Implemented changes from @lscheffler's fork

This commit is contained in:
Doug Hennig
2023-09-04 10:14:46 -05:00
parent c5c7aa294f
commit 803ba987a2
7 changed files with 2398 additions and 794 deletions

View File

@@ -30,11 +30,12 @@ As far as possible these are the original documents. Changes are added where fun
- [Multi-config](#multi-config)
- [File Capitalization](#file-capitalization)
- [Conversion processes Logging](#conversion-processes-logging)
- [Storing paths for pjx](#storing-paths-for pjx)
- [Storing paths for pjx](#storing-paths-for-pjx)
- [Create Class-Per-File](#create-class-per-file)
- [Complementary options for the UseClassPerFile setting](#complementary-options-for-the-useclassperfile-setting)
- [RedirectClassPerFileToMain](#redirectclassperfiletomain)
- [ClassPerFileCheck](#classperfilecheck)
- [Create File-Per-Form](create_file_per_form)
- [Create File-Per-DBC](#create-file-per-dbc)
- [Complementary options for the UseFilesPerDBC setting](#complementary-options-for-the-usefilesperdbc-setting)
- [RedirectFilePerDBCToMain](#redirectfileperdbctomain)
@@ -110,10 +111,12 @@ These are the FoxBin2Prg.cfg configuration file settings and their meaning:
| ShowProgressbar | 0, _1_, 2 | 0=Don't show progressbar,<br/>1=Always show a progress bar,<br/>2=Only show it when processing multiple-files |
| DontShowErrors | _0_, 1 | 0=show message errors in a modal messagebox. (default)<br/>1=don't show errors |
| ExtraBackupLevels | 0, _1_, n | <br/>0=No backup<br/>1=One backupfile _\_filename\_.BAK_ (default)<br/>n=n levels of backup in style _\_filename\_.n.BAK_ |
| Debug | _0_, 1, 2 | 0=Off<br/>1=Normal<br/>2=Extended<br/>By default, don't generate individual <file>.Log with process hints.<br/>Activate with "1" to find possible error causes and for debugging,<br/>"2" is special logging |
| BackgroundImage | <cFile> | Backgroundimage for process form |
| Debug | _0_, 1, 2 | 0=Off<br/>1=Normal<br/>2=Extended<br/>By default, don't generate individual \<file\>.Log with process hints.<br/>Activate with "1" to find possible error causes and for debugging,<br/>"2" is special logging.<br/>**If cDebug is set via parameter, this is ignored.** |
| BackgroundImage | \<cFile\> | Backgroundimage for process form |
| HomeDir | 0, _1_ | 0=don't save HomeDir in PJ2,<br/>1=save HomeDir in PJ2.<br/>Setting this to 0 prevents the PJ2 file from changing just because two developers have the project in different folders |
|||
| InhibitInheritance | _0_, 1, 2, 3 | **This settings is for config file via parameter only** <br/>Settings for config file via parameter only0=Allow scanning "regular" config files (file via parameter is just additional default)<br/>1=Only read tree from root of the file given by parameter, not FoxBin2Prg default<br/>2=Only read folder and subfolder of the file given by parameter<br/>3=Read no other file<br/>This is like<br/>0 Default \| Parameter file \| Default near FoxBin2Prg \| all other config files<br/>1 Default \| Parameter file \| Inheritance from root to parent of folder \| folder and subdirs<br/>2 Default \| Parameter file \| folder and subdirs<br/>3 Default \| Parameter file |
|||
| XXX_Conversion_Support | n | Defines the conversion operation per filetype |
| | | For code:<br/> 0=No support,<br/>1=Generate _Text_ (Diff),<br/>2=Generate _Text_ and _Bin_ (Merge) |
| | | For complex data:<br/> (PJX / DBC / DBF): 0=No support,<br/>1=Generate Header _Text_ only (Diff),<br/>2=Generate Header _Text_ and _Bin_ (Merge/Only Structure!),<br/>4=Generate _Text_ with DATA (Diff),<br/>8=Export and Import DATA (Merge/Structure & Data) |
@@ -131,14 +134,24 @@ These are the FoxBin2Prg.cfg configuration file settings and their meaning:
| CheckFileInPath | _0_, 1, 2, 3 |Determines how 2Txt deals with files not in the subfolders of the PJX. No handler for UNC paths.<br />0 = Ignore. Default<br />1 = Check and error out if file is not on same structure (for source control)<br />2 = Create absolute path if file is on different drive.<br />3 = Create absolute path if file is not in structure<br />See [Storing paths for pjx](#storing-paths-for-pjx) |
|||
| UseClassPerFile | _0_, 1, 2 | 0=One library _Text_ file,<br/>1=Multiple file.class.vc2 files,<br/>2=Multiple file.baseclass.class.vc2 files<br/>See [Create Class-Per-File](#create-class-per-file) |
| [RedirectClassPerFileToMain:](#redirectclassperfiletomain:) | _0_, 1 | 0=Don't redirect to file.vc2,<br/>1=Redirect to file.vc2 when selecting file.class.vc2<br/>RedirectClassType: 1 precedes this setting |
| [RedirectClassPerFileToMain:](#redirectclassperfiletomain:) | _0_, 1 | 0=Don't redirect to file.vcx,<br/>1=Redirect to file.vcx when selecting file.class.vc2<br/>RedirectClassType: 1 precedes this setting |
| RedirectClassType | _0_, 1, 2 | For classes created with UseClassPerFile>0 in the form file[.baseclass].class.tx2 (vcx only) |
| | | 0=creates / refresh class in file.VCX and add / replace all other classes of this library |
| | | 1=creates / refresh class file[.baseclass].class.VCX and do not touch file.VCX |
| | | 2=creates / refresh class in file.VCX and do not touch other classes of file.VCX |
| [ClassPerFileCheck](#classperfilecheck) | _0_, 1 | 0=Don't check file.class.vc2 inclusion,<br/>1=Check file.class.vc2 inclusion<br/>Only used if import file is in file[.baseclass].class.tx2 syntax.<br/>Ignored for RedirectClassType: 2 |
|||
| OldFilesPerDBC | _0_, 1 | 0=Old Style,<br/>1=New style<br/>This controls the use of the _UseFilesPerDBC_, _RedirectFilePerDBCToMain_ and _ItemPerDBCCheck_ options.<br/>Only if this option is set, the options will be read. |
| [UseFormSettings](create_file_per_form)
| _0_, 1 | 0=Old Style, like the class settings<br/>1=Form style, special for form<br/>This controls the use of the _UseFormPerFile_, _RedirectFormPerFileToMain_, _RedirectFormType_ and _FormPerFileCheck_ options.<br/>Only if this option is set, the options will be read. |
| UseFormPerFile | _0_, 1, 2 | 0=One library _Text_ file,<br/>1=Multiple Form.Object.sc2 files,<br/>2=Multiple Form.baseclass.Object.sc2 files<br/>See [Create Class-Per-File](#create-class-per-file) |
| [RedirectFormPerFileToMain:](#redirectclassperfiletomain:) | _0_, 1 | 0=Don't redirect to Form.scx,<br/>1=Redirect to Form.scx when selecting Form.Object.sc2<br/>RedirectClassType: 1 precedes this setting |
| RedirectFormType | _0_, 1, 2 | For classes created with UseClassPerFile>0 in the form Form[.baseclass].Object.sx2 (scx only) |
| | | 0=creates / refresh class in Form.SCX and add / replace all other classes of this library |
| | | 1=creates / refresh class Form[.baseclass].Object.SCX and do not touch Form.SCX |
| | | 2=creates / refresh class in Form.SCX and do not touch other classes of Form.SCX |
| [FormPerFileCheck](#classperfilecheck) | _0_, 1 | 0=Don't check Form.Object.sc2 inclusion,<br/>1=Check Form.Object.sc2 inclusion<br/>Only used if import file is in Form[.baseclass].Object.sc2 syntax.<br/>Ignored for RedirectClassType: 2 |
|||
| OldFilesPerDBC | _0_, 1 | 0=Old Style,<br/>1=New style<br/>This controls the use of the _UseFilesPerDBC_, _RedirectFilePerDBCToMain_ and _ItemPerDBCCheck_ options.<br/>Only if this option is set, the **Form** options below will be read. |
| | | 0=New version inactive, options follow:<br/>UseFilesPerDBC=UseClassPerFile<br/>RedirectFilePerDBCToMain=RedirectClassPerFileToMain<br/>ItemPerDBCCheck=ClassPerFileCheck |
| | | 1=New version active, options active |
| | | Note: The options will be set to old style, if option is turned off. |
@@ -256,7 +269,7 @@ Views and Relations. All this to minimize the differences when diffing DBCs that
</FIELD_ORDER>
````
### PAM Section
This section is generated for classes and forms, it is delimited with the <DefinedPropArrayMethod> tag,
This section is generated for classes and forms, it is delimited with the \<DefinedPropArrayMethod\> tag,
and have the definition of Properties, Arrays and Methods, with their comments, like this example:
````
DEFINE CLASS c1 AS custom OLEPUBLIC && Description of "c1" class
@@ -344,7 +357,7 @@ Example of multiple file masks (separte with ","):
````
### Configuration per table
New <filename.dbf.cfg> configuration options. See [Configuration file per table](#configuration-file-per-table).
New \<filename.dbf.cfg> configuration options. See [Configuration file per table](#configuration-file-per-table).
These options can be used in any combination inside a dbf particular cfg file,
if you create a text file using your dbf filename and adding ".cfg".
@@ -432,10 +445,17 @@ This inheritance saves a lot of time and minimizes the CFGs needed \:\)
##### Note
Options will be read outside in, top to down.
If an option is defined multiple times, even in the same file, last occurance wins.
This exception is the group controlling the new style to split DBC files.
The options _UseFilesPerDBC_, _RedirectFilePerDBCToMain_ and _ItemPerDBCCheck_ will be ignored,
The exception are the group controlling the new style to split DBC files and the one for forms.
The options _UseFilesPerDBC_, _RedirectFilePerDBCToMain_ and _ItemPerDBCCheck_ will be ignored for DBC,
if _OldFilesPerDBC_ is set to 0.
If _OldFilesPerDBC_ is set to 0 after it was active, the values of the three options are rejected at all.
Setting _OldFilesPerDBC_ to 1 will inhertit the values from the \*class\* options.
If _OldFilesPerDBC_ is set to 0 after it was active, the values of the three options are rejected at all and reset to the corresponding \*class\* values.
For Forms, options _UseFormPerFile_, _RedirectFormPerFileToMain_, _RedirectFormType_ and _FormPerFileCheck_ will be ignored,
if _UseFormSettings_ is set to 0.
Setting _UseFormSettings_ to 1 will inhertit the values from the \*class\* options.
If _UseFormSettings_ is set to 0 after it was active, the values of the four options are rejected at all and reset to the corresponding \*class\* values.
### File Capitalization
FoxBin2Prg takes care of file capitalization (their extension, specifically),
@@ -522,9 +542,20 @@ If you don't use the redirect setting, an individual vcx/scx file will be genera
This can be useful if you want to divide a big library in smaller pieces.
#### Note
This is true for SCX files as well. SCX files may contain a form and a dataenvironment.
It will create sc2 files.
By default, these settings are valid for SCX and DBC files as well. SCX files may expand to header, form and dataenvironment, and a DBC may be split into header and several files of the objects contained.
If you like finer and independend control over forms and databases, check
- [Create File-Per-Form](create_file_per_form) and
- [Create File-Per-DBC](#create-file-per-dbc)
### Create File-Per-Form
Starting at 1.20.05 you can configure FoxBin2Prg to generate Form (sc2) files independent of classlibrary.
The major idea is, that the class settings to split a vcx into multiple files result into splitting a form(SCX into a form header, a from and a dataenvironment file, what might be overkill. (splitting classes is great, so one does not need to merge the whole lib, but a form is a form.)
To configure this, you must first enable it in foxbin2prg.cfg file:
````
UseFormSettings: 1
````
The settings of the four options are similar to the one of the [class options](#create-class-per-file), except they are named \*Form\* instead of \*Class\*.
### Create File-Per-DBC
Starting at 1.19.55 you can configure FoxBin2Prg to generate one _Text_ file per dbc item using naming style "DatabaseName.item.name.dc2"
with the value "1"
@@ -555,7 +586,7 @@ annotated on DataBaseName.dc2 main file, otherwise no checking is made and when
#### Note
If you don't use the Redirect setting, an individual dbc file will be generated.
There is no real use of this.
### FoxBin2Prg API
With v1.19.42 version started an enhanced API support, making public methods that where only for internal use up to now.
When using FoxBin2Prg as an object, you can access low level functionalities not available when using as external program,
@@ -740,8 +771,4 @@ For options on integrating FoxBin2Prg with SCM tools, look at this topic:
See [FoxBin2Prg and use with git](./FoxBin2Prg_git.md)
----
![VFPX logo](https://vfpx.github.io/images/vfpxbanner_small.gif)
This project is part of [VFPX](https://vfpx.github.io/).
----
Last changed: _2023/03/20_ ![Picture](./pictures/vfpxpoweredby_alternative.gif)
Last changed: _2023/09/03_