Documentation

Better information on configuration files
use of git documentation: how to fix boken line endings
minor broken links
This commit is contained in:
Lutz
2026-06-20 14:56:54 +02:00
parent 429b43342f
commit 5142ff2131
2 changed files with 38 additions and 10 deletions

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,6 +104,10 @@ 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).
@@ -110,7 +116,7 @@ in the settings object returned by get_DirSettings method of the API object. See
| ----- | ----- | ----- |
| 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.** |
@@ -198,6 +204,7 @@ 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.

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)