Merge pull request #124 from lscheffler/fork_mod

Added some changes to the documentation due to some issues.

- https://github.com/fdbozzo/foxbin2prg/issues/117#issuecomment-4757649261
- #123
This commit is contained in:
Lutz Scheffler
2026-06-20 15:08:32 +02:00
committed by GitHub
4 changed files with 71 additions and 42 deletions

View File

@@ -89,9 +89,9 @@ FoxBin2Prg can be used in tree ways:
1. [EXE version](./FoxBin2Prg_Run.md): (Recommended and fastest)
- All-inclusive, you just need foxbin2prg.exe and filename_caps.exe/cfg.
- Runs from windows
- If run from IDE, the EXE needs to be compiled for the version of FoxPro.
- **If run from IDE, the EXE needs to be compiled for the version of FoxPro.**
1. [PRG version](./FoxBin2Prg_Run.md):
- You need various files: foxbin2prg.prg, all the props*.txt files and filename_caps.exe/cfg.
- You need various files: foxbin2prg.prg, all the props*.txt files and filename_caps.exe/cfg. Keep in one folder.
- Runs out of VFP IDE, no problems mixing VFP 9 and VFPA
1. [Object version](./FoxBin2Prg_Object.md):
- Usable out of own code
@@ -108,4 +108,4 @@ FoxBin2Prg can be used in tree ways:
This project is part of [VFPX](https://vfpx.github.io/).
----
Last changed: _2023/12/05_ ![Picture](./pictures/vfpxpoweredby_alternative.gif)
Last changed: _2026/06/20_ ![Picture](./pictures/vfpxpoweredby_alternative.gif)

View File

@@ -92,6 +92,8 @@ All limitations that occur to a binary format must be kept on the text represent
the definition of a HEADER class to a VCX will fail.
## Configuration file
The configuration how to run FoxBin2Prg is stored in configuration files, FoxBin2Prg.cfg for general settings, and [Configuration file per table](#configuration-file-per-table).
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
@@ -102,15 +104,19 @@ The config file is used to move local setting to a different comupter or for cha
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.
There is a [Multi-config](#multi-config), that allows to have global settings with specific local settings.
If a setting does not follow inheritance, it is mentioned in the table below.
These are the FoxBin2Prg.cfg configuration file settings and their meaning.
The second line in the keyword column is the name of the respective property (if there is one)
in the settings object returned by get_DirSettings method of the API object. See [PEM](#pem).
| FoxBin2Prg.cfg keywords<br/>Property of settings object | Value (_Default_) | Description |
| ----- | ----- | ----- |
| 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)) ||
| Language | _(auto)_,<br/>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)) ||
| DontShowProgress<br/>n_ShowProgressbar | 0 | **Deprecated**. Replaced by ShowProgressbar option from v1.19.40, see below.<br/>The values of 0 and 1 are inverted to ShowProgressbar. |
| ShowProgressbar<br/>n_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.<br/>**If set via parameter _cDontShowProgress_, this is ignored.** |
| ShowProgressbar<br/>n_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.<br/>**If set via parameter _cDontShowProgress_, this is ignored.<br/>_cDontShowProgress_ has value "0","1" inverted to the property.** |
| DontShowErrors<br/>n/a | _0_, 1 | 0=show message errors in a modal messagebox. (default)<br/>1=don't show errors<br/>**If set via parameter _cDontShowError_, this is ignored.**<br/>**There is no inheritance for this setting. First occurance wins.** |
| ExtraBackupLevels<br/>n/a | 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_<br/>**There is no inheritance for this setting. First occurance wins.** |
| Debug<br/>n_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 set via parameter _cDebug_, this is ignored.** |
@@ -181,16 +187,16 @@ in the settings object returned by get_DirSettings method of the API object. See
| | | **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. |
|||
| extension: xx2 | | FoxBin2Prg extensions ends in '2' (pj2, vc2, sc2, etc), but you can change that. |
| extension: pj2=<br/>c_pj2 | \<extension\> | Text file for project PJX |
| extension: vc2=<br/>c_vc2 | \<extension\> | Text file for classlibray VCX, or a class out of a VCX |
| extension: sc2=<br/>c_sc2 | \<extension\> | Text file for form SCX, or a class out of a SCX (Form; Dataenbironment) |
| extension: fr2=<br/>c_fr2 | \<extension\> | Text file for report FRX |
| extension: lb2=<br/>c_lb2 | \<extension\> | Text file for label LBX |
| extension: mn2=<br/>c_mn2 | \<extension\> | Text file for menu MNX |
| extension: db2=<br/>c_db2 | \<extension\> | Text file for table DBF, free or DBC bound |
| extension: dc2=<br/>c_dc2 | \<extension\> | Text file for database container DBC, or records from database container DBC |
| extension: fk2=<br/>c_fk2 | \<extension\> | Text file for macro file FKY |
| extension: me2=<br/>c_me2 | \<extension\> | Text file for variable memory MEM, created with SAVE TO |
| extension: pj2=<br/>c_pj2 | \<extension\> | Extension for text file representing project PJX |
| extension: vc2=<br/>c_vc2 | \<extension\> | Extension for text file representing classlibray VCX, or a class out of a VCX |
| extension: sc2=<br/>c_sc2 | \<extension\> | Extension for text file representing form SCX, or a class out of a SCX (Form; Dataenbironment) |
| extension: fr2=<br/>c_fr2 | \<extension\> | Extension for text file representing report FRX |
| extension: lb2=<br/>c_lb2 | \<extension\> | Extension for text file representing label LBX |
| extension: mn2=<br/>c_mn2 | \<extension\> | Extension for text file representing menu MNX |
| extension: db2=<br/>c_db2 | \<extension\> | Extension for text file representing table DBF, free or DBC bound |
| extension: dc2=<br/>c_dc2 | \<extension\> | Extension for text file representing database container DBC, or records from database container DBC |
| extension: fk2=<br/>c_fk2 | \<extension\> | Extension for text file representing macro file FKY |
| extension: me2=<br/>c_me2 | \<extension\> | Extension for text file representing variable memory MEM, created with SAVE TO |
| | | **Example for for making it SourceSafe (sccapi v1) compatible:**<br/>extension: pj2=pja<br/>extension: vc2=vca<br/>extension: sc2=sca<br/>extension: fr2=fra<br/>extension: lb2=lba<br/>extension: mn2=mna<br/>extension: db2=dba<br/>extension: dc2=dca |
### Note
@@ -198,9 +204,10 @@ The options will be read outside in, top to down. See [Multi-config](#multi-conf
## 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
```
DO FOXBIN2PRG.PRG WITH "-t","template.dbf.cfg" &&==> Generates a template for table.dbf.cfg per table config file with newest settings
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).
@@ -211,13 +218,13 @@ These are the Table.dbf.cfg configuration file settings and their meaning:
| FoxBin2Prg.cfg keywords | Value | per<br/>file | Description |
| ----- | ----- | ----- | ----- |
| DBF_Conversion_Support | 0, 1, 2, 4, 8 | | 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) |
| DBF_Conversion_Order | c_Expression | x | Field expresion (For _INDEX ON_). ie: name+str(age,3),<br/>Empty means no sort order. <br/> usefull only if _DBF_Conversion_Support_>0 |
| DBF_Conversion_Condition | c_Expression | x | Logical expression (For _SCAN FOR_). ie: age > 10 AND NOT DELETED(),<br/>empty means all records, except _DBF_IncludeDeleted_ <br/> usefull only if _DBF_Conversion_Support_>0 |
| DBF_IndexList | c_FileList | x | A comma delimited list of additional index files ( cdx or idx ). **Not the structural index file.** |
| DBF_BinChar_Base64 | 0, 1 | | 0=For character type fields, if NoCPTrans 0=do not transform,<br/>1=use Base64 transform <br/> usefull only if _DBF_Conversion_Support_>2 |
| DBF_IncludeDeleted | 0, 1 | | 0=Do not include deleted records,<br/>1=Include deleted records <br/> usefull only if _DBF_Conversion_Support_>2 |
| DBF_Conversion_Order | c_Expression | x | Field expresion (For _INDEX ON_). ie: name+str(age,3),<br/>Empty means no sort order. <br/> usefull only if *DBF_Conversion_Support* >0 |
| DBF_Conversion_Condition | c_Expression | x | Logical expression (For _SCAN FOR_). ie: age > 10 AND NOT DELETED(),<br/>empty means all records, except *DBF_IncludeDeleted* <br/> usefull only if *DBF_Conversion_Support* >0 |
| DBF_IndexList | c_FileList | x | A comma delimited list of additional index files ( cdx or idx ). __Not the structural index file.__ |
| DBF_BinChar_Base64 | 0, 1 | | 0=For character type fields, if NoCPTrans 0=do not transform,<br/>1=use Base64 transform <br/> usefull only if *DBF_Conversion_Support* > 2 |
| DBF_IncludeDeleted | 0, 1 | | 0=Do not include deleted records,<br/>1=Include deleted records <br/> usefull only if *DBF_Conversion_Support* > 2 |
Setting **per file** could only be used via this configuration file.
Setting *per file** could only be used via this configuration file.
For defaults, see [Configuration file](#configuration-file).
## Excluding directories
@@ -282,7 +289,7 @@ This section is generated for classes and forms, it is delimited with the \<Defi
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
*<DefinedPropArrayMethod>
* <DefinedPropArrayMethod>
*m: emptymethod_with_comments && This method have no code, just comments!
*m: mymethod && My Method
*p: prop1 && My prop 1
@@ -291,7 +298,7 @@ DEFINE CLASS c1 AS custom OLEPUBLIC && Description of "c1" class
*a: array_1_d[1,0](1,0) && 1 dimension array (1)
*a: array_2_d[1,2](1,2) && 2 dimension array (1,2)
*p: _memberdata && XML Metadata for customizable properties
*</DefinedPropArrayMethod>
* </DefinedPropArrayMethod>
````
Starting from v1.19.21 arrays don't need to be preceded with "^" symbol, and methods don't need to be preceded with "*" symbol,
which makes this section more easy to maintain.
@@ -318,9 +325,9 @@ and a list with all in it ("props_all.txt") for the second case, so in case of a
rearranging some props will be an easy thing.
#### Warning
These "props_**" files are necessary in the FoxBin2Prg install directory.
These "props_*" files are necessary in the FoxBin2Prg install directory.
It's recommended to use the EXE version that have all files included and is faster._
It's recommended to use the EXE version that have all files included and is faster. **Note, the EXE must fit your version of VFP**.
Several Unit Tests (in TESTS directory) are made to make the best effort to cover the most typical use cases.
There is also an Excel spreedsheet with the compilation of properties of each class with the order that FoxPro uses internally,
and a tab with the all-in-one order for the worst case.
@@ -785,4 +792,4 @@ Last changed: _2023/09/06_
This project is part of [VFPX](https://vfpx.github.io/).
----
Last changed: _2026/06/18_ ![Picture](./pictures/vfpxpoweredby_alternative.gif)
Last changed: _2026/06/20_ ![Picture](./pictures/vfpxpoweredby_alternative.gif)

View File

@@ -36,7 +36,7 @@ The exe contains the most controling structures and the program itself.
Alongside the _FoxBin2Prg.exe_ must be _\_FileName\_Caps.exe_ .
It is recomended to have a general _FoxBin2Prg.cfg_ configuration file in the folder with the EXE, but it will run without.
Remember, the Exe needs to be created first.
Remember, the exe(s) needs to be created first, and they must be compiled with the version of VFP you use, for example VFPA.
### PRG
The prg is just the program and needs to find the controling structures. In particular:
@@ -109,16 +109,17 @@ The filename is an external variable parameter received when SendingTo FoxBin2Pr
### Usage 2
`FoxBin2Prg.EXE c|C|t [OutFileName [ cCFG_File[ cDebug]]]`
`DO FoxBin2Prg.EXE WITH -c|-C|-t [, OutFileName [, cCFG_File[, cDebug]]]`
`DO FoxBin2Prg.EXE WITH -c|-C|-t [, cOutputFile [, cCFG_File[, cDebug]]]`
| Parameter | Description |
| ----- | ----- |
| none | Call Info screen |
| -c (c) | creates a template config-file _cOutputFile_ ( like FOXBIN2PRG.CFG ) |
| -C (C) | creates a config-file _cOutputFile_ ( like FOXBIN2PRG.CFG ) with the recent options used on the path of cOutputFile |
| | If cOutputFile is empty, a file FOXBIN2PRG.\_CFG will be created in default foder. |
| | If _cOutputFile_ is empty, a file FOXBIN2PRG.\_CFG will be created in default foder. |
| -t (t) | creates a template table-config-file _cOutputFile_ ( like \_TableName\_.dbf.cfg ) |
| cCFG_File | Indicates a special CFG filename for default values<br/>Note, if the "regular" config files are used orn not, is controlled by the setting *AllowInheritance* in *this** file. |
| cOutputFile | config file to create<br/>**Note: if empty it creates *and overwrite* FOXBIN2PRG.CFG or the table config file in default folder.** |
| cCFG_File | Indicates a special *input* CFG filename for default values<br/> **Note, if the "regular" config files are used or not, is controlled by the setting *AllowInheritance* in *this* file.** |
| cDebug | '1' for generating process LOGs, stop on errors<br/>This has precedence over any value in the config files. |
### Usage 3
@@ -132,7 +133,7 @@ The filename is an external variable parameter received when SendingTo FoxBin2Pr
#### Note
From command line the call with paramters like -c, -C -t is not possible. Those parameters will be removed by VFP itself.
From MS Windows command line the call with paramters like -c, -C -t is not possible. Those parameters will be removed by VFP itself.
Just call without the dash.
Calling inside VFP with `DO FoxBin2Prg.EXE` works with this dashed parameters.
@@ -183,4 +184,4 @@ FoxBin2Prg.lnk <path>\foxbin2prg.exe "INTERACTIVE-SHOWMSG"
This project is part of [VFPX](https://vfpx.github.io/).
----
Last changed: _2023/11/26_ ![Picture](./pictures/vfpxpoweredby_alternative.gif)
Last changed: _2026/06/20_ ![Picture](./pictures/vfpxpoweredby_alternative.gif)

View File

@@ -15,6 +15,7 @@ See [Use with SCM tools](./FoxBin2Prg_SCM.md)
- [settings per project](#settings-per-project)
- [gitignore](#gitignore)
- [gitattributes](#gitattributes)
- [Fixing line endings](#fixing-line-endings)
- [config](#foxbin2prg-config)
## Introduction
@@ -137,9 +138,10 @@ Those settings are mainly per user (in _git_ terms **global**)
Assuming you do a fresh install of git, you will be asked questions over questions. The most you left unchanged.
The one I recommend is the dealing with line endings. You know all the odd uses of LF and CR.
_git_ offers to alter this while dealing with your files. I recommend not.
Just "Check in as is, check out as is" while installing _git for windows_.
Just _Check in as is, check out as is_ while installing _git for windows_.
This will keep your files, and any modern editor or WEB UI will not care anyway.
If you missed on install - just install again.
**If you have an issue with CRLF/LF so that you will get odd commits due to changing line endings, see [Fixing line endings](#fixing-line-endings).**
Do not forget to set up username, email and a ssh key. The following script sets up git and creates the key.
It will copy the public key to _clipboard_ too - ready to paste into github. Anyway, you allways can copy the contents of `~/.ssh/id_rsa.pub`.
@@ -186,11 +188,11 @@ For some odd reasons, the people on git-scm are going the way of evil. If you st
If you not check _Run as Adminstrator_, it will install into your user folder. Even if installed in Programs folder earlier!
### Settings per project
Those settings are mainly per project (in _git_ terms **local**). One can argue to put the one or other in different levels.
Those settings are mainly per project (repository) (in _git_ terms **local**). One can argue to put the one or other in different levels.
I recommend those inside the project to keep the repository as self contained as possible.
#### gitignore
The _.gitignore_ file controls which files **go not** into the git repository by default. It goes by folder with inheritance.
If you understand the inheritance of .gitignore, you grok [FoXBin2Prg.cfg](#foxbin2prg-config) and vice versa. Very close.
If you understand the inheritance of .gitignore, you grok [FoXBin2Prg.cfg](#https://github.com/fdbozzo/foxbin2prg/blob/master/docs/FoxBin2Prg_Internals.md#configuration-file) and vice versa. Very close.
But git would not be git if one could not teach .gitignore to define the files **included**.
Again, see pro-git.
@@ -266,19 +268,38 @@ I think I will swap to use them as _Text_ too, since version 1.19.55 of FoxBin2P
Also this approach ignores any bak / log / tmp / err files by default.
#### gitattributes
The _.gitattributes_ file controls some things that might be set to as local computer / user / repository (via _git config_),
but should be constant to the repository, no matter the local settings. This file is included into the repository.
for VFP purposes, it controls the processing of line ending on commit / checkout.
The _.gitattributes_ file controls some things that might be set to as local computer / user / repository (via `git config`). Note, using `git config` to alter the behaviour of the _repository_ will still be local to your computer, so a remote computer is not influenced. IOW, this is not pushed.
It should be constant to the repository, no matter the local settings of any collaborator. This while we should use _.gitattributes_ file and included into the repository.
For VFP purposes, _.gitattributes_ controls the processing of line ending on git commit / checkout.
As mentioned [above](#git-settings) git might manipulate CRLF and LF. If the settings are different on different computers ,
it might checkout with LF instead of CRLF. This creates useless files in the commit, but also might create havoc using the files.
See [this](https://github.com/VFPX/GoFish/issues/27) for an example.
See [GoFish](https://github.com/VFPX/GoFish/issues/27) for an example.
To solve this, add a _.gitattributes_ file to any of your projects, next to the _.gitignore_ file. It should look like this:
````
#.gitattributes
# disable newline conversion on checkout with no conversion on check-in for all files
* -text
````
If you have a project running, check the line endings and make shure they follow DOS standard CRLF.
If you have a project running, check the line endings and make shure they follow DOS standard CRLF:
##### Fixing line endings
If you run into the problem that you have set up different computers different for dealing with line endings so commits of all files or all lines of a file without reason, you might need to change to git to keep CRLF and set your files line endings to CRLF.
- create a backup of your folder
- create _.gitattributes_ file as above
run following lines in bash:
```
git add . -u
git commit -m "Saving files before refreshing line endings"
git add --renormalize .
git commit -m "Normalize all the line endings"
```
**Note: You must do this to *every repository* and, if there are several branches of a repository, with *every (active) branch*.**
**Note: Be careful, this will not alter any older commit, so `git reset` (or the like) to an old commit could create the problem again. Recreating _.gitattributes_ and the code snippet should solve the problem, for single files like:***
```
git add --renormalize filename
git commit
```
#### FoxBin2Prg config
The config of FoxBin2Prg using FoxBin2Prg.cfg files is relative simple. As you might see above, I carry the file within the repo.
@@ -425,4 +446,4 @@ All use off this are the last four lines. But I like to keep the template (recen
This project is part of [VFPX](https://vfpx.github.io/).
----
Last changed: _2023/11/26_ ![Picture](./pictures/vfpxpoweredby_alternative.gif)
Last changed: _2026/06/20_ ![Picture](./pictures/vfpxpoweredby_alternative.gif)