Lutz fc15ebdff7 With additional index 1
fix DBF_Conversion_Condition
2021-03-18 08:39:44 +01:00
2017-12-04 22:35:20 +01:00
2021-03-08 13:55:37 +01:00
2018-03-14 19:40:07 +01:00
2017-12-04 22:35:20 +01:00
2017-12-04 22:35:20 +01:00
2015-09-04 19:05:08 +02:00
2015-09-04 19:05:08 +02:00
2015-09-04 19:05:08 +02:00
2020-04-01 17:45:04 +02:00
2021-03-18 08:39:44 +01:00
2021-03-05 11:06:26 +01:00
2017-12-03 01:38:13 +01:00
2017-12-03 23:16:26 +01:00
2015-09-04 19:05:08 +02:00
2021-03-09 12:39:20 +01:00
2016-02-06 16:26:34 +01:00
2016-02-06 16:26:34 +01:00

FoxBin2Prg v1.19.57

Binary/Text Converting program for Microsoft Visual FoxPro

Lutz Scheffler

VFPX Logo

Why this fork?

This is a fork of Fernando D. Bozzo foxbin2prg.
It's main purpose it's to fix some bugs and add some new functions. It looks like Fernando does not longer maintain FoxBin2Prg, so, with his permission, I introduce this fork to VFPX VFPX Picture.

I do not maintain the spanish documentation - it would fade. So just check Fernados repo for this information.
A quick run is introduced, more complex, and a large documentation exists too. Remember yourself to compile the exe first.



If you like to see Fernandos blog, or value his work:



If you like to value my work, support the Geeks at https://virtualfoxfest.com/ or www.swfox.net.
I also do not reject invitations to beer, Next autumn in Gilbert.



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), or as standalone program for Diff (viewing differences) and Merge operations. Foxbin2prg can substitute for SccText/X, TwoFox and others, and enhance their functionality, generating bidirectional PRG-Style versions of Foxpro binary files that allow recreating the original binary file.

Advantages:

  • It generates "PRG" style text files from Foxpro binary files for use in SCM and VCS systems and for visual comparison.

    (it's not really a prg, and can not be compiled, but it reads like one to Foxpro developers.)

  • It enables the change of the Text version as easy as modifying a PRG.

  • All the program code for any binary file (a form, a report, a class) is in just one text file, to simplify its maintainability.

  • You can regenerate the original binaries from the text files, so it is useful as backup

  • The extensions are configurable if you create a FOXBIN2PRG.CFG file

  • Inheritance of CFG configuration files between directories

  • Methods and properties of Text versions are alphabetically sorted for easy comparison

  • You can set the "UseClassPerFile" setting to create individual files by class or DBC member.

    (Which violates number three above, but it may be what you want.)

  • Takes advantage of the Win32 API using foxbin2prg as an object

  • It has compatibility with SccText/X at the parameter level so that it can be used as substitute for SccText with SourceSafe. (Not that we recommend SourceSafe.)

  • Productivity: You can create a shortcut in the "SendTo" folder on your user Windows Profile, so you can "send" the selected file (pjx,pj2,etc) to Foxbin2prg.exe and make on-the-fly conversions

  • You can modify the TX2 Prg-Style versions of your objects with MODIFY COMMAND (without compile) to see colored syntax, or even use the Document View to navigate the procedures

  • Get back your SourceSafe projects (.pjx) from their .pjm file

The program supports conversions between PJX,SCX,VCX,FRX,LBX,DBC,DBF and MNX files, for which it generates TEXT versions with extension PJ2,SC2,VC2,FR2,LB2,DC2,DB2 and MN2. If you want, the created text file extensions can be reconfigured to be compatibilize with SourceSafe.

Examples

Redefine extensions of Text

Here is an example of a FOXBIN2PRG.CFG configuration file if you need to change extensions for using it with a specific VSS (SourceSafe)

extension: SC2=SCA
extension: VC2=VCA
extension: PJ2=PJA
extension: MN2=MNA
extension: FR2=FRA
extension: LB2=LBA
extension: DB2=DBA
extension: DC2=DCA

Use FoxBin2Prg

DO FOXBIN2PRG.PRG WITH "<path>\archivo.scx"     ==> Generates the TEXT version sc2 extension
DO FOXBIN2PRG.PRG WITH "<path>\archivo.sc2"     ==> Regenerates the binary version with scx extension

DO FOXBIN2PRG.PRG WITH "-c","template.cfg"      ==> Generates a template for FoxBin2Prg.cfg config file with newest settings
DO FOXBIN2PRG.PRG WITH "-t","template.dbf.cfg"  ==> Generates a template for table.dbf.cfg per table config file with newest settings

Use with MS Windows SendTo

You can create up to three different shortcuts pointing to FoxBin2Prg.exe and in your "SendTo" folder in your Windows profile. This allows you to "send" a selected file (pjx,pj2,etc) to the selected option, and make on-the-fly conversions. (Make sure you have the option for seeing known file extensions turned on!):

Process directories or individual files to Text

  • Name:
    FoxBin2Prg - Binary2Text.lnk
  • Right-click/Properties/destination_
    <path>\foxbin2prg.exe "BIN2PRG-SHOWMSG"

Process directories or individual files to Binary

  • Name:
    FoxBin2Prg - Text2Binary.lnk
  • Right-click/Properties/destination_
    <path>\foxbin2prg.exe "PRG2BIN-SHOWMSG"

Process individual files or directories asking what to convert

  • Name:
    FoxBin2Prg.lnk
  • Right-click/Properties/destination_
    <path>\foxbin2prg.exe "INTERACTIVE-SHOWMSG"

Select a file, right-click, SendTo -> FoxBin2Prg

LOCALIZATION:

Is automatic starting at v1.19.38 (Languages: EN,ES,FR,DE)

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.

Project info and updates:

Fernando D. Bozzo's repository at Github: https://github.com/fdbozzo/foxbin2prg

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/.



Changes

See Changes

Changes in 1.19.59

  • Added support for writing to a different folder than the source code using a new tcOutputFolder parameter
  • Added a configuration item: HomeDir, which determines if HomeDir is saved in PJ2 files (the default is 1 for Yes)
  • Logging of settings as settings object passed to execute method (Option debug > 0)
  • Bug Fixes: RedirectClassType = 2
  • Improved, Better description of ClassPerFileCheck and tcOutputFolder.
  • Added option to create config file template based on current values of a directory To create config file (working settings) with all values set for a folder. Intended for storing the settings with the project.
DO FOXBIN2PRG.PRG WITH "-C","template.cfg"      ==> Generates a file like FoxBin2Prg.cfg config file with recent settings

Changes in 1.19.58

  • Added support for writing to a different folder than the source code using a new tcOutputFolder parameter
  • Added a configuration item: HomeDir, which determines if HomeDir is saved in PJ2 files (the default is 1 for Yes)

Changes pre 1.19.58

To get the new settings in config file, use the new create-a-template function:

DO FOXBIN2PRG.PRG WITH "-c","template.cfg"      ==> Generates a template for FoxBin2Prg.cfg config file with newest settings
DO FOXBIN2PRG.PRG WITH "-t","template.dbf.cfg"  ==> Generates a template for table.dbf.cfg per table config file with newest settings

Split of container files

VCX, SCX and DBC are container that hold different items. There is was a single option to split them.
The split of DBC the same way like VCX/SCX might not be the best choice under all circumstances.
New option OldFilesPerDBC is set 1, UseFilesPerDBC, RedirectFilePerDBCToMain and ItemPerDBCCheck might be used to set the handling of the DBC.
Note that those options will be ignored, if OldFilesPerDBC is 0 (default).
Check that changes will be reflected on running projects.
See Internals.

Tanscoding of table fields with NoCPTrans

The function DBF_BinChar_Base64: 0 must be handled with care too. Tables must converted to Text according. It's not recommended for running projects. Handle with extra care otherwise.

Inclusion of deleted records

Sometimes information left in deleted (table) records is still valuable information. The new option DBF_IncludeDeleted allows to keep those records throug conversion.
The data added by DBF_IncludeDeleted: 1 will be ignored by old versions generating Binary files.

Recomendation

It's a good idea to have the FoxBin2Prg.cfg per projekt and and source control, old commits / versions would have the old config.
So the settings would fit the data and FoxBin2Prg could generate according to it.

Fixes

Details
Added MEM and FKY options to config template and internal documentation
Conversion prg -> vcx, files per class could create one class multiple times
Processing directory, flush log file after loop instead of file
Conversion prg -> dbf, fields with .NULL. value are incorectly recreated
Minor translations
Conversion dbf -> prg, error if only test mode (toFoxBin2Prg.l_ProcessFiles is false)
DBF_Conversion_Condition, problem with macro expansion
Bug on special setting for import in form file[.baseclass].class.vc2
Bug on RedirectClassType = 2 mixed up PATH
Bug on RedirectClassType = 2, UseClassPerFile = 2 failed

Features

Details
Documentation reworked.
German translation improved
Info screen-doc improved
Inserted option DBF_IncludeDeleted to allow including deleted records of DBF
Inserted option DBF_BinChar_Base64 to allow processing of NoCPTrans fields in non base64 way
Inserted option OldFilesPerDBC to control split of DBC, the options below are controled by this
Inserted option UseFilesPerDBC to split DBC processing from vcx / scx
Inserted option RedirectFilePerDBCToMain to split DBC processing from vcx / scx
Inserted option ItemPerDBCCheck to split DBC processing from vcx / scx
added option to create config file template
New value 2 for option RedirectClassType. Alter single class for input form file[.baseclass].class.vc2


Folder information

Project to generate text representations of VFP binary sources for source control

./

This folder containes the files necessary to run FoxBin2Prg.prg or to create the FoxBin2Prg.exe

For usage see documentation


Last changed: 2021/03/09 Picture

Description
No description provided
Readme MIT 168 MiB
Languages
xBase 75%
SQLPL 17.3%
PowerShell 4.5%
VBScript 1.5%
Forth 0.8%
Other 0.9%