Commited changes

This commit is contained in:
Doug Hennig
2021-03-10 13:47:55 -06:00
parent 0dec7cd665
commit c2e86b9e8e
18 changed files with 599 additions and 1021 deletions

View File

@@ -32,8 +32,13 @@ _**Note:** you can click on the version number for downloading this version from
| Rel.Date | Developer | Version | Details |
| - | - | - | - |
| 2021/03/04 | Doug Hennig | [v1.19.58]() | Added support for writing to a different folder than the source code using a new tcOutputFolder parameter |
| | | | Added a configuration item: HomeDir, which determines if HomeDir is saved in PJ2 files (the default is 1 for Yes) |
| 2021/03/09 | LScheffler | [v1.19.59]() | **Feature**: Logging of settings as settings object passed to execute method (Option debug > 0) |
| 2021/03/09 | LScheffler | [v1.19.59]() | **Feature**: Added option to create config file template based on current values of a directory |
| 2021/03/09 | LScheffler | [v1.19.59]() | **Bug Fix**: RedirectClassType = 2, Path was set wrong in special config |
| 2021/03/09 | LScheffler | [v1.19.59]() | **Bug Fix**: RedirectClassType = 2, UseClassPerFile = 2 failed |
| 2021/03/09 | LScheffler | [v1.19.59]() | **Doc**: Improved, Better description of ClassPerFileCheck, tcOutputFolder. |
| 2021/03/04 | Doug Hennig | [v1.19.58]() | **Feature**: Added support for writing to a different folder than the source code using a new tcOutputFolder parameter |
| | | | **Feature**: Added a configuration option: HomeDir, which determines if HomeDir is saved in PJ2 files (the default is 1 for Yes) |
| 2021/03/05 | LScheffler | [v1.19.57]() | **Bug Fix**: RedirectClassType = 2 mixed up PATH |
| | | | **Doc**: Improved |
| 2021/03/04 | LScheffler | [v1.19.56]() | **Feature**: New value 2 for option RedirectClassType = 2, just process the single class for input in form file[.baseclass].class.vc2 |
@@ -374,4 +379,4 @@ _**Note:** you can click on the version number for downloading this version from
This project is part of [VFPX](https://vfpx.github.io/).
----
Last changed: _2021/03/05_ ![Picture](./pictures/vfpxpoweredby_alternative.gif)
Last changed: _2021/03/09_ ![Picture](./pictures/vfpxpoweredby_alternative.gif)

View File

@@ -67,7 +67,14 @@ and this require that generated text files can be manipulated manually or automa
No problem, just convert the .pjm to .pjx/.pjt sending to FoxBin2Prg, and it generates the real project again.
## Configuration file
It is possible to create a template with all options and comments via `FoxBin2Prg.EXE -c cOutputFile`. See [command line](./FoxBin2Prg_Run.md).
It is possible to create a template or a config with all options and comments via
```
DO FOXBIN2PRG.PRG WITH "-c","template.cfg" ==> Generates a template for FoxBin2Prg.cfg config file with newest settings
DO FOXBIN2PRG.PRG WITH "-C","config.cfg" ==> Generates a config file like FoxBin2Prg.cfg with recent settings of path of second parameter
```
See [command line](./FoxBin2Prg_Run.md#usage-2).
The config file is used to move local setting to a different comupter or for changes while branching.
The options in the template (or in the config that ships with FoxBin2Prg) are commented out.
To activate an option remove the asterix and set appropriate value.
These are the FoxBin2Prg.cfg configuration file settings and their meaning:
@@ -109,29 +116,33 @@ These are the FoxBin2Prg.cfg configuration file settings and their meaning:
| | | 1 creates a file.dc2 with DBC properties |
| | | and additional DBC files per DBC item (stored-proc, table, ..) |
| | | Note: recration only if RedirectFilePerDBCToMain is 1 |
| [RedirectFilePerDBCToMain](#redirectfileperdbctomain) | _0_, 1 | 0=Don't redirect to file.dc2,<br/>1=Redirect to file.tx2 when selecting file.item.*.dc2<br/>**Only if OldFilesPerDBC is 1** |
| [ItemPerDBCCheck](#itemperdbccheck) | _0_, 1 | 0=Don't check file.item.*.dc2 inclusion,<br/> 1=Check file.item.*.dc2 inclusion<br/>**Only if OldFilesPerDBC is 1**|
| DBF_BinChar_Base64 | 0, _1_ | 0=For character type fields, if NoCPTrans 0=do not transform, 1=use Base64 transform (default) <br/> **Note:** This can be [changed per table](#configuration-file-per-table). |
| DBF_IncludeDeleted | _0_, 1 | 0=Do not include deleted records (default),<br/>1=Include deleted records<br/>**Note:** This can be [changed per table](#configuration-file-per-table). |
| | | **Note:**<br/>This is only true for tables. Generating DBC to _Text_ and back to _Binary_ will act as PACK DATABASE.<br/>The data added by _DBF_IncludeDeleted: 1_ will be ignored by old versions generating _Binary_ files. |
| 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 |
| 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 |
| RedirectFilePerDBCToMain | _0_, 1 | 0=Don't redirect to file.dc2,<br/>1=Redirect to file.tx2 when selecting file.item.*.dc2<br/>**Only if OldFilesPerDBC is 1** |
| ItemPerDBCCheck | _0_, 1 | 0=Don't check file.item.*.dc2 inclusion,<br/> 1=Check file.item.*.dc2 inclusion<br/>**Only if OldFilesPerDBC is 1**|
| DBF_BinChar_Base64 | 0, _1_ | 0=For character type fields, if NoCPTrans 0=do not transform, 1=use Base64 transform (default) <br/> **Note:** This can be [changed per table](#configuration-file-per-table). |
| DBF_IncludeDeleted | _0_, 1 | 0=Do not include deleted records (default),<br/>1=Include deleted records<br/>**Note:** This can be [changed per table](#configuration-file-per-table). |
| | | **Note:**<br/>This is only true for tables. Generating DBC to _Text_ and back to _Binary_ will act as PACK DATABASE.<br/>The data added by _DBF_IncludeDeleted: 1_ will be ignored by old versions generating _Binary_ files. |
| UseClassPerFile | _0_, 1 | 0=One library _Text_ file, 1=Multiple file.class.vc2 files, 2=Multiple file.baseclass.class.vc2 files<br/> See [Create Class-Per-File](#create-class-per-file) |
| RedirectClassPerFileToMain | _0_, 1 | 0=Don't redirect to file.vc2, 1=Redirect to file.vc2 when selecting file.class.vc2 |
| ClassPerFileCheck | _0_, 1 | 0=Don't check file.class.vc2 inclusion, 1=Check file.class.vc2 inclusion |
| [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 |
| ClearDBFLastUpdate | 0, _1_ | 0=Keep DBF LastUpdate, 1=Clear DBF LastUpdate. Useful for Diff, minimizes differences. |
| Language | _(auto)_, EN, FR, ES, DE | Language of shown messages and LOGs. EN=English, FR=French, ES=Español, DE=German, Not defined = AUTOMATIC (using VERSION(3)) |
| HomeDir | 0, _1_ | 0 = don't save HomeDir in PJ2, 1 = save HomeDir in PJ2. Setting this to 0 prevents the PJ2 file from changing just because two developers have the project in different folders |
| Language | _(auto)_, EN, FR, ES, DE | Language of templates, shown messages and LOGs. EN=English, FR=French, ES=Español, DE=German, Not defined = AUTOMATIC (using VERSION(3)) ||
| 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 |
### Note
The options will be read outside in, top to down. See [Multi-config](#multi-config)
## Configuration file per table
Those configuration files are valid for a single table only. The idea is to have special settings for single tables.
It is possible to create a template with all options and comments via `FoxBin2Prg.EXE -t cOutputFile`.
See [command line](./FoxBin2Prg_Run.md#usage-1).
It is possible to create a template with all options and comments via
```
DO FOXBIN2PRG.PRG WITH "-t","template.dbf.cfg" ==> Generates a template for table.dbf.cfg per table config file with newest settings
```
See [command line](./FoxBin2Prg_Run.md#usage-2).
The options in the template (or in the config that ships with FoxBin2Prg) are commented out.
To activate an option remove the asterix and set appropriate value.
These are the Table.dbf.cfg configuration file settings and their meaning:
@@ -410,6 +421,8 @@ In example, if you have a classlib "mylib.vcx" with 3 classes inside ( "cl_1, cl
- mylib.cl_1.vc2
- mylib.cl_2.vc2
- mylib.cl_3.vc2
#### Important note
The settings of UseClassPerFile and related options are sensible. If changed the wrong way it easy to destroy classlibs.
#### Recommended new setting
Starting at v1.19.42 you can configure foxbin2prg to generate one class per file.
@@ -430,13 +443,17 @@ mylib.textbox.cl_3.vc2
#### Complementary options for the UseClassPerFile setting
##### RedirectClassPerFileToMain:
Configuring this setting to 1 will redirect any selection of file.class.vc2
Configuring this setting to 1 will redirect any selection of file[.baseclass].class.vc2
to the main file.vc2 file, which will not let you generate individual vcx files by mistake.
RedirectClassType: 1 precedes this setting for files in the
##### ClassPerFileCheck
Configuring this setting to 1 will check the inclusion of all file.class.vc2 files
Configuring this setting to 1 will check the inclusion of all file[.baseclass].class.vc2 files
annotated on file.vc2 main file, otherwise no checking is made and when reconstructing the vcx/scx all files
containing the file.class.ext naming will be included in the _Binary_ (useful when you want to add external classes to the library)
containing the file.class.ext naming will be included in the _Binary_ (useful when you want to add external classes to the library).
This only used if import file is in file[.baseclass].class.tx2 syntax.
Ignored for RedirectClassType: 2
#### Note
If you dont use the redirect setting, an individual vcx/scx file will be generated.

View File

@@ -74,6 +74,15 @@ Some settings will overwrite configuration. Using an object as cCFG_File will ov
| cCFG_File | filename | Indicates a CFG filename for not using the default on foxbin2prg directory or path. |
| | object | An object containing configuration options to use. See [Internals](./FoxBin2Prg_Internals.md) for object creation. |
#### cOutputFolder
The procedural call of FoxBin2Prg like
`FoxBin2Prg.EXE cInputFile ...` exposes a parameter _cOutputFolder_.
This parameter is not available in this call. To set _cOutputFolder_:
````
obj.cOutputFolder = cOutputFolder
obj.execute(...)
````
#### Note
The _BIN2PRG, PRG2BIN, INTERACTIVE, SHOWMSG_ cTypes might be mixed freely like:
`PRG2BIN-INTERACTIVE`
@@ -92,4 +101,4 @@ Return value is 0=OK, 1=Error.
This project is part of [VFPX](https://vfpx.github.io/).
----
Last changed: _2021/03/03_ ![Picture](./pictures/vfpxpoweredby_alternative.gif)
Last changed: _2021/03/09_ ![Picture](./pictures/vfpxpoweredby_alternative.gif)

View File

@@ -69,16 +69,7 @@ just select and process each one independently, in parallel if you like, but in
## Usage
### Usage 1
`FoxBin2Prg.EXE [-c cOutputFile] [-t cOutputFile]`
| Parameter | Description |
| ----- | ----- |
| none | Call Info screen |
| -c | creates a template config-file _cOutputFile_ ( like FOXBIN2PRG.CFG ) |
| -t | creates a template table-config-file _cOutputFile_ ( like _TableName_.dbf.cfg ) |
### Usage 2
`FoxBin2Prg.EXE cInputFile [,cType [,cTextName [,lGenText [,cDontShowErrors [,cDebug [,cDontShowProgress [,cOriginalFileName [,cRecompile [,cNoTimestamps [,cCFG_File] ] ] ] ] ] ] ] ] ] ]`
`FoxBin2Prg.EXE cInputFile [,cType [,cTextName [,lGenText [,cDontShowErrors [,cDebug [,cDontShowProgress [,cOriginalFileName [,cRecompile [,cNoTimestamps [,cCFG_File [,cOutputFolder ] ] ] ] ] ] ] ] ] ] ] ]`
| Parameter | Value (_Default_) | Description |
| ----- | ----- | ----- |
@@ -102,6 +93,7 @@ just select and process each one independently, in parallel if you like, but in
| | path | The _Binary_ is compiled from this path |
| cNoTimestamps | 0, _1_ | Indicates if timestamp must be cleared ('1' or empty) or not ('0') |
| cCFG_File | filename | Indicates a CFG filename for not using the default on foxbin2prg directory or path. |
| cOutputFolder | folder | Optional. A folder to write the output to. If not used, output be the source path. |
#### Note #1
The _BIN2PRG, PRG2BIN, INTERACTIVE, SHOWMSG_ cTypes might be mixed freely like:
@@ -114,6 +106,16 @@ This is useful when used as EXE dealing with Windows shortcuts,
on which fixed parameters must be in the shortcut.
The filename is an external variable parameter received when SendingTo FoxBin2Prg with right-click on File Manager.
### Usage 2
`FoxBin2Prg.EXE [-c cOutputFile] [-C cOutputFile] [-t cOutputFile]`
| Parameter | Description |
| ----- | ----- |
| none | Call Info screen |
| -c | creates a template config-file _cOutputFile_ ( like FOXBIN2PRG.CFG ) |
| -C | creates a config-file _cOutputFile_ ( like FOXBIN2PRG.CFG ) with the recent options used on the path of cOutputFile |
| -t | creates a template table-config-file _cOutputFile_ ( like _TableName_.dbf.cfg ) |
## Return values
Return value via _ErrorLevel_ is 0=OK, 1=Error.
@@ -161,4 +163,4 @@ FoxBin2Prg.lnk <path>\foxbin2prg.exe "INTERACTIVE-SHOWMSG"
This project is part of [VFPX](https://vfpx.github.io/).
----
Last changed: _2021/03/04_ ![Picture](./pictures/vfpxpoweredby_alternative.gif)
Last changed: _2021/03/09_ ![Picture](./pictures/vfpxpoweredby_alternative.gif)