Skip to content

Visual FoxPro 9 Binary to Text and Text to Binary converter. Replacement for SCCText(X) and TwoFox that is bi-directional (Text is editable)

License

Notifications You must be signed in to change notification settings

fdbozzo/foxbin2prg

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FoxBin2Prg

Version 1.21.04

Binary/Text Converting program for Microsoft Visual FoxPro

Lutz Scheffler

This is the perpetuation of Fernando D. Bozzo foxbin2prg.

The spanish documentation is not longer maintained. Remind yourself to compile the exe first.

Regenerate after download / clone / pull

Note: If you have cloned or pulled the project, you must run it against itself to create the binaries and exes. Run

CD "path_to_FoxBin2Prg"
*This uses a special configuration
DO ReCreate_FoxBin2Prg.prg

Note: Do not run FoxBin2Prg.prg directly.


If you like to value my work, support the Geeks at Virtual Fox Fest! or Southwest Fox!.
I also do not reject invitations to a beer, next time in Arizona.


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


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.


Contribution

See contribution


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 "<path>","Prg2Bin"     ==> Generates the TEXT of the path, that is directory or file
DO FOXBIN2PRG.PRG WITH "<path>","Bin2Prg"     ==> Regenerates the binary version of the path, that is directory or file

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

Interactive list of options

DO FOXBIN2PRG.PRG WITH "?"

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"
How to use the links

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.

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 to Settings

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 default settings
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

Limitations

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.


Usage

For usage see documentation


Helping with FoxBin2PRG

See contribution


Note

The spanish documentation is not longer maintained - it would fade. For fast access a quick run is introduced, more complex, and a large documentation exists too. If you do not access FoxBin2Prg via Thor remind yourself to compile the exe first.

If you like to see Fernando's blog, or value his work:


Last changed: 2024/08/26 Picture

About

Visual FoxPro 9 Binary to Text and Text to Binary converter. Replacement for SCCText(X) and TwoFox that is bi-directional (Text is editable)

Resources

License

Stars

Watchers

Forks

Packages

No packages published