With additional index 4

This commit is contained in:
Lutz
2021-03-18 23:16:15 +01:00
parent 8b3b3a65df
commit faecbc3320
13 changed files with 331 additions and 176 deletions

View File

@@ -19,9 +19,7 @@ As far as possible these are the original documents. Changes are added where fun
The older links point to Fernandos repository.
For recent verisons see
![Picture](./pictures/FoxBin2Prg_Full_Change_History_vfpxreleasesmall.png) [Fernandos FoxBin2PRG](https://github.com/fdbozzo/foxbin2prg)
![Picture](./pictures/FoxBin2Prg_Full_Change_History_vfpxreleasesmall.png) [This fork](https://github.com/lscheffler/foxbin2prg/tree/fork_mod)
![Picture](./pictures/FoxBin2Prg_Full_Change_History_vfpxreleasesmall.png) [Just the bug fixes of this fork](https://github.com/lscheffler/foxbin2prg/tree/fork)
![Picture](./pictures/FoxBin2Prg_Full_Change_History_vfpxreleasesmall.png) [FoxBin2PRG](https://github.com/fdbozzo/foxbin2prg)
## Full Change History
This page is not only to get the history of the changes, but to keep a permanent list of people that have contributed to enhance FoxBin2Prg and that I feel as part of the ADN of this tool.
@@ -32,6 +30,13 @@ _**Note:** you can click on the version number for downloading this version from
| Rel.Date | Developer | Version | Details |
| - | - | - | - |
| 2021/xx/xx | LScheffler | [v1.19.60]() | **Enhancement**: -cC options learned to create default FoxBin2Prg._cfg file |
| 2021/xx/xx | LScheffler | [v1.19.60]() | **Enhancement**: -t Option learned to create default \<tablename\>._cfg file, if table is open. |
| 2021/xx/xx | LScheffler | [v1.19.60]() | **Enhancement**: Handling of additional non structural index per DBF in Bin2Text and Text2Bin. See [Config per DBF](./FoxBin2Prg_Internals.md#configuration-per-table). |
| 2021/xx/xx | LScheffler | [v1.19.60]() | **Enhancement**: Debug-Logging for Index |
| 2021/xx/xx | LScheffler | [v1.19.60]() | **Bug Fix**: DBF_Conversion_Condition was read, but never used |
| 2021/xx/xx | LScheffler | [v1.19.60]() | **Bug Fix**: DBF_Conversion_Order sets an index that later would be stored as structural index |
| 2021/xx/xx | LScheffler | [v1.19.60]() | **Bug Fix**: config options with text value fail, if line comment is set |
| 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 |
@@ -379,4 +384,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/09_ ![Picture](./pictures/vfpxpoweredby_alternative.gif)
Last changed: _2021/03/18_ ![Picture](./pictures/vfpxpoweredby_alternative.gif)

View File

@@ -11,6 +11,7 @@ As far as possible these are the original documents. Changes are added where fun
----
## Table of contents
- [Why to use this tool](#why-to-use-this-tool)
- [Limitations](#limitations)
- [Configuration file](#configuration-file)
- [Configuration file per table](#configuration-file-per-table)
- [FoxBin2Prg Internals](#foxbin2prg-internals)
@@ -66,6 +67,28 @@ 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.
## Limitations
Most of the files look like prg or XML data. Please note, those files are only look alike.
The parsing to generate the binary depends highly on the position of data.
So if a file is defined like
```
<FIELDS>
<FIELD>
<Name>I1</Name>
```
this
```
<FIELDS><FIELD><Name>I1</Name>.
```
will be nice XML, but not readable to FoxBin2Prg. This is a line by line parser.
Leading and trailing spaces are mostly no problem.
You might freely change and merge code inside the text files, or data in a table-XML,
but the result must be compilable and keep the structure.
All limitations that occur to a binary format must be kept on the text representation -
the definition of a HEADER class to a VCX will fail.
## Configuration file
It is possible to create a template or a config with all options and comments via
```
@@ -147,14 +170,16 @@ The options in the template (or in the config that ships with FoxBin2Prg) are co
To activate an option remove the asterix and set appropriate value.
These are the Table.dbf.cfg configuration file settings and their meaning:
| FoxBin2Prg.cfg keywords | Value | 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 | 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 | Logical expression (For _SCAN FOR_). ie: age > 10 AND NOT DELETED(),<br/>empty means all files, except _DBF_IncludeDeleted_ <br/> usefull only if _DBF_Conversion_Support_>0 |
| 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 |
| 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 files, 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.
For defaults, see [Configuration file](#configuration-file).
## FoxBin2Prg Internals
@@ -644,7 +669,7 @@ Output file (**O**), Processed (**P1**), Without Errors (**E0**), Supported (**S
## How to use with a SCM tool
### Note
This chapter is without function if the only the _Text_ files are in the source control.
This chapter is without function if the only the _Text_ files are in the source control.
Here we need to identify 2 distinct operations: checkin because a _Binary_ modification with the IDE
and checkin because a merge operation.
@@ -673,10 +698,13 @@ because anyway you will generate them later from their _Text_ files._
For options on integrating FoxBin2Prg with SCM tools, look at this topic:
**> [FoxBin2Prg and use with SCM tools](./FoxBin2Prg_SCM.md)**
## How to use with _git_
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: _2021/03/04_ ![Picture](./pictures/vfpxpoweredby_alternative.gif)
Last changed: _2021/03/18_ ![Picture](./pictures/vfpxpoweredby_alternative.gif)

View File

@@ -56,6 +56,9 @@ Some settings will overwrite configuration. Using an object as cCFG_File will ov
| | * | If _cInputFile_ is a project (pj[x2]) all files of the project, **including** the pjx, will be processed. The extension defines direction of operation. |
| | \*\- | If _cInputFile_ is a project (pj[x2]) all files of the project, **excluding** the pjx, will be processed. The extension defines direction of operation. |
| | d, D, K, B, M, R, V | SCCAPI (SCCTEXT.PRG) compatibility mode, query the conversion support for the file type specified <br /> Types: d=DBC, D=DBF, K=Form, B=Label, M=Menu, R=Report, V=Class |
| | -C | Create configuration file \<cInputFile\> or, if first parameter is empty, FoxBin2Prg._cfg in default folder. With recent values. |
| | -c | Create configuration file template \<cInputFile\> or, if first parameter is empty, FoxBin2Prg._cfg in default folder. With inactive default values. |
| | -t | Create per-table configuration file template <cInputFile> or, if first parameter is empty and a table open, \<tablename\>._cfg in table folder. With inactive default values. |
| cTextName | Text filename. | Only for SCCAPI (SCCTEXT.PRG) compatibility mode. File to use. |
| lGenText | .T., .F. | Only for SCCAPI (SCCTEXT.PRG) compatibility mode. .T.=Generates Text, .F.=Generates Binary. <br/> **Note:** _cType_ have predominance over _lGenText_ |
| cDontShowErrors | _0_, 1 | '1' for NOT showing errors in MESSAGEBOX |
@@ -90,6 +93,7 @@ The _BIN2PRG, PRG2BIN, INTERACTIVE, SHOWMSG_ cTypes might be mixed freely like:
#### Note
- The swap of _cInputFile_ and _cType_ is not possible here.
- If cType is -cCt, then only the first both parameters are allowed.
- Setting _cInputFile_ and _cType_ appropriate, info screen and generation of configuration templates is possible too. See [command line](./FoxBin2Prg_Run.md#usage_1)
- While possibe, the SCCAPI (SCCTEXT.PRG) compatibility mode is more an idea of the [command line](./FoxBin2Prg_Run.md).
@@ -101,4 +105,4 @@ Return value is 0=OK, 1=Error.
This project is part of [VFPX](https://vfpx.github.io/).
----
Last changed: _2021/03/09_ ![Picture](./pictures/vfpxpoweredby_alternative.gif)
Last changed: _2021/03/18_ ![Picture](./pictures/vfpxpoweredby_alternative.gif)

View File

@@ -107,14 +107,16 @@ 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]`
`FoxBin2Prg.EXE [-cCt [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 |
| | If cOutputFile is empty, a file FOXBIN2PRG._CFG will be created in default foder. |
| -t | creates a template table-config-file _cOutputFile_ ( like _TableName_.dbf.cfg ) |
| | If cOutputFile is empty and a table is open is workarea, a file \<tablename\>._CFG will be created in table foder. |
## Return values
Return value via _ErrorLevel_ is 0=OK, 1=Error.
@@ -163,4 +165,4 @@ FoxBin2Prg.lnk <path>\foxbin2prg.exe "INTERACTIVE-SHOWMSG"
This project is part of [VFPX](https://vfpx.github.io/).
----
Last changed: _2021/03/09_ ![Picture](./pictures/vfpxpoweredby_alternative.gif)
Last changed: _2021/03/18_ ![Picture](./pictures/vfpxpoweredby_alternative.gif)

View File

@@ -43,6 +43,7 @@ generating bidirectional PRG-Style versions that allow recreating the original b
- Out of the _Text_ versions you can **generate the original binaries**, so it is useful as backup
- The extensions are configurable if you create a FOXBIN2PRG.CFG file
- Inheritance of CFG configuration files between directories
- Special configuration per table, allowing additional non structural index files, sorting and ranges of records to include
- Methods and properties of _Text_ version are alphabetically sorted for easy comparison
- Can set _UseClassPerFile_ setting to create individual files by class
- Can set _UseFilesPerDBC_ setting to create individual files by DBC member
@@ -84,4 +85,4 @@ FoxBin2Prg can be used in tree ways:
This project is part of [VFPX](https://vfpx.github.io/).
----
Last changed: _2021/03/03_ ![Picture](./pictures/vfpxpoweredby_alternative.gif)
Last changed: _2021/03/18_ ![Picture](./pictures/vfpxpoweredby_alternative.gif)