Compare commits

..

10 Commits

Author SHA1 Message Date
d873d52aea Adaugari locale ROA: vcx2txt.ps1 (cautare cod in binare VFP), prompturi si CLAUDE.md 2026-07-09 11:42:07 +03:00
Lutz Scheffler
32715d06b8 Merge pull request #127 from lscheffler/fork_mod
Minor flaws
2026-06-21 14:24:05 +02:00
Lutz
cfcc8ed372 Minor flaws 2026-06-21 14:23:31 +02:00
Lutz Scheffler
2f9ce55803 Merge pull request #126 from lscheffler/fork_mod
Documentation reworked
- Single file for config files
- Dependencies of parameters and settings better shown
- Some API pem added.
- Static paths removed
- Settings better and more often linked
- TOCs reworked
2026-06-21 14:19:52 +02:00
Lutz
53e8b0c5a4 Documentation reworked
Single file for config files
Dependencies of parameters and settings better shown
Some API pem added.
Static paths removed
Settings better and more often linked
TOCs reworked
2026-06-21 14:14:35 +02:00
Lutz
7c0119b8e2 Docu ReadMe 2026-06-21 11:19:39 +02:00
Lutz Scheffler
c18afb8ccc 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
2026-06-20 15:08:32 +02:00
Lutz
9881b104a7 changes to prg removed, just documentation 2026-06-20 15:03:57 +02:00
Lutz
5142ff2131 Documentation
Better information on configuration files
use of git documentation: how to fix boken line endings
minor broken links
2026-06-20 14:58:35 +02:00
Lutz
429b43342f Documentation EXE vs PRG
Better documentation of issues with EXE and different versions of VFP
Clearer description when to use prg (mostly on many active VFP versions)
Minor documentation updates
2026-06-20 13:59:56 +02:00
12 changed files with 992 additions and 423 deletions

93
CLAUDE.md Normal file
View File

@@ -0,0 +1,93 @@
# CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
## What this is
A local shared copy of **FoxBin2Prg** (the VFPX tool by Fernando D. Bozzo, maintained by Lutz Scheffler): a Visual FoxPro 9 program that converts VFP binary files to PRG-style text and back. Supported conversions: `PJX↔PJ2`, `SCX↔SC2`, `VCX↔VC2`, `FRX↔FR2`, `LBX↔LB2`, `DBC↔DC2`, `DBF↔DB2`, `MNX↔MN2`.
This directory is a git clone of `https://github.com/fdbozzo/foxbin2prg.git` (`master` tracks `origin/master`; the pre-update local state is kept on branch `local-snapshot-v1.21.04`). Local-only files (`vcx2txt.ps1`, `_textcache_*`, compiled binaries) are ignored via the upstream `.gitignore` plus `.git/info/exclude`. After a `git pull`, the binaries/EXE must be regenerated in VFP9 with `DO ReCreate_FoxBin2Prg.prg`. It serves two purposes:
1. Upstream tool source (for occasional patches to FoxBin2Prg itself).
2. A **shared search tool for the ROA VFP projects** (`D:\ROA\ROAGEST`, `D:\ROA\ROAIMOB`, `D:\ROA\ROAACNPRO`, …) via the local additions below.
## Local additions (ROA-specific, not part of upstream)
- **`vcx2txt.ps1`** — PowerShell script that converts the VFP binaries of a project (read from its `.pjx`) into text under a cache folder, so the code inside `.vcx/.scx/.frx/.mnx/.dbc` binaries becomes greppable. Incremental (skips up-to-date files), does not need the VFP IDE open (uses the compiled `FoxBin2Prg.EXE`).
- **`_textcache_*` folders** (`_textcache`, `_textcache_roagest`, `_textcache_roaimob`) — per-project regenerable text caches. Safe to delete; never version them.
- **`PROMPT_cautare_vfp.md`** — reusable prompt (Romanian) explaining how to set up this search flow in any VFP project. Read it before working on VFP code search.
**Golden rule:** the generated text cache is **read-only, for searching only**. Code changes to a VFP project are made in the VFP IDE on the binary files (`.vcx/.scx/...`), never by editing the cached text.
```powershell
# Populate/refresh a project's text cache (incremental)
& 'D:\ROA\UTIL\foxbin2prg\vcx2txt.ps1' -Project 'D:\ROA\ROAGEST\roagest.pjx' -ProjectRoot 'D:\ROA\ROAGEST' -CacheRoot 'D:\ROA\UTIL\foxbin2prg\_textcache_roagest'
# Include reports/menus too: -Types vcx,scx,frx,mnx
# One-off conversion of a file/folder not in the project: -Source 'path\to\lib.vcx'
# Other flags: -Force (reconvert all), -Clean (wipe cache first)
```
Then search the cache with Grep (e.g. `PROCEDURE do_salvare`), citing `file:line` from the cache.
## Commands
All FoxBin2Prg commands run inside VFP 9 (or via the compiled `FoxBin2Prg.EXE`).
```foxpro
* After clone/pull: regenerate all binaries from text and compile the EXEs.
* NEVER run foxbin2prg.prg directly for this — it uses a special config.
DO ReCreate_FoxBin2Prg.prg
* Convert a single file (direction inferred from extension)
DO FOXBIN2PRG.PRG WITH "<path>\file.scx" && binary -> text (.sc2)
DO FOXBIN2PRG.PRG WITH "<path>\file.sc2" && text -> binary (.scx)
* Convert a whole directory
DO FOXBIN2PRG.PRG WITH "<path>","Bin2Prg"
DO FOXBIN2PRG.PRG WITH "<path>","Prg2Bin"
* Config templates
DO FOXBIN2PRG.PRG WITH "-c","template.cfg" && default settings
DO FOXBIN2PRG.PRG WITH "-C","config.cfg" && active settings
DO FOXBIN2PRG.PRG WITH "-t","table.dbf.cfg" && per-table template
* Interactive help / option list
DO FOXBIN2PRG.PRG WITH "?"
```
### Tests
Unit tests live in `TESTS/` and use **FoxUnit** (path configured in `TESTS/foxunit_path.txt`). Files: `ut__foxbin2prg__<class>__<method>.prg` (unit) and `ft__foxbin2prg__<class>.prg` (functional). Run them from VFP via FoxUnit; test fixtures live in `TESTS/DATOS_READONLY/`.
## Architecture
Nearly everything is in one ~34,000-line file: **`foxbin2prg.prg`**. Key class hierarchy inside it:
- **`c_foxbin2prg` (As Session)** — entry point / public API. Parameter parsing, config resolution (`evaluateConfiguration`), file dispatch, progress UI, error logging. Also usable as COM-ish object (`CREATEOBJECT('c_foxbin2prg')`, `.execute(...)`), which is how the `.vbs` helpers and SCM integrations drive it.
- **`c_conversor_base`** — shared conversion logic (backup handling, timestamps, comment/property parsing, exclusion blocks).
- **`c_conversor_bin_a_prg`** and per-type subclasses (`c_conversor_vcx_a_prg`, `c_conversor_scx_a_prg`, `c_conversor_pjx_a_prg`, `c_conversor_dbf_a_prg`, …) — binary → text.
- **`c_conversor_prg_a_bin`** and per-type subclasses — text → binary.
- **`CL_*` model classes** (`CL_CLASE`, `CL_PROJECT`, `CL_DBC*`, `CL_DBF_*`, `CL_MENU*`, …) — object model the text files are parsed into / generated from.
- **`CL_CFG` / `CL_DBF_CFG`** — config file handling (`FOXBIN2PRG.CFG` with directory inheritance, per-table `.dbf.cfg`).
- **`CL_LANG`** — localization (EN/ES/FR/DE), auto-selected.
Supporting files: `foxbin2prg_keywords.dbf/.cdx` (VFP keyword table used during generation — has its own `.db2` text form), `props_*.txt` (per-control default property lists used to suppress default values in output), `Create_FoxBin2Prg.cfg` (the special self-conversion config), `Fb2P_Diff/` and `FileName_Caps/` (companion sub-projects, built by `ReCreate_FoxBin2Prg.prg`), `BuildProcess/` (VFPXDeployment build hooks), `ThorUpdater/` (Thor/VFPX release plumbing).
**Text format is position-sensitive:** the generated `.??2` files look like PRG/XML but are parsed line by line; structure and line layout must be preserved when editing them. Properties/methods are emitted alphabetically sorted.
## Upstream contribution conventions (from `.github/CONTRIBUTING.md`)
If patching FoxBin2Prg itself:
- Two version constants at the top of `foxbin2prg.prg`: bump only the minor part of `DC_FB2PRG_VERSION_REAL` (e.g. `'1.21.04'`); do **not** change `DN_FB2PRG_VERSION` (`1.21`) — it's written into every text file and forces mass recommits.
- Add the change to the history section at the top of `foxbin2prg.prg` and to `docs/ChangeLog.md`; update the version in `README.md`.
- Style: mixed-case keywords, tab indentation, spaces around operators and after list items; do not run BeautifyX with mDots insertion.
- After changes, regenerate text with `DO Create_FoxBin2Prg.prg` and compile in **VFP9 SP2**.
## Documentation
- `docs/FoxBin2Prg_Internals.md` — settings reference and internals (ZOrder, timestamps, class-per-file, DBF export hooks, API).
- `docs/FoxBin2Prg_Run.md` — full command-line/parameter reference.
- `docs/FoxBin2Prg_git.md`, `docs/FoxBin2Prg_SCM.md` — SCM integration.
- Spanish docs in `Documentacion/` are unmaintained.

83
PROMPT_cautare_vfp.md Normal file
View File

@@ -0,0 +1,83 @@
# Prompt: căutare în cod VFP (foxbin2prg) — reutilizabil în orice proiect Visual FoxPro
Acest fișier conține un **prompt gata de copiat** pentru Claude Code (sau alt agent), care
configurează și folosește sistemul `foxbin2prg` ca să poată căuta cod-sursă aflat **în interiorul
fișierelor binare VFP** (`.vcx/.vct`, `.scx/.sct`, `.frx/.frt`, `.mnx/.mnt`, `.dbc/.dct`) într-un
proiect nou.
Unealta e partajată și stă la `D:\ROA\UTIL\foxbin2prg\` — nu trebuie copiată per proiect. Doar
spui agentului care e proiectul curent (folderul + fișierul `.pjx`).
---
## Cum se folosește
1. Deschide proiectul VFP în Claude Code.
2. Copiază blocul de mai jos în prompt.
3. Înlocuiește cele **2 valori** marcate `<<...>>` cu datele proiectului tău:
- `<<RADACINA_PROIECT>>` = folderul rădăcină al proiectului (ex. `D:\ROA\ROAGEST`)
- `<<FISIER_PJX>>` = calea către `.pjx` (ex. `D:\ROA\ROAGEST\roagest.pjx`)
---
## ▼▼▼ PROMPT DE COPIAT ▼▼▼
```
Acest proiect este o aplicație Visual FoxPro 9. O mare parte din cod (proceduri, metode,
parametri) NU stă în fișiere .prg, ci în interiorul fișierelor binare VFP: librării de clase
(.vcx+.vct), forme (.scx+.sct), rapoarte (.frx+.frt), meniuri (.mnx+.mnt). Un grep direct pe
acestea nu e lizibil (sunt tabele DBF cu memo binar).
Ca să poți căuta în acel cod, folosește unealta partajată foxbin2prg, care convertește binarele
în reprezentarea lor TEXT (.vc2/.sc2/.fr2/.mn2/.dc2) într-un cache, și apoi caută în cache.
PARAMETRII PROIECTULUI CURENT:
- Rădăcină proiect: <<RADACINA_PROIECT>>
- Fișier proiect (.pjx): <<FISIER_PJX>>
REGULA DE AUR: textul generat e DOAR pentru citire/căutare. Orice modificare de cod se face în
IDE-ul VFP, în fișierul binar (.vcx/.scx/...), niciodată în text.
PAS 1 — populează cache-ul text (la începutul sesiunii, sau după ce s-a modificat ceva în IDE).
Rulează în PowerShell (e incremental — sare peste ce e deja la zi):
& 'D:\ROA\UTIL\foxbin2prg\vcx2txt.ps1' -Project '<<FISIER_PJX>>' -ProjectRoot '<<RADACINA_PROIECT>>' -CacheRoot 'D:\ROA\UTIL\foxbin2prg\_textcache_<<NUME_PROIECT>>'
(Folosește un -CacheRoot distinct per proiect ca să nu amesteci cache-urile. Implicit scriptul
convertește doar .vcx și .scx; pentru a include și rapoarte/meniuri adaugă: -Types vcx,scx,frx,mnx)
Dacă scriptul se plânge că lipsește FoxBin2Prg.EXE, trebuie compilat o singură dată: deschide
'D:\ROA\UTIL\foxbin2prg\foxbin2prg.pj2' în VFP 9 și Build > Build Executable. Anunță-mă să fac asta.
PAS 2 — caută în cache cu unealta Grep (NU în binarele originale):
Grep pe folderul '_textcache_<<NUME_PROIECT>>' pentru numele de metodă/procedură/variabilă căutat.
Ex.: caută "PROCEDURE do_salvare" sau numele tabelei/cursorului implicat.
CONVERSIE PUNCTUALĂ (un fișier sau folder care NU e în proiect, ex. o librărie din COMUN):
& 'D:\ROA\UTIL\foxbin2prg\vcx2txt.ps1' -Source 'CALE\catre\librarie.vcx' -CacheRoot 'D:\ROA\UTIL\foxbin2prg\_textcache_<<NUME_PROIECT>>'
ALTE OPȚIUNI: -Force (reconvertește tot), -Clean (șterge cache-ul întâi).
FLUX TIPIC: la prima sesiune rulează PAS 1 o dată, apoi caută cu Grep în cache (PAS 2). La
sesiunile următoare rescrie doar ce s-a schimbat. Când citești codul unei metode, dă referințe
fișier:linie din cache, dar reține: editarea efectivă se face în IDE-ul VFP pe binar.
```
## ▲▲▲ SFÂRȘIT PROMPT ▲▲▲
---
## Note pentru adaptare
- `<<NUME_PROIECT>>` îl poți pune orice etichetă scurtă (ex. `roagest`), doar ca numele
folderului de cache să fie unic per proiect.
- Scriptul citește lista de fișiere direct din `.pjx`, deci convertește **doar** ce folosește
efectiv proiectul (rapid), nu tot `COMUN\`.
- Cache-ul (`_textcache_*`) e regenerabil și e în afara arborelui de versionare al proiectului —
poate fi șters oricând.
- Conversia NU necesită IDE-ul VFP deschis (folosește `FoxBin2Prg.EXE` compilat).
- Ghid complet (varianta ROAACNPRO, cu exemple): `D:\ROA\ROAACNPRO\docs\cautare_vcx_vct.md`.
- Tabel corespondență binar → text: `.vcx``.vc2`, `.scx``.sc2`, `.frx``.fr2`, `.mnx``.mn2`,
`.dbc``.dc2`, `.lbx``.lb2`.

View File

@@ -32,16 +32,31 @@ If you like to see Fernandos blog, or value his work:
Thank you for your support!
----
## Important Note
To fix a bug, this version changes the text file header.
It is suggested to create all text files and commit in one step.
## Table of contents
- [Contribution](#contribution)
- [What is FOXBIN2PRG](#what-is-foxbin2prg)
- [Advantages](#advantages)
- [Examples](#examples)
- [Redefine extensions of _Text_](#redefine-extensions-of-text)
- [Use FoxBin2Prg](#use-foxbin2prg)
- [Interactive list of options](#interactive-list-of-options)
- [Use with MS Windows SendTo](#use-with-ms-windows-sendto)
- [How to use the links](#how-to-use-the-links)
- [LOCALIZATION](#localization)
- [FINAL NOTE](#final-note)
- [LICENCE](#licence)
- [Changes](#changes)
- [Changes to Configuration](#changes-to-settings)
- [Limitations](#limitations)
- [**Documentation**](#documentation)
- [**Helping with FoxBin2PRG / issues**](#helping-with-foxbin2prg--issues)
- [Note](#note)
----
## Contribution
See [contribution](./.github/CONTRIBUTING.md)
---
## What is FOXBIN2PRG?
It is a program intended to be used with **SCM tools** (Source Code Managers, like VSS, CVS, SVN)
and *DVCS tools* (Version Control Systems such as Git, Mercurial, Plastic, and others),
@@ -124,14 +139,14 @@ You can create up to three different shortcuts pointing to FoxBin2Prg.exe and in
##### How to use the links
Select a file, right-click, SendTo -> FoxBin2Prg
## LOCALIZATION:
## LOCALIZATION
Is automatic starting at v1.19.38 (Languages: EN,ES,FR,DE)
## FINAL NOTE:
## FINAL NOTE
This program is Open Source and "libre", and I don't make any guaranties that it fulfills your expectations or that it will be free of bugs.
I will try to fix bugs if my obligations let me do it.
## LICENCE:
## LICENCE
This work is licensed under the Creative Commons Attribution 4.0 International License.
To view a copy of this license, visit http://creativecommons.org/licenses/by/4.0/.
@@ -139,7 +154,7 @@ To view a copy of this license, visit http://creativecommons.org/licenses/by/4.0
## Changes
See [Changes](./docs/ChangeLog.md)
### Changes to Settings
### Changes to Configuration
To get the new settings in config file, use the new create-a-template function:
```
@@ -147,23 +162,23 @@ DO FOXBIN2PRG.PRG WITH "-c","template.cfg" ==> Generates a template for Fox
DO FOXBIN2PRG.PRG WITH "-C","template.cfg" ==> Generates a template for FoxBin2Prg.cfg config file with active settings
DO FOXBIN2PRG.PRG WITH "-t","template.dbf.cfg" ==> Generates a template for table.dbf.cfg per table config file with newest settings
```
See [Configuration](./FoxBin2Prg_Settings.md) for more information about configuration file(s).
----
## Limitations
If dealing with project files, FoxBin2Prg will fail if files of the project are not stored on the drive of the project.
- If dealing with project files, FoxBin2Prg will fail if files of the project are not stored on the drive of the project.
See [issue #93](https://github.com/fdbozzo/foxbin2prg/issues/93).
- FoxBin2Prg could be used as exe or prg. See [Usage](./docs/FoxBin2Prg.md#usage) for details and problems.
----
## Usage
## Documentation
For usage see [documentation](./docs/FoxBin2Prg.md)
----
## Helping with FoxBin2PRG
## Helping with FoxBin2PRG / issues
See [contribution](./.github/CONTRIBUTING.md)
---
## Note
The spanish documentation is not longer maintained - it would fade.
For fast access a quick run is [introduced](#use-foxbin2prg), more [complex](./docs/FoxBin2Prg_Run.md#usage-1), and a large [documentation](./docs/FoxBin2Prg.md) exists too.
@@ -174,5 +189,4 @@ If you like to see Fernando's blog, or value his work:
- [![DONATE!](http://www.pngall.com/wp-content/uploads/2016/05/PayPal-Donate-Button-PNG-File-180x100.png)](https://www.paypal.com/cgi-bin/webscr?cmd=_donations&amp;business=fdbozzo%40gmail%2ecom&amp;lc=ES&amp;item_name=FoxBin2Prg&amp;item_number=FoxBin2Prg&amp;currency_code=USD&amp;bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHosted)
----
Last changed: _2026/06/18_ ![Picture](./docs/pictures/vfpxpoweredby_alternative.gif)
Last changed: _2026/06/21_ ![Picture](./docs/pictures/vfpxpoweredby_alternative.gif)

View File

@@ -12,18 +12,24 @@ As far as possible these are the original documents. Changes are added where fun
## Table of contents
- [Use](#use)
- [Download for development](#download-for-development)
- [Source](#source)
- [Rebuild additional files](#rebuild-additional-files)
- [Requirements](#requirements)
- [Demo video](#demo-video)
- [What is FoxBin2Prg](#what-is-foxbin2prg)
- [Advantages](#advantages)
- [Example](#example)
- [Limitations](#limitations)
- [Usage](#usage)
- [**Configuration**](#configuration)
- [Keep reading](#keep-reading)
## Use
- Download the [runtime](https://github.com/fdbozzo/foxbin2prg/blob/master/ThorUpdater/FoxBin2Prg.zip) (same as used by Thor)
- Or (best) install via [Thor](https://github.com/VFPX/Thor/blob/master/Docs/Thor_install.md), this keeps you on the latest version.
See [Usage](#usage) for details and problems.
## Download for development
### Source
Original repository at https://github.com/fdbozzo/foxbin2prg.
@@ -77,26 +83,31 @@ for which a _Text_ version is generated with pj2, sc2, vc2, fr2, lb2, dc2, db2,
The extensions may be reconfigured to be compatible with SCCAPI (just tested with SourceSafe).
## Example
![FoxBin2prg_scctextx-vs-FoxBin2Prg_scx_EN.png](pictures/FoxBin2prg_scctextx-vs-FoxBin2Prg_scx_EN.png)
![FoxBin2prg_scctextx-vs-FoxBin2Prg_mnx_EN.png](pictures/FoxBin2prg_scctextx-vs-FoxBin2Prg_mnx_EN.png)
![FoxBin2prg_scctextx-vs-FoxBin2Prg_scx_EN.png](./pictures/FoxBin2prg_scctextx-vs-FoxBin2Prg_scx_EN.png)
![FoxBin2prg_scctextx-vs-FoxBin2Prg_mnx_EN.png](./pictures/FoxBin2prg_scctextx-vs-FoxBin2Prg_mnx_EN.png)
## Limitations
If dealing with project files, FoxBin2Prg will fail if files of the project are not stored on the drive of the project.
- If dealing with project files, FoxBin2Prg will fail if files of the project are not stored on the drive of the project.
See [issue #93](https://github.com/fdbozzo/foxbin2prg/issues/93).
- FoxBin2Prg could be used as exe or prg. See [Usage](#usage) for details and problems.
## Usage
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.
- 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):
- Based on EXE or PRG
- Usable out of own code
- expandable
## Configuration
See [Configuration](./FoxBin2Prg_Settings.md) for more information about configuration file(s).
## Keep reading
- [FoxBin2Prg Full Change History](./ChangeLog.md)
- [FoxBin2Prg Internals and Configuration](./FoxBin2Prg_Internals.md)
@@ -108,4 +119,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/21_ ![Picture](./pictures/vfpxpoweredby_alternative.gif)

View File

@@ -12,10 +12,10 @@ 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)
- [Excluding directories](#excluding-directories)
- [FoxBin2Prg Internals](#foxbin2prg-internals)
- [**Configuration**](#configuration)
- [Configuration per table](#configuration-per-table)
- [Parameters](#parameters)
- [ZOrder](#zorder)
- [RemoveZOrderSetFromProps setting](#removezordersetfromprops-setting)
- [VFP ZOrder bug and fix](#vfp-zorder-bug-and-fix)
@@ -25,10 +25,8 @@ As far as possible these are the original documents. Changes are added where fun
- [Timestamps and UniqueIDs](#timestamps-and-uniqueids)
- [DBF Data Export/Import for Diff/Merge](#dbf-data-export/import-for-diff/merge)
- [Order and range of records](#order-and-range-of-records)
- [Configuration per table](#configuration-per-table)
- [DBF/DB2 Convertion Hooks](#dbf/db2-convertion-hooks)
- [Language Support for messages](#language-support-for-messages)
- [Multi-config](#multi-config)
- [File Capitalization](#file-capitalization)
- [Conversion processes Logging](#conversion-processes-logging)
- [Storing paths for pjx](#storing-paths-for-pjx)
@@ -91,142 +89,16 @@ 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
```
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.
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)) ||
| 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.** |
| 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.** |
| BackgroundImage<br/>c_BackgroundImage | \<cFile\> | Backgroundimage for process form |
| HomeDir<br/>n_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 |
| BodyDevInfo<br/>n_BodyDevInfo | _0_, 1, 2 | 0=Don't keep DevInfo for body pjx records, 1=Keep DevInfo, 2 = Don't keep DevInfo or ObjRev.<br/>Setting this to 2 prevents the PJ2 file from changing just because two developers built the project on their machines |
|||
| InhibitInheritance<br/>n_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) |
| PJX_Conversion_Support<br/>.n_PJX_Conversion_Support | 0, 1, _2_ | Default value is 2 - Bidirectional ((Merge/Only Structure!),<br/>4=Generate _Text_ with DATA (Diff), 8=Export and Import DATA (Merge/Structure & Data) and _bin_) support activated |
| VCX_Conversion_Support<br/>.n_VCX_Conversion_Support | 0, 1, _2_ | Default value is 2 - Bidirectional (_Text_ and _bin_) support activated |
| SCX_Conversion_Support<br/>.n_SCX_Conversion_Support | 0, 1, _2_ | Default value is 2 - Bidirectional (_Text_ and _bin_) support activated |
| FRX_Conversion_Support<br/>.n_FRX_Conversion_Support | 0, 1, _2_ | Default value is 2 - Bidirectional (_Text_ and _bin_) support activated |
| LBX_Conversion_Support<br/>.n_LBX_Conversion_Support | 0, 1, _2_ | Default value is 2 - Bidirectional (_Text_ and _bin_) support activated |
| MNX_Conversion_Support<br/>.n_MNX_Conversion_Support | 0, 1, _2_ | Default value is 2 - Bidirectional (_Text_ and _bin_) support activated |
| DBC_Conversion_Support<br/>.n_DBC_Conversion_Support | 0, 1, _2_ | Default value is 2 - Bidirectional (_Text_ and _bin_) support activated |
| DBF_Conversion_Support<br/>.n_DBF_Conversion_Support | 0, _1_, 2, 4, 8 | Default value is 1 - just _Text_ support activated.<br/>The support for regenerating DBFs structures (value = 2) are disabled by default to not overrite data accidentally. When activating bidirectional support, keep in mind that Data is not restored, just the structure and indexes!.<br/>A value of 4 is used to export Structure and Data, but exported data is not imported again.<br/>A value of 8 is used for bidirectional support (No General fields!). <br/> **Note:** This can be [changed per table](#configuration-file-per-table). |
| FKY_Conversion_Support<br/>.n_FKY_Conversion_Support | 0, _1_ | Default value is 1 - _Text_ support activated |
| MEM_Conversion_Support<br/>.n_MEM_Conversion_Support | 0, _1_ | Default value is 1 - _Text_ support activated |
|||
| CheckFileInPath<br/>n_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<br/>n_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:)<br/>l_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<br/>n_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)<br/>l_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 |
|||
| [UseFormSettings](#create-file-per-form)<br/>l_UseFormSettings | _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<br/>n_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)<br/>l_RedirectFormPerFileToMain | _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<br/>n_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)<br/>l_FormPerFileCheck | _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<br/>l_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. |
| UseFilesPerDBC<br/>n_UseFilesPerDBC | _0_, 1 | 0=One database dc2 file,<br/>1=Multiple file.\*.\*.dc2 files.<br/>See [Create File-Per-DBC](#create file-per-dbc)<br/>**Only if OldFilesPerDBC is 1** |
| | | 0=creates only a file.dc2 with all DBC (file) data |
| | | 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)<br/>l_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)<br/>l_ItemPerDBCCheck | _0_, 1 | 0=Don't check file.item.*.dc2 inclusion,<br/> 1=Check file.item.*.dc2 inclusion<br/>**Only if OldFilesPerDBC is 1**|
|||
| NoTimestamps<br/>n/a | 0, _1_ | 0=Do not clear<br/>1=Clear<br/>By default, timestamp fields are cleared on _Text_ files, because a lot of differencies are generated on _Binaries_ and _Text_ files with Timestamps activated. This timestamp field is part of the vcx, scx and other Foxpro binary source code files.<br/>**If set via parameter _cNoTimestamps_, this is ignored.**<br/>**There is no inheritance for this setting. First occurance wins.** |
| ClearUniqueID<br/>n/a | 0, _1_ | 0=Keep UniqueID,<br/>1=Clear Unique ID.<br/>Very useful for Diff and Merge.<br/>By default, UniqueID fields are cleared on _Text_ files, because a lot of differencies are generated with UniqueID activated.<br/>**There is no inheritance for this setting. First occurance wins.** |
| OptimizeByFilestamp<br/>n/a | _0_, 1 | 0=Don't optimize (always generate),<br/>1=Optimize (generate only when destination filestamp es older). By default this optimization is deactivated, and it is not recommended if using for merge, so _Bin_ and _Text_ files can be modified seperately.<br/><span style="background-color: gold;">Dangerous while working with branches!</span>.<br/>**There is no inheritance for this setting. First occurance wins.** |
| RemoveNullCharsFromCode<br/>l_RemoveNullCharsFromCode | 0, _1_ | 1=Drop NULL chars from source code,<br/>0=Leave NULL chars in source code |
| RemoveZOrderSetFromProps<br/>l_RemoveZOrderSetFromProps | _0_, 1 | 1=Remove ZOrderSet from the properties,<br/>0=Leave ZOrderSet in the properties |
|||
| PRG_Compat_Level<br/>n_PRG_Compat_Level | _0_, 1 | 0=Legacy,<br/>1=Use HELPSTRING as Class Procedure comment. |
| ClearDBFLastUpdate<br/>l_ClearDBFLastUpdate | 0, _1_ | 0=Keep DBF LastUpdate,<br/>1=Clear DBF LastUpdate.<br/>Useful for Diff, minimizes differences. |
| ExcludeDBFAutoincNextval<br/>n_ExcludeDBFAutoincNextval | _0_, 1 | 0=Do not exclude this value from db2,<br/>1=Exclude this value from db2 |
| DBF_Conversion_Included<br/>c_DBF_Conversion_Included | * | If DBF_Conversion_Support:4, you can specify multiple filemasks: www,fb2p_free.dbf.<br/>See [Order and range of records](#order-and-range-of-records).<br/>**Note:** This can be [changed per table](#configuration-file-per-table). |
| DBF_Conversion_Excluded<br/>c_DBF_Conversion_Excluded | | If DBF_Conversion_Support:4, you can specify multiple filemasks: www,fb2p_free.dbf.<br/>See [Order and range of records](#order-and-range-of-records).<br/>**Note:** This can be [changed per table](#configuration-file-per-table). |
| DBF_BinChar_Base64<br/>l_DBF_BinChar_Base64 | 0, _1_ | 0=For character type fields, if NoCPTrans 0=do not transform,<br/>1=use Base64 transform (default)<br/>**Note:** This can be [changed per table](#configuration-file-per-table). |
| DBF_IncludeDeleted<br/>l_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. |
|||
| 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 |
| | | **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
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
```
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:
| 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 |
Setting **per file** could only be used via this configuration file.
For defaults, see [Configuration file](#configuration-file).
## Excluding directories
It is possible to exclude directory structures from processing. Placing a file **.FoxBin2Prg_Ignore** into a directory will stop FoxBin2Prg from processing any file in this directory and it's subdirectories. The file must just exist and could otherwise be empty.
The difference to setting all *XXX_Conversion_Support to 0* is, that it could not be turned on again down the directory structure.
This was set up to ignore the local GoFish_ settings and history folder, the file will be automatically created by GoFish starting with version 6.2.004.
## FoxBin2Prg Internals
### Configuration
The internals found on this document are set via [Configuration file(s)](./FoxBin2Prg_Settings.md). See there for a complete list of all settings.
#### Configuration per table
New \<filename.dbf.cfg> configuration options. See [Configuration file per table](./FoxBin2Prg_Settings.md#configuration-file-per-table).
### Parameters
Some of the internals might be influenced by parameters of either the call of the [program / executable](./FoxBin2Prg_Run.md#usage-1) or [API, Execute method](./FoxBin2Prg_Object.md#execute).
### ZOrder
In _Text_ files and starting from v1.19.12, the ZOrder,
that determines the order on which objects are instantiated and which one is on top,
@@ -282,7 +154,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 +163,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 +190,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.
@@ -343,7 +215,7 @@ Since version v1.19.47, importing of Data can be activated with **"DBF_Conversio
If you want to export the data of just some tables and not for all of them, one way is moving the tables
for data export to another directory, or even a subdirectory of main data files,
and write a foxbin2prg.cfg with **"DBF_Conversion_Support: 4 or 8"** for this diretory only,
taking advantage of multi-configuration capability introduced on v1.19.25
taking advantage of [Multi configuration](./multi-configuration#multi-configuration) capability introduced on v1.19.25
A much better option that join the best of the two worlds, available from v1.19.44,
could be using the default setting **"DBF_Conversion_Support: 1"** and using **individual cfg files** for each table
(table.dbf.cfg) on which you want to export their data, so this way you can have only the structure in DB2 files
@@ -365,26 +237,6 @@ Example of multiple file masks (separte with ","):
"DBF_Conversion_Included: PET**.**, ??ME.DBF, ???.DBF, ?.**"
````
### Configuration 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".
#### Syntax for filename.dbf.cfg contents
````
"DBF_Conversion_Support: <4 for export only or 8 for bidirectional support>"
"DBF_Conversion_Order: <C_Expression>"
"DBF_Conversion_Condition: <C_Expression>"
````
#### Example: customers.dbf.cfg
````
"DBF_Conversion_Support: 4"
"DBF_Conversion_Order: cust_no"
"DBF_Conversion_Condition: cust_no > 10"
````
### DBF/DB2 Convertion Hooks
From version v1.19.19 there is a new property "run_AfterCreateTable" and from version v1.19.24 "run_AfterCreate_DB2".
The purpose of both properties is to allow the execution of an external program each time a DBF is converted to DB2 or a DB2
@@ -440,32 +292,6 @@ and send it to me. I will include it in the next release ;-)
.h language files are not supported anymore, and are now implemented inside FoxBin2Prg,
in the "C_LANG" class at the end of the PRG_
### Multi-config
Starting at version v1.19.25 FoxBin2Prg allow configuration per directory,
overriding the main configuration of FoxBin2Prg directory.
The override is by each setting, so you can reconfigure one or more settings and the
remaining settings are inherited from main CFG.
From v1.19.42 CFGs are inherited between directories from parent to child,
so if you have all your developments under, let's say, "c:\devs" directory and subdirs,
de CFG in "c:\devs" will be inherited on subdirs, and settings can be overriden one by one if you want to.
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.
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.
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),
using another program called ("filename_caps.exe") for capitalizing input files and output files.
@@ -683,20 +509,22 @@ This is a list of available methods and properties:
| Method()/Property<br/>Syntax | Description |
| -| - |
| **execute**<br/>loCnv.execute( cInputFile [,cType [,cTextName [,lGenText [,cDontShowErrors [,cDebug [,cDontShowProgress [,oModule [,oEx [,lRelanzarError [,cOriginalFileName [,cRecompile [,cNoTimestamps [,cBackupLevels [,cClearUniqueID [,cOptimizeByFilestamp [,cCFG_File](,cType-[,cTextName-[,lGenText-[,cDontShowErrors-[,cDebug-[,cDontShowProgress-[,oModule-[,oEx-[,lRelanzarError-[,cOriginalFileName-[,cRecompile-[,cNoTimestamps-[,cBackupLevels-[,cClearUniqueID-[,cOptimizeByFilestamp-[,cCFG_File ] ] ] ] ] ] ] ] ] ] ] ] ] ] ) | Main execution method to start a conversion<br/> See [Object version](./FoxBin2Prg_Object.md#execute) |
| **execute**<br/>loCnv.execute( cInputFile [,cType [,cTextName;<br/>[,lGenText [,cDontShowErrors [,cDebug;<br/>[,cDontShowProgress [,oModule [,oEx;<br/>[,lRelanzarError [,cOriginalFileName [,cRecompile;<br/>[,cNoTimestamps [,cBackupLevels [,cClearUniqueID;<br/>[,cOptimizeByFilestamp ,cCFG_File ] ] ] ] ] ] ] ] ] ] ] ] ] ] ) | Main execution method to start a conversion<br/> See [Object version](./FoxBin2Prg_Object.md#execute) |
| **conversionSupportType**<br/>loCnv.conversionSupportType( cFilename ) | Return the code of the support type (0,1,2,4,8) |
| **get_DBF_Configuration**<br/>loCnv.get_DBF_Configuration( cInputFile, @oOutDbfCfg ) | Returns 1 if a CFG is found for the indicated DBF, or 0 if not |
| **hasSupport_Bin2Prg**<br/>loCnv.hasSupport_Bin2Prg( cFilename.ext )<br/>loCnv.hasSupport_Bin2Prg( cExt ) | Returns .T. if there is support for converting the file or filetype indicated to _text_ |
| **hasSupport_Prg2Bin**<br/>loCnv.hasSupport_Prg2Bin( cFilename.ext )<br/>loCnv.hasSupport_Prg2Bin( cExt ) | Returns .T. if there is support for converting the file or filetype indicated to _Binary_ |
| **evaluateConfiguration**<br/>loCnv.evaluateConfiguration( cDontShowProgress [,cDontShowErrors [,cNoTimestamps [,cDebug [,cRecompile [,cBackupLevels [,cClearUniqueID [,cOptimizeByFilestamp [,cInputFile [,cInputFileTypeType [,cCFG_File](,cDontShowErrors-[,cNoTimestamps-[,cDebug-[,cRecompile-[,cBackupLevels-[,cClearUniqueID-[,cOptimizeByFilestamp-[,cInputFile-[,cInputFileTypeType-[,cCFG_File) ] ] ] ] ] ] ] ] ) | Forces FoxBin2Prg to process the directory indicated in the cInputFile and update any CFG in the directory or their parents |
| **evaluateConfiguration**<br/>loCnv.evaluateConfiguration( cDontShowProgress;<br/>[,cDontShowErrors [,cNoTimestamps [,cDebug;<br/>[,cRecompile [,cBackupLevels [,cClearUniqueID;<br/>[,cOptimizeByFilestamp [,cInputFile [,cInputFileTypeType;<br/>[,cCFG_File] ] ] ] ] ] ] ] ] ) | Forces FoxBin2Prg to process the directory indicated in the cInputFile and update any CFG in the directory or their parents |
| **loadProgressbarForm**<br/>loCnv.loadProgressbarForm() | Load and show the progressbar form as upper level window |
| **unloadProgressbarForm**<br/>loCnv.unloadProgressbarForm() | Hide and unload the progressbar form |
| **updateProgressbar**<br/>loCnt.updateProgressbar( cText, nValue, nTotal, nType ) | Update the progressbar and the message. nType indicates which progressbar to update, being 0=1st PB and 1=2nd PB |
| **get_DirSettings**<br/>loCnv.get_DirSettings( cDir ) | Returns a CFG object with the settings that are applied on the indicated directory<br/>See [Configuration file](#configuration-file) for the properties and how they fit to the settings file. |
| **get_DirSettings**<br/>loCnv.get_DirSettings( cDir ) | Returns a CFG object with the settings that are applied on the indicated directory<br/>See [Configuration file](./FoxBin2Prg_Settings.md#configuration-file) for the properties and how they fit to the settings file. |
| **get_Ext2FromExt**<br/>loCnv.get_Ext2FromExt( cExt ) | Returns the _text extension_ corresponding to the _Binary_ extension indicated |
| **get_Processed**<br/>loCnv.get_Processed( @aProcessed, cFileMask ) | Returns an array with the status of the files being processed or that will be processed in no-real-process-mode if you set `l_ProcessFiles=.F.` before the call. Columns returned are 6: "cFile, cInOutType, cProcessed, cHasErrors, cSupported, cExpanded"` |
| **get_Processed**<br/>loCnv.get_Processed( @aProcessed, cFileMask ) | Returns an array with the status of the files being processed or that will be processed in no-real-process-mode.<br/>No-real-process-mode is set if `l_ProcessFiles=.F.` before the call.<br/>Columns returned are 6: "cFile, cInOutType, cProcessed, cHasErrors, cSupported, cExpanded"` |
| **clearProcessedFiles**<br/>loCnv.clearProcessedFiles() | Clear the statistics and the cache about processed files. If a file was processed and is already processed, being not cached will force to process it again |
| **wasProcessed**<br/>loCnv.wasProcessed( cFile ) | Returns .T. if the fullpath-file was processed, searching in the internal cache |
| **c_OutputFile**<br/>loCnv.c_OutputFile = cPath | A folder (or file) to write the output to. If not used, output be the source path.<br/>Similar to exe/prgs parameter. _cOutputFolder_- |
| **l_ProcessFiles**<br/>loCnv.l_ProcessFiles = Boolean | Controls if _Execute_ will process the files or simulate. If simulated, the files in the process can be read via _get_Processed_ method. Intended for expansions of FoxBin2Prg. |
#### Renamed
This is the translation table of old method names up to v1.19.41 and the new names:
@@ -780,9 +608,8 @@ For options on integrating FoxBin2Prg with SCM tools, look at this topic:
See [FoxBin2Prg and use with git](./FoxBin2Prg_git.md)
----
Last changed: _2023/09/06_
![VFPX logo](https://vfpx.github.io/images/vfpxbanner_small.gif)
This project is part of [VFPX](https://vfpx.github.io/).
----
Last changed: _2026/06/18_ ![Picture](./pictures/vfpxpoweredby_alternative.gif)
Last changed: _2026/06/21_ ![Picture](./pictures/vfpxpoweredby_alternative.gif)

View File

@@ -5,7 +5,7 @@ Documentation of FoxBin2Prg - A Binary to Text converter for MS Visual Foxpro 9
FoxBin2Prg might be used as an EXE either from Windows or VFP, or as as prg from inside VFP in a [command line](./FoxBin2Prg_Run.md) way.
This document deals with the integration as an VFP Object using VFP based objects.
For settings, API and other realted stuff see [Internals](./FoxBin2Prg_Internals.md).
For settings see [Configuration](./FoxBin2Prg_Settings.md), for API and other related stuff see [Internals](./FoxBin2Prg_Internals.md).
The original document was created by [Fernando D. Bozzo](https://github.com/fdbozzo) whom I like to thank for the great project.
Pictures are taken from the original project.
@@ -42,7 +42,10 @@ Transforming file(s) works like
`obj.execute(cInputFile [,cType [,cTextName [,lGenText [,cDontShowErrors [,cDebug [,cDontShowProgress [,oModule [,oEx [,lRelanzarError [,cOriginalFileName [,cRecompile [,cNoTimestamps [,cBackupLevels [,cClearUniqueID [,cOptimizeByFilestamp [,cCFG_File] ] ] ] ] ] ] ] ] ] ] ] ] ] ])`
A lot of the parameters are the same as calling the [command line](./FoxBin2Prg_Run.md),
some additional are added and some are not string type.
Some settings will overwrite configuration. Using an object as cCFG_File will overwrite all configuration.
Some settings will overwrite configuration.
Using an file as cCFG_File with `InhibitInheritance=3` set will overwrite all configuration. See [Configuration file(s)](./FoxBin2Prg_Settings.md) for more information. This file will be read as first setting, see [Multi config](./FoxBin2Prg_Settings.md#multi-configuration).
Using an object as oCFG (instead of cCFG_File) will overwrite all configuration and only this settings will be used.
| Parameter | Value (_Default_) | Description |
| ----- | ----- | ----- |
@@ -61,21 +64,21 @@ Some settings will overwrite configuration. Using an object as cCFG_File will ov
| | -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 |
| cDebug | _0_, 1, 2 | '0 'no debug, '1' for generating process LOGs, stop on errors, '2' like '1' and special log.<br/>This has precedence over any value in the config files. Only the first valid value will be used. |
| cDontShowProgress | 0, _1_, 2 | '0' show progress, '1' for **not** showing the process window, '2' Show only for multi-file processing |
| cDontShowErrors | _0_, 1 | '1' for NOT showing errors in MESSAGEBOX.<br/>This has precedence over the _DontShowErrors_ setting. |
| cDebug | _0_, 1, 2 | '0 'no debug, '1' for generating process LOGs, stop on errors, '2' like '1' and special log.<br/>This has precedence over the _Debug_ value in the config files. |
| cDontShowProgress | 0, _1_, 2 | '0' show progress, '1' for **not** showing the process window, '2' Show only for multi-file processing.<br/>This has precedence over the _ShowProgressbar_ setting. Value "0","1" is inverted to the setting. |
| oModule | | Internal use for Unit Testing |
| oEx | | Exception object, return for errorhandling |
| lRelanzarError | .T.. _.F._ | Throw error to caller of _.Execute()_ |
| cOriginalFileName | text | used in those cases in which inputFile is a temporary filename and you want to generate the correct filename on the header of the text version |
| cRecompile | 0, _1_ | Indicates recompile ('1') the binary once generated. <br/> True if called from SCCAPI (SCCTEXT.PRG) compatibility mode. |
| | path | The binary is compiled from this path |
| cNoTimestamps | 0, _1_ | Indicates if timestamp must be cleared ('1' or empty) or not ('0') |
| cNoTimestamps | 0, _1_ | Indicates if timestamp must be cleared ('1' or empty) or not ('0'),<br/>This has precedence over the _NoTimestamps_ setting. |
| cBackupLevels | 0, _1_, .. | "0" no Bakup, "1", one level _filename_.bak, "n" n levels of Backup _filename_.n.bak |
| cClearUniqueID | 0, _1_ | 0=Keep UniqueID in text files, 1=Clear Unique ID. Useful for Diff and Merge |
| cOptimizeByFilestamp | _0_, 1 | 1=Optimize file regeneration depending on file timestamp.<br/><span style="background-color: gold;">Dangerous while working with branches!</span> |
| cCFG_File<br/>or oCFG | 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. |
| cClearUniqueID | 0, _1_ | 0=Keep UniqueID in text files, 1=Clear Unique ID. Useful for Diff and Merge.<br/>This has precedence over the _ClearUniqueID_ setting. |
| cOptimizeByFilestamp | _0_, 1 | 1=Optimize file regeneration depending on file timestamp.<br/>This has precedence over the _OptimizeByFilestamp_ setting.<br/><span style="background-color: gold;">Dangerous while working with branches!</span> |
| cCFG_File<br/>or oCFG | filename | Indicates a CFG filename for not using the default on foxbin2prg directory or path.<br/>See [Configuration file(s)](./FoxBin2Prg_Settings.md) and [Multi config](./FoxBin2Prg_Settings.md#multi-configuration) for more information. |
| | object | An object containing configuration options to use. See [Internals](./FoxBin2Prg_Internals.md) for object creation.<br/>If this is set, no additional configuration file will be read. |
#### cOutputFolder
The procedural call of FoxBin2Prg like
@@ -105,4 +108,4 @@ Return value is 0=OK, 1=Error.
This project is part of [VFPX](https://vfpx.github.io/).
----
Last changed: _2026/06/18_ ![Picture](./pictures/vfpxpoweredby_alternative.gif)
Last changed: _2026/06/21_ ![Picture](./pictures/vfpxpoweredby_alternative.gif)

View File

@@ -16,8 +16,13 @@ As far as possible these are the original documents. Changes are added where fun
- [PRG](#prg)
- [Parameters](#parameters)
- [Usage](#usage)
- [Usage 1](#usage-1)
- [Usage 2](#usage-2)
- [Usage 3](#usage-3)
- [Return values](#return-values)
- [Examples](#Examples)
- [Using the "EXE" version](#using-the-exe-version)
- [Using the "PRG" version](#using-the-prg-version)
- [Explorer SendTo](#explorer-sendto)
----
@@ -28,22 +33,23 @@ Since the EXE is basically the prg packed with some controling files, the way to
The knowledge of differences in calling, DO .. WITH syntax separating parameters with "," and the DOS way off calling will be assumed.
Do the similarity of the call, the prg version takes all parameters as strings too.
For settings and other related stuff see [Internals](./FoxBin2Prg_Internals.md).
For settings see [Configuration](./FoxBin2Prg_Settings.md), for API and other related stuff see [Internals](./FoxBin2Prg_Internals.md).
## Differences on excecution
### EXE
The exe contains the most controling structures and the program itself.
Alongside the _FoxBin2Prg.exe_ must be _\_FileName\_Caps.exe_ .
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.
See [Configuration](./FoxBin2Prg_Settings.md) for information about settings.
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:
- _FileName_Caps.exe_
- _Props*.txt_
- _FileName_Caps.exe_
- _FoxBin2Prg.cfg_ is recomended
- _FoxBin2Prg.cfg_ is recomended, see [Configuration](./FoxBin2Prg_Settings.md)
#### Note
All mentioned files need to be in the same folder. You can't use just the PRG without the rest of the mentioned files.
@@ -61,12 +67,13 @@ Remember that using the prg style, parameters must be wrapped in string delimite
#### Note
Do to the compatibility with VSS the usage of _cInputFile_ and _cType_ is odd.
#### Important note:
#### Important note
When you process a directory, it is used as the base for the compilation of _Binaries_,
and because of this, never process more than one directory in the same process,
because the compilation may not be ok. To process more than one directory (or project),
just select and process each one independently, in parallel if you like, but in different processes.
---
## Usage
### Usage 1
`FoxBin2Prg.EXE cInputFile [,cType [,cTextName [,lGenText [,cDontShowErrors [,cDebug [,cDontShowProgress [,cOriginalFileName [,cRecompile [,cNoTimestamps [,cCFG_File [,cOutputFolder ] ] ] ] ] ] ] ] ] ] ] ]`
@@ -86,14 +93,14 @@ just select and process each one independently, in parallel if you like, but in
| | 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 |
| cTextName | Text filename. | Only for SCCAPI (SCCTEXT.PRG) compatibility mode. File to use. |
| lGenText | .T., .F. | Only for SCCAPI (SCCTEXT.PRG) compatibility mode.<br/>.T.=Generates _Text_, .F.=Generates _Binary_.<br/>**Note:** _cType_ have predominance over _lGenText_ |
| cDontShowErrors | _0_, 1 | '1' for NOT showing errors in MESSAGEBOX |
| cDebug | _0_, 1, 2 | '0 'no debug, '1' for generating process LOGs, stop on errors, '2' like '1' and special log.<br/>This has precedence over any value in the config files. |
| cDontShowProgress | 0, _1_, 2 | '0' show progress, '1' for **not** showing the process window, '2' Show only for multi-file processing |
| cDontShowErrors | _0_, 1 | '1' for NOT showing errors in MESSAGEBOX.<br/>This has Precedence Over The _Dontshowerrors_ setting. |
| cDebug | _0_, 1, 2 | '0 'no debug, '1' for generating process LOGs, stop on errors, '2' like '1' and special log.<br/>This has precedence over any value in the config files.<br/>This has Precedence Over The _Debug_ setting. |
| cDontShowProgress | 0, _1_, 2 | '0' show progress, '1' for **not** showing the process window, '2' Show only for multi-file processing<br/>This has Precedence Over The _ShowProgressbar_ setting. Value "0","1" is inverted to the setting. |
| cOriginalFileName | text | used in those cases in which inputFile is a temporary filename and you want to generate the correct filename on the header of the _Text_ version |
| cRecompile | 0, _1_ | Indicates recompile ('1') the _Binary_ once generated. <br/> True if called from SCCAPI (SCCTEXT.PRG) compatibility mode. |
| | 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 special 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. |
| cNoTimestamps | 0, _1_ | Indicates if timestamp must be cleared ('1' or empty) or not ('0').<br/>This has Precedence Over The _NoTimestamps_ setting. |
| cCFG_File | filename | Indicates a special 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.<br/>See [Configuration](./FoxBin2Prg_Settings.md) |
| cOutputFolder | folder | Optional. A folder to write the output to. If not used, output be the source path. |
#### Note #1
@@ -109,16 +116,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.**<br/>See [Configuration](./FoxBin2Prg_Settings.md) |
| cDebug | '1' for generating process LOGs, stop on errors<br/>This has precedence over any value in the config files. |
### Usage 3
@@ -132,7 +140,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.
@@ -140,7 +148,9 @@ Calling inside VFP with `DO FoxBin2Prg.EXE` works with this dashed parameters.
Return value via _ErrorLevel_ is 0=OK, 1=Error.
## Examples
### Using the "EXE" version: (useful for calling from 3rd party programs)
### Using the "EXE" version
**Useful for calling from 3rd party programs.**
Note, the EXE must be compiled to the VFP version you are using.
| command | description |
| - | - |
@@ -152,7 +162,8 @@ Return value via _ErrorLevel_ is 0=OK, 1=Error.
| `FOXBIN2PRG.EXE "<path>\file.vcx::cus_client"` | Generates only the _Text_ version of the individual class cus_client of file.vcx (with UseClassPerFile:1 or 2) |
| `FOXBIN2PRG.EXE "<path>\proj.pj2" "*" \| find /V ""` | Generates the _Binary_ files for all the files in the PJ2 and outputs to stdOut |
### Using the "PRG" version:
### Using the "PRG" version
**Useful for calling from in IDE, in special if several versions of VFP are active.**
| command | description |
| - | - |
@@ -183,4 +194,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/21_ ![Picture](./pictures/vfpxpoweredby_alternative.gif)

397
docs/FoxBin2Prg_Settings.md Normal file
View File

@@ -0,0 +1,397 @@
# FoxBin2Prg Configuration
Documentation of FoxBin2Prg - A Binary to Text converter for MS Visual Foxpro 9
## Purpose of this document
This document shows the use of configuration files and the varius setrtings on FoxBin2Prg.
----
## Table of contents
- [Configuration file](#configuration-file)
- [Multi config](#multi-configuration)
- [Example](#example)
- [Configuration file per table](#configuration-file-per-table)
- [Excluding directories](#excluding-directories)
## 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
DO FOXBIN2PRG.PRG WITH "-C","config.cfg" &&==> Generates a config file like FoxBin2Prg.cfg with recent settings of path of second parameter
```
An example of a template is given in [Example](#example)
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.
There is a [Multi config](#multi-configuration), 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](./FoxBin2Prg_Internals.md#pem).
| FoxBin2Prg.cfg keywords<br/>Property of settings object | Value (_Default_) | Description |
| ----- | ----- | ----- |
| Language | _(auto)_,<br/>EN, FR, ES, DE | Language of templates, shown messages and LOGs. EN=English, FR=French, ES=Espa<70>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.<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 _cDontShowErrors_, 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.** |
| BackgroundImage<br/>c_BackgroundImage | \<cFile\> | Backgroundimage for process form |
| HomeDir<br/>n_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 |
| BodyDevInfo<br/>n_BodyDevInfo | _0_, 1, 2 | 0=Don't keep DevInfo for body pjx records, 1=Keep DevInfo, 2 = Don't keep DevInfo or ObjRev.<br/>Setting this to 2 prevents the PJ2 file from changing just because two developers built the project on their machines |
|||
| InhibitInheritance<br/>n_InhibitInheritance | _0_, 1, 2, 3 | **This settings is for config file via parameter only**. See [Multi config](#multi-configuration).<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) |
| PJX_Conversion_Support<br/>.n_PJX_Conversion_Support | 0, 1, _2_ | Default value is 2 - Bidirectional ((Merge/Only Structure!),<br/>4=Generate _Text_ with DATA (Diff), 8=Export and Import DATA (Merge/Structure & Data) and _bin_) support activated |
| VCX_Conversion_Support<br/>.n_VCX_Conversion_Support | 0, 1, _2_ | Default value is 2 - Bidirectional (_Text_ and _bin_) support activated |
| SCX_Conversion_Support<br/>.n_SCX_Conversion_Support | 0, 1, _2_ | Default value is 2 - Bidirectional (_Text_ and _bin_) support activated |
| FRX_Conversion_Support<br/>.n_FRX_Conversion_Support | 0, 1, _2_ | Default value is 2 - Bidirectional (_Text_ and _bin_) support activated |
| LBX_Conversion_Support<br/>.n_LBX_Conversion_Support | 0, 1, _2_ | Default value is 2 - Bidirectional (_Text_ and _bin_) support activated |
| MNX_Conversion_Support<br/>.n_MNX_Conversion_Support | 0, 1, _2_ | Default value is 2 - Bidirectional (_Text_ and _bin_) support activated |
| DBC_Conversion_Support<br/>.n_DBC_Conversion_Support | 0, 1, _2_ | Default value is 2 - Bidirectional (_Text_ and _bin_) support activated |
| DBF_Conversion_Support<br/>.n_DBF_Conversion_Support | 0, _1_, 2, 4, 8 | Default value is 1 - just _Text_ support activated.<br/>The support for regenerating DBFs structures (value = 2) are disabled by default to not overrite data accidentally. When activating bidirectional support, keep in mind that Data is not restored, just the structure and indexes!.<br/>A value of 4 is used to export Structure and Data, but exported data is not imported again.<br/>A value of 8 is used for bidirectional support (No General fields!). <br/> **Note:** This can be [changed per table](#configuration-file-per-table). |
| FKY_Conversion_Support<br/>.n_FKY_Conversion_Support | 0, _1_ | Default value is 1 - _Text_ support activated |
| MEM_Conversion_Support<br/>.n_MEM_Conversion_Support | 0, _1_ | Default value is 1 - _Text_ support activated |
|||
| CheckFileInPath<br/>n_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](./FoxBin2Prg_Internals.md#storing-paths-for-pjx) |
|||
| UseClassPerFile<br/>n_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](./FoxBin2Prg_Internals.md#create-class-per-file) |
| [RedirectClassPerFileToMain:](./FoxBin2Prg_Internals.md#redirectclassperfiletomain:)<br/>l_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<br/>n_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](./FoxBin2Prg_Internals.md#classperfilecheck)<br/>l_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 |
|||
| [UseFormSettings](./FoxBin2Prg_Internals.md#create-file-per-form)<br/>l_UseFormSettings | _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<br/>n_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](./FoxBin2Prg_Internals.md#create-class-per-file) |
| [RedirectFormPerFileToMain](./FoxBin2Prg_Internals.md#redirectclassperfiletomain)<br/>l_RedirectFormPerFileToMain | _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<br/>n_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](./FoxBin2Prg_Internals.md#classperfilecheck)<br/>l_FormPerFileCheck | _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<br/>l_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. |
| UseFilesPerDBC<br/>n_UseFilesPerDBC | _0_, 1 | 0=One database dc2 file,<br/>1=Multiple file.\*.\*.dc2 files.<br/>See [Create File-Per-DBC](./FoxBin2Prg_Internals.md#create file-per-dbc)<br/>**Only if OldFilesPerDBC is 1** |
| | | 0=creates only a file.dc2 with all DBC (file) data |
| | | 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](./FoxBin2Prg_Internals.md#redirectfileperdbctomain)<br/>l_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](./FoxBin2Prg_Internals.md#itemperdbccheck)<br/>l_ItemPerDBCCheck | _0_, 1 | 0=Don't check file.item.*.dc2 inclusion,<br/> 1=Check file.item.*.dc2 inclusion<br/>**Only if OldFilesPerDBC is 1**|
|||
| NoTimestamps<br/>n/a | 0, _1_ | 0=Do not clear<br/>1=Clear<br/>By default, timestamp fields are cleared on _Text_ files, because a lot of differencies are generated on _Binaries_ and _Text_ files with Timestamps activated. This timestamp field is part of the vcx, scx and other Foxpro binary source code files.<br/>**If set via parameter _cNoTimestamps_, this is ignored.**<br/>**There is no inheritance for this setting. First occurance wins.** |
| ClearUniqueID<br/>n/a | 0, _1_ | 0=Keep UniqueID,<br/>1=Clear Unique ID.<br/>Very useful for Diff and Merge.<br/>By default, UniqueID fields are cleared on _Text_ files, because a lot of differencies are generated with UniqueID activated.<br/>**If set via parameter _cClearUniqueID_, this is ignored.**<br/>**There is no inheritance for this setting. First occurance wins.** |
| OptimizeByFilestamp<br/>n/a | _0_, 1 | 0=Don't optimize (always generate),<br/>1=Optimize (generate only when destination filestamp es older). By default this optimization is deactivated, and it is not recommended if using for merge, so _Bin_ and _Text_ files can be modified seperately.<br/><span style="background-color: gold;">Dangerous while working with branches!</span>.<br/>**If set via parameter _cOptimizeByFilestamp_, this is ignored.**<br/>**There is no inheritance for this setting. First occurance wins.** |
| RemoveNullCharsFromCode<br/>l_RemoveNullCharsFromCode | 0, _1_ | 1=Drop NULL chars from source code,<br/>0=Leave NULL chars in source code |
| RemoveZOrderSetFromProps<br/>l_RemoveZOrderSetFromProps | _0_, 1 | 1=Remove ZOrderSet from the properties,<br/>0=Leave ZOrderSet in the properties |
|||
| PRG_Compat_Level<br/>n_PRG_Compat_Level | _0_, 1 | 0=Legacy,<br/>1=Use HELPSTRING as Class Procedure comment. |
| ClearDBFLastUpdate<br/>l_ClearDBFLastUpdate | 0, _1_ | 0=Keep DBF LastUpdate,<br/>1=Clear DBF LastUpdate.<br/>Useful for Diff, minimizes differences. |
| ExcludeDBFAutoincNextval<br/>n_ExcludeDBFAutoincNextval | _0_, 1 | 0=Do not exclude this value from db2,<br/>1=Exclude this value from db2 |
| DBF_Conversion_Included<br/>c_DBF_Conversion_Included | * | If DBF_Conversion_Support:4, you can specify multiple filemasks: www,fb2p_free.dbf.<br/>See [Order and range of records](./FoxBin2Prg_Internals.md#order-and-range-of-records).<br/>**Note:** This can be [changed per table](./FoxBin2Prg_Internals.md#configuration-file-per-table). |
| DBF_Conversion_Excluded<br/>c_DBF_Conversion_Excluded | | If DBF_Conversion_Support:4, you can specify multiple filemasks: www,fb2p_free.dbf.<br/>See [Order and range of records](./FoxBin2Prg_Internals.md#order-and-range-of-records).<br/>**Note:** This can be [changed per table](./FoxBin2Prg_Internals.md#configuration-file-per-table). |
| DBF_BinChar_Base64<br/>l_DBF_BinChar_Base64 | 0, _1_ | 0=For character type fields, if NoCPTrans 0=do not transform,<br/>1=use Base64 transform (default)<br/>**Note:** This can be [changed per table](./FoxBin2Prg_Internals.md#configuration-file-per-table). |
| DBF_IncludeDeleted<br/>l_DBF_IncludeDeleted | _0_, 1 | 0=Do not include deleted records (default),<br/>1=Include deleted records<br/>**Note:** This can be [changed per table](./FoxBin2Prg_Internals.md#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. |
|||
| extension: xx2 | | FoxBin2Prg extensions ends in '2' (pj2, vc2, sc2, etc), but you can change that. |
| 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
The options will be read outside in, top to down. See [Multi config](#multi-configuration)
#### Multi configuration
Starting at version v1.19.25 FoxBin2Prg allow configuration per directory,
overriding the main configuration of FoxBin2Prg directory.
The override is by each setting, so you can reconfigure one or more settings and the
remaining settings are inherited from main CFG.
From v1.19.42 CFGs are inherited between directories from parent to child,
so if you have all your developments under, let's say, "c:\devs" directory and subdirs,
de CFG in "c:\devs" will be inherited on subdirs, and settings can be overriden one by one if you want to.
This inheritance saves a lot of time and minimizes the CFGs needed \:\)
The order is:
1. An optional configuration file given by the parameters [program / executable](./FoxBin2Prg_Run.md#usage-1) or [API, Execute method](./FoxBin2Prg_Object.md#execute)
2. An optional default configuration file next to the prg/exe
3. Any configuration file drive root up to current folder
3. Folder and subfolder of current folder. *This is, if called for a pjx, not only the pjx folder, any subfolder could have configuration file, valid for the files of this subfolder and it's subfolders.*
If the _optional configuration file given by the parameter_ sets `InhibitInheritance` on a different value the 0, the chain of inheritance will be different, see above.
##### 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. There are some exceptions, see below.
A different 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.
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.
### Example
This is a template of a configuration file as created with
```
DO FOXBIN2PRG.PRG WITH "-c","template.cfg" &&==> Generates a template for FoxBin2Prg.cfg config file with newest settings
```
```
*################################################################################################################
*FOXBIN2PRG.CFG configuration options: (If no values given, these are the DEFAULTS)
*Version: v1.21.05
*****************************************************************************************************************
* Note, configuration files will follow an inheritance.
* 1. Default values
* 2., optional FOXBIN2PRG.CFG in folder of FOXBIN2PRG.EXE
* or, if defined, a config file given by a parameter calling FOXBIN2PRG
* if used, the InhibitInheritance setting controls if other config files will be evaluated (default). See below.
* 3., optional FOXBIN2PRG.CFG in root of working directory
* 4., optional FOXBIN2PRG.CFG in every folder up to the working directory
* 5., optional Special settings per single DBF's (Syntax: <TableName>.dbf.cfg in tables folder)
* Some Parameter calling FOXBIN2PRG.EXE overturn this settings (except Defaults)
*****************************************************************************************************************
*-- Settings for internal work, not processing
*Language: (auto) && Language of shown messages and LOGs. EN=English, FR=French, ES=Espa<70>ol, DE=German, Not defined = AUTOMATIC [DEFAULT]
*ShowProgressbar: 1 && 0=Don't show, 1=Allways show, 2=Show only for multi-file processing
* && Note: This setting will be ignored, if cDontShowProgress parameter is set.
*DontShowErrors: 0 && Show message errors by default
* && Note: This setting will be ignored, if cDontShowError parameter is set.
* && Note: There is no inheritance for this setting. First occurance wins.
*ExtraBackupLevels: 1 && By default 1 BAK is created. With this you can make more .N.BAK, or none
* && Note: There is no inheritance for this setting. First occurance wins.
*Debug: 0 && 0=Don't Activate individual <file>.Log by default
* && 1=Activate individual <file>.Log by default
* && 2=???
* && Only valid if not controlled by parameter cDebug
*BackgroundImage: <cFile> && Backgroundimage for process form. Empty for empty Background. File not found uses default.
*HomeDir: 1 && Home directory in PJX
* && 0 don't save HomeDir in PJ2
* && 1 save HomeDir in PJ2
*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*-- Settings for config file via parameter only
*InhibitInheritance: 0 && 0=Allow scanning "regular" config files (file via parameter is just additional default)
* && 1=Only read tree from root of the file given by parameter, not FoxBin2Prg default
* && 2=Only read folder and subfolder of the file given by parameter
* && 3=Read no other file
* && This is like
* && 0 Default | Parameter file | Default near FoxBin2Prg | all other config files
* && 1 Default | Parameter file | Inheritance from root to parent of folder | folder and subdirs
* && 2 Default | Parameter file | folder and subdirs
* && 3 Default | Parameter file
*----------------------------------------------------------------------------------------------------------------
*-- Conversion operation by type
*PJX_Conversion_Support: 2 && 0=No support, 1=Generate TXT only (Diff), 2=Generate TXT and BIN (Merge)
*VCX_Conversion_Support: 2 && 0=No support, 1=Generate TXT only (Diff), 2=Generate TXT and BIN (Merge)
*SCX_Conversion_Support: 2 && 0=No support, 1=Generate TXT only (Diff), 2=Generate TXT and BIN (Merge)
*FRX_Conversion_Support: 2 && 0=No support, 1=Generate TXT only (Diff), 2=Generate TXT and BIN (Merge)
*LBX_Conversion_Support: 2 && 0=No support, 1=Generate TXT only (Diff), 2=Generate TXT and BIN (Merge)
*MNX_Conversion_Support: 2 && 0=No support, 1=Generate TXT only (Diff), 2=Generate TXT and BIN (Merge)
*DBC_Conversion_Support: 2 && 0=No support, 1=Generate TXT only (Diff), 2=Generate TXT and BIN (Merge)
*DBF_Conversion_Support: 1 && 0=No support, 1=Generate Header TXT only (Diff), 2=Generate Header TXT and BIN (Merge/Only Structure!), 4=Generate TXT with DATA (Diff), 8=Export and Import DATA (Merge/Structure & Data)
*FKY_Conversion_Support: 1 && 0=No support, 1=Generate TXT only (Diff)
*MEM_Conversion_Support: 1 && 0=No support, 1=Generate TXT only (Diff)
*----------------------------------------------------------------------------------------------------------------
*Setting for pjx files
*CheckFileInPath: 0 && Determines 2Txt deals with files not in the subfolders of the PJX. No handler for UNC paths.
* && 0 Ignore. Default
* && 1 Check and error out if file is not on same structure (for source control)
* && 2 Create absolute path if file is on different drive.
* && 3 Create absolute path if file is not in structure
*----------------------------------------------------------------------------------------------------------------
*Setting for container files (not pjx)
*-- CLASS (, FORM and DBC) options (tx2 is to read as vc2 or sc2, VCX might be SCX)
*-- FORM and DBC options default to this settings, if not set otherwise. See below.
*- Class per file options (UseClassPerFile: 1)
*UseClassPerFile: 0 && Determines how a library (or form) will handle included class (or, for forms, objects)
* && 0 One library.tx2 file
* && 1 Multiple file.class.tx2 files
* && 2 Multiple file.baseclass.class.tx2 files
*RedirectClassPerFileToMain: 0 && When regenerating binary files, determine target file
* && 0 Don't redirect to file.vcx/scx
* && 1 Redirect to file.vcx/scx when selecting file[.baseclass].class.tx2
* && RedirectClassType: 1 has precedence
*RedirectClassType: 0 && For classes created with UseClassPerFile>0 in the form file[.baseclass].class.tx2
* && Those files could be imported like file.tx2::Class::import or like file[.baseclass].class.tx2
* && For the second form:
* && 0 Redirect file[.baseclass].class.tx2 to file.VCX and add / replace all other classes of this library
* && 1 Redirect file[.baseclass].class.tx2 to file[.baseclass].class.VCX and do not touch file.VCX
* && 2 Redirect file[.baseclass].class.tx2 to file.VCX and do not touch other classes of file.VCX
*ClassPerFileCheck: 0 && Check, if files listed in the main file of a library or form will be included
* && 0 Don't check file inclusion
* && 1 Check file[.baseclass].class.tx2 inclusion
* && Only used if import file is in file[.baseclass].class.tx2 syntax
* && Ignored for RedirectClassType: 2
*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
*-- FORM options
*- Form per file options (UseFormSettings: 1)
*UseFormSettings: 0 && 1=Turns the File per SCX options on, 0 uses the old UseClassPerFile etc settings.
* && Options below will only read if UseFormSettings is set 1 before!
* && If UseFormSettings is set 0 later, all setting will be lost
*UseFormPerFile: 0 && Determines how a form will handle included objects
* && 0 One Form.sc2 file
* && 1 Multiple Form.Obj.sc2 files
* && 2 Multiple Form.baseclass.Obj.sc2 files
*RedirectFormPerFileToMain: 0 && When regenerating binary files, determine target file
* && 0 Don't redirect to Form.scx
* && 1 Redirect to Form.scx when selecting Form[.baseclass].Obj.sc2
* && RedirectFormType: 1 has precedence
*RedirectFormType: 0 && For classes created with UseFormPerFile>0 in the form Form[.baseclass].Obj.sc2
* && Those files could be imported like Form.sc2::Class::import or like Form[.baseclass].Obj.sc2
* && For the second form:
* && 0 Redirect Form[.baseclass].Obj.sc2 to Form.SCX and add / replace all other classes of this library
* && 1 Redirect Form[.baseclass].Obj.sc2 to Form[.baseclass].Obj.SCX and do not touch Form.SCX
* && 2 Redirect Form[.baseclass].Obj.sc2 to Form.SCX and do not touch other classes of Form.SCX
*FormPerFileCheck: 0 && Check, if files listed in the main file of a library or form will be included
* && 0 Don't check file inclusion
* && 1 Check Form[.baseclass].Obj.sc2 inclusion
* && Only used if import file is in Form[.baseclass].Obj.sc2 syntax
* && Ignored for RedirectFormType: 2
*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
*-- DBC options
*- File per DBC options (UseFilesPerDBC: 1)
*OldFilesPerDBC: 0 && 1=Turns the File per DBC options on, 0 uses the old UseClassPerFile etc settings.
* && Options below will only read if OldFilesPerDBC is set 1 before!
* && If OldFilesPerDBC is set 0 later, all setting will be lost
*UseFilesPerDBC: 0 && 0=One database dc2 file, 1=Multiple file.*.*.dc2 files
* && 0 creates only a file.dc2 with all DBC (file) data
* && 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: 0 && 0=Don't redirect to file.dc2, 1=Redirect to file.tx2 when selecting file.item.*.dc2
*ItemPerDBCCheck: 0 && 0=Don't check file.item.*.dc2 inclusion, 1=Check file.item.*.dc2 inclusion
*----------------------------------------------------------------------------------------------------------------
*-- General files
*NoTimestamps: 1 && Clear timestamps of several file types by default for minimize text-file differences
* && Note: This setting will be ignored, if cNoTimestamps parameter is set.
* && Note: There is no inheritance for this setting. First occurance wins.
*ClearUniqueID: 1 && 0=Keep UniqueID in text files, 1=Clear Unique ID. Useful for Diff and Merge
* && Note: There is no inheritance for this setting. First occurance wins.
*OptimizeByFilestamp: 0 && 1=Optimize file regeneration depending on file timestamp. Dangerous while working with branches!
* && Note: There is no inheritance for this setting. First occurance wins.
*RemoveNullCharsFromCode: 1 && 1=Drop .Null. chars from source code
*RemoveZOrderSetFromProps: 0 && 0=Do not remove ZOrderSet property from object, 1=Remove ZOrderSet property from object
*PRG_Compat_Level: 0 && 0=Legacy, 1=Use HELPSTRING as Class Procedure comment
*----------------------------------------------------------------------------------------------------------------
*-- PJX special
*BodyDevInfo: 0 && 0=Don't keep DevInfo for body pjx records, 1=Keep DevInfo, 2 = Don't keep DevInfo or ObjRev
*----------------------------------------------------------------------------------------------------------------
*-- DBF special
*ClearDBFLastUpdate: 1 && 0=Keep DBF LastUpdate, 1=Clear DBF LastUpdate. Useful for Diff.
*ExcludeDBFAutoincNextval: 0 && 0=Do not exclude this value from db2, 1=Exclude this value from db2
*DBF_Conversion_Included: * && If DBF_Conversion_Support:4, you can specify multiple filemasks: www,fb2p_free.dbf
*DBF_Conversion_Excluded: && If DBF_Conversion_Support:4, you can specify multiple filemasks: www,fb2p_free.dbf
*DBF_BinChar_Base64: 1 && For character type fields, if NoCPTrans 0=do not transform, 1=use Base64 transform (default)
*DBF_IncludeDeleted: 0 && 0=Do not include deleted records (default), 1=Include deleted records
*----------------------------------------------------------------------------------------------------------------
*-- Text file extensions
*extension: tx2=newext && Specify extensions to use. Default FoxBin2Prg extensions ends in '2' (see at the bottom)
*-- Example configuration for SourceSafe compatibility:
*extension: pj2=pja && Text file to PJX
*extension: vc2=vca && Text file to VCX
*extension: sc2=sca && Text file to SCX
*extension: fr2=fra && Text file to FRX
*extension: lb2=lba && Text file to LBX
*extension: mn2=mna && Text file to MNX
*extension: db2=dba && Text file to DBF
*extension: dc2=dca && Text file to DBC
*-- Additional extensions
*extension: fk2=fkx && Text file to FKY
*extension: me2=fkx && Text file to MEM
*
```
## 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.
```
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:
| 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 |
Setting *per file** could only be used via this configuration file.
For defaults, see [Configuration file](#configuration-file).
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".
#### Syntax for filename.dbf.cfg contents
````
"DBF_Conversion_Support: <4 for export only or 8 for bidirectional support>"
"DBF_Conversion_Order: <C_Expression>"
"DBF_Conversion_Condition: <C_Expression>"
````
#### Example: customers.dbf.cfg
````
"DBF_Conversion_Support: 4"
"DBF_Conversion_Order: cust_no"
"DBF_Conversion_Condition: cust_no > 10"
````
## Excluding directories
It is possible to exclude directory structures from processing. Placing a **.FoxBin2Prg_Ignore** file into a directory will stop FoxBin2Prg from processing any file in this directory and it's subdirectories. The file must just exist and could otherwise be empty.
The difference to setting all *XXX_Conversion_Support to 0* is, that it could not be turned on again down the directory structure.
This was set up to ignore the local GoFish_ settings and history folder, the file will be automatically created by GoFish starting with version 6.2.004.
----
![VFPX logo](https://vfpx.github.io/images/vfpxbanner_small.gif)
This project is part of [VFPX](https://vfpx.github.io/).
----
Last changed: _2026/06/21_ ![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
@@ -108,7 +109,7 @@ Also on blame.
If you go for the _lib.baseclass.classname.vc2_ or _lib.classname.vc2_ style is a matter of taste.
I can see baseclass on classname, so there is not much value, other might think different.
But split into classes makes life easy.
This is to be done in the [config file](#foxbin2prg-config), setting _UseClassPerFile_ option to 1 or 2.
This is to be done in the [config file](./FoxBin2Prg_Settings.md), setting _UseClassPerFile_ option to 1 or 2.
#### Forms
Side effect of splitting VCX is that SCX will be split into 3 files too.
@@ -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](./FoxBin2Prg_Settings.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.
@@ -206,9 +208,9 @@ An example for _Text_ only use.
#include general
#dbx data
!*.dbf
!*.cdx
!*.fpt
#!*.dbf
#!*.cdx
#!*.fpt
!*.dbc
!*.dc[tx]
@@ -242,7 +244,7 @@ An example for _Text_ only use.
!*.mn2
!*.sc2
!*.lb2
#!*.d[bc]2
!*.d[bc]2
#include special
#default git
@@ -260,169 +262,51 @@ An example for _Text_ only use.
foxuser.*
_command.prg
````
As you see, this assumes that tables and databases are stored as binary.
I think I will swap to use them as _Text_ too, since version 1.19.55 of FoxBin2Prg eleminates some problems with this idea.
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.
The good on this is, if I change my mind and alter settings in it, FoxBin2Prg will find the setting that fit to the data on each commit.
If I have to checkout old stuff - the setting will fit.
````
*################################################################################################################
*FOXBIN2PRG.CFG configuration options: (If no values given, these are the DEFAULTS)
*Version: v1.21.01
*****************************************************************************************************************
* Note, configuration files will follow an inheritance.
* 1. Default values
* 2. optional FOXBIN2PRG.CFG in folder of FOXBIN2PRG.EXE,
* or, if defined, a config file given by a parameter calling FOXBIN2PRG,
* if used, the AllowInheritance setting controls if other config files will be evaluated,
* 3. optional FOXBIN2PRG.CFG in root of working directory,
* 4. optional FOXBIN2PRG.CFG in every folder up to the working directory,
* 5. optional Special settings per single DBF's Syntax:<TableName>.dbf.cfg in tables folder),
* 6. Parameter calling FOXBIN2PRG.EXE.
* Some Parameter calling FOXBIN2PRG.EXE overturn this settings (except Defaults)
*****************************************************************************************************************
*-- Settings for internal work, not processing
*Language: (auto) && Language of shown messages and LOGs. EN=English, FR=French, ES=Espa<70>ol, DE=German, Not defined = AUTOMATIC [DEFAULT]
*ShowProgressbar: 1 && 0=Don't show, 1=Allways show, 2=Show only for multi-file processing
*DontShowErrors: 0 && Show message errors by default
*ExtraBackupLevels: 1 && By default 1 BAK is created. With this you can make more .N.BAK, or none
*Debug: 0 && Don't Activate individual <file>.Log by default
*BackgroundImage: <cFile> && Backgroundimage for process form. Empty for empty Background. File not found uses default.
*HomeDir: 1 && Home directory in PJX
* && 0 don't save HomeDir in PJ2
* && 1 save HomeDir in PJ2
*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*-- Settings for config file via parameter only
*AllowInheritance: 1 && 0=Not allow, 1=Allow scanning "regular" config files
*----------------------------------------------------------------------------------------------------------------
*-- Conversion operation by type
*PJX_Conversion_Support: 2 && 0=No support, 1=Generate TXT only (Diff), 2=Generate TXT and BIN (Merge)
*VCX_Conversion_Support: 2 && 0=No support, 1=Generate TXT only (Diff), 2=Generate TXT and BIN (Merge)
*SCX_Conversion_Support: 2 && 0=No support, 1=Generate TXT only (Diff), 2=Generate TXT and BIN (Merge)
*FRX_Conversion_Support: 2 && 0=No support, 1=Generate TXT only (Diff), 2=Generate TXT and BIN (Merge)
*LBX_Conversion_Support: 2 && 0=No support, 1=Generate TXT only (Diff), 2=Generate TXT and BIN (Merge)
*MNX_Conversion_Support: 2 && 0=No support, 1=Generate TXT only (Diff), 2=Generate TXT and BIN (Merge)
*DBC_Conversion_Support: 2 && 0=No support, 1=Generate TXT only (Diff), 2=Generate TXT and BIN (Merge)
*DBF_Conversion_Support: 1 && 0=No support, 1=Generate Header TXT only (Diff), 2=Generate Header TXT and BIN (Merge/Only Structure!), 4=Generate TXT with DATA (Diff), 8=Export and Import DATA (Merge/Structure & Data)
*FKY_Conversion_Support: 1 && 0=No support, 1=Generate TXT only (Diff)
*MEM_Conversion_Support: 1 && 0=No support, 1=Generate TXT only (Diff)
*----------------------------------------------------------------------------------------------------------------
*Setting for pjx files
*CheckFileInPath: 0 && Determines 2Txt deals with files not in the subfolders of the PJX. No handler for UNC paths.
* && 0 Ignore. Default
* && 1 Check and error out if file is not on same structure (for source control)
* && 2 Create absolute path if file is on different drive.
* && 3 Create absolute path if file is not in structure
*----------------------------------------------------------------------------------------------------------------
*Setting for container files (not pjx)
*-- CLASS and FORM options (tx2 is to read as vc2 or sc2, VCX might be SCX)
*- Class per file options (UseClassPerFile: 1)
*UseClassPerFile: 0 && Determines how a library (or form) will handle included class (or, for forms, objects)
* && 0 One library.tx2 file
* && 1 Multiple file.class.tx2 files
* && 2 Multiple file.baseclass.class.tx2 files
*RedirectClassPerFileToMain: 0 && When regenerating binary files, determine target file
* && 0 Don't redirect to file.tx2
* && 1 Redirect to file.tx2 when selecting file[.baseclass].class.tx2
* && RedirectClassType: 1 has precedence
*RedirectClassType: 0 && For classes created with UseClassPerFile>0 in the form file[.baseclass].class.tx2
* && Those files could be imported like file.tx2::Class::import or like file[.baseclass].class.tx2
* && For the second form:
* && 0 Redirect file[.baseclass].class.tx2 to file.VCX and add / replace all other classes of this library
* && 1 Redirect file[.baseclass].class.tx2 to file[.baseclass].class.VCX and do not touch file.VCX
* && 2 Redirect file[.baseclass].class.tx2 to file.VCX and do not touch other classes of file.VCX
*ClassPerFileCheck: 0 && Check, if files listed in the main file of a library or form will be included
* && 0 Don't check file inclusion
* && 1 Check file[.baseclass].class.tx2 inclusion
* && Only used if import file is in file[.baseclass].class.tx2 syntax
* && Ignored for RedirectClassType: 2
*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
*-- DBC options
*- File per DBC options (UseFilesPerDBC: 1)
*OldFilesPerDBC: 0 && 1=Turns the File per DBC options on, 0 uses the old UseClassPerFile etc settings.
* && Options below will only read if OldFilesPerDBC is set 1 before!
* && If OldFilesPerDBC is set 0 later, alle setting will be lost
*UseFilesPerDBC: 0 && 0=One database dc2 file, 1=Multiple file.*.*.dc2 files
* && 0 creates only a file.dc2 with all DBC (file) data
* && 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: 0 && 0=Don't redirect to file.dc2, 1=Redirect to file.tx2 when selecting file.item.*.dc2
*ItemPerDBCCheck: 0 && 0=Don't check file.item.*.dc2 inclusion, 1=Check file.item.*.dc2 inclusion
*----------------------------------------------------------------------------------------------------------------
*-- General files
*NoTimestamps: 1 && Clear timestamps of several file types by default for minimize text-file differences
*ClearUniqueID: 1 && 0=Keep UniqueID in text files, 1=Clear Unique ID. Useful for Diff and Merge
*OptimizeByFilestamp: 0 && 1=Optimize file regeneration depending on file timestamp. Dangerous while working with branches!
*RemoveNullCharsFromCode: 1 && 1=Drop .Null. chars from source code
*RemoveZOrderSetFromProps: 0 && 0=Do not remove ZOrderSet property from object, 1=Remove ZOrderSet property from object
*PRG_Compat_Level: 0 && 0=Legacy, 1=Use HELPSTRING as Class Procedure comment
*----------------------------------------------------------------------------------------------------------------
*-- PJX special
*BodyDevInfo: 0 && 0=Don't keep DevInfo for body pjx records, 1=Keep DevInfo
*----------------------------------------------------------------------------------------------------------------
*-- DBF special
*ClearDBFLastUpdate: 1 && 0=Keep DBF LastUpdate, 1=Clear DBF LastUpdate. Useful for Diff.
*ExcludeDBFAutoincNextval: 0 && 0=Do not exclude this value from db2, 1=Exclude this value from db2
*DBF_Conversion_Included: * && If DBF_Conversion_Support:4, you can specify multiple filemasks: www,fb2p_free.dbf
*DBF_Conversion_Excluded: && If DBF_Conversion_Support:4, you can specify multiple filemasks: www,fb2p_free.dbf
*DBF_BinChar_Base64: 1 && For character type fields, if NoCPTrans 0=do not transform, 1=use Base64 transform (default)
*DBF_IncludeDeleted: 0 && 0=Do not include deleted records (default), 1=Include deleted records
*----------------------------------------------------------------------------------------------------------------
*-- Text file extensions
*extension: tx2=newext && Specify extensions to use. Default FoxBin2Prg extensions ends in '2' (see at the bottom)
*-- Example configuration for SourceSafe compatibility:
*extension: pj2=pja && Text file to PJX
*extension: vc2=vca && Text file to VCX
*extension: sc2=sca && Text file to SCX
*extension: fr2=fra && Text file to FRX
*extension: lb2=lba && Text file to LBX
*extension: mn2=mna && Text file to MNX
*extension: db2=dba && Text file to DBF
*extension: dc2=dca && Text file to DBC
*-- Additional extensions
*extension: fk2=fkx && Text file to FKY
*extension: me2=fkx && Text file to MEM
````
All use off this are the last four lines. But I like to keep the template (recent as version 1.19.69).
- Using single classes - because it's much more easy to merge a single class then a whole library.
- A single class selected might be added to the VCX
- Turn off DBC and DBF conversion
If I have to checkout old stuff - the setting will fit. See [Configuration file(s)](./FoxBin2Prg_Settings.md) for detailed information.
----
![VFPX logo](https://vfpx.github.io/images/vfpxbanner_small.gif)
This project is part of [VFPX](https://vfpx.github.io/).
----
Last changed: _2023/11/26_ ![Picture](./pictures/vfpxpoweredby_alternative.gif)
Last changed: _2026/06/21_ ![Picture](./pictures/vfpxpoweredby_alternative.gif)

View File

@@ -333,8 +333,6 @@
* 18/06/2026 LScheffler v1.21.05 Docu: Better documentation if a settings us ignored when a parameter is set. Voth in in docu and setting files generated via -Cc options.
* 18/06/2026 LScheffler v1.21.05 Docu: Some settings will not follow inheritence, documented in docu and setting files generated via -Cc options.
* 18/06/2026 LScheffler v1.21.05 Docu: Minor changes
* 19/06/2026 LScheffler v1.21.06 Bug Fix: Fixed a typo in toF1oxBin2Prg. The "1" is not needed. #121 (ccantrell72)
* 19/06/2026 LScheffler v1.21.06 Bug Fix: Unused methods set_BinTableFlags and set_NumTableFlags removed. #122
* </HISTORIAL DE CAMBIOS Y NOTAS IMPORTANTES>
*
*---------------------------------------------------------------------------------------------------
@@ -517,11 +515,9 @@
* 19/09/2023 LScheffler Bug REPORT v1.21.00 Splitted database file is not regenerated. Problem with removed Spanish comment.
* 03/01/2024 LScheffler Bug REPORT v1.21.01 Problems regenerating single classes and forms from text files in class-per-file form; #105
* 25/03/2024 griessbach14943 Bug REPORT v1.21.02 Text To Bin with Fieldcaption = "NULL" (misnomer. it's the field name); #106
* 25/02/2026 omirian Bug REPORT v1.21.04 Brute force fixed Datatype error for tcDontShowProgress, #114
* 09/04/2026 ToniKoehler Bug REPORT v1.21.04 Fixed missing link SCM documentation, #116
* 18/06/2026 LScheffler Bug REPORT v1.21.04 Fixed a problem that cDontShowProgress parameter will be ignored if ShowProgressbar property is used. #118
* 19/06/2026 ccantrell72 Bug REPORT v1.21.05 Typo in toF1oxBin2Prg. The "1" is not needed. #121
* 19/06/2026 k-dawg66 Bug REPORT v1.21.05 Parameter name mismatch 'tcTableFlags' vs 'tcBinTableFlags'. #122
* 25/02/2026 omirian Bug REPORT v1.21.05 Brute force fixed Datatype error for tcDontShowProgress, #114
* 09/04/2026 ToniKoehler Bug REPORT v1.21.05 Fixed missing link SCM documentation, #116
* 18/06/2026 LScheffler Bug REPORT v1.21.05 Fixed a problem that cDontShowProgress parameter will be ignored if ShowProgressbar property is used. #118
* </TESTEO Y REPORTE DE BUGS (AGRADECIMIENTOS)>
*
@@ -2808,7 +2804,6 @@ Define Class c_foxbin2prg As Session
*!* Changed by: SF 18.06.2026
*!* <pdm>
*!* <change date="{^2026-06-18,14:49:00}">Changed by: SF<br />
*!* https://github.com/fdbozzo/foxbin2prg/issues/118 / Precedence of parameter cDontShowProgress over setting in config "." v1.21.04
*!* Parameter tcDontShowProgress has priority, as in DontShowProgress
*!* If tcDontShowProgress has a valid value, the setting will be ignored, and the parameter sets .n_ShowProgressbar further below.
*!* </change>
@@ -3246,7 +3241,7 @@ Define Class c_foxbin2prg As Session
*!* Changed by: SF 18.06.2026
*!* <pdm>
*!* <change date="{^2026-06-18,14:45:00}">Changed by: SF<br />
*!* https://github.com/fdbozzo/foxbin2prg/issues/114 / tcDontShowProgress type error "." v1.21.04
*!* Problem with removed type Error in tcDontShowProgress
*!* </change>
*!* </pdm>
* lo_CFG.n_ShowProgressbar = Icase(tcDontShowProgress=='0',1, tcDontShowProgress=='1',0, 2)
@@ -27086,18 +27081,7 @@ Define Class CL_DBF_INDEXES As CL_COL_BASE
laIndexFiles( 1 )
toFoxBin2Prg.writeLog( ' ' + Replicate('-', 98) )
*!* Changed by: LScheffler 19.6.2026
*!* <pdm>
*!* <change date="{^2026-06-19,18:25:00}">Changed by: LScheffler<br />
*!* https://github.com/fdbozzo/foxbin2prg/issues/121 / BUG - Line 27084 - '1' Typo v1.21.04
*!* Error in object name
*!* </change>
*!* </pdm>
* toF1oxBin2Prg.writeLog( loLang.C_INDEX2TXT_EXTRAFILES_LOC )
toFoxBin2Prg.writeLog( loLang.C_INDEX2TXT_EXTRAFILES_LOC )
*!* /Changed by LScheffler 19.6.2026
toF1oxBin2Prg.writeLog( loLang.C_INDEX2TXT_EXTRAFILES_LOC )
toFoxBin2Prg.writeLog( ' ' + Replicate('- ', 49) )
*Additional index files
@@ -30655,6 +30639,8 @@ Define Class CL_DBF_UTILS As Session
+ [<memberdata name="get_bintableflags" display="get_BinTableFlags"/>] ;
+ [<memberdata name="get_numtableflags" display="get_NumTableFlags"/>] ;
+ [<memberdata name="get_structure" display="get_Structure"/>] ;
+ [<memberdata name="set_bintableflags" display="set_BinTableFlags"/>] ;
+ [<memberdata name="set_numtableflags" display="set_NumTableFlags"/>] ;
+ [<memberdata name="totext" display="toText"/>] ;
+ [<memberdata name="write_dbc_backlink" display="write_DBC_BackLink"/>] ;
+ [</VFPData>]
@@ -31181,6 +31167,27 @@ Define Class CL_DBF_UTILS As Session
Return Asc( This.get_BinTableFlags(tcFile) )
Endproc
Procedure set_BinTableFlags
*-- Seteo los flags en la tabla indicada
Lparameters tcFile, tcBinTableFlags
Local lnHandle, lnWritten
lnHandle = Fopen(tcFile,1)
Fseek(lnHandle,28)
lnWritten = Fwrite(lnHandle, tcTableFlags, 1)
Fclose(lnHandle)
Return lnWritten
Endproc
Procedure set_NumTableFlags
*-- Seteo los flags en la tabla indicada
Lparameters tcFile, tnNumTableFlags
Return This.set_BinTableFlags( tcFile, Chr(tnNumTableFlags) )
Endproc
Enddefine

View File

@@ -0,0 +1,86 @@
# Prompt: init git in paralel cu SVN pentru un proiect ROA
Foloseste acest prompt intr-o sesiune Claude Code noua, deschisa in radacina proiectului
tinta (ex. `D:\ROA\ROAIMOB`). Functioneaza generic pentru orice proiect VFP din `D:\ROA\`
care are structura ROAACNPRO (proiect + subfolder COMUN\ partajat, ambele in SVN).
---
```
Vreau sa initializezi git pentru proiectul VFP din directorul curent, in paralel cu SVN-ul
existent (nu atinge SVN, nu rula comenzi svn, doar adauga .svn/ in .gitignore).
Structura e identica cu D:\ROA\ROAACNPRO: acest folder e propriul proiect VFP (are un .PJX
al lui), si contine un subfolder COMUN\ care e framework-ul PARTAJAT intre toate aplicatiile
ROA, versionat separat prin SVN (are propriul .svn\).
Fa exact ce s-a facut deja pentru ROAACNPRO (poti citi acolo ca referinta/sablon):
- D:\ROA\ROAACNPRO\.gitignore (sablon pentru .gitignore-ul proiectului principal)
- D:\ROA\ROAACNPRO\COMUN\.gitignore (sablon pentru .gitignore-ul din COMUN)
- D:\ROA\ROAACNPRO\CLAUDE.md (conventii proiect) si docs\cautare_vcx_vct.md (cum se cauta
cod in interiorul .vcx/.scx binare, via D:\ROA\UTIL\foxbin2prg\vcx2txt.ps1)
Pasi:
1. Verifica intai ce exista deja: `git status`/`.git` in radacina si in COMUN\, si
`git remote -v` daca exista deja vreun remote configurat gresit (asa cum a fost cazul la
ROAACNPRO, unde originul proiectului principal pointa gresit catre repo-ul comun.git).
2. REPO PRINCIPAL (radacina acestui folder):
- Daca nu exista .git, `git init -b main`.
- Creeaza/adapteaza .gitignore dupa modelul ROAACNPRO/.gitignore (artefacte VFP compilate:
*.fxp, *.mpx, *.bak, *.mpr, *.err, log.txt, *.tmp, *.dct, *.exe, cruft Windows), plus
obligatoriu `COMUN/` (COMUN e gestionat de git-ul lui separat, nu de-al acestui repo)
si `.svn/`.
- Deduce numele repo-ului gitea dupa conventia romfast/<nume-folder-lowercase>.git
(ex. romfast/roaimob.git). INAINTE sa creezi/pushezi orice, verifica cu
`git ls-remote git@gitea.romfast.ro:romfast/<nume>.git` daca exista deja si ce contine
(clone --depth 1 intr-un folder temporar din scratchpad daca ai dubii). Daca exista deja
cu istoric care nu se potriveste cu ce ai local, OPRESTE-TE si intreaba-ma inainte sa
faci push sau orice suprascriere.
- Daca remote-ul e gol/nou: add -A, commit "Initial commit — sursa <PROIECT>", adauga
origin, push normal (fara --force).
3. COMUN\ (subfolder-ul partajat):
- Initializeaza un git SEPARAT, propriu, in interiorul COMUN\ (COMUN are propriul .git,
nu e tracked de repo-ul principal — de-asta l-am exclus mai sus).
- .gitignore propriu in COMUN\ dupa modelul ROAACNPRO/COMUN/.gitignore (artefacte VFP +
`.svn/` + `bash.exe.stackdump`).
- Origin-ul din COMUN\ trebuie sa fie EXACT acelasi repo pentru toate proiectele ROA:
git@gitea.romfast.ro:romfast/comun.git — repo-ul asta e deja populat (din COMUN-ul lui
ROAACNPRO). NU face commit+push orbeste peste el.
- Fa intai `git fetch origin`, compara continutul de pe origin/main cu fisierele locale
din acest COMUN\ (diff pe folder, nu doar pe nume). Daca sunt identice sau diferentele
sunt neglijabile, seteaza pur si simplu branch-ul local sa urmareasca origin/main (fara
sa strici fisierele din working copy SVN). Daca sunt diferente reale intre COMUN-ul
acestui proiect si cel deja impins pe gitea, arata-mi un rezumat al diferentelor si
intreaba-ma explicit cum procedez (nu face force-push fara aprobarea mea explicita —
ar sterge ireversibil istoricul comun tuturor proiectelor ROA).
4. Cautare in cod VFP binar (.vcx/.scx) pentru acest proiect:
- Foloseste acelasi vcx2txt.ps1, dar parametrizat pentru proiectul curent (nu ROAACNPRO):
powershell -ExecutionPolicy Bypass -File D:\ROA\UTIL\foxbin2prg\vcx2txt.ps1 `
-Project D:\ROA\<PROIECT>\<proiect>.PJX -ProjectRoot D:\ROA\<PROIECT> `
-CacheRoot D:\ROA\UTIL\foxbin2prg\_textcache_<proiect>
- Cache separat per proiect (nu-l amesteca cu _textcache al ROAACNPRO). Grep in cache-ul
respectiv, la fel ca in docs\cautare_vcx_vct.md.
5. La final, adauga/actualizeaza CLAUDE.md al acestui proiect cu o sectiune scurta: git ruleaza
in paralel cu SVN legacy (SVN ramane sursa "vie" pentru COMUN, sincronizat manual catre git);
COMUN e partajat intre toate aplicatiile ROA prin acelasi git@gitea.romfast.ro:romfast/comun.git;
cautarile in .vcx/.scx se fac cu vcx2txt.ps1 parametrizat pentru acest proiect (vezi mai sus).
Inainte de orice `push --force` sau orice operatie care ar suprascrie istoric remote deja
existent (mai ales pe romfast/comun.git, care e comun mai multor proiecte), opreste-te si
intreaba-ma explicit — nu decide singur.
```
---
## Note
- Cel mai sensibil pas e COMUN\: daca versiunea de COMUN a noului proiect difera de cea deja
impinsa pe `comun.git` (din ROAACNPRO), Claude trebuie sa se opreasca si sa intrebe cum se
reconciliaza, nu sa faca force-push automat.
- Daca `romfast/<proiect>.git` nu exista inca pe gitea, trebuie creat gol acolo inainte de push
(manual sau prin API) — altfel push-ul esueaza cu "repository not found".

153
vcx2txt.ps1 Normal file
View File

@@ -0,0 +1,153 @@
<#
.SYNOPSIS
Converteste in TEXT (.vc2/.sc2/.fr2/.mn2/.dc2/.lb2) librariile/formele VFP binare,
ca sa poata fi cautat codul din proceduri/metode cu grep.
.DESCRIPTION
Implicit ("project mode"), converteste DOAR fisierele incluse in proiect (citite din .pjx),
nu tot folderul COMUN (care contine multe librarii nefolosite in ROAACNPRO).
Pentru fiecare fisier copiaza binarul + memo-ul (.vct/.sct/...) intr-un folder de cache care
oglindeste structura proiectului (ca sa NU murdareasca arborele SVN), ruleaza FoxBin2Prg.exe
acolo, si pastreaza doar fisierul TEXT. Incremental: sare peste ce e deja la zi.
NU e nevoie de IDE-ul VFP deschis (se foloseste FoxBin2Prg.exe compilat).
.PARAMETER Source
Optional. Daca e dat, ignora proiectul si converteste exact: un fisier .vcx/.scx/... SAU un
folder (recursiv). Folosit pentru conversii punctuale.
.PARAMETER Project
Fisierul .pjx din care se citeste lista de fisiere (implicit roaacnpro.PJX).
.PARAMETER Types
Ce extensii sa includa in project mode (implicit vcx,scx = cod). Ex: -Types vcx,scx,frx,mnx
.PARAMETER ProjectRoot
Radacina proiectului (implicit D:\ROA\ROAACNPRO). Caile din .pjx sunt relative la ea.
.PARAMETER CacheRoot
Unde se scrie textul (implicit D:\ROA\UTIL\foxbin2prg\_textcache).
.PARAMETER Clean
Sterge tot cache-ul inainte de conversie (util dupa ce s-au convertit accidental fisiere extra).
.PARAMETER Force
Reconverteste chiar daca textul exista si e mai nou decat sursa.
.EXAMPLE
# doar fisierele proiectului (recomandat, rapid)
powershell -ExecutionPolicy Bypass -File D:\ROA\UTIL\foxbin2prg\vcx2txt.ps1
.EXAMPLE
# include si rapoartele si meniurile
powershell -ExecutionPolicy Bypass -File D:\ROA\UTIL\foxbin2prg\vcx2txt.ps1 -Types vcx,scx,frx,mnx
.EXAMPLE
# conversie punctuala a unei librarii (chiar daca nu e in proiect)
powershell -ExecutionPolicy Bypass -File D:\ROA\UTIL\foxbin2prg\vcx2txt.ps1 -Source D:\ROA\ROAACNPRO\COMUN\clase\caut.vcx
#>
[CmdletBinding()]
param(
[string]$Source,
[string]$Project = 'D:\ROA\ROAACNPRO\roaacnpro.PJX',
[string[]]$Types = @('vcx','scx'),
[string]$ProjectRoot = 'D:\ROA\ROAACNPRO',
[string]$CacheRoot = 'D:\ROA\UTIL\foxbin2prg\_textcache',
[switch]$Clean,
[switch]$Force
)
$ErrorActionPreference = 'Stop'
$exe = 'D:\ROA\UTIL\foxbin2prg\FoxBin2Prg.EXE'
if (-not (Test-Path $exe)) {
throw "Nu gasesc $exe. Compileaza intai FoxBin2Prg (deschide foxbin2prg.pj2 in VFP si Build)."
}
# binar -> (memo, extensie text)
$map = @{
'.vcx' = @('.vct', '.vc2'); '.scx' = @('.sct', '.sc2'); '.frx' = @('.frt', '.fr2')
'.lbx' = @('.lbt', '.lb2'); '.mnx' = @('.mnt', '.mn2'); '.dbc' = @('.dct', '.dc2')
}
function Convert-One($fullPath) {
$f = Get-Item -LiteralPath $fullPath
$ext = $f.Extension.ToLower()
if (-not $map.ContainsKey($ext)) { return 'skip' }
$memoX = $map[$ext][0]; $txtX = $map[$ext][1]
$memo = [IO.Path]::ChangeExtension($f.FullName, $memoX)
$rel = $f.FullName
if ($rel.ToLower().StartsWith($ProjectRoot.ToLower())) {
$rel = $rel.Substring($ProjectRoot.Length).TrimStart('\')
} else { $rel = $f.Name }
$relDir = Split-Path $rel -Parent
$workDir = if ($relDir) { Join-Path $CacheRoot $relDir } else { $CacheRoot }
$txtOut = Join-Path $workDir ([IO.Path]::GetFileNameWithoutExtension($f.Name) + $txtX)
if (-not $Force -and (Test-Path $txtOut) -and ((Get-Item $txtOut).LastWriteTime -ge $f.LastWriteTime)) {
return 'uptodate'
}
if (-not (Test-Path $workDir)) { New-Item -ItemType Directory -Force -Path $workDir | Out-Null }
$binCopy = Join-Path $workDir $f.Name
Copy-Item -LiteralPath $f.FullName -Destination $binCopy -Force
if (Test-Path $memo) { Copy-Item -LiteralPath $memo -Destination (Join-Path $workDir (Split-Path $memo -Leaf)) -Force }
& $exe $binCopy '' '' '' '1' '0' '1' | Out-Null
Remove-Item -LiteralPath $binCopy -Force -ErrorAction SilentlyContinue
$memoCopy = Join-Path $workDir (Split-Path $memo -Leaf)
if (Test-Path $memoCopy) { Remove-Item -LiteralPath $memoCopy -Force -ErrorAction SilentlyContinue }
if (Test-Path $txtOut) { return 'ok' } else { return 'fail' }
}
# --- Construieste lista de fisiere ---
$list = @()
if (-not [string]::IsNullOrWhiteSpace($Source)) {
if (Test-Path $Source -PathType Leaf) { $list = @((Get-Item -LiteralPath $Source).FullName) }
elseif (Test-Path $Source -PathType Container) {
$list = Get-ChildItem -LiteralPath $Source -Recurse -File |
Where-Object { $map.ContainsKey($_.Extension.ToLower()) } |
ForEach-Object { $_.FullName }
} else { throw "Sursa nu exista: $Source" }
} else {
# PROJECT MODE: citeste .pjx -> pj2 si extrage fisierele
if (-not (Test-Path $Project)) { throw "Nu gasesc proiectul: $Project" }
$tmp = Join-Path $env:TEMP ('pjx_' + [IO.Path]::GetFileNameWithoutExtension($Project))
New-Item -ItemType Directory -Force -Path $tmp | Out-Null
$pjxName = [IO.Path]::GetFileName($Project)
Copy-Item -LiteralPath $Project -Destination (Join-Path $tmp $pjxName) -Force
$pjt = [IO.Path]::ChangeExtension($Project, '.pjt')
if (Test-Path $pjt) { Copy-Item -LiteralPath $pjt -Destination (Join-Path $tmp ([IO.Path]::GetFileName($pjt))) -Force }
& $exe (Join-Path $tmp $pjxName) '' '' '' '1' '0' '1' | Out-Null
$pj2 = Join-Path $tmp ([IO.Path]::GetFileNameWithoutExtension($Project) + '.pj2')
if (-not (Test-Path $pj2)) { throw "Conversia .pjx a esuat: $pj2" }
$extPat = ($Types | ForEach-Object { [regex]::Escape($_) }) -join '|'
$rx = [regex]("(?i)\.ADD\('([^']*\.(?:$extPat))'\)")
foreach ($m in $rx.Matches((Get-Content -Raw $pj2))) {
$relp = $m.Groups[1].Value
$abs = Join-Path $ProjectRoot $relp
if (Test-Path $abs) { $list += (Get-Item -LiteralPath $abs).FullName }
else { Write-Warning "lipsa: $relp" }
}
$list = $list | Sort-Object -Unique
}
if ($Clean -and (Test-Path $CacheRoot)) { Remove-Item -Recurse -Force $CacheRoot }
if (-not $list) { Write-Host 'Nimic de convertit.'; return }
$ok=0;$up=0;$fail=0
foreach ($p in $list) {
switch (Convert-One $p) {
'ok' { $ok++; $r = $p; if ($r.ToLower().StartsWith($ProjectRoot.ToLower())) { $r = $r.Substring($ProjectRoot.Length).TrimStart('\') }; Write-Host "OK $r" }
'uptodate' { $up++ }
'fail' { $fail++; Write-Warning "ESEC $p" }
}
}
Write-Host ''
Write-Host "Gata. Convertite: $ok Sarite(la zi): $up Esuate: $fail (tipuri: $($Types -join ','))"
Write-Host "Text in: $CacheRoot"
Write-Host "Cauta cu: grep -rn 'expresie' `"$CacheRoot`""