diff --git a/FoxBin2PRGVersionFile.txt b/FoxBin2PRGVersionFile.txt index 0152221..843b559 100644 --- a/FoxBin2PRGVersionFile.txt +++ b/FoxBin2PRGVersionFile.txt @@ -2,12 +2,12 @@ Lparameters toUpdateInfo Local lcNote With toUpdateInfo - .VersionNumber = 'v1.19.50.3' - .VersionDate = Date(2018,03,15) + .VersionNumber = 'v1.19.51' + .VersionDate = Date(2018,03,24) .SourceFileUrl = 'http://vfpxrepository.com/dl/thorupdate/Projects/FoxBin2Prg/FoxBin2Prg.Zip' - .Link = 'http://vfpx.codeplex.com/wikipage?title=FoxBin2PRG' - .LinkPrompt = 'FoxBin2Prg Home Page' + .Link = 'https://github.com/fdbozzo/foxbin2prg/wiki' + .LinkPrompt = 'FoxBin2Prg Wiki Page' EndWith Text to lcNote NoShow @@ -15,12 +15,19 @@ Developed by Fernando D. Bozzo - GitHub: https://github.com/fdbozzo/foxbin2prg FoxBin2Prg is a 2-way conversor for Visual FoxPro 9 binary files intended to be used with SCM tools (Diff and Merge operations) or just for backup -Supported formats are: PJX, PJM, SCX, VCX, FRX, LBX, MNX, DBC, DBF +Supported formats are: PJX, PJM, SCX, VCX, FRX, LBX, MNX, DBC, DBF, FKY Demo video using FoxBin2Prg with PlasticSCM: http://youtu.be/sE4wQ50Itqg Change History ------------------------------------------------------------- +2018-03-24 v1.19.51 +- Add LOG info about config.fpw used and CodePage +- Enhanced HELP dialog info when running FoxBin2Prg with double-click +- Feature: Added automatic default language recognition for the supported ones (FR,DE,ES,EN) +- Feature: FKY file structure support (MACRO exporting to text fk2) +- Feature: MEM file structure support (MEMORY exporting to text me2) + 2018-03-15 v1.19.50.3 - Bug Fix: When adding some non-VFP text files like html,css,etc, in the text section of the project, FoxBin2Prg does not keep this selection when regenerating the PJX, leaving them in the files section (Darko Kezic) diff --git a/TESTS/DATOS_READONLY/macros.fk2 b/TESTS/DATOS_READONLY/macros.fk2 new file mode 100644 index 0000000..cc327f3 --- /dev/null +++ b/TESTS/DATOS_READONLY/macros.fk2 @@ -0,0 +1,48 @@ +*-------------------------------------------------------------------------------------------------------------------------------------------------------- +* (ES) AUTOGENERADO - ¡¡ATENCIÓN!! - ¡¡NO PENSADO PARA EJECUTAR!! USAR SOLAMENTE PARA INTEGRAR CAMBIOS Y ALMACENAR CON HERRAMIENTAS SCM!! +* (EN) AUTOGENERATED - ATTENTION!! - NOT INTENDED FOR EXECUTION!! USE ONLY FOR MERGING CHANGES AND STORING WITH SCM TOOLS!! +*-------------------------------------------------------------------------------------------------------------------------------------------------------- +*< FOXBIN2PRG: Version="1.19" SourceFile="macros.fky" /> (Solo para binarios VFP 9 / Only for VFP 9 binaries) +* + + + Macro_Name : special_chars + Keystroke : ALT+0 + Macro_Keystrokes: {CTRL+A}{CTRL+B}{CTRL+C}{CTRL+D}{CTRL+E}{CTRL+F}{CTRL+G}{BACKSPACE}{TAB}{CTRL+ENTER}{CTRL+K}{CTRL+L}{ENTER}{CTRL+N}{SPACEBAR}{CTRL+N}{CTRL+O}{CTRL+P}{CTRL+Q}{CTRL+R}{CTRL+S}{CTRL+T}{CTRL+U}{CTRL+V}{CTRL+W}{CTRL+X}{CTRL+Y}{CTRL+Z}{ESCAPE}{CTRL+BACKSLASH}{CTRL+RBRACKET}{CTRL+CARET}{CTRL+HYPHEN}{SPACEBAR}{ESCAPE}{SHIFT+SEMICOLON},:._-?{x10BF}'{x00A1}{SEMICOLON}, + + + + Macro_Name : tecla_alt_c + Keystroke : ALT+C + Macro_Keystrokes: {ALT+1}{ALT+2}{ALT+3}{ALT+4}{ALT+A}{x0095}???``{SHIFT+CTRL+A}{CTRL+ALT+A}{SHIFT+CTRL+ALT+A}{ALT+A}Aa{BACKSPACE}{BACKSPACE}{DEL}{SHIFT+DEL}{CTRL+DEL}{ALT+DEL}A{SHIFT+INS}{SHIFT+HOME}{SHIFT+UPARROW}{SHIFT+DNARROW}{SHIFT+LEFTARROW}{SHIFT+RIGHTARROW}{SHIFT+PGUP}{SHIFT+PGDN}{SHIFT+END}{x1100} + + + + Macro_Name : ctrl_enter_j + Keystroke : ALT+J + Macro_Keystrokes: {CTRL+ENTER}{CTRL+ENTER}{CTRL+K} + + + + Macro_Name : alt_z + Keystroke : ALT+Z + Macro_Keystrokes: {UPARROW}{RIGHTARROW}{DNARROW}{LEFTARROW}{HOME}{END}{PGUP}{PGDN}{DEL}{BACKSPACE}{x00BA}1234567890'{x00A1}{TAB}qwertyuiop{x00F2}+asdfghjkl{x00F1}{x00E1}{x00E7}<\|@#{CTRL+ALT+4}~{x0080}{x00AC}{CTRL+ALT+7}u{CTRL+ALT+8}{CTRL+ALT+9}{CTRL+ALT+0}{CTRL+ALT+'}{x0001}{CTRL+ALT+'}][{CTRL+ALT+P}{CTRL+ALT+O}{RBRACE}{LBRACE}{ESCAPE}{F2}{SHIFT+F2}{CTRL+ALT+F2}{CTRL+F2}{INS}{INS}{ESCAPE}zZ{CTRL+ALT+Z}{LITERAL+l}it{PAUSE KEY}{PAUSE 1.20}end.{ESCAPE}{SHIFT+ESCAPE}{F2}{CTRL+F2}{SHIFT+F2}{ALT+F2} + + + + Macro_Name : ctrl_dnarrow + Keystroke : CTRL+DNARROW + Macro_Keystrokes: {UPARROW}{UPARROW}{RIGHTARROW}{RIGHTARROW}{DNARROW}{LEFTARROW}{LEFTARROW}{DNARROW}{LITERAL+d}ds{PAUSE KEY} + + + + Macro_Name : ctrl_rightarrow + Keystroke : CTRL+RIGHTARROW + Macro_Keystrokes: {UPARROW}{UPARROW}{UPARROW}{RIGHTARROW}{RIGHTARROW}{RIGHTARROW}{HOME}{PGDN}{PAUSE 2.00} + + + + Macro_Name : tecla_ctrl_z + Keystroke : CTRL+Z + Macro_Keystrokes: {CTRL+E}{CTRL+C}{CTRL+Q}{CTRL+HOME}{CTRL+END}{CTRL+PGUP}{CTRL+PGDN}{CTRL+ENTER}{CTRL+LEFTARROW}{UPARROW}{UPARROW}{UPARROW}{RIGHTARROW}{RIGHTARROW}{RIGHTARROW}{HOME}{PGDN}{PAUSE 0.00}{CTRL+UPARROW}{UPARROW}{UPARROW}{RIGHTARROW}{RIGHTARROW}{DNARROW}{LEFTARROW}{LEFTARROW}{DNARROW}{LITERAL+d}ds{PAUSE 0.00}{UPARROW}{UPARROW}{RIGHTARROW}{RIGHTARROW}{DNARROW}{LEFTARROW}{LEFTARROW}{DNARROW}{LITERAL+d}ds{PAUSE 0.00}{CTRL+SPACEBAR}^ + \ No newline at end of file diff --git a/TESTS/DATOS_READONLY/macros.fky b/TESTS/DATOS_READONLY/macros.fky new file mode 100644 index 0000000..b6422f4 Binary files /dev/null and b/TESTS/DATOS_READONLY/macros.fky differ diff --git a/TESTS/DATOS_READONLY/var_a.me2 b/TESTS/DATOS_READONLY/var_a.me2 new file mode 100644 index 0000000..7cc8def --- /dev/null +++ b/TESTS/DATOS_READONLY/var_a.me2 @@ -0,0 +1,27 @@ +*-------------------------------------------------------------------------------------------------------------------------------------------------------- +* (ES) AUTOGENERADO - ¡¡ATENCIÓN!! - ¡¡NO PENSADO PARA EJECUTAR!! USAR SOLAMENTE PARA INTEGRAR CAMBIOS Y ALMACENAR CON HERRAMIENTAS SCM!! +* (EN) AUTOGENERATED - ATTENTION!! - NOT INTENDED FOR EXECUTION!! USE ONLY FOR MERGING CHANGES AND STORING WITH SCM TOOLS!! +*-------------------------------------------------------------------------------------------------------------------------------------------------------- +*< FOXBIN2PRG: Version="1.19" SourceFile="var_a.mem" /> (Solo para binarios VFP 9 / Only for VFP 9 binaries) +* +A_VALORESS_LONGNAME A(20,1) + ( 1, 1) N(15,4) 123456.789000000000000000 + ( 2, 1) N(10) 123456.789000000000000000 + ( 3, 1) N(15,4) 123456.789000000000000000 + ( 4, 1) N(15,4) 123456.789000000000000000 + ( 5, 1) N(15,4) 123456.789000000000000000 + ( 6, 1) N(13,2) 123456.789000000000000000 + ( 7, 1) C "text string" + ( 8, 1) Y 123456.7890 + ( 9, 1) D 2018/03/21 + ( 10, 1) T 2018/03/21 01:02:03 + ( 11, 1) Q 0h74 + ( 12, 1) C "t" + ( 13, 1) L .T. + ( 14, 1) Q 0h7465787420737472696E67 + ( 15, 1) N(10) 123456.000000000000000000 + ( 16, 1) I .NULL. + ( 17, 1) Y .NULL. + ( 18, 1) C .NULL. + ( 19, 1) B .NULL. + ( 20, 1) N(10) 16.000000000000000000 \ No newline at end of file diff --git a/TESTS/DATOS_READONLY/var_a.mem b/TESTS/DATOS_READONLY/var_a.mem new file mode 100644 index 0000000..3c651d8 Binary files /dev/null and b/TESTS/DATOS_READONLY/var_a.mem differ diff --git a/TESTS/DATOS_READONLY/var_d.me2 b/TESTS/DATOS_READONLY/var_d.me2 new file mode 100644 index 0000000..b37c0e7 --- /dev/null +++ b/TESTS/DATOS_READONLY/var_d.me2 @@ -0,0 +1,7 @@ +*-------------------------------------------------------------------------------------------------------------------------------------------------------- +* (ES) AUTOGENERADO - ¡¡ATENCIÓN!! - ¡¡NO PENSADO PARA EJECUTAR!! USAR SOLAMENTE PARA INTEGRAR CAMBIOS Y ALMACENAR CON HERRAMIENTAS SCM!! +* (EN) AUTOGENERATED - ATTENTION!! - NOT INTENDED FOR EXECUTION!! USE ONLY FOR MERGING CHANGES AND STORING WITH SCM TOOLS!! +*-------------------------------------------------------------------------------------------------------------------------------------------------------- +*< FOXBIN2PRG: Version="1.19" SourceFile="var_d.mem" /> (Solo para binarios VFP 9 / Only for VFP 9 binaries) +* +ÑAPALATEROS D 2018/03/24 \ No newline at end of file diff --git a/TESTS/DATOS_READONLY/var_d.mem b/TESTS/DATOS_READONLY/var_d.mem new file mode 100644 index 0000000..7910b97 Binary files /dev/null and b/TESTS/DATOS_READONLY/var_d.mem differ diff --git a/TESTS/DATOS_READONLY/var_y.me2 b/TESTS/DATOS_READONLY/var_y.me2 new file mode 100644 index 0000000..3b26d60 --- /dev/null +++ b/TESTS/DATOS_READONLY/var_y.me2 @@ -0,0 +1,7 @@ +*-------------------------------------------------------------------------------------------------------------------------------------------------------- +* (ES) AUTOGENERADO - ¡¡ATENCIÓN!! - ¡¡NO PENSADO PARA EJECUTAR!! USAR SOLAMENTE PARA INTEGRAR CAMBIOS Y ALMACENAR CON HERRAMIENTAS SCM!! +* (EN) AUTOGENERATED - ATTENTION!! - NOT INTENDED FOR EXECUTION!! USE ONLY FOR MERGING CHANGES AND STORING WITH SCM TOOLS!! +*-------------------------------------------------------------------------------------------------------------------------------------------------------- +*< FOXBIN2PRG: Version="1.19" SourceFile="var_y.mem" /> (Solo para binarios VFP 9 / Only for VFP 9 binaries) +* +ÑAPALATEROS Y 123.4500 \ No newline at end of file diff --git a/TESTS/DATOS_READONLY/var_y.mem b/TESTS/DATOS_READONLY/var_y.mem new file mode 100644 index 0000000..68bf7ba Binary files /dev/null and b/TESTS/DATOS_READONLY/var_y.mem differ diff --git a/TESTS/DATOS_READONLY/var_y2.me2 b/TESTS/DATOS_READONLY/var_y2.me2 new file mode 100644 index 0000000..76c9d7a --- /dev/null +++ b/TESTS/DATOS_READONLY/var_y2.me2 @@ -0,0 +1,7 @@ +*-------------------------------------------------------------------------------------------------------------------------------------------------------- +* (ES) AUTOGENERADO - ¡¡ATENCIÓN!! - ¡¡NO PENSADO PARA EJECUTAR!! USAR SOLAMENTE PARA INTEGRAR CAMBIOS Y ALMACENAR CON HERRAMIENTAS SCM!! +* (EN) AUTOGENERATED - ATTENTION!! - NOT INTENDED FOR EXECUTION!! USE ONLY FOR MERGING CHANGES AND STORING WITH SCM TOOLS!! +*-------------------------------------------------------------------------------------------------------------------------------------------------------- +*< FOXBIN2PRG: Version="1.19" SourceFile="var_y2.mem" /> (Solo para binarios VFP 9 / Only for VFP 9 binaries) +* +ÑAPALATERO Y 123.4500 \ No newline at end of file diff --git a/TESTS/DATOS_READONLY/var_y2.mem b/TESTS/DATOS_READONLY/var_y2.mem new file mode 100644 index 0000000..f526207 Binary files /dev/null and b/TESTS/DATOS_READONLY/var_y2.mem differ diff --git a/TESTS/DATOS_READONLY/vars.me2 b/TESTS/DATOS_READONLY/vars.me2 new file mode 100644 index 0000000..7cef709 --- /dev/null +++ b/TESTS/DATOS_READONLY/vars.me2 @@ -0,0 +1,60 @@ +*-------------------------------------------------------------------------------------------------------------------------------------------------------- +* (ES) AUTOGENERADO - ¡¡ATENCIÓN!! - ¡¡NO PENSADO PARA EJECUTAR!! USAR SOLAMENTE PARA INTEGRAR CAMBIOS Y ALMACENAR CON HERRAMIENTAS SCM!! +* (EN) AUTOGENERATED - ATTENTION!! - NOT INTENDED FOR EXECUTION!! USE ONLY FOR MERGING CHANGES AND STORING WITH SCM TOOLS!! +*-------------------------------------------------------------------------------------------------------------------------------------------------------- +*< FOXBIN2PRG: Version="1.19" SourceFile="vars.mem" /> (Solo para binarios VFP 9 / Only for VFP 9 binaries) +* +A_VALORES A(3,2) + ( 1, 1) C "Fer" + ( 1, 2) C "Orange" + ( 2, 1) C "Ceci" + ( 2, 2) C "Verde" + ( 3, 1) C "Sofi" + ( 3, 2) N(10) 17.000000000000000000 +A_VALS A(16) + ( 1) N(15,4) 123456.789000000000000000 + ( 2) N(10) 123456.789000000000000000 + ( 3) N(10) -123456.000000000000000000 + ( 4) N(14,2) -123456.789000000000000000 + ( 5) N(17,5) -123456.789000000000000000 + ( 6) N(13,2) 123456.789000000000000000 + ( 7) C "text string" + ( 8) Y 123456.7890 + ( 9) D 2018/03/21 + ( 10) T 2018/03/21 01:02:03 + ( 11) Q 0h74 + ( 12) C "t" + ( 13) L .T. + ( 14) Q 0h7465787420737472696E67 + ( 15) N(10) 123456.000000000000000000 + ( 16) L .F. +B_VALOR N(13,2) 123456.789000000000000000 +B_VALOR2 N(13,2) 123456.789000000000000000 +C_VALOR C "ABCdef" +C_VAR___10 C "1234567890" +C_VAR____11 C "12345678901" +C_VAR_____12 C "123456789012" +C_VAR______13 C "1234567890123" +C_VAR_____________20 C "12345678901234567890" +D_VALOR D 2018/03/21 +ESTA_ES_UNA_VARIABLE_BASTANTE_LARGA_CON_LA_INTENCION_DE_SABER_CUANTO_SOPORTAN_LOS_NOMBRES C "Guau! :)" +F_VALOR N(10) 123456.789000000000000000 +F_VALOR2 N(15,4) 123456.789000000000000000 +F_VALOR3 N(15,4) 123456.789000000000000000 +I_VALOR N(10) 123456.000000000000000000 +I_VALOR2 N(10) 123456789.000000000000000000 +L_VALOR L .T. +N_VALOR N(15,4) 123456.789000000000000000 +N_VALOR2 N(10) 123456.789000000000000000 +N_VALOR3 N(15,4) 123456.789000000000000000 +N_VALOR4 N(11) -123456.789000000000000000 +N_VALOR5 N(15,3) -123456.789000000000000000 +N_VALOR6 N(11) -123456.789000000000000000 +N_VALOR7 N(11) -123456.789000000000000000 +N_VALOR8 N(11) -1234.000000000000000000 +N_VALOR_14_4 N(15,4) 123456.789000000000000000 +N_VALOR_16_0 N(11) -123456.789000000000000000 +N_VALOR_18_2 N(14,2) -123456.789000000000000000 +T_VALOR T 2018/03/21 01:02:03 +X_VALOR L .NULL. +Y_VALOR Y 123456.7890 \ No newline at end of file diff --git a/TESTS/DATOS_READONLY/vars.mem b/TESTS/DATOS_READONLY/vars.mem new file mode 100644 index 0000000..23c71e9 Binary files /dev/null and b/TESTS/DATOS_READONLY/vars.mem differ diff --git a/TESTS/DATOS_READONLY/varx.me2 b/TESTS/DATOS_READONLY/varx.me2 new file mode 100644 index 0000000..9e11538 --- /dev/null +++ b/TESTS/DATOS_READONLY/varx.me2 @@ -0,0 +1,9 @@ +*-------------------------------------------------------------------------------------------------------------------------------------------------------- +* (ES) AUTOGENERADO - ¡¡ATENCIÓN!! - ¡¡NO PENSADO PARA EJECUTAR!! USAR SOLAMENTE PARA INTEGRAR CAMBIOS Y ALMACENAR CON HERRAMIENTAS SCM!! +* (EN) AUTOGENERATED - ATTENTION!! - NOT INTENDED FOR EXECUTION!! USE ONLY FOR MERGING CHANGES AND STORING WITH SCM TOOLS!! +*-------------------------------------------------------------------------------------------------------------------------------------------------------- +*< FOXBIN2PRG: Version="1.19" SourceFile="varx.mem" /> (Solo para binarios VFP 9 / Only for VFP 9 binaries) +* +N_VALOR_10 N(10) 10.000000000000000000 +N_VALOR__11 N(13,2) 11.110000000000000000 +ÑAPALATEROS L .NULL. \ No newline at end of file diff --git a/TESTS/DATOS_READONLY/varx.mem b/TESTS/DATOS_READONLY/varx.mem new file mode 100644 index 0000000..7f8995c Binary files /dev/null and b/TESTS/DATOS_READONLY/varx.mem differ diff --git a/ThorUpdater/FoxBin2Prg.zip b/ThorUpdater/FoxBin2Prg.zip index 01e3598..cc938ba 100644 Binary files a/ThorUpdater/FoxBin2Prg.zip and b/ThorUpdater/FoxBin2Prg.zip differ diff --git a/ThorUpdater/FoxBin2PrgVersion.txt b/ThorUpdater/FoxBin2PrgVersion.txt index 33d40d1..191de3e 100644 --- a/ThorUpdater/FoxBin2PrgVersion.txt +++ b/ThorUpdater/FoxBin2PrgVersion.txt @@ -2,10 +2,10 @@ lparameters toUpdateObject local ldDate, ; lnJulian, ; lcJulian -ldDate = date(2018,3,6) +ldDate = date(2018,3,26) lnJulian = val(sys(11, ldDate)) - val(sys(11, {^2000-01-01})) lcJulian = padl(transform(lnJulian), 4, '0') -toUpdateObject.AvailableVersion = 'FoxBin2Prg-1.19.50' + lcJulian + ; +toUpdateObject.AvailableVersion = 'FoxBin2Prg-1.19.51' + lcJulian + ; '-update-' + dtoc(ldDate, 1) return toUpdateObject @@ -23,451 +23,7 @@ Supported formats are: PJX, PJM, SCX, VCX, FRX, LBX, MNX, DBC, DBF Demo video using FoxBin2Prg with PlasticSCM: http://youtu.be/sE4wQ50Itqg Change History ------------------------------------------------------------- - -2018/01/06 v1.19.49.6 -- BugFix vcx/scx: FoxBin2Prg should ignore the records that VFP Designer ignores (Doug Hennig / https://github.com/fdbozzo/foxbin2prg/issues/15) -- BugFix vcx/scx: FoxBin2Prg encodes MemberData property with CR/LF, which can cause "property '_memberdata' value is too long" error (Doug Hennig / https://github.com/fdbozzo/foxbin2prg/issues/16) - -2017/12/20 v1.19.49.5 -- BugFix dbf: When FoxBin2PRG converts a DB2 file to a DBF file and imports the data (using DBF_Conversion_Support = 8), tabs at the start of lines in memo fields are lost (Doug Hennig) - -2017/12/04 v1.19.49.4 -- Bug Fix VCX: When using ClassPerFile in API Mode and importing single classes, sometimes their names get unquoted, throwing errors / Reported by Lutz Scheffler (https://github.com/fdbozzo/foxbin2prg/issues/11) - -2017/12/03 v1.19.49.3 -- Bug Fix: "Double" field types are explicitly defined with 0 decimals when no decimals are defined (Jerry Stager) - -2017/12/03 v1.19.49.2 -- Bug Fix: ClassPerFile export didn't work correctly starting from v1.19.49 / Reported by Lutz Scheffler (https://github.com/fdbozzo/foxbin2prg/issues/9) - -2017/06/25 v1.19.49.1 -- Bug Fix: DEVINFO field is only used when doing PJX conversions. On other files throw errors - -2017/04/26 v1.19.49 -- Replace Scripting.FileSystemObject MoveFile with Win32API equivalent -- Added support for using temporal CFG file for low-level API operations -- Bug Fix: Single-class export with "classlib.vcx::classname" syntax did not export (Lutz Scheffler) -- Added single-class import support ("library.vcx::classname::import") -- Added new single-class export syntax ("library.vcx::classname::export") -- Both single-class syntaxes doesn't require a CFG configuration -- Bug Fix: Partially corrupted frx/lbx info generated when using "&&" string inside field expressions (Alejandro A Sosa) -- sys(2023) secure temp: When sys(2023) points to "program files", then getenv("temp") is used -- Add more options to config.fpw to minimize interference from existent configs -- Feature: Save the contents of User field (Doug Hennig). Note: DevInfo is already supported - -2016/07/11 v1.19.48 -- Bug Fix: Error message 'variable tcOutputFile not found' (german version) (Andy Kasper) -- Bug Fix: Menu location 'Before' always changed to 'after' when convert (Andy Kasper) -- Bug Fix: DBF conversion restrictions are not always respected when using particular CFGs for DBFs (Nathan Brown) -- Bug Fix db2: When reading a miltiline-memo with old db2 data, an index out of range error occurs -- Bug Fix db2: When using ExcludeDBFAutoincNextval: 1 setting in FoxBin2Prg.cfg and at the same time the data import with an AutoInc field, then error "Error 2088, Field is read-only" occurs (Nathan Brown) -- Defect Fix db2: When fixing the multi-line memo bug, introduced a new defect on which a single-line memo is not decoded correctly (Nathan Brown) -- Bug Fix pj2: When a binary is regenerated from a PJ2 file containing files with parenthesis and spaces, the error "Error 36, Command contains unrecognized phrase/keyword" occurs (Nathan Brown) -- Bug Fix frx: ControlSource of OLE Objects containing quotes are not well regenerated from FR2 (Nathan Brown) - -2016/06/08 v1.19.47 -- Bug Fix: When a filename "*" is specified with a type "*", an automatic regeneration of all binary files is made from text files (Alejandro Sosa) -- BugFix: Added variable declaration (Doug Hennig) -- BugFix: Fixed incorrectly named variable (Doug Hennig) -- BugFix: Added missing assignment (Doug Hennig) -- Enhancement: Put double quotes around path in case in contains single quote (Doug Hennig) -- BugFix: Added "+16" to Debug flags to maintain internal defaults to not generate timestamps on xx2 files -- Feature: Added support for appending data from DB2 to DBF with the new value DBF_Conversion_Support=8. All datatypes except General. (Walter Nicholls) - -2016/02/06 v1.19.46 -- Bug Fix: set_UserValue() method causes error when trying to get information about another error and the VFP binary table can not be opened (ie, because corrupted memo) -- Feature: Added internal support for querying directory cfg information, with a new optional parameter, for API methods that require it (ie: get_Ext2FromExt, hasSupport*) -- Feature: Convert FUNCTION to PROCEDURE for maintaining compatibility with the way that VFP save methods on binaries -- New fb2p_diff.exe: Allow a quick Diff of VFP9 binaries, for those that don't need converting to text manually -- Bug Fix: When processing a directory or a project with all the files, sometimes an "Alias already in use" error may occur (Dave Crozier) -- Bug Fix mnx: When menu options contains '&&' in their texts, menu binary is corrupted when regenerated (Walter Nichols) -- Bug Fix fb2p_diff: When calling fb2p_diff.exe from a directory out of FoxBin2Prg dir, an error is thrown because FoxBin2Prg is not found (Mike Potjer) -- Feature: In some environments and under some conditions WSscript.Shell object can cause problems, so now it's replaced with Win32 native functions (Aurélien Dellieux) -- Bug Fix frx/lbx: Ordering of report objects changes the ZOrder of near objects that can overlap, which can cause bad visualization and printing (Ryan Harris) -- Bug Fix frx/lbx: When regenerating reports or labels with multiline texts center or right aligned, alignment is not completely right (Ryan Harris) -- Bug Fix frx/lbx: When grouping objects in design mode, generating text and regenerating binary cause the lost of the grouping (does not affect data) (Lutz Scheffler) -- Bug Fix Pjx: SPR and MPR files are not correctly identified in the PJX Project info (Ralf Wagner) -- Bug Fix Pj2: An error is thrown when regenerating a PJX from a PJ2 when some file have parenthesis in it's name (EddieC) -- Feature (dbf): New ExcludeDBFAutoincNextval parameter for minimizing DB2 differences (edyshor) -- Bug Fix: When processing a file on root dir, a 2062 error occurs (Aurélien Dellieux) -- Feature: Added VFP 9 runtimes (vfp9r.dll, vfp9renu.dll) so FoxBin2Prg can be used with VFP when VPF IDE is not installed - - -2015/06/21 v1.19.45 -- Bug Fix mnx: When a menu that uses single quotes or an expression in the option's MESSAGE is exported to text, when regenerating the menu from the text there are parts of the message that are cut off (Mike Potjer) -- Bug Fix: When processing multiple PJ2 files, an error "variable llError not defined" can occur (Lutz Scheffler) -- Bug Fix pjx/pj2: PJX/PJ2 projects that references files from other disk units throw errors for those files when processing with "*" or "*-" options (Matt Slay) -- Bug Fix: When processing multiple-files, sometimes encountered errores are not reported -- Feature (API-PJX): New loadModule() method that returns the internal FoxBin2Prg Project object when the full name of an existent project file is specified -- Feature (API-PJX): New getFilesNotFound() method for the FoxBin2Prg's Project object, that returns the count of files referenced in the project that are not found on disk and an array with all the existence state of each file - - -2015/05/31 v1.19.44 -- Bug Fix: In certain PCs FoxBin2Prg does not return error codes when called from an external program, so another terminating method is implemented (Ralf Wagner) -- Allow exporting DBF data when using DBF_Conversion_Support:1 and optional individual CFG files -- Bug Fix: A previous bug fix on cascading errors management caused reseting the error status, making that sometimes errors don't get reported - - -2015/05/10 v1.19.43 -- Feature: Added new CFG setting "RemoveZOrderSetFromProps" for removing ZOrderSet property when you want to maintain the original class ZOrder always, avoid unnecesary differences and fix some visual on top/on bottom control problems (Ryan Harris) -- Feature: Do not allow progressbar window become the default output window of ? command (Lutz Scheffler) -- Bug Fix: Fixed VFP9 SP1 validation message -- Bug Fix: FoxBin2Prg does not return error codes when called from an external program (Ralf Wagner) -- Bug Fix: FoxBin2Prg sometimes generates an OLE error when executed as object more than once on a file with problems (Fidel Charny) -- Bug Fix: When a form have AutoCenter=.T., there are times that when regenerating the binary and executing it does not shows centered (Esteban H) - - -2015/04/16 v1.19.42 -- Feature: Added VFP 9 SP1 runtime validation -- Bug Fix: Broken SourceSafe compatibility because an error is thrown when querying for file support (Tuvia Vinitsky) -- Bug Fix scx/vcx: Process only one TEXT/ENDTEXT nesting level because TEXT/ENDTEXT can't be nested (Lutz Scheffler) -- Feature: Make some error descriptions more informative and precise (Lutz Scheffler) -- Feature (API): Allow specifying inputFile with relative path (Lutz Scheffler) -- Bug Fix scx: Metadata of Dataenvironment not properly generated when Dataenvironment is renamed -- Bug Fix: Added PJX/PJ2 generation when specifying "file.pjx", "*" (Lutz Scheffler) -- Some enhancements in german translations (Lutz Scheffler) -- Feature: Added multiprocessing of projects (*.pjx, *.pj2) when specifying "file.pjx", "*" (Lutz Scheffler) -- Change FoxBin2Prg base class from custom to session (Lutz Scheffler) -- Feature: Allow processing all project files without converting the PJX/2, with "*-" (Lutz Scheffler) -- Bug Fix pjx/pj2: If end of line (CR+LF) is used on pjx's "Build" properties data, generated pj2 is malformed -- Feature: Default foxbin2prg.cfg configuration file renamed to foxbin2prg.cfg.txt to no overwrite user cfg (Lutz Scheffler) -- Added DOS errOut output support and implemented in writeErrorLog when logging errors -- Feature: Added full support for *? file masks for multi-processing files of the same extension (Lutz Scheffler) -- Feature (API): Added new parameter to allow alternative main CFG (Lutz Scheffler) -- Feature (API): Added new get_Processed() method for obtaining information about processed files (Lutz Scheffler) -- Feature: Added new file processing output to DOS stdOut (Lutz Scheffler) -- Bug Fix: Fixed processing cancelation with Esc key -- Feature: Sort table/view fields alphabetically to facilitate diffing and merging, while maintaining a list with the original field order for correct DBC regeneration (Ryan Harris) -- Feature: Apply ClassPerFile to DBC connections, tables, views and SPs (Ryan Harris) -- Bug Fix vw: Views now save/restore their Path and RecordCount properties -- Feature: New default FoxBin2Prg App icon and background image, configurable with a new CFG "BackgroundImage" setting -- Bug Fix mnx: Empty Pad name is not kept when regenerating a menu defined with and empty Pad name (Lutz Scheffler) -- Feature (API): New property "l_ProcessFiles" that allow setting to .F. when using foxbin2prg as object to get Processing file info with get_Processed method without actual processing -- Bug Fix frx/lbx: Trimmed some extra CR,LF,TAB from FR2/LB2 tag that where included in previous versions (Ryan Harris) -- Bug Fix scx/vcx/dbc: Delete ERR files when processing with UseClassPerFile switch (Ryan Harris) -- Feature: Implemented CFG inheritance between directories -- Feature (API): New method get_DirSettings() that returns the CFG settings object for the indicated directory (Lutz Scheffler) -- Feature: Allow generation of text for a single class of a librery when using ClassPerFile (Lutz Scheffler) -- Feature (API): Renowned method names to English to facilitate international understanding (Mike Potjer) - -2015/01/18 v1.19.41 -- Bug Fix db2: Erroneous detection of Invalid Table when size is less than 328 bytes. Lower limit was changed to 65 bytes. -- Bug Fix vcx/scx: Erroneous detection of PROCEDURE/ENDPROC structures when used as parameters of LPARAMETERS and start in new line (Ryan Harris) - -2015/01/11 v1.19.40 -- Enhancement frx/lbx: Clean ASCII 0 from expression field for Dataenvironment, Cursors and Relations -- Bug fix frx/lbx: When using Dataenvironment with more than one cursor, remaining cursors are lost -- Feature: Added new configuration "ShowProgressbar:2" to activate the progressbar only when a directory is selected and deactivate it for individual files (Jim Nelson) -- Bug fix dbf: [Error 12, variable "tcOutputFile" is not found] when DBF_Conversion_Support=4 and output file is the same as existent one (Mike Potjer) -- Feature scx/vcx/sc2/vc2: Added new code checking to find duplicated object names for the same class and container to notify those cases of file corruption -- Fix for "Error 2183: Operation requires that SET MULTILOCKS is set to ON" in some DBF convertions - -2015/01/01 v1.19.39 -- Bug fix vbs: vbs scripts does not show FoxBin2Prg process errors correctly -- When using BIN2PRG or PRG2BIN keywords with FoxBin2Prg command line, allow processing one file (Mike Potjer) -- Add keyword SHOWMSG and use INTERACTIVE keyword for an interactive dialog (Mike Potjer) -- When processing a directory from commandline with foxbin2prg alone and the INTERACTIVE keyword, show a dialog to ask what to process (Mike Potjer) -- Bug fix dc2: DisplayClass and DisplayClassLibrary values got the wrong value "Default" and not the corresponding own values (Christopher Kurth/Ryan Harris) -- Deleted recompilation scripts for language, because it is an automatic selection now - -2014/12/13 v1.19.38 -- Feature: Now is possible to use FoxBin2Prg for batch conversions directly from the File Explorer (see README.txt), without the need of vbs scripts, that sometimes can make trouble or are not permitted by IT department (Francisco Prieto) -- Feature: Enhanced Multilanguage support by 3 ways: 1-Automatic [DEFAULT] (depending on VERSION(3)); 2-By parameter, using the new method ChangeLanguage(); 3-Using the new setting "Language" in foxbin2prg.cfg -- Feature: Detection of duplicated methods on vc2/sc2 files to notify those cases of vcx/scx file corruption (Ãlvaro Castrillón) - -2014/11/30 v1.19.37 -- Feature: Added Class per file support, configurable with UseClassPerFile:1 (Ryan Harris/Lutz Scheffler) -- Feature: foxbin2prg.cfg configuration options can now have "&&" comments at the right of the values (edyshor) -- Feature: Added support for the new "ClearDBFLastUpdate" setting in FoxBin2Prg.cfg, activated by default to minimize DB2 differences (edyshor) -- Feature: Enhanced progressbar indication, with more detailed information -- Feature: vcx/scx broken properties autofix because an erroneous manual user edition on the vcx/scx -- Feature: vcx/scx autofix por Hidden and Protected duplicated properties (some type of corruption or bad manual user edit) -- Feature: Added a validation for FRX to notify the user if it is not a VFP 9 REPORT -- Feature: Batch convertions can now be interrupted with the Esc key -- Bug Fix dbf: "Error 1903, String is too long to fit" when converting long DBF files with "DBF_Conversion_Support:4" to text (edyshor) -- Bug Fix vcx/scx: Sometimes some properties get the description of a similarly named property -- Bug Fix vcx/scx: Hidden and Protected properties are not ordered alphabetically -- Various Code Optimizations for enhancing processing performance - -2014/10/08 v1.19.36 -- Bug fix mnx: When generating mn2 text view, menu all pad IDs are generated as _000000000 (bug introduced in v1.19.36) -- Enhancement: New "VFP9_FoxBin2Prg.vbs" script for "SendTo" menu, that replaces FoxBin2Prg.exe in this menu and adds a process status message - -2014/09/26 v1.19.35 -- Enhancement: Always generate the same Timestamp and UniqueID for binaries, for minimizing differences when regenerating them (Marcio Gomez G.) - -2014/09/19 v1.19.34 -- Bug Fix: If run from VFP Command Window and there is a file in use, an error is thrown because can't capitalize source file (Jim Nelson) - -2014/08/29 v1.19.33 -- Bug Fix mnx: Menu doesn't generate well when there is a Bar of #BAR type without a name (Peter Hipp) -- Bug Fix mnx: If a menu option have an associated Procedure with 1 line of code, the Procedure is converted to Command (Peter Hipp) - -2014/08/26 v1.19.32 -- If exists a property called "text" it is confused with a text/endtext structure (Peter Hipp) - -2014/08/22 v1.19.31 -- Trash cleanup code on binary methods, normally added by tools like ReFox and others -- Added EXE version number when generating a debug LOG file -- Enhanced recognition of #IF..#ENDIF instructions when there are spaces between # symbol and the command name -- Added capitalization normalization for input files -- Added new c_Language property for querying actual compiled language (EN,ES,DE,etc) - -2014/08/07 v1.19.30 -- Bug Fix vcx/scx: Bad EndText block detection when the previous line ends with "," or ";" (Jim Nelson) -- Bug Fix vcx/scx: Some methods are not alphabetically sorted in some inheritance situations (Ryan Harris) -- Added FoxUnit test cases to bug fix confirmation of both - -2014/08/01 v1.19.29 -- Bug Fix vcx/scx: Bad Text block detection when the previous line ends with "," (M_N_M) -- Optimizations and refactoring - -2014/07/26 v1.19.28 -- Feature: Added new options in foxbin2prg.cfg (DBF_Conversion_Included, DBF_Conversion_Excluded) and in filename.dbf.cfg (DBF_Conversion_Order, DBF_Conversion_Condition) for exporting DBFs data to text when DBF_Conversion_Support is 4 (Edyshor) - -2014/07/18 v1.19.27 -- Feature: Added support for exporting DBF data for DIFF (It's intended just for DIFF small DBFs, as config ones, not for true Data export. Binary fields are not exported and there is not an Import Data feature) (Doug Hennig) - -2014/07/06 v1.19.26 -- Feature: Drop asterisks between "ENDPROC" and "PROCEDURE", analyzed in that exact order, to regenerate binary without errors. (Daniel Sánchez) -- Feature: Add the l_DropNullCharsFromCode configuration option, enabled by default, to allow droping NULLs from source code. (Matt Slay) -- Bug Fix cfg: ExtraBackupLevel does not work when using multi-configuration - -2014/06/25 v1.19.25 -- When processing one or multiple files with vbs scripts, show a message indicating the status of the generation, and show the error log if any error occurs (Pedro Gutiérrez M.) -- Code cleaning and normalization -- ClearUniqueID is True by default for tx2 files -- OptimizeByTimestamp is False by default, to avoid possible automatic modifications made by VFP when opening a form or a classlib -- New AllowMultiConfig switch enabled by default, that allow a foxbin2prg.CFG file per directory, overriding main CFG (Mario Peschke) - -2014/06/15 v1.19.24 -- Bug Fix scx/vcx: The absence of AGAIN keyword on some USE commands throws "tabla in use" error if used the PRG version from VFP command window (Matt Slay) -- Bug Fix scx/vcx: A table field called "text" that begins the line can be confused with the TEXT/ENDTEXT structure and can wrong recognize the rest of the code (Mario Peschke) -- Bug Fix scx/vcx: GetTimeStamp internal method throwse an error when day or month have just 1 digit (happen from v1.19.23) -- New "run_aftercreate_db2" event that permits execution of an external program when using FoxBin2Prg as object (for example, to export table data) -- New FoxUnit Unit Tests to verify new functionality and "text" bug fix -- Added foxbin2prg_de.h file translation of most messages to German (Mario Peschke) - -2014/06/07 v1.19.23 -- Timestamps and UniqueIds values are back on binaries, and they are just cleaned up on tx2 files if NoTimestamps and ClearUniqueID flags are set. This minimizes some differences on the binary side. -- Added sccdata default value when regenerating PJX binary (which is automatically completed on the PJX when opened anyway) -- Fixed timestamp evaluation for "OptimizeByFilestamp" optimization that evaluates just .??X files, and now .??T (memo) filestamps are evaluated too -- Fixed missing BordeCcolor property on props_optiongroup.txt file -- Fixed missing Stretch property on props_image.txt file (Kenny Vermassen) -- Fixed missing Enabled property on props_image.txt file - -2014/05/17 v1.19.22 -- Bug Fix vcx/scx: Picture property of a form class does not show the image. Does not happen with control pictures (Fidel Charny) -- Bug Fix scx/vcx: Incorrect detection of PROCEDURE/ENDPROC/TEXT/ENDTEXT that can cause lost of some methods in some circunstantes (Andres Mendoza) -- Bug Fix scx/vcx: Some options from the optiongroup control loose there width when subclassed from a class with autosize=.T. (Miguel Duran) -- Added evaluation and generation of properties by classtype, when applicable -- Added support of property evaluation from external file (props_*.txt) -- Added enhanced Unit Tests of bitmap comparisons of screen captures before/after (the original is compared with the regenerated of the regenerated binary, for more accuracy) -- A lot of garbage collect optimizations all over the code -- Added Unit Testing of configuration by defaults, by file and by parameters -- Added Unit Testing for checking the generation of classes, forms, reports and menus -- Added new switch OptimizeByFilestamp (active by default) for making possible deactivation of this regeneration optimization by file timestamp, in case someone wants to force regeneration allways - -2014/05/01 v1.19.21 -- Added support to convert to text or binary all files of a project from pjx or pj2 (Matt Slay) -- Added optimization on the search of the capitalization program when processing projects -- Added keyword AGAIN on table openings, for enhancing concurrence (Jim Nelson) -- Added optimization based on file timestamps for regenerating only newer binaries and tx2 files (Matt Slay) -- Added English translation in foxbin2prg_en.h for the LOG message of new timestamp optimization -- section simplification: Methods and arrays doesn't require preceding * and ^ symbols anymore. - -2014/04/17 v1.19.20 -- New: CDX filename in DB2 files have relative paths now. This help show less differences when regenerating DB2 files from different paths - -2014/04/02 v1.19.19 -- New: DBF Hook that let intercalate a personalized process between DBF creation and index creation when processing a DB2 file (example program in "tests\demo_hook_dbf.prg" included) - -2014/03/25 v1.19.18 -- Bug Fix vcx/scx: Image controls with stretched icons or images, get redimensioned to original size when regenerating binary (Arturo Ramos) -- Bug Fix vcx/scx: Library level comments are not kept (Ryan Harris) - -2014/03/16 v1.19.17 -- Bug Fix frx/lbx: Double-quoted expressiones make fx2/lb2 files corrupt (Ryan Harris) -- Bug Fix frx/lbx: Multiline Comments are lost (Ryan Harris) -- frx/lbx tag2 field enhance: when used for tooltips, real values are shown in regards of b64 normal encoding -- Bug Fix mnx: Multiline Comments on Bars/Pads makes MN2 file corrupt (Ryan Harris) -- Bug Fix mnx: Some procedures doesn't generate correctly (Ryan Harris) -- English translation file foxbin2prg_en.h syntax corrected (Ryan Harris) -- Bug Fix vcx/scx: Lowercase saved Dataenvironment property causes Reserved2 value to be not calculated -- Bug Fix frx: character on print condition on field makes fr2 file corrupt -- Bug Fix mnx: Using double-quotes on prompt option fields makes mn2 file invalid (Ryan Harris) - -2014/03/10 v1.19.16 -- Bug Fix vcx/scx: properties loose there hidden/protected visibility when no default value assigned (Ryan Harris) -- Bug Fix vcx/scx: character value with length >255 in addobject property regenerates with tag included (Ryan Harris) -- Bug Fix vcx/scx: When regenerating binari file with empty procedure makes FoxPro crash when trying to modify it on IDE -- Bug Fix scx/vcx: Binary can be corrupted if the class have a multiline comment (Tested on: Ffc\_frxcursor.vcx) -- Bug Fix: If _memberdata contains CR inside there values, they can be lost when regenerating tx2 text files -- Bug Fix: Property values with spaces at the right loose this spaces -- Bug Fix: When 2 or more methods share the same name (ej: met and met2) tx2 text file gets corrupted (Ryan Harris) - -2014/03/04 v1.19.15 -- Bug Fix: OLE information cleared when a legacy TX2 is processed -- Bug Fix: Default value of NoTimestamp = 0 ==> Now is 1, as should be -- Bug Fix: DBFs backlink info cleared when DBC is recreated (Ryan Harris) -- Feature: Lowercase capitalization in tx2 filename headers to minimize differences - -2014/03/01 v1.19.14 -- Load of configuration is optimized (foxbin2prg.cfg) to read cfg only once for a massive processing of multiple conversions -- .vbs scripts have been modified to respect the conversion support configuration defined in foxbin2prg.cfg configuration file -- 2 new functions where added to enhance and encapsulate the external use of the evaluation of the conversion support (requires previous call to EvaluarConfiguracion()). Used on .vbs scripts -- ExtraBackupLevels Regression: when no defined value, no backup is made -- New default value ClearUniqueID = 1 in foxbin2prg.cfg for minimizing differences in the SCM - -2014/02/26 v1.19.13 -- Bug Fix: If NoTimestamp setting of foxbin2prg.cfg is changed, opposite value is evaluated (Ryan Harris) -- Encapsulated foxbin2prg.cfg file for enhancing FoxUnit automated testing -- Internal change of property l_UseTimestamps by l_NoTimestamps -- With ExtraBackupLevels setting you can now deactivate backups if setting to 0 (Ryan Harris proposal) -- foxbin2prg.log file checking dropped, to activate the log file use foxbin2prg.cfg setting Debug=1 -- In TX2 header files show the file without path, because genereting it from different places makes unnecesary differences in Diff (Ryan Harris proposal) -- Created a lot of FoxUnit automated tests to check all settings of foxbin2prg.cfg configuration file - -2014/02/23 v1.19.12 -- Generation of VC2/SC2 with new header metadata for centralizing uniqueid, timestamp and ZOrder and big reduce of differences in a diff/merge (enhancement proposed by Ryan Harris) -- BINARY regeneration from the new metadata header (remains compatible with old VC2/SC2) -- FoxUnit test cases fixed for the new functionality -- Cleaning, Refactorization and optimization of Code -- Presentation enhancement of VC2/SC2 file headers - -2014/02/13 v1.19.11 -- WITH/ENDWITH optimizations with a conversion performance gain up to 16% more fast -- Bug Fix: Just one level of #IF was contemplated, throwing an error if more levels are nested -- Bug Fix: When regenerating the PJX, default home directory not always was correct -- New FoxUnit automated test added to check bug fix of nested #IF - -2014/02/09 v1.19.10 -- Added parametrization to enable configuration support for each kind of binary (0=None, 1=Only TX2, 2=TX2 and Binary) -- Fixed default NoTimestamps setting -- EXPERIMENTAL: Added new configuration parameter "ClearUniqueID" in foxbin2prg.cfg for Clearing UniqueID in binaries and text versions. Works well and apparently FoxProdoesn't make use of it, but more testing is required -- Adjusted some FoxUnit test cases - -2014/02/08 v1.19.9 -- New configuration items in foxbin2prg.cfg -- Localization Bug: When recompiling with localization file foxbin2prg_en.h renamed to foxbin2prg.h, syntax error occurs -- Debug information of .LOG files enhanced -- New parametrization for the number of backups, now just one .BAK by default (earlier was 10) -- Enabled configuration file foxbin2prg.cfg by default -- Change in default behavior: Now Timestamps are disabled by default. You can change this on foxbin2prg.cfg - -2014/02/03 v1.19.8 -- Bug fix: ActivePage error when executing a regenerated binary with a PageFrame / New FoxUnit test to test solution -- Added cNoTimestamps='1' to batch conversion vbs scripts - -2014/02/02 v1.19.7 -- Added Ole encapsulation in just 1 place -- Adjusted Blocksize of generated binaries -- New cNoTimestamps parameter. If '1' is given, then no timestamps are generated (useful for diff/merge) - -2014/01/31 v1.19.6 -- Added SourceSafe support (SCCAPI) for Diff and Merge -- SCX bug fix: Dataenvironment sometimes doesn't regenerates correctly -- Functionality change: Automatic recompilation enabled by default again because some methods doesn't show on form edit. Can be deactivated passing '0' to cRecompile param - -2014/01/26 v1.19.5 -- Added Multilanguage support and Localization file for English. To use it rename the new file foxbin2prg_en.h to foxbin2prg.h and recompile - -2014/01/24 v1.19.4 -- New "Recompile" parameter for recompiling from PJX directory (if provided) -- Functionality change: Now FoxBin2Prg does not recompile bins for default, because it do on bin dir and that can throw compilation errors. Use new parameter if needed or recompile by your own -- DBC: Added support for multiline "comment" property -- VBS Batch scripts: Added progress bar - -2014/01/18 v1.19.3 -- Change on TXT timestamps to preserve empty values that can save a lot of differences when diff/merging. Previously empty timestamps get converted to datetime -- Optimization on TXT generation of ZOrders - -2014/01/13 v1.19.2 -- Fix on PJX regeneration caused for something missing in the last change of "Autor" to "Author" - -2014/01/08 v1.19.1 -- Small change on TX2 headers to drop the "Generated" timestamp that causes unnecesary differences / Updated the EXE version with the correct one - -2014/01/08 v1.19 -- Added new debug flag on .vbs scripts to show a "End process" message for batch processing -- Bug Fix scx/vcx: Improper order of Reserved3 props cause event access to not fire -- Bug Fix dbf: Improper index generated when the type is Candidate -- Added support for converting SourceSafe PJM to FoxBin PJ2 -- Added validation for Menus when converting from older versions, so user can convert it to VFP 9 format first -- Change in MN2 property: "Autor" was changed to "Author". You can add the missing letter to MN2 or regenerate - -2014/01/07 v1.18.1 -- Added a vbs script (Normalize_FileNames.vbs) for FileNames normalizing in batch mode, and updated FileName_Caps.exe and the call on FoxBin2prg - -2014/01/06 v1.18 -- mnx bug fix: Generation of DO Procedure or Command when no Procedure or Command available to call when empty option is created (Fidel Charny) -- Added support for DBFs earlier than VFP 9 for generating DB2 text, but DBF regeneration is in VFP 9 version! -- dbf bug fix: DBFs linked to a DBC that use long field names throw error when regenerating DBFs -- dbf bug fix: Some view info is lost when generating text from DBC - -2014/01/03 v1.17 -- mnx bug fix: Location value is lost and some menus doesn't render properly (Fidel Charny) -- Added 2 VB scripts (Convert_VFP9_BIN_2_PRG.vbs and Convert_VFP9_PRG_2_BIN.vbs) for batch converting of dirs and files if a shortcut is placed on "SendTo" user folder -- Added new Unit Testing cases for menus - -2014/01/02 v1.16 -- Added support for Menus (MNX) - -2013/12/18 v1.15 -- Added support for DBF, DBC and CDX binaries - -2013/12/15 v1.14 -- scx bug fix: autocenter property do nothing (Arturo Ramos) -- scx bug fix: Last COMMENT record is lost (Fidel Charny) - -2013/12/08 v1.13 -- frx/lbx bug fix: "Error 1924, TOREG is not an object" on some reports (Fidel Charny) - -2013/12/08 v1.12 -- Added support for Reports (FRX) and Labels (LBX) - -2013/12/08 v1.11 -- scx/vcx bug fix: _memberdata value corrupted when the value is a long one (Edgar Kummers) - -2013/12/07 v1.10 -- scx/vcx bug fix: when there are methods with the same name, there code is assigned to erroneous objects (Fidel Charny) - -2013/12/07 v1.9 -- scx/vcx bug fix: last fix keep loosing some properties (Fidel Charny) - -2013/12/06 v1.8 -- scx/vcx bug fix: last fix keep loosing some properties (Fidel Charny) -- sort function encapsulated and reused on BIN and TXT generation for safety - -2013/12/03 v1.7 -- vcx/scx bug fix: some properties get lost and picture clause is not displayed if "Name" is not the last property on memo (Fidel Charny) -- Added verification of readOnly files and report this to Log file in debug mode - -2013/12/02 v1.6 -- Complete refactoring of BIN and TXT generation -- Changes of various algorithms -- scx/vcx bug fix: Array properties didn't save (Fidel Charny) -- Unit testing cases with FoxUnit - -2013/11/27 v1.5 -- Bug fix: On some forms dataenvironment didn't regenerate appropiately (Luis Martínez) - -2013/11/27 v1.4 -- Added mask support -- Added support for extension configuration on file foxbin2prg.cfg, so one can use "vca" instead of "vc2", etc -- Added support for a new parameter for Log generation - -2013/11/24 v1.3 -- Bug fixes, code cleaning, refactoring - -2013/11/24 v1.2 -- Bug fixes, code cleaning, refactoring - -2013/11/22 v1.1 -- Bug fixes - -2013/11/22 v1.0 -- Initial creation of clases on prg and support of VCX/SCX/PJX files +* look at https://github.com/fdbozzo/foxbin2prg/wiki/FoxBin2Prg-Full-Change-History EndText diff --git a/ThorUpdater/Project.txt b/ThorUpdater/Project.txt index 910773e..4ef305c 100644 --- a/ThorUpdater/Project.txt +++ b/ThorUpdater/Project.txt @@ -1,5 +1,5 @@ appName = FoxBin2Prg appID = FoxBin2Prg -majorVersion = 1.19.50 +majorVersion = 1.19.51 excludeFiles = *.bak,*.bat,*.fxp,*.tbk,*.tmp,*.dat,*.log,*.cvp,README.md,.gitignore,*.zip*,*.7z*,*- copia.*,*.private.*,test_*.*,xx*.*,*.lnk,vfp_init.*,tmp*.*,*.err, *.conflict.*, *.private.* excludeFolders = *.plastic*,*ThorUpdater*,*Documentacion*,*foxunit*,*foxunit_*,*pruebas varias*,*versiones*,*datos_test* diff --git a/ThorUpdater/Version.txt b/ThorUpdater/Version.txt index ff4a650..969c201 100644 --- a/ThorUpdater/Version.txt +++ b/ThorUpdater/Version.txt @@ -23,451 +23,7 @@ Supported formats are: PJX, PJM, SCX, VCX, FRX, LBX, MNX, DBC, DBF Demo video using FoxBin2Prg with PlasticSCM: http://youtu.be/sE4wQ50Itqg Change History ------------------------------------------------------------- - -2018/01/06 v1.19.49.6 -- BugFix vcx/scx: FoxBin2Prg should ignore the records that VFP Designer ignores (Doug Hennig / https://github.com/fdbozzo/foxbin2prg/issues/15) -- BugFix vcx/scx: FoxBin2Prg encodes MemberData property with CR/LF, which can cause "property '_memberdata' value is too long" error (Doug Hennig / https://github.com/fdbozzo/foxbin2prg/issues/16) - -2017/12/20 v1.19.49.5 -- BugFix dbf: When FoxBin2PRG converts a DB2 file to a DBF file and imports the data (using DBF_Conversion_Support = 8), tabs at the start of lines in memo fields are lost (Doug Hennig) - -2017/12/04 v1.19.49.4 -- Bug Fix VCX: When using ClassPerFile in API Mode and importing single classes, sometimes their names get unquoted, throwing errors / Reported by Lutz Scheffler (https://github.com/fdbozzo/foxbin2prg/issues/11) - -2017/12/03 v1.19.49.3 -- Bug Fix: "Double" field types are explicitly defined with 0 decimals when no decimals are defined (Jerry Stager) - -2017/12/03 v1.19.49.2 -- Bug Fix: ClassPerFile export didn't work correctly starting from v1.19.49 / Reported by Lutz Scheffler (https://github.com/fdbozzo/foxbin2prg/issues/9) - -2017/06/25 v1.19.49.1 -- Bug Fix: DEVINFO field is only used when doing PJX conversions. On other files throw errors - -2017/04/26 v1.19.49 -- Replace Scripting.FileSystemObject MoveFile with Win32API equivalent -- Added support for using temporal CFG file for low-level API operations -- Bug Fix: Single-class export with "classlib.vcx::classname" syntax did not export (Lutz Scheffler) -- Added single-class import support ("library.vcx::classname::import") -- Added new single-class export syntax ("library.vcx::classname::export") -- Both single-class syntaxes doesn't require a CFG configuration -- Bug Fix: Partially corrupted frx/lbx info generated when using "&&" string inside field expressions (Alejandro A Sosa) -- sys(2023) secure temp: When sys(2023) points to "program files", then getenv("temp") is used -- Add more options to config.fpw to minimize interference from existent configs -- Feature: Save the contents of User field (Doug Hennig). Note: DevInfo is already supported - -2016/07/11 v1.19.48 -- Bug Fix: Error message 'variable tcOutputFile not found' (german version) (Andy Kasper) -- Bug Fix: Menu location 'Before' always changed to 'after' when convert (Andy Kasper) -- Bug Fix: DBF conversion restrictions are not always respected when using particular CFGs for DBFs (Nathan Brown) -- Bug Fix db2: When reading a miltiline-memo with old db2 data, an index out of range error occurs -- Bug Fix db2: When using ExcludeDBFAutoincNextval: 1 setting in FoxBin2Prg.cfg and at the same time the data import with an AutoInc field, then error "Error 2088, Field is read-only" occurs (Nathan Brown) -- Defect Fix db2: When fixing the multi-line memo bug, introduced a new defect on which a single-line memo is not decoded correctly (Nathan Brown) -- Bug Fix pj2: When a binary is regenerated from a PJ2 file containing files with parenthesis and spaces, the error "Error 36, Command contains unrecognized phrase/keyword" occurs (Nathan Brown) -- Bug Fix frx: ControlSource of OLE Objects containing quotes are not well regenerated from FR2 (Nathan Brown) - -2016/06/08 v1.19.47 -- Bug Fix: When a filename "*" is specified with a type "*", an automatic regeneration of all binary files is made from text files (Alejandro Sosa) -- BugFix: Added variable declaration (Doug Hennig) -- BugFix: Fixed incorrectly named variable (Doug Hennig) -- BugFix: Added missing assignment (Doug Hennig) -- Enhancement: Put double quotes around path in case in contains single quote (Doug Hennig) -- BugFix: Added "+16" to Debug flags to maintain internal defaults to not generate timestamps on xx2 files -- Feature: Added support for appending data from DB2 to DBF with the new value DBF_Conversion_Support=8. All datatypes except General. (Walter Nicholls) - -2016/02/06 v1.19.46 -- Bug Fix: set_UserValue() method causes error when trying to get information about another error and the VFP binary table can not be opened (ie, because corrupted memo) -- Feature: Added internal support for querying directory cfg information, with a new optional parameter, for API methods that require it (ie: get_Ext2FromExt, hasSupport*) -- Feature: Convert FUNCTION to PROCEDURE for maintaining compatibility with the way that VFP save methods on binaries -- New fb2p_diff.exe: Allow a quick Diff of VFP9 binaries, for those that don't need converting to text manually -- Bug Fix: When processing a directory or a project with all the files, sometimes an "Alias already in use" error may occur (Dave Crozier) -- Bug Fix mnx: When menu options contains '&&' in their texts, menu binary is corrupted when regenerated (Walter Nichols) -- Bug Fix fb2p_diff: When calling fb2p_diff.exe from a directory out of FoxBin2Prg dir, an error is thrown because FoxBin2Prg is not found (Mike Potjer) -- Feature: In some environments and under some conditions WSscript.Shell object can cause problems, so now it's replaced with Win32 native functions (Aurélien Dellieux) -- Bug Fix frx/lbx: Ordering of report objects changes the ZOrder of near objects that can overlap, which can cause bad visualization and printing (Ryan Harris) -- Bug Fix frx/lbx: When regenerating reports or labels with multiline texts center or right aligned, alignment is not completely right (Ryan Harris) -- Bug Fix frx/lbx: When grouping objects in design mode, generating text and regenerating binary cause the lost of the grouping (does not affect data) (Lutz Scheffler) -- Bug Fix Pjx: SPR and MPR files are not correctly identified in the PJX Project info (Ralf Wagner) -- Bug Fix Pj2: An error is thrown when regenerating a PJX from a PJ2 when some file have parenthesis in it's name (EddieC) -- Feature (dbf): New ExcludeDBFAutoincNextval parameter for minimizing DB2 differences (edyshor) -- Bug Fix: When processing a file on root dir, a 2062 error occurs (Aurélien Dellieux) -- Feature: Added VFP 9 runtimes (vfp9r.dll, vfp9renu.dll) so FoxBin2Prg can be used with VFP when VPF IDE is not installed - - -2015/06/21 v1.19.45 -- Bug Fix mnx: When a menu that uses single quotes or an expression in the option's MESSAGE is exported to text, when regenerating the menu from the text there are parts of the message that are cut off (Mike Potjer) -- Bug Fix: When processing multiple PJ2 files, an error "variable llError not defined" can occur (Lutz Scheffler) -- Bug Fix pjx/pj2: PJX/PJ2 projects that references files from other disk units throw errors for those files when processing with "*" or "*-" options (Matt Slay) -- Bug Fix: When processing multiple-files, sometimes encountered errores are not reported -- Feature (API-PJX): New loadModule() method that returns the internal FoxBin2Prg Project object when the full name of an existent project file is specified -- Feature (API-PJX): New getFilesNotFound() method for the FoxBin2Prg's Project object, that returns the count of files referenced in the project that are not found on disk and an array with all the existence state of each file - - -2015/05/31 v1.19.44 -- Bug Fix: In certain PCs FoxBin2Prg does not return error codes when called from an external program, so another terminating method is implemented (Ralf Wagner) -- Allow exporting DBF data when using DBF_Conversion_Support:1 and optional individual CFG files -- Bug Fix: A previous bug fix on cascading errors management caused reseting the error status, making that sometimes errors don't get reported - - -2015/05/10 v1.19.43 -- Feature: Added new CFG setting "RemoveZOrderSetFromProps" for removing ZOrderSet property when you want to maintain the original class ZOrder always, avoid unnecesary differences and fix some visual on top/on bottom control problems (Ryan Harris) -- Feature: Do not allow progressbar window become the default output window of ? command (Lutz Scheffler) -- Bug Fix: Fixed VFP9 SP1 validation message -- Bug Fix: FoxBin2Prg does not return error codes when called from an external program (Ralf Wagner) -- Bug Fix: FoxBin2Prg sometimes generates an OLE error when executed as object more than once on a file with problems (Fidel Charny) -- Bug Fix: When a form have AutoCenter=.T., there are times that when regenerating the binary and executing it does not shows centered (Esteban H) - - -2015/04/16 v1.19.42 -- Feature: Added VFP 9 SP1 runtime validation -- Bug Fix: Broken SourceSafe compatibility because an error is thrown when querying for file support (Tuvia Vinitsky) -- Bug Fix scx/vcx: Process only one TEXT/ENDTEXT nesting level because TEXT/ENDTEXT can't be nested (Lutz Scheffler) -- Feature: Make some error descriptions more informative and precise (Lutz Scheffler) -- Feature (API): Allow specifying inputFile with relative path (Lutz Scheffler) -- Bug Fix scx: Metadata of Dataenvironment not properly generated when Dataenvironment is renamed -- Bug Fix: Added PJX/PJ2 generation when specifying "file.pjx", "*" (Lutz Scheffler) -- Some enhancements in german translations (Lutz Scheffler) -- Feature: Added multiprocessing of projects (*.pjx, *.pj2) when specifying "file.pjx", "*" (Lutz Scheffler) -- Change FoxBin2Prg base class from custom to session (Lutz Scheffler) -- Feature: Allow processing all project files without converting the PJX/2, with "*-" (Lutz Scheffler) -- Bug Fix pjx/pj2: If end of line (CR+LF) is used on pjx's "Build" properties data, generated pj2 is malformed -- Feature: Default foxbin2prg.cfg configuration file renamed to foxbin2prg.cfg.txt to no overwrite user cfg (Lutz Scheffler) -- Added DOS errOut output support and implemented in writeErrorLog when logging errors -- Feature: Added full support for *? file masks for multi-processing files of the same extension (Lutz Scheffler) -- Feature (API): Added new parameter to allow alternative main CFG (Lutz Scheffler) -- Feature (API): Added new get_Processed() method for obtaining information about processed files (Lutz Scheffler) -- Feature: Added new file processing output to DOS stdOut (Lutz Scheffler) -- Bug Fix: Fixed processing cancelation with Esc key -- Feature: Sort table/view fields alphabetically to facilitate diffing and merging, while maintaining a list with the original field order for correct DBC regeneration (Ryan Harris) -- Feature: Apply ClassPerFile to DBC connections, tables, views and SPs (Ryan Harris) -- Bug Fix vw: Views now save/restore their Path and RecordCount properties -- Feature: New default FoxBin2Prg App icon and background image, configurable with a new CFG "BackgroundImage" setting -- Bug Fix mnx: Empty Pad name is not kept when regenerating a menu defined with and empty Pad name (Lutz Scheffler) -- Feature (API): New property "l_ProcessFiles" that allow setting to .F. when using foxbin2prg as object to get Processing file info with get_Processed method without actual processing -- Bug Fix frx/lbx: Trimmed some extra CR,LF,TAB from FR2/LB2 tag that where included in previous versions (Ryan Harris) -- Bug Fix scx/vcx/dbc: Delete ERR files when processing with UseClassPerFile switch (Ryan Harris) -- Feature: Implemented CFG inheritance between directories -- Feature (API): New method get_DirSettings() that returns the CFG settings object for the indicated directory (Lutz Scheffler) -- Feature: Allow generation of text for a single class of a librery when using ClassPerFile (Lutz Scheffler) -- Feature (API): Renowned method names to English to facilitate international understanding (Mike Potjer) - -2015/01/18 v1.19.41 -- Bug Fix db2: Erroneous detection of Invalid Table when size is less than 328 bytes. Lower limit was changed to 65 bytes. -- Bug Fix vcx/scx: Erroneous detection of PROCEDURE/ENDPROC structures when used as parameters of LPARAMETERS and start in new line (Ryan Harris) - -2015/01/11 v1.19.40 -- Enhancement frx/lbx: Clean ASCII 0 from expression field for Dataenvironment, Cursors and Relations -- Bug fix frx/lbx: When using Dataenvironment with more than one cursor, remaining cursors are lost -- Feature: Added new configuration "ShowProgressbar:2" to activate the progressbar only when a directory is selected and deactivate it for individual files (Jim Nelson) -- Bug fix dbf: [Error 12, variable "tcOutputFile" is not found] when DBF_Conversion_Support=4 and output file is the same as existent one (Mike Potjer) -- Feature scx/vcx/sc2/vc2: Added new code checking to find duplicated object names for the same class and container to notify those cases of file corruption -- Fix for "Error 2183: Operation requires that SET MULTILOCKS is set to ON" in some DBF convertions - -2015/01/01 v1.19.39 -- Bug fix vbs: vbs scripts does not show FoxBin2Prg process errors correctly -- When using BIN2PRG or PRG2BIN keywords with FoxBin2Prg command line, allow processing one file (Mike Potjer) -- Add keyword SHOWMSG and use INTERACTIVE keyword for an interactive dialog (Mike Potjer) -- When processing a directory from commandline with foxbin2prg alone and the INTERACTIVE keyword, show a dialog to ask what to process (Mike Potjer) -- Bug fix dc2: DisplayClass and DisplayClassLibrary values got the wrong value "Default" and not the corresponding own values (Christopher Kurth/Ryan Harris) -- Deleted recompilation scripts for language, because it is an automatic selection now - -2014/12/13 v1.19.38 -- Feature: Now is possible to use FoxBin2Prg for batch conversions directly from the File Explorer (see README.txt), without the need of vbs scripts, that sometimes can make trouble or are not permitted by IT department (Francisco Prieto) -- Feature: Enhanced Multilanguage support by 3 ways: 1-Automatic [DEFAULT] (depending on VERSION(3)); 2-By parameter, using the new method ChangeLanguage(); 3-Using the new setting "Language" in foxbin2prg.cfg -- Feature: Detection of duplicated methods on vc2/sc2 files to notify those cases of vcx/scx file corruption (Ãlvaro Castrillón) - -2014/11/30 v1.19.37 -- Feature: Added Class per file support, configurable with UseClassPerFile:1 (Ryan Harris/Lutz Scheffler) -- Feature: foxbin2prg.cfg configuration options can now have "&&" comments at the right of the values (edyshor) -- Feature: Added support for the new "ClearDBFLastUpdate" setting in FoxBin2Prg.cfg, activated by default to minimize DB2 differences (edyshor) -- Feature: Enhanced progressbar indication, with more detailed information -- Feature: vcx/scx broken properties autofix because an erroneous manual user edition on the vcx/scx -- Feature: vcx/scx autofix por Hidden and Protected duplicated properties (some type of corruption or bad manual user edit) -- Feature: Added a validation for FRX to notify the user if it is not a VFP 9 REPORT -- Feature: Batch convertions can now be interrupted with the Esc key -- Bug Fix dbf: "Error 1903, String is too long to fit" when converting long DBF files with "DBF_Conversion_Support:4" to text (edyshor) -- Bug Fix vcx/scx: Sometimes some properties get the description of a similarly named property -- Bug Fix vcx/scx: Hidden and Protected properties are not ordered alphabetically -- Various Code Optimizations for enhancing processing performance - -2014/10/08 v1.19.36 -- Bug fix mnx: When generating mn2 text view, menu all pad IDs are generated as _000000000 (bug introduced in v1.19.36) -- Enhancement: New "VFP9_FoxBin2Prg.vbs" script for "SendTo" menu, that replaces FoxBin2Prg.exe in this menu and adds a process status message - -2014/09/26 v1.19.35 -- Enhancement: Always generate the same Timestamp and UniqueID for binaries, for minimizing differences when regenerating them (Marcio Gomez G.) - -2014/09/19 v1.19.34 -- Bug Fix: If run from VFP Command Window and there is a file in use, an error is thrown because can't capitalize source file (Jim Nelson) - -2014/08/29 v1.19.33 -- Bug Fix mnx: Menu doesn't generate well when there is a Bar of #BAR type without a name (Peter Hipp) -- Bug Fix mnx: If a menu option have an associated Procedure with 1 line of code, the Procedure is converted to Command (Peter Hipp) - -2014/08/26 v1.19.32 -- If exists a property called "text" it is confused with a text/endtext structure (Peter Hipp) - -2014/08/22 v1.19.31 -- Trash cleanup code on binary methods, normally added by tools like ReFox and others -- Added EXE version number when generating a debug LOG file -- Enhanced recognition of #IF..#ENDIF instructions when there are spaces between # symbol and the command name -- Added capitalization normalization for input files -- Added new c_Language property for querying actual compiled language (EN,ES,DE,etc) - -2014/08/07 v1.19.30 -- Bug Fix vcx/scx: Bad EndText block detection when the previous line ends with "," or ";" (Jim Nelson) -- Bug Fix vcx/scx: Some methods are not alphabetically sorted in some inheritance situations (Ryan Harris) -- Added FoxUnit test cases to bug fix confirmation of both - -2014/08/01 v1.19.29 -- Bug Fix vcx/scx: Bad Text block detection when the previous line ends with "," (M_N_M) -- Optimizations and refactoring - -2014/07/26 v1.19.28 -- Feature: Added new options in foxbin2prg.cfg (DBF_Conversion_Included, DBF_Conversion_Excluded) and in filename.dbf.cfg (DBF_Conversion_Order, DBF_Conversion_Condition) for exporting DBFs data to text when DBF_Conversion_Support is 4 (Edyshor) - -2014/07/18 v1.19.27 -- Feature: Added support for exporting DBF data for DIFF (It's intended just for DIFF small DBFs, as config ones, not for true Data export. Binary fields are not exported and there is not an Import Data feature) (Doug Hennig) - -2014/07/06 v1.19.26 -- Feature: Drop asterisks between "ENDPROC" and "PROCEDURE", analyzed in that exact order, to regenerate binary without errors. (Daniel Sánchez) -- Feature: Add the l_DropNullCharsFromCode configuration option, enabled by default, to allow droping NULLs from source code. (Matt Slay) -- Bug Fix cfg: ExtraBackupLevel does not work when using multi-configuration - -2014/06/25 v1.19.25 -- When processing one or multiple files with vbs scripts, show a message indicating the status of the generation, and show the error log if any error occurs (Pedro Gutiérrez M.) -- Code cleaning and normalization -- ClearUniqueID is True by default for tx2 files -- OptimizeByTimestamp is False by default, to avoid possible automatic modifications made by VFP when opening a form or a classlib -- New AllowMultiConfig switch enabled by default, that allow a foxbin2prg.CFG file per directory, overriding main CFG (Mario Peschke) - -2014/06/15 v1.19.24 -- Bug Fix scx/vcx: The absence of AGAIN keyword on some USE commands throws "tabla in use" error if used the PRG version from VFP command window (Matt Slay) -- Bug Fix scx/vcx: A table field called "text" that begins the line can be confused with the TEXT/ENDTEXT structure and can wrong recognize the rest of the code (Mario Peschke) -- Bug Fix scx/vcx: GetTimeStamp internal method throwse an error when day or month have just 1 digit (happen from v1.19.23) -- New "run_aftercreate_db2" event that permits execution of an external program when using FoxBin2Prg as object (for example, to export table data) -- New FoxUnit Unit Tests to verify new functionality and "text" bug fix -- Added foxbin2prg_de.h file translation of most messages to German (Mario Peschke) - -2014/06/07 v1.19.23 -- Timestamps and UniqueIds values are back on binaries, and they are just cleaned up on tx2 files if NoTimestamps and ClearUniqueID flags are set. This minimizes some differences on the binary side. -- Added sccdata default value when regenerating PJX binary (which is automatically completed on the PJX when opened anyway) -- Fixed timestamp evaluation for "OptimizeByFilestamp" optimization that evaluates just .??X files, and now .??T (memo) filestamps are evaluated too -- Fixed missing BordeCcolor property on props_optiongroup.txt file -- Fixed missing Stretch property on props_image.txt file (Kenny Vermassen) -- Fixed missing Enabled property on props_image.txt file - -2014/05/17 v1.19.22 -- Bug Fix vcx/scx: Picture property of a form class does not show the image. Does not happen with control pictures (Fidel Charny) -- Bug Fix scx/vcx: Incorrect detection of PROCEDURE/ENDPROC/TEXT/ENDTEXT that can cause lost of some methods in some circunstantes (Andres Mendoza) -- Bug Fix scx/vcx: Some options from the optiongroup control loose there width when subclassed from a class with autosize=.T. (Miguel Duran) -- Added evaluation and generation of properties by classtype, when applicable -- Added support of property evaluation from external file (props_*.txt) -- Added enhanced Unit Tests of bitmap comparisons of screen captures before/after (the original is compared with the regenerated of the regenerated binary, for more accuracy) -- A lot of garbage collect optimizations all over the code -- Added Unit Testing of configuration by defaults, by file and by parameters -- Added Unit Testing for checking the generation of classes, forms, reports and menus -- Added new switch OptimizeByFilestamp (active by default) for making possible deactivation of this regeneration optimization by file timestamp, in case someone wants to force regeneration allways - -2014/05/01 v1.19.21 -- Added support to convert to text or binary all files of a project from pjx or pj2 (Matt Slay) -- Added optimization on the search of the capitalization program when processing projects -- Added keyword AGAIN on table openings, for enhancing concurrence (Jim Nelson) -- Added optimization based on file timestamps for regenerating only newer binaries and tx2 files (Matt Slay) -- Added English translation in foxbin2prg_en.h for the LOG message of new timestamp optimization -- section simplification: Methods and arrays doesn't require preceding * and ^ symbols anymore. - -2014/04/17 v1.19.20 -- New: CDX filename in DB2 files have relative paths now. This help show less differences when regenerating DB2 files from different paths - -2014/04/02 v1.19.19 -- New: DBF Hook that let intercalate a personalized process between DBF creation and index creation when processing a DB2 file (example program in "tests\demo_hook_dbf.prg" included) - -2014/03/25 v1.19.18 -- Bug Fix vcx/scx: Image controls with stretched icons or images, get redimensioned to original size when regenerating binary (Arturo Ramos) -- Bug Fix vcx/scx: Library level comments are not kept (Ryan Harris) - -2014/03/16 v1.19.17 -- Bug Fix frx/lbx: Double-quoted expressiones make fx2/lb2 files corrupt (Ryan Harris) -- Bug Fix frx/lbx: Multiline Comments are lost (Ryan Harris) -- frx/lbx tag2 field enhance: when used for tooltips, real values are shown in regards of b64 normal encoding -- Bug Fix mnx: Multiline Comments on Bars/Pads makes MN2 file corrupt (Ryan Harris) -- Bug Fix mnx: Some procedures doesn't generate correctly (Ryan Harris) -- English translation file foxbin2prg_en.h syntax corrected (Ryan Harris) -- Bug Fix vcx/scx: Lowercase saved Dataenvironment property causes Reserved2 value to be not calculated -- Bug Fix frx: character on print condition on field makes fr2 file corrupt -- Bug Fix mnx: Using double-quotes on prompt option fields makes mn2 file invalid (Ryan Harris) - -2014/03/10 v1.19.16 -- Bug Fix vcx/scx: properties loose there hidden/protected visibility when no default value assigned (Ryan Harris) -- Bug Fix vcx/scx: character value with length >255 in addobject property regenerates with tag included (Ryan Harris) -- Bug Fix vcx/scx: When regenerating binari file with empty procedure makes FoxPro crash when trying to modify it on IDE -- Bug Fix scx/vcx: Binary can be corrupted if the class have a multiline comment (Tested on: Ffc\_frxcursor.vcx) -- Bug Fix: If _memberdata contains CR inside there values, they can be lost when regenerating tx2 text files -- Bug Fix: Property values with spaces at the right loose this spaces -- Bug Fix: When 2 or more methods share the same name (ej: met and met2) tx2 text file gets corrupted (Ryan Harris) - -2014/03/04 v1.19.15 -- Bug Fix: OLE information cleared when a legacy TX2 is processed -- Bug Fix: Default value of NoTimestamp = 0 ==> Now is 1, as should be -- Bug Fix: DBFs backlink info cleared when DBC is recreated (Ryan Harris) -- Feature: Lowercase capitalization in tx2 filename headers to minimize differences - -2014/03/01 v1.19.14 -- Load of configuration is optimized (foxbin2prg.cfg) to read cfg only once for a massive processing of multiple conversions -- .vbs scripts have been modified to respect the conversion support configuration defined in foxbin2prg.cfg configuration file -- 2 new functions where added to enhance and encapsulate the external use of the evaluation of the conversion support (requires previous call to EvaluarConfiguracion()). Used on .vbs scripts -- ExtraBackupLevels Regression: when no defined value, no backup is made -- New default value ClearUniqueID = 1 in foxbin2prg.cfg for minimizing differences in the SCM - -2014/02/26 v1.19.13 -- Bug Fix: If NoTimestamp setting of foxbin2prg.cfg is changed, opposite value is evaluated (Ryan Harris) -- Encapsulated foxbin2prg.cfg file for enhancing FoxUnit automated testing -- Internal change of property l_UseTimestamps by l_NoTimestamps -- With ExtraBackupLevels setting you can now deactivate backups if setting to 0 (Ryan Harris proposal) -- foxbin2prg.log file checking dropped, to activate the log file use foxbin2prg.cfg setting Debug=1 -- In TX2 header files show the file without path, because genereting it from different places makes unnecesary differences in Diff (Ryan Harris proposal) -- Created a lot of FoxUnit automated tests to check all settings of foxbin2prg.cfg configuration file - -2014/02/23 v1.19.12 -- Generation of VC2/SC2 with new header metadata for centralizing uniqueid, timestamp and ZOrder and big reduce of differences in a diff/merge (enhancement proposed by Ryan Harris) -- BINARY regeneration from the new metadata header (remains compatible with old VC2/SC2) -- FoxUnit test cases fixed for the new functionality -- Cleaning, Refactorization and optimization of Code -- Presentation enhancement of VC2/SC2 file headers - -2014/02/13 v1.19.11 -- WITH/ENDWITH optimizations with a conversion performance gain up to 16% more fast -- Bug Fix: Just one level of #IF was contemplated, throwing an error if more levels are nested -- Bug Fix: When regenerating the PJX, default home directory not always was correct -- New FoxUnit automated test added to check bug fix of nested #IF - -2014/02/09 v1.19.10 -- Added parametrization to enable configuration support for each kind of binary (0=None, 1=Only TX2, 2=TX2 and Binary) -- Fixed default NoTimestamps setting -- EXPERIMENTAL: Added new configuration parameter "ClearUniqueID" in foxbin2prg.cfg for Clearing UniqueID in binaries and text versions. Works well and apparently FoxProdoesn't make use of it, but more testing is required -- Adjusted some FoxUnit test cases - -2014/02/08 v1.19.9 -- New configuration items in foxbin2prg.cfg -- Localization Bug: When recompiling with localization file foxbin2prg_en.h renamed to foxbin2prg.h, syntax error occurs -- Debug information of .LOG files enhanced -- New parametrization for the number of backups, now just one .BAK by default (earlier was 10) -- Enabled configuration file foxbin2prg.cfg by default -- Change in default behavior: Now Timestamps are disabled by default. You can change this on foxbin2prg.cfg - -2014/02/03 v1.19.8 -- Bug fix: ActivePage error when executing a regenerated binary with a PageFrame / New FoxUnit test to test solution -- Added cNoTimestamps='1' to batch conversion vbs scripts - -2014/02/02 v1.19.7 -- Added Ole encapsulation in just 1 place -- Adjusted Blocksize of generated binaries -- New cNoTimestamps parameter. If '1' is given, then no timestamps are generated (useful for diff/merge) - -2014/01/31 v1.19.6 -- Added SourceSafe support (SCCAPI) for Diff and Merge -- SCX bug fix: Dataenvironment sometimes doesn't regenerates correctly -- Functionality change: Automatic recompilation enabled by default again because some methods doesn't show on form edit. Can be deactivated passing '0' to cRecompile param - -2014/01/26 v1.19.5 -- Added Multilanguage support and Localization file for English. To use it rename the new file foxbin2prg_en.h to foxbin2prg.h and recompile - -2014/01/24 v1.19.4 -- New "Recompile" parameter for recompiling from PJX directory (if provided) -- Functionality change: Now FoxBin2Prg does not recompile bins for default, because it do on bin dir and that can throw compilation errors. Use new parameter if needed or recompile by your own -- DBC: Added support for multiline "comment" property -- VBS Batch scripts: Added progress bar - -2014/01/18 v1.19.3 -- Change on TXT timestamps to preserve empty values that can save a lot of differences when diff/merging. Previously empty timestamps get converted to datetime -- Optimization on TXT generation of ZOrders - -2014/01/13 v1.19.2 -- Fix on PJX regeneration caused for something missing in the last change of "Autor" to "Author" - -2014/01/08 v1.19.1 -- Small change on TX2 headers to drop the "Generated" timestamp that causes unnecesary differences / Updated the EXE version with the correct one - -2014/01/08 v1.19 -- Added new debug flag on .vbs scripts to show a "End process" message for batch processing -- Bug Fix scx/vcx: Improper order of Reserved3 props cause event access to not fire -- Bug Fix dbf: Improper index generated when the type is Candidate -- Added support for converting SourceSafe PJM to FoxBin PJ2 -- Added validation for Menus when converting from older versions, so user can convert it to VFP 9 format first -- Change in MN2 property: "Autor" was changed to "Author". You can add the missing letter to MN2 or regenerate - -2014/01/07 v1.18.1 -- Added a vbs script (Normalize_FileNames.vbs) for FileNames normalizing in batch mode, and updated FileName_Caps.exe and the call on FoxBin2prg - -2014/01/06 v1.18 -- mnx bug fix: Generation of DO Procedure or Command when no Procedure or Command available to call when empty option is created (Fidel Charny) -- Added support for DBFs earlier than VFP 9 for generating DB2 text, but DBF regeneration is in VFP 9 version! -- dbf bug fix: DBFs linked to a DBC that use long field names throw error when regenerating DBFs -- dbf bug fix: Some view info is lost when generating text from DBC - -2014/01/03 v1.17 -- mnx bug fix: Location value is lost and some menus doesn't render properly (Fidel Charny) -- Added 2 VB scripts (Convert_VFP9_BIN_2_PRG.vbs and Convert_VFP9_PRG_2_BIN.vbs) for batch converting of dirs and files if a shortcut is placed on "SendTo" user folder -- Added new Unit Testing cases for menus - -2014/01/02 v1.16 -- Added support for Menus (MNX) - -2013/12/18 v1.15 -- Added support for DBF, DBC and CDX binaries - -2013/12/15 v1.14 -- scx bug fix: autocenter property do nothing (Arturo Ramos) -- scx bug fix: Last COMMENT record is lost (Fidel Charny) - -2013/12/08 v1.13 -- frx/lbx bug fix: "Error 1924, TOREG is not an object" on some reports (Fidel Charny) - -2013/12/08 v1.12 -- Added support for Reports (FRX) and Labels (LBX) - -2013/12/08 v1.11 -- scx/vcx bug fix: _memberdata value corrupted when the value is a long one (Edgar Kummers) - -2013/12/07 v1.10 -- scx/vcx bug fix: when there are methods with the same name, there code is assigned to erroneous objects (Fidel Charny) - -2013/12/07 v1.9 -- scx/vcx bug fix: last fix keep loosing some properties (Fidel Charny) - -2013/12/06 v1.8 -- scx/vcx bug fix: last fix keep loosing some properties (Fidel Charny) -- sort function encapsulated and reused on BIN and TXT generation for safety - -2013/12/03 v1.7 -- vcx/scx bug fix: some properties get lost and picture clause is not displayed if "Name" is not the last property on memo (Fidel Charny) -- Added verification of readOnly files and report this to Log file in debug mode - -2013/12/02 v1.6 -- Complete refactoring of BIN and TXT generation -- Changes of various algorithms -- scx/vcx bug fix: Array properties didn't save (Fidel Charny) -- Unit testing cases with FoxUnit - -2013/11/27 v1.5 -- Bug fix: On some forms dataenvironment didn't regenerate appropiately (Luis Martínez) - -2013/11/27 v1.4 -- Added mask support -- Added support for extension configuration on file foxbin2prg.cfg, so one can use "vca" instead of "vc2", etc -- Added support for a new parameter for Log generation - -2013/11/24 v1.3 -- Bug fixes, code cleaning, refactoring - -2013/11/24 v1.2 -- Bug fixes, code cleaning, refactoring - -2013/11/22 v1.1 -- Bug fixes - -2013/11/22 v1.0 -- Initial creation of clases on prg and support of VCX/SCX/PJX files +* look at https://github.com/fdbozzo/foxbin2prg/wiki/FoxBin2Prg-Full-Change-History EndText diff --git a/foxbin2prg.cfg.txt b/foxbin2prg.cfg.txt index a2afc1d..6717a3f 100644 --- a/foxbin2prg.cfg.txt +++ b/foxbin2prg.cfg.txt @@ -12,18 +12,18 @@ * DETAIL OF SUPPORTED VALUES / DETALLE DE VALORES SOPORTADOS * If no values given, these are the DEFAULTS / Si no se proporcionan valores, estos son los PREDETERMINADOS * -* extension: tx2=newext && Default FoxBin2Prg extensions ends in '2' (see at the bottom) / Las extensiones por defecto de FoxBin2Prg terminan en '2' (ver debajo de todo) -* ShowProgressbar: 1 && 0=Don't show, 1=Allways show, 2= Show only for multi-file processing / 0=No mostrar, 1=Mostrar siempre, 2=Mostrar solamente para multi-procesamiento -* DontShowErrors: 0 && Show message errors by default / Mostrar mensajes de error por defecto -* NoTimestamps: 1 && Clear timestamps by default for minimize differences / Vaciar Timestamps por defecto para minimizar diferencias -* Debug: 0 && Don't Activate individual .Log by default / No Activar .Log por defecto -* BodyDevInfo: 0 && [0=Don't keep DevInfo for body pjx records], 1=Keep DevInfo / [0=No guardar DevInfo para el cuerpo del PJX], 1=Guardar DevInfo -* ExtraBackupLevels: 1 && By default 1 BAK is created. With this you can make more .N.BAK, or none / Por defecto 1 BAK es creado. Con esto puede crear más .N.BAK, o ninguno -* ClearUniqueID: 1 && 0=Keep UniqueID, 1=Clear Unique ID. Useful for Diff and Merge / 0=Mantener UniqueID, 1=Borrar Unique ID. Util para Diff y Merge -* ClearDBFLastUpdate: 1 && 0=Keep DBF LastUpdate, 1=Clear DBF LastUpdate. Useful for Diff. / 0=Mantener DBF LastDate, , 1=Borrar DBF LastDate. Util para Diff. -* OptimizeByFilestamp: 0 && Optimize file regeneration depending on file timestamp / Optimizar la regeneración de archivos dependiendo del timestamp de archivo -* RemoveNullCharsFromCode: 1 && 1=Drop NULL chars from source code / 0=Leave Nulls in code, if any -* RemoveZOrderSetFromProps: 0 && 0=Do not remove ZOrderSet property from object, 1=Remove ZOrderSet property from object / 0=No quitar la propiedad ZOrderSet de los objetos, 1=Quitar la propiedad ZOrderSet de los objetos +* extension: tx2=newext && Default FoxBin2Prg extensions ends in '2' (see at the bottom) +* ShowProgressbar: 1 && 0=Don't show, 1=Allways show, 2= Show only for multi-file processing +* DontShowErrors: 0 && Show message errors by default +* NoTimestamps: 1 && Clear timestamps by default for minimize differences +* Debug: 0 && Don't Activate individual .Log by default +* BodyDevInfo: 0 && [0=Don't keep DevInfo for body pjx records], 1=Keep DevInfo +* ExtraBackupLevels: 1 && By default 1 BAK is created. With this you can make more .N.BAK, or none +* ClearUniqueID: 1 && 0=Keep UniqueID, 1=Clear Unique ID. Useful for Diff and Merge +* ClearDBFLastUpdate: 1 && 0=Keep DBF LastUpdate, 1=Clear DBF LastUpdate. Useful for Diff. +* OptimizeByFilestamp: 0 && Optimize file regeneration depending on file timestamp +* 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 * Language: (auto) && Language of shown messages and LOGs. EN=English, FR=French, ES=Español, DE=German, Not defined = AUTOMATIC [DEFAULT] * ExcludeDBFAutoincNextval: 0 && [0=Do not exclude this value from db2], 1=Exclude this value from db2 * PRG_Compat_Level: 0 && [0=Legacy], 1=Use HELPSTRING as Class Procedure comment @@ -35,17 +35,17 @@ * 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) +* FKY_Conversion_Support: 1 && 0=No support, 1=Generate TXT only (Diff) +* MEM_Conversion_Support: 1 && 0=No support, 1=Generate TXT only (Diff) * 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 TXT only (Diff), 2=Generate TXT and BIN (Merge/Only Structure!), 4=Generate TXT with DATA (Diff), 8=Export and Import DATA (Merge/Structure & Data) -* >>DBF_Conversion_Support NOTE: >> EN: FoxBin2Prg support bi-directional convertion of DBFs, but does not keep data. Use with care. -* >> ES: FoxBin2Prg tiene soporte bi-direccional para convertir DBF, pero no mantiene los datos. Usar con cuidado. -* DBF_Conversion_Included: * && If DBF_Conversion_Support:4, you can specify multiple filemasks: www,fb2p_free.dbf / Si DBF_Conversion_Support:4, se pueden indicar múltiples máscaras de archivo: www,fb2p_free.dbf -* DBF_Conversion_Excluded: && If DBF_Conversion_Support:4, you can specify multiple filemasks: www,fb2p_free.dbf / Si DBF_Conversion_Support:4, se pueden indicar múltiples máscaras de archivo: www,fb2p_free.dbf +* 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 -*-- "CLASS PER FILE" OPTIONS (UseClassPerFile: 1) / OPCIONES DE "CLASE POR ARCHIVO" (UseClassPerFile: 1) -* UseClassPerFile: 0 && 0=One library tx2 file, 1=Multiple file.class.tx2 files, 2=Multiple file.baseclass.class.tx2 files including DBC members / 0=Una archivo librería tx2, 1=Múltiples archivo.clase.tx2, 2=Múltiples archivo.clasebase.clase.tx2 incluendo miembros DBC -* RedirectClassPerFileToMain: 0 && 0=Don't redirect to file.tx2, 1=Redirect to file.tx2 when selecting file.class.tx2 / 0=No redireccionar a archivo.tx2, 1=Redireccionar a archivo.tx2 cuando se seleccione archivo.clase.tx2 -* ClassPerFileCheck: 0 && 0=Don't check file.class.tx2 inclusion, 1=Check file.class.tx2 inclusion / 0=No verificar la inclusión de archivo.clase.tx2, 1=Verificar la inclusión de archivo.clase.tx2 +*-- "CLASS PER FILE" OPTIONS (UseClassPerFile: 1) +* UseClassPerFile: 0 && 0=One library tx2 file, 1=Multiple file.class.tx2 files, 2=Multiple file.baseclass.class.tx2 files including DBC members +* RedirectClassPerFileToMain: 0 && 0=Don't redirect to file.tx2, 1=Redirect to file.tx2 when selecting file.class.tx2 +* ClassPerFileCheck: 0 && 0=Don't check file.class.tx2 inclusion, 1=Check file.class.tx2 inclusion * * END DOCUMENTATION SECTION / FIN DE LA SECCIÓN DE DOCUMENTACIÓN **************************************************************************************************** diff --git a/foxbin2prg.exe b/foxbin2prg.exe index 3effef4..2148b47 100644 Binary files a/foxbin2prg.exe and b/foxbin2prg.exe differ diff --git a/foxbin2prg.pj2 b/foxbin2prg.pj2 index 1dba3f4..0671139 100644 --- a/foxbin2prg.pj2 +++ b/foxbin2prg.pj2 @@ -26,7 +26,7 @@ _LegalTrademark = "MIT License" _ProductName = "FOXBIN2PRG" _MajorVer = "1" _MinorVer = "19" -_Revision = "50" +_Revision = "51" _LanguageID = "1034" _AutoIncrement = "0" * diff --git a/foxbin2prg.pjt b/foxbin2prg.pjt index 5861a22..73ca1f2 100644 Binary files a/foxbin2prg.pjt and b/foxbin2prg.pjt differ diff --git a/foxbin2prg.pjx b/foxbin2prg.pjx index 32e1171..682c034 100644 Binary files a/foxbin2prg.pjx and b/foxbin2prg.pjx differ diff --git a/foxbin2prg.prg b/foxbin2prg.prg index d528e12..002c5c6 100644 --- a/foxbin2prg.prg +++ b/foxbin2prg.prg @@ -213,6 +213,8 @@ * 03/03/2018 FDBOZZO v1.19.50 Mejora: Permitir exportar a texto la información de DBFs cuya apertura está protegida por eventos del DBC * 12/03/2018 FDBOZZO v1.19.50.1 Bug Fix: Cuando se usa la equivalencia "extension: pj2=pjm" se debe manejar el pjm como un pj2 y no como un pjm de SourceSafe (Darko Kezic) * 15/03/2018 FDBOZZO v1.19.50.3 Bug Fix: Cuando se agregan archivos de texto no-VFP, como html,css,etc, en la sección de Text del proyecto, FoxBin2Prg no mantiene esta selección al regenerar el PJX, dejándolos en la sección Files (Darko Kezic) +* 16/03/2018 FDBOZZO v1.19.51 Mejora: Agregado soporte para archivos de macros (.FKY) +* 25/03/2018 FDBOZZO v1.19.51 Mejora: Agregado soporte para archivos de memoria (.MEM) * * *--------------------------------------------------------------------------------------------------- @@ -690,6 +692,8 @@ DEFINE CLASS c_foxbin2prg AS Session + [] ; + [] ; + [] ; + + [] ; + + [] ; + [] ; + [] ; + [] ; @@ -751,7 +755,6 @@ DEFINE CLASS c_foxbin2prg AS Session + [] ; + [] ; + [] ; - + [] ; + [] ; + [] ; + [] ; @@ -788,6 +791,7 @@ DEFINE CLASS c_foxbin2prg AS Session PROTECTED n_CFG_Actual, l_Main_CFG_Loaded, o_Configuration, l_CFG_CachedAccess *-- n_FB2PRG_Version = 1.19 + c_FB2PRG_Version_Real = '1.19.51' *-- c_Language = '' && EN, FR, ES, DE c_SimulateError = '' && SIMERR_I0, SIMERR_I1, SIMERR_O1 @@ -870,12 +874,16 @@ DEFINE CLASS c_foxbin2prg AS Session c_DB2 = 'DB2' && DBF c_DC2 = 'DC2' && DBC c_MN2 = 'MN2' && MNX + c_FK2 = 'FK2' && FKY + c_ME2 = 'ME2' && MEM PJX_Conversion_Support = 2 VCX_Conversion_Support = 2 SCX_Conversion_Support = 2 FRX_Conversion_Support = 2 LBX_Conversion_Support = 2 MNX_Conversion_Support = 2 + FKY_Conversion_Support = 1 + MEM_Conversion_Support = 1 DBF_Conversion_Support = 1 DBC_Conversion_Support = 2 DBF_Conversion_Included = '' @@ -889,7 +897,8 @@ DEFINE CLASS c_foxbin2prg AS Session LOCAL THIS AS c_foxbin2prg OF 'FOXBIN2PRG.PRG' #ENDIF - LOCAL lcSys16, lnPosProg, lc_Foxbin2prg_EXE, laValues(1,5), lcPicturePath, laDir(1,5) + LOCAL lcSys16, lnPosProg, lc_Foxbin2prg_EXE, laValues(1,5), lcPicturePath, laDir(1,5) ; + , lcLang SET DELETED ON SET DATE YMD SET HOURS TO 24 @@ -942,7 +951,7 @@ DEFINE CLASS c_foxbin2prg AS Session THIS.c_Foxbin2prg_ConfigFile = EVL( tcCFG_File, FORCEEXT( THIS.c_Foxbin2prg_FullPath, 'CFG' ) ) THIS.c_BackgroundImage = THIS.get_AbsolutePath( ADDBS(JUSTPATH(THIS.c_Foxbin2prg_FullPath)) + 'foxbin2prg.jpg' ) lc_Foxbin2prg_EXE = FORCEEXT( THIS.c_Foxbin2prg_FullPath, 'EXE' ) - THIS.c_FB2PRG_EXE_Version = 'v' + IIF( AGETFILEVERSION( laValues, lc_Foxbin2prg_EXE ) = 0, TRANSFORM(THIS.n_FB2PRG_Version), laValues(11) ) + THIS.c_FB2PRG_EXE_Version = 'v' + IIF( AGETFILEVERSION( laValues, lc_Foxbin2prg_EXE ) = 0, TRANSFORM(THIS.c_FB2PRG_Version_Real), laValues(11) ) ADDPROPERTY(_SCREEN, 'c_FB2PRG_EXE_Version', THIS.c_FB2PRG_EXE_Version) ADDPROPERTY(_SCREEN, 'ExitCode', 0) @@ -950,7 +959,24 @@ DEFINE CLASS c_foxbin2prg AS Session THIS.writeLog( 'FoxBin2Prg INIT -', 2 ) THIS.writeLog( REPLICATE( '*', 100 ) ) THIS.writeLog( 'FoxBin2Prg: [' + THIS.c_Foxbin2prg_FullPath + '] (EXE Version: ' + THIS.c_FB2PRG_EXE_Version + ', FoxPro Version: ' + VERSION(4) + ')' ) - THIS.changeLanguage() + THIS.writeLog( TEXTMERGE( '- Internal CFG: <> / External CFG: <> / CodePage Used: <>)' ) ) + + * Get default language info + * ISO 639-2 Language Codes: https://www.loc.gov/standards/iso639-2/php/code_list.php + lcLang = THIS.getLocaleInfo(0x00000067) && ie: spa + + DO CASE + CASE lcLang = 'spa' + lcLang = 'ES' + CASE INLIST(lcLang, 'den', 'deu', 'ger', 'gmh', 'goh', 'gsw', 'nds') + lcLang = 'DE' + CASE INLIST(lcLang, 'cpf', 'fra', 'fre', 'frm', 'fro') + lcLang = 'FR' + OTHERWISE && Default: EN + lcLang = 'EN' + ENDCASE + + THIS.changeLanguage(lcLang) THIS.o_FSO = CREATEOBJECT("Scripting.FileSystemObject") *THIS.o_WSH = CREATEOBJECT("WScript.Shell") @@ -1401,6 +1427,24 @@ DEFINE CLASS c_foxbin2prg AS Session ENDPROC + PROCEDURE c_FK2_ACCESS + IF THIS.n_CFG_Actual = 0 OR ISNULL( THIS.o_Configuration( THIS.n_CFG_Actual ) ) + RETURN THIS.c_FK2 + ELSE + RETURN NVL( THIS.o_Configuration( THIS.n_CFG_Actual ).c_FK2, THIS.c_FK2 ) + ENDIF + ENDPROC + + + PROCEDURE c_ME2_ACCESS + IF THIS.n_CFG_Actual = 0 OR ISNULL( THIS.o_Configuration( THIS.n_CFG_Actual ) ) + RETURN THIS.c_ME2 + ELSE + RETURN NVL( THIS.o_Configuration( THIS.n_CFG_Actual ).c_ME2, THIS.c_ME2 ) + ENDIF + ENDPROC + + PROCEDURE PJX_Conversion_Support_ACCESS IF THIS.n_CFG_Actual = 0 OR ISNULL( THIS.o_Configuration( THIS.n_CFG_Actual ) ) RETURN THIS.PJX_Conversion_Support @@ -1455,6 +1499,24 @@ DEFINE CLASS c_foxbin2prg AS Session ENDPROC + PROCEDURE FKY_Conversion_Support_ACCESS + IF THIS.n_CFG_Actual = 0 OR ISNULL( THIS.o_Configuration( THIS.n_CFG_Actual ) ) + RETURN THIS.FKY_Conversion_Support + ELSE + RETURN NVL( THIS.o_Configuration( THIS.n_CFG_Actual ).FKY_Conversion_Support, THIS.FKY_Conversion_Support ) + ENDIF + ENDPROC + + + PROCEDURE MEM_Conversion_Support_ACCESS + IF THIS.n_CFG_Actual = 0 OR ISNULL( THIS.o_Configuration( THIS.n_CFG_Actual ) ) + RETURN THIS.MEM_Conversion_Support + ELSE + RETURN NVL( THIS.o_Configuration( THIS.n_CFG_Actual ).MEM_Conversion_Support, THIS.MEM_Conversion_Support ) + ENDIF + ENDPROC + + PROCEDURE DBF_Conversion_Support_ACCESS IF THIS.n_CFG_Actual = 0 OR ISNULL( THIS.o_Configuration( THIS.n_CFG_Actual ) ) RETURN THIS.DBF_Conversion_Support @@ -1764,7 +1826,7 @@ DEFINE CLASS c_foxbin2prg AS Session tcBakFile_1 = FORCEEXT(tcOutputFile, lcExt_1 + lcNext_Bak) DO CASE - CASE INLIST( lcExt_1, .c_PJ2, .c_VC2, .c_SC2, .c_FR2, .c_LB2, .c_DB2, .c_DC2, .c_MN2, 'PJM' ) + CASE INLIST( lcExt_1, .c_PJ2, .c_VC2, .c_SC2, .c_FR2, .c_LB2, .c_DB2, .c_DC2, .c_MN2, .c_FK2, .c_ME2, 'PJM' ) *-- Extensiones TEXTO CASE lcExt_1 = 'DBF' @@ -1781,11 +1843,14 @@ DEFINE CLASS c_foxbin2prg AS Session tcBakFile_2 = FORCEEXT(tcOutputFile, lcExt_2 + lcNext_Bak) tcBakFile_3 = FORCEEXT(tcOutputFile, lcExt_3 + lcNext_Bak) - OTHERWISE + CASE INLIST( lcExt_1, 'PJX', 'VCX', 'SCX', 'FRX', 'LBX', 'MNX' ) *-- PJX, VCX, SCX, FRX, LBX, MNX lcExt_2 = LEFT(lcExt_1,2) + 'T' tcBakFile_2 = FORCEEXT(tcOutputFile, lcExt_2 + lcNext_Bak) + OTHERWISE + *-- PKY, MEM + ENDCASE IF NOT EMPTY(lcExt_1) @@ -2253,6 +2318,20 @@ DEFINE CLASS c_foxbin2prg AS Session .writeLog( C_TAB + JUSTFNAME(lcConfigFile) + ' > MNX_Conversion_Support: ' + TRANSFORM(lo_CFG.MNX_Conversion_Support) ) ENDIF + CASE LEFT( laConfig(m.I), 23 ) == LOWER('FKY_Conversion_Support:') + lcValue = ALLTRIM( SUBSTR( laConfig(m.I), 24 ) ) + IF INLIST( lcValue, '0', '1' ) THEN + lo_CFG.FKY_Conversion_Support = INT( VAL( lcValue ) ) + .writeLog( C_TAB + JUSTFNAME(lcConfigFile) + ' > FKY_Conversion_Support: ' + TRANSFORM(lo_CFG.FKY_Conversion_Support) ) + ENDIF + + CASE LEFT( laConfig(m.I), 23 ) == LOWER('MEM_Conversion_Support:') + lcValue = ALLTRIM( SUBSTR( laConfig(m.I), 24 ) ) + IF INLIST( lcValue, '0', '1' ) THEN + lo_CFG.MEM_Conversion_Support = INT( VAL( lcValue ) ) + .writeLog( C_TAB + JUSTFNAME(lcConfigFile) + ' > MEM_Conversion_Support: ' + TRANSFORM(lo_CFG.MEM_Conversion_Support) ) + ENDIF + CASE LEFT( laConfig(m.I), 23 ) == LOWER('DBF_Conversion_Support:') lcValue = ALLTRIM( SUBSTR( laConfig(m.I), 24 ) ) IF INLIST( lcValue, '0', '1', '2', '4', '8' ) THEN @@ -2634,6 +2713,8 @@ DEFINE CLASS c_foxbin2prg AS Session , lcExt == 'FRX', .FRX_Conversion_Support > 0 ; , lcExt == 'LBX', .LBX_Conversion_Support > 0 ; , lcExt == 'MNX', .MNX_Conversion_Support > 0 ; + , lcExt == 'FKY', .FKY_Conversion_Support > 0 ; + , lcExt == 'MEM', .MEM_Conversion_Support > 0 ; , lcExt == 'DBF', NOT ISNULL(loDBF_CFG) AND loDBF_CFG.DBF_Conversion_Support > 0 OR .DBF_Conversion_Support > 0 ; , lcExt == 'DBC', .DBC_Conversion_Support > 0 ; , .F. ) @@ -2674,6 +2755,8 @@ DEFINE CLASS c_foxbin2prg AS Session , lcExt == .c_FR2, .FRX_Conversion_Support = 2 ; , lcExt == .c_LB2, .LBX_Conversion_Support = 2 ; , lcExt == .c_MN2, .MNX_Conversion_Support = 2 ; + , lcExt == .c_FK2, .FKY_Conversion_Support = 2 ; + , lcExt == .c_ME2, .MEM_Conversion_Support = 2 ; , lcExt == .c_DB2, NOT ISNULL(loDBF_CFG) AND INLIST(loDBF_CFG.DBF_Conversion_Support, 2, 8) ; OR (INLIST(.DBF_Conversion_Support, 2, 8) ; AND (ISNULL(loDBF_CFG) OR NOT INLIST(loDBF_CFG.DBF_Conversion_Support, 1, 4))) ; @@ -2718,6 +2801,8 @@ DEFINE CLASS c_foxbin2prg AS Session , INLIST(lcExt, .c_FR2, 'FRX'), .FRX_Conversion_Support ; , INLIST(lcExt, .c_LB2, 'LBX'), .LBX_Conversion_Support ; , INLIST(lcExt, .c_MN2, 'MNX'), .MNX_Conversion_Support ; + , INLIST(lcExt, .c_FK2, 'FKY'), .FKY_Conversion_Support ; + , INLIST(lcExt, .c_ME2, 'MEM'), .MEM_Conversion_Support ; , INLIST(lcExt, .c_DB2, 'DBF'), ICASE( ISNULL(loDBF_CFG) OR loDBF_CFG.DBF_Conversion_Support = 0, .DBF_Conversion_Support, loDBF_CFG.DBF_Conversion_Support ) ; , INLIST(lcExt, .c_DC2, 'DBC'), .DBC_Conversion_Support ; , 0 ) @@ -3240,7 +3325,6 @@ DEFINE CLASS c_foxbin2prg AS Session ENDCASE *-- UN ARCHIVO INDIVIDUAL O CONSULTA DE SOPORTE DE ARCHIVO - *IF LEN(EVL(tc_InputFile,'')) = 1 IF lcInputFile_Type = C_FILETYPE_QUERYSUPPORT *-- Consulta de soporte de conversión (compatibilidad con SourceSafe) *-- SourceSafe consulta el tipo de soporte de cada archivo antes del Checkin/Checkout @@ -3921,6 +4005,22 @@ DEFINE CLASS c_foxbin2prg AS Session loConversor = CREATEOBJECT( 'c_conversor_mnx_a_prg' ) .changeFileAttribute( FORCEEXT( .c_InputFile, .c_MN2 ), lcForceAttribs ) + CASE lcExtension = 'FKY' + IF NOT INLIST(.FKY_Conversion_Support, 1, 2) + ERROR (TEXTMERGE(loLang.C_FILE_NAME_IS_NOT_SUPPORTED_LOC)) + ENDIF + .c_OutputFile = FORCEEXT( .c_InputFile, .c_FK2 ) + loConversor = CREATEOBJECT( 'c_conversor_fky_a_prg' ) + .changeFileAttribute( FORCEEXT( .c_InputFile, .c_FK2 ), lcForceAttribs ) + + CASE lcExtension = 'MEM' + IF NOT INLIST(.MEM_Conversion_Support, 1, 2) + ERROR (TEXTMERGE(loLang.C_FILE_NAME_IS_NOT_SUPPORTED_LOC)) + ENDIF + .c_OutputFile = FORCEEXT( .c_InputFile, .c_ME2 ) + loConversor = CREATEOBJECT( 'c_conversor_mem_a_prg' ) + .changeFileAttribute( FORCEEXT( .c_InputFile, .c_ME2 ), lcForceAttribs ) + CASE lcExtension = .c_VC2 IF .VCX_Conversion_Support <> 2 ERROR (TEXTMERGE(loLang.C_FILE_NAME_IS_NOT_SUPPORTED_LOC)) @@ -4003,6 +4103,22 @@ DEFINE CLASS c_foxbin2prg AS Session .changeFileAttribute( FORCEEXT( .c_InputFile, 'MNX' ), lcForceAttribs ) .changeFileAttribute( FORCEEXT( .c_InputFile, 'MNT' ), lcForceAttribs ) + CASE lcExtension = .c_FK2 + IF .FKY_Conversion_Support <> 2 + ERROR (TEXTMERGE(loLang.C_FILE_NAME_IS_NOT_SUPPORTED_LOC)) + ENDIF + .c_OutputFile = FORCEEXT( .c_InputFile, 'FKY' ) + loConversor = CREATEOBJECT( 'c_conversor_prg_a_fky' ) + .changeFileAttribute( FORCEEXT( .c_InputFile, 'FKY' ), lcForceAttribs ) + + CASE lcExtension = .c_ME2 + IF .MEM_Conversion_Support <> 2 + ERROR (TEXTMERGE(loLang.C_FILE_NAME_IS_NOT_SUPPORTED_LOC)) + ENDIF + .c_OutputFile = FORCEEXT( .c_InputFile, 'MEM' ) + loConversor = CREATEOBJECT( 'c_conversor_prg_a_mem' ) + .changeFileAttribute( FORCEEXT( .c_InputFile, 'MEM' ), lcForceAttribs ) + OTHERWISE *ERROR 'El archivo [' + .c_InputFile + '] no está soportado' ERROR (TEXTMERGE(loLang.C_FILE_NAME_IS_NOT_SUPPORTED_LOC)) @@ -5206,6 +5322,57 @@ DEFINE CLASS c_foxbin2prg AS Session ENDFUNC + FUNCTION FERROR_Message(tcFileName as String) + LOCAL lcMsg, lnError + tcFileName = EVL(tcFileName,'') + lnError = FERROR() + + DO CASE + CASE lnError = 2 + lcMsg = 'File not found' + CASE lnError = 4 + lcMsg = 'Too many files open (out of file handles)' + CASE lnError = 5 + lcMsg = 'Access denied' + CASE lnError = 6 + lcMsg = 'Invalid file handle given' + CASE lnError = 8 + lcMsg = 'Out of memory' + CASE lnError = 25 + lcMsg = [Seek error (can't seek before the start of a file)] + CASE lnError = 29 + lcMsg = 'Disk full' + CASE lnError = 31 + lcMsg = 'Error opening file' + OTHERWISE + lcMsg = 'Unrecognized error trying to open the file ' + tcFileName + ENDCASE + + RETURN lcMsg + ENDFUNC + + + FUNCTION getLocaleInfo + LPARAMETERS tnSetting, tcLocale + #DEFINE C_NULL CHR(0) + LOCAL lcLocale, lnLen, lcBuffer, lnReturn, lcReturn + + IF VARTYPE(tcLocale) = 'C' AND NOT EMPTY(tcLocale) + lcLocale = STRCONV(tcLocale, 5) + C_NULL + ELSE + lcLocale = .NULL. + ENDIF + + DECLARE INTEGER GetLocaleInfoEx in Win32API ; + string locale, long type, string @buffer, integer len + lnLen = 255 + lcBuffer = SPACE(lnLen) + lnReturn = GetLocaleInfoEx(lcLocale, tnSetting, @lcBuffer, lnLen) + lcReturn = STRCONV(LEFT(lcBuffer, 2 * (lnReturn - 1)), 6) + RETURN lcReturn + ENDFUNC + + ENDDEFINE @@ -5846,40 +6013,47 @@ DEFINE CLASS frm_main AS form AlwaysOnTop = .T. AutoCenter = .T. BackColor = (RGB(255,255,255)) - BorderStyle = 2 + BorderStyle = 3 Caption = "FoxBin2Prg " Closable = .T. ControlBox = .T. DoCreate = .T. Height = 380 KeyPreview = .T. - MaxButton = .F. + MaxButton = .T. MinButton = .F. + MinHeight = 380 + MinWidth = 756 Name = "FRM_MAIN" ShowWindow = 2 Width = 756 + ADD OBJECT 'edt_Help' AS editbox WITH ; + Anchor = 1+2+4+8, ; + BackStyle = 0, ; + BorderStyle = 0, ; + DisabledForeColor = (RGB(0,0,0)), ; + Enabled = .T., ; + FontName = "Courier New", ; + FontSize = 9, ; + Height = 324, ; + Left = 12, ; + Name = "edt_Help", ; + ReadOnly = .T., ; + ScrollBars = 2, ; + Top = 12, ; + Width = 728 + ADD OBJECT 'cmd_Close' AS commandbutton WITH ; + Anchor = 4+8, ; Cancel = .T., ; - Caption = "Cerrar", ; + Caption = "Close", ; Height = 27, ; Left = 656, ; Name = "cmd_Close", ; Top = 344, ; Width = 84 - ADD OBJECT 'edt_Help' AS editbox WITH ; - BackStyle = 0, ; - BorderStyle = 0, ; - DisabledForeColor = (RGB(0,0,0)), ; - Enabled = .F., ; - Height = 324, ; - Left = 12, ; - Name = "edt_Help", ; - ScrollBars = 0, ; - Top = 12, ; - Width = 728 - PROCEDURE Init LPARAMETERS toFoxBin2Prg @@ -17704,6 +17878,201 @@ ENDDEFINE +DEFINE CLASS c_conversor_fky_a_prg AS c_conversor_bin_a_prg + #IF .F. + LOCAL THIS AS c_conversor_fky_a_prg OF 'FOXBIN2PRG.PRG' + #ENDIF + c_Type = 'FKY' + + + PROCEDURE convert + *--------------------------------------------------------------------------------------------------- + * PARÁMETROS: (v=Pasar por valor | @=Pasar por referencia) (!=Obligatorio | ?=Opcional) (IN/OUT) + * toMacro (!@ OUT) Objeto generado de clase CL_MACRO con la información leida del texto + * toEx (!@ OUT) Objeto con información del error + * toFoxBin2Prg (v! IN ) Referencia al objeto principal + *--------------------------------------------------------------------------------------------------- + LPARAMETERS toMacro, toEx AS EXCEPTION, toFoxBin2Prg + DODEFAULT( @toMacro, @toEx, @toFoxBin2Prg ) + + #IF .F. + LOCAL toMacro AS CL_MACRO OF 'FOXBIN2PRG.PRG' + LOCAL toFoxBin2Prg AS c_foxbin2prg OF 'FOXBIN2PRG.PRG' + #ENDIF + + LOCAL lnCodError, lnLen, lnHandle ; + , loLang as CL_LANG OF 'FOXBIN2PRG.PRG' + + TRY + WITH THIS AS c_conversor_fky_a_prg OF 'FOXBIN2PRG.PRG' + lnHandle = -1 + + IF toFoxBin2Prg.l_ProcessFiles THEN + loLang = _SCREEN.o_FoxBin2Prg_Lang + STORE 0 TO lnCodError + + .updateProgressbar( 'Analyzing FKY...', 1, 2, 1 ) + + *-- Verificación de archivo de macros válido + *IF FCOUNT() < 25 OR EMPTY(FIELD("RESNAME")) OR EMPTY(FIELD("SYSRES")) + * *ERROR 'Menu [' + (.c_InputFile) + '] is NOT VFP 9 Format! - Please convert to VFP 9 with MODIFY MENU ' + JUSTFNAME((.c_InputFile)) + * ERROR (TEXTMERGE(loLang.C_MENU_NOT_IN_VFP9_FORMAT_LOC)) + *ENDIF + + *-- Header + C_FB2PRG_CODE = C_FB2PRG_CODE + toFoxBin2Prg.get_PROGRAM_HEADER() + + toMacro = CREATEOBJECT('CL_MACRO') + toMacro.get_DataFromMacroFKY(.c_InputFile, @toFoxBin2Prg) + C_FB2PRG_CODE = C_FB2PRG_CODE + toMacro.toText() + ENDIF + + DO CASE + CASE toFoxBin2Prg.c_SimulateError = 'SIMERR_I1' + ERROR 'InputFile Error Simulation' + CASE toFoxBin2Prg.c_SimulateError = 'SIMERR_I0' + .writeErrorLog( '*** SIMULATED ERROR' ) + ENDCASE + + IF .l_Error + .writeLog( '*** ERRORS found - Generation Cancelled' ) + EXIT + ENDIF + + toFoxBin2Prg.updateProcessedFile() + + + *-- Genero el FK2 + IF toFoxBin2Prg.l_ProcessFiles THEN + .updateProgressbar( 'Writing ' + toFoxBin2Prg.c_FK2 + '...', 2, 2, 1 ) + ENDIF + + IF .l_Test + toMacro = C_FB2PRG_CODE + ELSE + .write_OutputFile( (C_FB2PRG_CODE), .c_OutputFile, @toFoxBin2Prg ) + ENDIF + ENDWITH && THIS + + + CATCH TO toEx + THIS.set_UserValue(@toEx) + + IF THIS.n_Debug > 0 AND _VFP.STARTMODE = 0 + SET STEP ON + ENDIF + + THROW + + FINALLY + * + ENDTRY + + RETURN + ENDPROC +ENDDEFINE + + + +DEFINE CLASS c_conversor_mem_a_prg AS c_conversor_bin_a_prg + #IF .F. + LOCAL THIS AS c_conversor_mem_a_prg OF 'FOXBIN2PRG.PRG' + #ENDIF + c_Type = 'MEM' + + + PROCEDURE convert + *--------------------------------------------------------------------------------------------------- + * PARÁMETROS: (v=Pasar por valor | @=Pasar por referencia) (!=Obligatorio | ?=Opcional) (IN/OUT) + * toMacro (!@ OUT) Objeto generado de clase CL_MACRO con la información leida del texto + * toEx (!@ OUT) Objeto con información del error + * toFoxBin2Prg (v! IN ) Referencia al objeto principal + *--------------------------------------------------------------------------------------------------- + LPARAMETERS toMemVar, toEx AS EXCEPTION, toFoxBin2Prg + DODEFAULT( @toMemVar, @toEx, @toFoxBin2Prg ) + + #IF .F. + LOCAL toMemVar AS CL_MEMVAR OF 'FOXBIN2PRG.PRG' + LOCAL toFoxBin2Prg AS c_foxbin2prg OF 'FOXBIN2PRG.PRG' + #ENDIF + + LOCAL lnCodError, lnLen, lnHandle ; + , loLang as CL_LANG OF 'FOXBIN2PRG.PRG' + + PRIVATE pnCols, pnRows, pnElement + STORE 0 TO pnCols, pnRows, pnElement + + TRY + WITH THIS AS c_conversor_mem_a_prg OF 'FOXBIN2PRG.PRG' + lnHandle = -1 + + IF toFoxBin2Prg.l_ProcessFiles THEN + loLang = _SCREEN.o_FoxBin2Prg_Lang + STORE 0 TO lnCodError + + .updateProgressbar( 'Analyzing MEM...', 1, 2, 1 ) + + *-- Verificación de archivo de macros válido + *IF FCOUNT() < 25 OR EMPTY(FIELD("RESNAME")) OR EMPTY(FIELD("SYSRES")) + * *ERROR 'Menu [' + (.c_InputFile) + '] is NOT VFP 9 Format! - Please convert to VFP 9 with MODIFY MENU ' + JUSTFNAME((.c_InputFile)) + * ERROR (TEXTMERGE(loLang.C_MENU_NOT_IN_VFP9_FORMAT_LOC)) + *ENDIF + + *-- Header + C_FB2PRG_CODE = C_FB2PRG_CODE + toFoxBin2Prg.get_PROGRAM_HEADER() + + toMemVar = CREATEOBJECT('CL_MEMVAR') + toMemVar.get_DataFromMEM(.c_InputFile, @toFoxBin2Prg) + C_FB2PRG_CODE = C_FB2PRG_CODE + toMemVar.toText() + ENDIF + + DO CASE + CASE toFoxBin2Prg.c_SimulateError = 'SIMERR_I1' + ERROR 'InputFile Error Simulation' + CASE toFoxBin2Prg.c_SimulateError = 'SIMERR_I0' + .writeErrorLog( '*** SIMULATED ERROR' ) + ENDCASE + + IF .l_Error + .writeLog( '*** ERRORS found - Generation Cancelled' ) + EXIT + ENDIF + + toFoxBin2Prg.updateProcessedFile() + + + *-- Genero el FK2 + IF toFoxBin2Prg.l_ProcessFiles THEN + .updateProgressbar( 'Writing ' + toFoxBin2Prg.c_ME2 + '...', 2, 2, 1 ) + ENDIF + + IF .l_Test + toMemVar = C_FB2PRG_CODE + ELSE + .write_OutputFile( (C_FB2PRG_CODE), .c_OutputFile, @toFoxBin2Prg ) + ENDIF + ENDWITH && THIS + + + CATCH TO toEx + THIS.set_UserValue(@toEx) + + IF THIS.n_Debug > 0 AND _VFP.STARTMODE = 0 + SET STEP ON + ENDIF + + THROW + + FINALLY + * + ENDTRY + + RETURN + ENDPROC +ENDDEFINE + + + DEFINE CLASS CL_CUS_BASE AS CUSTOM *-- Propiedades (Se preservan: CONTROLCOUNT, CONTROLS, OBJECTS, PARENT, CLASS) HIDDEN BASECLASS, TOP, WIDTH, CLASSLIB, CLASSLIBRARY, COMMENT ; @@ -27991,6 +28360,8 @@ DEFINE CLASS CL_CFG AS CUSTOM + [] ; + [] ; + [] ; + + [] ; + + [] ; + [] ; + [] ; + [] ; @@ -28014,6 +28385,8 @@ DEFINE CLASS CL_CFG AS CUSTOM + [] ; + [] ; + [] ; + + [] ; + + [] ; + [] ; + [] ; + [] ; @@ -28057,12 +28430,16 @@ DEFINE CLASS CL_CFG AS CUSTOM c_DB2 = NULL c_DC2 = NULL c_MN2 = NULL + c_FK2 = NULL + c_ME2 = NULL PJX_Conversion_Support = NULL VCX_Conversion_Support = NULL SCX_Conversion_Support = NULL FRX_Conversion_Support = NULL LBX_Conversion_Support = NULL MNX_Conversion_Support = NULL + FKY_Conversion_Support = NULL + MEM_Conversion_Support = NULL DBF_Conversion_Support = NULL DBF_Conversion_Included = NULL DBF_Conversion_Excluded = NULL @@ -28104,12 +28481,16 @@ DEFINE CLASS CL_CFG AS CUSTOM .c_DB2 = toParentCFG.c_DB2 .c_DC2 = toParentCFG.c_DC2 .c_MN2 = toParentCFG.c_MN2 + .c_FK2 = toParentCFG.c_FK2 + .c_ME2 = toParentCFG.c_ME2 .PJX_Conversion_Support = toParentCFG.PJX_Conversion_Support .VCX_Conversion_Support = toParentCFG.VCX_Conversion_Support .SCX_Conversion_Support = toParentCFG.SCX_Conversion_Support .FRX_Conversion_Support = toParentCFG.FRX_Conversion_Support .LBX_Conversion_Support = toParentCFG.LBX_Conversion_Support .MNX_Conversion_Support = toParentCFG.MNX_Conversion_Support + .FKY_Conversion_Support = toParentCFG.FKY_Conversion_Support + .MEM_Conversion_Support = toParentCFG.MEM_Conversion_Support .DBF_Conversion_Support = toParentCFG.DBF_Conversion_Support .DBF_Conversion_Included = toParentCFG.DBF_Conversion_Included .DBF_Conversion_Excluded = toParentCFG.DBF_Conversion_Excluded @@ -28283,24 +28664,83 @@ DEFINE CLASS CL_LANG AS Custom .C_FILE_NOT_FOUND_LOC = "Fichier introuvable" .C_FILENAME_LOC = "Fichier" .C_FOXBIN2PRG_ERROR_CAPTION_LOC = "ERREUR" - .C_FOXBIN2PRG_SYNTAX_INFO_LOC = "SYNTAX INFO" - .C_FOXBIN2PRG_SYNTAX_INFO_EXAMPLE_LOC = "FOXBIN2PRG.EXE [cType [cTextName [cGenText [cDontShowErrors [cDebug [cDontShowProgress [cOriginalFileName [cRecompile [cNoTimestamps [cCFG_File] ] ] ] ] ] ] ] ] ]" + CR_LF + CR_LF ; - + "cFileSpec.Ext: Full name (fullpath) of the file to convert or directory name to process" + CR_LF ; - + "- If 'BIN2PRG' is specified, the directory specified in tcType is processed for generating TX2" + CR_LF ; - + "- If 'PRG2BIN' is specified, the directory specified in tcType is processed for regenerating BIN" + CR_LF ; - + "- In SCCAPI (VSS) compatibility mode, it is used to query the conversion support for the file type specified" + CR_LF ; - + "cType: In SCCAPI (VSS) compatibility mode indicates the input file type. " ; - + "If specified '*' o '*-' and tc_InputFile is a PJX, all project files are processed" + CR_LF ; - + "cTextName = Text filename. Only for SCCAPI (VSS) compatibility mode." + CR_LF ; - + "lGenText: .T.=Generates Text, .F.=Regenerates Binary. Only for SCCAPI (VSS) compatibility mode." + CR_LF ; - + "cDontShowErrors: '1' for NOT showing errors" + CR_LF ; - + "cDebug: '1' for generating process LOGs" + CR_LF ; - + "cDontShowProgress: '1' for NOT showing the process window" + CR_LF ; - + "cOriginalFileName: 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" + CR_LF ; - + "cRecompile: Indicates recompile ('1') the binary once regenerated. You can specify a Path too (ie, the project one)" + CR_LF ; - + "cNoTimestamps: Indicates if timestamp must be cleared ('1' or empty) or not ('0')" + CR_LF ; - + "cCFG_File: Indicates a CFG filename for not using the default on foxbin2prg directory" + .C_FOXBIN2PRG_SYNTAX_INFO_LOC = "SYNTAX AND PARAMETERS INFO" + TEXT TO .C_FOXBIN2PRG_SYNTAX_INFO_EXAMPLE_LOC TEXTMERGE NOSHOW FLAGS 1 PRETEXT 1+2 + <<>>FoxBin2Prg Home Page and download: https://github.com/fdbozzo/foxbin2prg/wiki - Fernando D. Bozzo (2013.11.25) + <<>> + <<>>FOXBIN2PRG.EXE [cType [cTextName [cGenText [cDontShowErrors [cDebug [cDontShowProgress [cOriginalFileName [cRecompile [cNoTimestamps [cCFG_File] ] ] ] ] ] ] ] ] ] + <<>> + <<>>-- Parameter details: + <<>>cFileSpec.Ext: Full name (fullpath) of the file to convert or directory name to process + <<>>- If 'BIN2PRG' is specified, the directory specified in tcType is processed for generating TX2 + <<>>- If 'PRG2BIN' is specified, the directory specified in tcType is processed for regenerating BIN + <<>>- In SCCAPI (VSS) compatibility mode, it is used to query the conversion support for the file type specified + <<>>cType: In SCCAPI (VSS) compatibility mode indicates the input file type. + <<>>- If specified '*' or '*-' and tc_InputFile is a PJX, all project files are processed + <<>>cTextName = Text filename. Only for SCCAPI (VSS) compatibility mode. + <<>>lGenText: .T.=Generates Text, .F.=Regenerates Binary. Only for SCCAPI (VSS) compatibility mode. + <<>>cDontShowErrors: '1' for NOT showing errors + <<>>cDebug: '1' for generating process LOGs + <<>>cDontShowProgress: '1' for NOT showing the process window + <<>>cOriginalFileName: 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: Indicates recompile ('1') the binary once regenerated. You can specify a Path too (ie, the project one) + <<>>cNoTimestamps: Indicates if timestamp must be cleared ('1' or empty) or not ('0') + <<>>cCFG_File: Indicates a CFG filename for not using the default on foxbin2prg directory + <<>> + <<>> + <<>>FOXBIN2PRG.CFG configuration options: (If no values given, these are the DEFAULTS) + <<>> + <<>>extension: tx2=newext && Specify extensions to use. Default FoxBin2Prg extensions ends in '2' (see at the bottom) + <<>>ShowProgressbar: 1 && 0=Don't show, 1=Allways show, 2= Show only for multi-file processing + <<>>DontShowErrors: 0 && Show message errors by default + <<>>NoTimestamps: 1 && Clear timestamps by default for minimize differences + <<>>Debug: 0 && Don't Activate individual .Log by default + <<>>BodyDevInfo: 0 && [0=Don't keep DevInfo for body pjx records], 1=Keep DevInfo + <<>>ExtraBackupLevels: 1 && By default 1 BAK is created. With this you can make more .N.BAK, or none + <<>>ClearUniqueID: 1 && 0=Keep UniqueID, 1=Clear Unique ID. Useful for Diff and Merge + <<>>ClearDBFLastUpdate: 1 && 0=Keep DBF LastUpdate, 1=Clear DBF LastUpdate. Useful for Diff. + <<>>OptimizeByFilestamp: 0 && Optimize file regeneration depending on file timestamp + <<>>OptimizeByFilestamp: 0 && Optimize file regeneration depending on file timestamp + <<>>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 + <<>>Language: (auto) && Language of shown messages and LOGs. EN=English, FR=French, ES=Español, DE=German, Not defined = AUTOMATIC [DEFAULT] + <<>>ExcludeDBFAutoincNextval: 0 && [0=Do not exclude this value from db2], 1=Exclude this value from db2 + <<>>PRG_Compat_Level: 0 && [0=Legacy], 1=Use HELPSTRING as Class Procedure comment + <<>> + <<>>-- Convertion options: + <<>>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 TXT only (Diff), 2=Generate TXT and BIN (Merge/Only Structure!), 4=Generate TXT with DATA (Diff), 8=Export and Import DATA (Merge/Structure & Data) + <<>>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 + <<>> + <<>>-- Class per file options (UseClassPerFile: 1) + <<>>UseClassPerFile: 0 && 0=One library tx2 file, 1=Multiple file.class.tx2 files, 2=Multiple file.baseclass.class.tx2 files including DBC members + <<>>RedirectClassPerFileToMain: 0 && 0=Don't redirect to file.tx2, 1=Redirect to file.tx2 when selecting file.class.tx2 + <<>>ClassPerFileCheck: 0 && 0=Don't check file.class.tx2 inclusion, 1=Check file.class.tx2 inclusion + <<>> + <<>>-- Example configuration for SourceSafe compatibility: + <<>>extension: pj2=pja + <<>>extension: vc2=vca + <<>>extension: sc2=sca + <<>>extension: fr2=fra + <<>>extension: lb2=lba + <<>>extension: mn2=mna + <<>>extension: db2=dba + <<>>extension: dc2=dca + <<>> + <<>> + <<>>-- Individual DBF configuration file (syntax: filename.dbf.cfg) + <<>>DBF_Conversion_Support: <1,2,4,8> && See same config in upper side + <<>>DBF_Conversion_Order: && Field expresion. ie: name+str(age,3) + <<>>DBF_Conversion_Condition: && Logical expression. ie: age > 10 AND NOT DELETED() + <<>> + ENDTEXT .C_FOXBIN2PRG_JUST_VFP_9_LOC = "FOXBIN2PRG est seulement pour Visual FoxPro 9.0!" .C_FOXBIN2PRG_WARN_CAPTION_LOC = "AVERTISSEMENT!" .C_GENERATED_FILE_SIZE_LOC = "Taille du fichier généré" @@ -28389,24 +28829,83 @@ DEFINE CLASS CL_LANG AS Custom .C_FILE_NOT_FOUND_LOC = "No se encontró el archivo" .C_FILENAME_LOC = "Archivo" .C_FOXBIN2PRG_ERROR_CAPTION_LOC = "ERROR" - .C_FOXBIN2PRG_SYNTAX_INFO_LOC = "INFORMACIÓN DE SINTAXIS" - .C_FOXBIN2PRG_SYNTAX_INFO_EXAMPLE_LOC = "FOXBIN2PRG.EXE [cType [cTextName [cGenText [cDontShowErrors [cDebug [cDontShowProgress [cOriginalFileName [cRecompile [cNoTimestamps [cCFG_File] ] ] ] ] ] ] ] ] ]" + CR_LF + CR_LF ; - + "cFileSpec.Ext: Nombre completo (fullpath) del archivo a convertir o del directorio a procesar" + CR_LF ; - + "- Si indica 'BIN2PRG', se procesa el directorio indicado en tcType para generar los TX2" + CR_LF ; - + "- Si indica 'PRG2BIN', se procesa el directorio indicado en tcType para generar los BIN" + CR_LF ; - + "- En modo compatibilidad con SCCAPI (VSS), se usa para preguntar el tipo de soporte de conversión para el tipo de archivo indicado" + CR_LF ; - + "cType: En modo compatibilidad con SCCAPI (VSS) es el Tipo de archivo de entrada. " ; - + "Si indica '*' o '*-' y tc_InputFile es un PJX, se procesa todo el proyecto" + CR_LF ; - + "cTextName = Nombre del archivo texto. (Solo para compatibilidad con Visual SourceSafe)" + CR_LF ; - + "lGenText: .T.=Genera Texto, .F.=Genera Binario. Solo para compatibilidad con SCCAPI (VSS)" + CR_LF ; - + "cDontShowErrors: '1' para NO mostrar errores" + CR_LF ; - + "cDebug: '1' para generar LOGs del proceso" + CR_LF ; - + "cDontShowProgress: '1' para NO mostrar la ventana de progreso" + CR_LF ; - + "cOriginalFileName: Sirve para los casos en los que inputFile es un nombre temporal y se quiere generar" + CR_LF ; - + " el nombre correcto en la cabecera de la versión texto" + CR_LF ; - + "cRecompile: Indica recompilar ('1') el binario una vez regenerado. También se puede indicar un Path (p.ej, el del proyecto)" + CR_LF ; - + "cNoTimestamps: Indica si se debe anular el timestamp ('1' o vacío) o no ('0')" + CR_LF ; - + "cCFG_File: Indica un nombre de archivo CFG para no usar el predeterminado en el directorio de foxbin2prg" + .C_FOXBIN2PRG_SYNTAX_INFO_LOC = "INFORMACIÓN DE SINTAXIS Y PARÁMETROS" + TEXT TO .C_FOXBIN2PRG_SYNTAX_INFO_EXAMPLE_LOC TEXTMERGE NOSHOW FLAGS 1 PRETEXT 1+2 + <<>>Página principal y descarga de FoxBin2Prg: https://github.com/fdbozzo/foxbin2prg/wiki - Fernando D. Bozzo (2013.11.25) + <<>> + <<>>FOXBIN2PRG.EXE [cType [cTextName [cGenText [cDontShowErrors [cDebug [cDontShowProgress [cOriginalFileName [cRecompile [cNoTimestamps [cCFG_File] ] ] ] ] ] ] ] ] ] + <<>> + <<>>-- Detalle de parámetros: + <<>>cFileSpec.Ext: Nombre completo (fullpath) del archivo a convertir o del directorio a procesar + <<>>- Si indica 'BIN2PRG', se procesa el directorio indicado en tcType para generar los TX2 + <<>>- Si indica 'PRG2BIN', se procesa el directorio indicado en tcType para generar los BIN + <<>>- En modo compatibilidad con SCCAPI (VSS), se usa para preguntar el tipo de soporte de conversión para el tipo de archivo indicado + <<>>cType: En modo compatibilidad con SCCAPI (VSS) es el Tipo de archivo de entrada. + <<>>- Si indica '*' o '*-' y tc_InputFile es un PJX, se procesa todo el proyecto + <<>>cTextName = Nombre del archivo texto. (Solo para compatibilidad con Visual SourceSafe) + <<>>lGenText: .T.=Genera Texto, .F.=Genera Binario. Solo para compatibilidad con SCCAPI (VSS) + <<>>cDontShowErrors: '1' para NO mostrar errores + <<>>cDebug: '1' para generar LOGs del proceso + <<>>cDontShowProgress: '1' para NO mostrar la ventana de progreso + <<>>cOriginalFileName: Sirve para los casos en los que inputFile es un nombre temporal y se quiere generar el nombre correcto en la cabecera de la versión texto + <<>>cRecompile: Indica recompilar ('1') el binario una vez regenerado. También se puede indicar un Path (p.ej, el del proyecto) + <<>>cNoTimestamps: Indica si se debe anular el timestamp ('1' o vacío) o no ('0') + <<>>cCFG_File: Indica un nombre de archivo CFG para no usar el predeterminado en el directorio de foxbin2prg + <<>> + <<>> + <<>>FOXBIN2PRG.CFG configuration options: (If no values given, these are the DEFAULTS) + <<>> + <<>>extension: tx2=newext && Specify extensions to use. Default FoxBin2Prg extensions ends in '2' (see at the bottom) + <<>>ShowProgressbar: 1 && 0=Don't show, 1=Allways show, 2= Show only for multi-file processing + <<>>DontShowErrors: 0 && Show message errors by default + <<>>NoTimestamps: 1 && Clear timestamps by default for minimize differences + <<>>Debug: 0 && Don't Activate individual .Log by default + <<>>BodyDevInfo: 0 && [0=Don't keep DevInfo for body pjx records], 1=Keep DevInfo + <<>>ExtraBackupLevels: 1 && By default 1 BAK is created. With this you can make more .N.BAK, or none + <<>>ClearUniqueID: 1 && 0=Keep UniqueID, 1=Clear Unique ID. Useful for Diff and Merge + <<>>ClearDBFLastUpdate: 1 && 0=Keep DBF LastUpdate, 1=Clear DBF LastUpdate. Useful for Diff. + <<>>OptimizeByFilestamp: 0 && Optimize file regeneration depending on file timestamp + <<>>OptimizeByFilestamp: 0 && Optimize file regeneration depending on file timestamp + <<>>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 + <<>>Language: (auto) && Language of shown messages and LOGs. EN=English, FR=French, ES=Español, DE=German, Not defined = AUTOMATIC [DEFAULT] + <<>>ExcludeDBFAutoincNextval: 0 && [0=Do not exclude this value from db2], 1=Exclude this value from db2 + <<>>PRG_Compat_Level: 0 && [0=Legacy], 1=Use HELPSTRING as Class Procedure comment + <<>> + <<>>-- Convertion options: + <<>>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 TXT only (Diff), 2=Generate TXT and BIN (Merge/Only Structure!), 4=Generate TXT with DATA (Diff), 8=Export and Import DATA (Merge/Structure & Data) + <<>>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 + <<>> + <<>>-- Class per file options (UseClassPerFile: 1) + <<>>UseClassPerFile: 0 && 0=One library tx2 file, 1=Multiple file.class.tx2 files, 2=Multiple file.baseclass.class.tx2 files including DBC members + <<>>RedirectClassPerFileToMain: 0 && 0=Don't redirect to file.tx2, 1=Redirect to file.tx2 when selecting file.class.tx2 + <<>>ClassPerFileCheck: 0 && 0=Don't check file.class.tx2 inclusion, 1=Check file.class.tx2 inclusion + <<>> + <<>>-- Example configuration for SourceSafe compatibility: + <<>>extension: pj2=pja + <<>>extension: vc2=vca + <<>>extension: sc2=sca + <<>>extension: fr2=fra + <<>>extension: lb2=lba + <<>>extension: mn2=mna + <<>>extension: db2=dba + <<>>extension: dc2=dca + <<>> + <<>> + <<>>-- Archivo de configuración individual para DBF (sintaxis: archivo.dbf.cfg) + <<>>DBF_Conversion_Support: <1,2,4,8> && Ver esta misma configuración más arriba + <<>>DBF_Conversion_Order: && Expresión de campo. ej: nombre+str(edad,3) + <<>>DBF_Conversion_Condition: && Expresión lógica. ej: edad > 10 AND NOT DELETED() + <<>> + ENDTEXT .C_FOXBIN2PRG_JUST_VFP_9_LOC = "¡FOXBIN2PRG es solo para Visual FoxPro 9.0!" .C_FOXBIN2PRG_WARN_CAPTION_LOC = "¡ATENCIÓN!" .C_GENERATED_FILE_SIZE_LOC = "Tamaño del archivo generado" @@ -28495,24 +28994,83 @@ DEFINE CLASS CL_LANG AS Custom .C_FILE_NOT_FOUND_LOC = "Datei nicht gefunden" .C_FILENAME_LOC = "Datei" .C_FOXBIN2PRG_ERROR_CAPTION_LOC = "FEHLER" - .C_FOXBIN2PRG_SYNTAX_INFO_LOC = "SYNTAX INFO" - .C_FOXBIN2PRG_SYNTAX_INFO_EXAMPLE_LOC = "FOXBIN2PRG.EXE [cType [cTextName [cGenText [cDontShowErrors [cDebug [cDontShowProgress [cOriginalFileName [cRecompile [cNoTimestamps [cCFG_File] ] ] ] ] ] ] ] ] ]" + CR_LF + CR_LF ; - + "cFileSpec.Ext: Full name (fullpath) of the file to convert or directory name to process" + CR_LF ; - + "- If 'BIN2PRG' is specified, the directory specified in tcType is processed for generating TX2" + CR_LF ; - + "- If 'PRG2BIN' is specified, the directory specified in tcType is processed for regenerating BIN" + CR_LF ; - + "- In SCCAPI (VSS) compatibility mode, it is used to query the conversion support for the file type specified" + CR_LF ; - + "cType: In SCCAPI (VSS) compatibility mode indicates the input file type. " ; - + "If specified '*' o '*-' and tc_InputFile is a PJX, all project files are processed" + CR_LF ; - + "cTextName = Text filename. Only for SCCAPI (VSS) compatibility mode." + CR_LF ; - + "lGenText: .T.=Generates Text, .F.=Regenerates Binary. Only for SCCAPI (VSS) compatibility mode." + CR_LF ; - + "cDontShowErrors: '1' for NOT showing errors" + CR_LF ; - + "cDebug: '1' for generating process LOGs" + CR_LF ; - + "cDontShowProgress: '1' for NOT showing the process window" + CR_LF ; - + "cOriginalFileName: 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" + CR_LF ; - + "cRecompile: Indicates recompile ('1') the binary once regenerated. You can specify a Path too (ie, the project one)" + CR_LF ; - + "cNoTimestamps: Indicates if timestamp must be cleared ('1' or empty) or not ('0')" + CR_LF ; - + "cCFG_File: Indicates a CFG filename for not using the default on foxbin2prg directory" + .C_FOXBIN2PRG_SYNTAX_INFO_LOC = "SYNTAX AND PARAMETERS INFO" + TEXT TO .C_FOXBIN2PRG_SYNTAX_INFO_EXAMPLE_LOC TEXTMERGE NOSHOW FLAGS 1 PRETEXT 1+2 + <<>>FoxBin2Prg Home Page and download: https://github.com/fdbozzo/foxbin2prg/wiki - Fernando D. Bozzo (2013.11.25) + <<>> + <<>>FOXBIN2PRG.EXE [cType [cTextName [cGenText [cDontShowErrors [cDebug [cDontShowProgress [cOriginalFileName [cRecompile [cNoTimestamps [cCFG_File] ] ] ] ] ] ] ] ] ] + <<>> + <<>>-- Parameter details: + <<>>cFileSpec.Ext: Full name (fullpath) of the file to convert or directory name to process + <<>>- If 'BIN2PRG' is specified, the directory specified in tcType is processed for generating TX2 + <<>>- If 'PRG2BIN' is specified, the directory specified in tcType is processed for regenerating BIN + <<>>- In SCCAPI (VSS) compatibility mode, it is used to query the conversion support for the file type specified + <<>>cType: In SCCAPI (VSS) compatibility mode indicates the input file type. + <<>>- If specified '*' or '*-' and tc_InputFile is a PJX, all project files are processed + <<>>cTextName = Text filename. Only for SCCAPI (VSS) compatibility mode. + <<>>lGenText: .T.=Generates Text, .F.=Regenerates Binary. Only for SCCAPI (VSS) compatibility mode. + <<>>cDontShowErrors: '1' for NOT showing errors + <<>>cDebug: '1' for generating process LOGs + <<>>cDontShowProgress: '1' for NOT showing the process window + <<>>cOriginalFileName: 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: Indicates recompile ('1') the binary once regenerated. You can specify a Path too (ie, the project one) + <<>>cNoTimestamps: Indicates if timestamp must be cleared ('1' or empty) or not ('0') + <<>>cCFG_File: Indicates a CFG filename for not using the default on foxbin2prg directory + <<>> + <<>> + <<>>FOXBIN2PRG.CFG configuration options: (If no values given, these are the DEFAULTS) + <<>> + <<>>extension: tx2=newext && Specify extensions to use. Default FoxBin2Prg extensions ends in '2' (see at the bottom) + <<>>ShowProgressbar: 1 && 0=Don't show, 1=Allways show, 2= Show only for multi-file processing + <<>>DontShowErrors: 0 && Show message errors by default + <<>>NoTimestamps: 1 && Clear timestamps by default for minimize differences + <<>>Debug: 0 && Don't Activate individual .Log by default + <<>>BodyDevInfo: 0 && [0=Don't keep DevInfo for body pjx records], 1=Keep DevInfo + <<>>ExtraBackupLevels: 1 && By default 1 BAK is created. With this you can make more .N.BAK, or none + <<>>ClearUniqueID: 1 && 0=Keep UniqueID, 1=Clear Unique ID. Useful for Diff and Merge + <<>>ClearDBFLastUpdate: 1 && 0=Keep DBF LastUpdate, 1=Clear DBF LastUpdate. Useful for Diff. + <<>>OptimizeByFilestamp: 0 && Optimize file regeneration depending on file timestamp + <<>>OptimizeByFilestamp: 0 && Optimize file regeneration depending on file timestamp + <<>>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 + <<>>Language: (auto) && Language of shown messages and LOGs. EN=English, FR=French, ES=Español, DE=German, Not defined = AUTOMATIC [DEFAULT] + <<>>ExcludeDBFAutoincNextval: 0 && [0=Do not exclude this value from db2], 1=Exclude this value from db2 + <<>>PRG_Compat_Level: 0 && [0=Legacy], 1=Use HELPSTRING as Class Procedure comment + <<>> + <<>>-- Convertion options: + <<>>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 TXT only (Diff), 2=Generate TXT and BIN (Merge/Only Structure!), 4=Generate TXT with DATA (Diff), 8=Export and Import DATA (Merge/Structure & Data) + <<>>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 + <<>> + <<>>-- Class per file options (UseClassPerFile: 1) + <<>>UseClassPerFile: 0 && 0=One library tx2 file, 1=Multiple file.class.tx2 files, 2=Multiple file.baseclass.class.tx2 files including DBC members + <<>>RedirectClassPerFileToMain: 0 && 0=Don't redirect to file.tx2, 1=Redirect to file.tx2 when selecting file.class.tx2 + <<>>ClassPerFileCheck: 0 && 0=Don't check file.class.tx2 inclusion, 1=Check file.class.tx2 inclusion + <<>> + <<>>-- Example configuration for SourceSafe compatibility: + <<>>extension: pj2=pja + <<>>extension: vc2=vca + <<>>extension: sc2=sca + <<>>extension: fr2=fra + <<>>extension: lb2=lba + <<>>extension: mn2=mna + <<>>extension: db2=dba + <<>>extension: dc2=dca + <<>> + <<>> + <<>>-- Individual DBF configuration file (syntax: filename.dbf.cfg) + <<>>DBF_Conversion_Support: <1,2,4,8> && See same config in upper side + <<>>DBF_Conversion_Order: && Field expresion. ie: name+str(age,3) + <<>>DBF_Conversion_Condition: && Logical expression. ie: age > 10 AND NOT DELETED() + <<>> + ENDTEXT .C_FOXBIN2PRG_JUST_VFP_9_LOC = "FOXBIN2PRG arbeitet nur für Visual FoxPro 9.0!" .C_FOXBIN2PRG_WARN_CAPTION_LOC = "WARNUNG!" .C_GENERATED_FILE_SIZE_LOC = "Generierte Dateigröße" @@ -28601,24 +29159,83 @@ DEFINE CLASS CL_LANG AS Custom .C_FILE_NOT_FOUND_LOC = "File not found" .C_FILENAME_LOC = "File" .C_FOXBIN2PRG_ERROR_CAPTION_LOC = "ERROR" - .C_FOXBIN2PRG_SYNTAX_INFO_LOC = "SYNTAX INFO" - .C_FOXBIN2PRG_SYNTAX_INFO_EXAMPLE_LOC = "FOXBIN2PRG.EXE [cType [cTextName [cGenText [cDontShowErrors [cDebug [cDontShowProgress [cOriginalFileName [cRecompile [cNoTimestamps [cCFG_File] ] ] ] ] ] ] ] ] ]" + CR_LF + CR_LF ; - + "cFileSpec.Ext: Full name (fullpath) of the file to convert or directory name to process" + CR_LF ; - + "- If 'BIN2PRG' is specified, the directory specified in tcType is processed for generating TX2" + CR_LF ; - + "- If 'PRG2BIN' is specified, the directory specified in tcType is processed for regenerating BIN" + CR_LF ; - + "- In SCCAPI (VSS) compatibility mode, it is used to query the conversion support for the file type specified" + CR_LF ; - + "cType: In SCCAPI (VSS) compatibility mode indicates the input file type. " ; - + "If specified '*' o '*-' and tc_InputFile is a PJX, all project files are processed" + CR_LF ; - + "cTextName = Text filename. Only for SCCAPI (VSS) compatibility mode." + CR_LF ; - + "lGenText: .T.=Generates Text, .F.=Regenerates Binary. Only for SCCAPI (VSS) compatibility mode." + CR_LF ; - + "cDontShowErrors: '1' for NOT showing errors" + CR_LF ; - + "cDebug: '1' for generating process LOGs" + CR_LF ; - + "cDontShowProgress: '1' for NOT showing the process window" + CR_LF ; - + "cOriginalFileName: 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" + CR_LF ; - + "cRecompile: Indicates recompile ('1') the binary once regenerated. You can specify a Path too (ie, the project one)" + CR_LF ; - + "cNoTimestamps: Indicates if timestamp must be cleared ('1' or empty) or not ('0')" + CR_LF ; - + "cCFG_File: Indicates a CFG filename for not using the default on foxbin2prg directory" + .C_FOXBIN2PRG_SYNTAX_INFO_LOC = "SYNTAX AND PARAMETERS INFO" + TEXT TO .C_FOXBIN2PRG_SYNTAX_INFO_EXAMPLE_LOC TEXTMERGE NOSHOW FLAGS 1 PRETEXT 1+2 + <<>>FoxBin2Prg Home Page and download: https://github.com/fdbozzo/foxbin2prg/wiki - Fernando D. Bozzo (2013.11.25) + <<>> + <<>>FOXBIN2PRG.EXE [cType [cTextName [cGenText [cDontShowErrors [cDebug [cDontShowProgress [cOriginalFileName [cRecompile [cNoTimestamps [cCFG_File] ] ] ] ] ] ] ] ] ] + <<>> + <<>>-- Parameter details: + <<>>cFileSpec.Ext: Full name (fullpath) of the file to convert or directory name to process + <<>>- If 'BIN2PRG' is specified, the directory specified in tcType is processed for generating TX2 + <<>>- If 'PRG2BIN' is specified, the directory specified in tcType is processed for regenerating BIN + <<>>- In SCCAPI (VSS) compatibility mode, it is used to query the conversion support for the file type specified + <<>>cType: In SCCAPI (VSS) compatibility mode indicates the input file type. + <<>>- If specified '*' or '*-' and tc_InputFile is a PJX, all project files are processed + <<>>cTextName = Text filename. Only for SCCAPI (VSS) compatibility mode. + <<>>lGenText: .T.=Generates Text, .F.=Regenerates Binary. Only for SCCAPI (VSS) compatibility mode. + <<>>cDontShowErrors: '1' for NOT showing errors + <<>>cDebug: '1' for generating process LOGs + <<>>cDontShowProgress: '1' for NOT showing the process window + <<>>cOriginalFileName: 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: Indicates recompile ('1') the binary once regenerated. You can specify a Path too (ie, the project one) + <<>>cNoTimestamps: Indicates if timestamp must be cleared ('1' or empty) or not ('0') + <<>>cCFG_File: Indicates a CFG filename for not using the default on foxbin2prg directory + <<>> + <<>> + <<>>FOXBIN2PRG.CFG configuration options: (If no values given, these are the DEFAULTS) + <<>> + <<>>extension: tx2=newext && Specify extensions to use. Default FoxBin2Prg extensions ends in '2' (see at the bottom) + <<>>ShowProgressbar: 1 && 0=Don't show, 1=Allways show, 2= Show only for multi-file processing + <<>>DontShowErrors: 0 && Show message errors by default + <<>>NoTimestamps: 1 && Clear timestamps by default for minimize differences + <<>>Debug: 0 && Don't Activate individual .Log by default + <<>>BodyDevInfo: 0 && [0=Don't keep DevInfo for body pjx records], 1=Keep DevInfo + <<>>ExtraBackupLevels: 1 && By default 1 BAK is created. With this you can make more .N.BAK, or none + <<>>ClearUniqueID: 1 && 0=Keep UniqueID, 1=Clear Unique ID. Useful for Diff and Merge + <<>>ClearDBFLastUpdate: 1 && 0=Keep DBF LastUpdate, 1=Clear DBF LastUpdate. Useful for Diff. + <<>>OptimizeByFilestamp: 0 && Optimize file regeneration depending on file timestamp + <<>>OptimizeByFilestamp: 0 && Optimize file regeneration depending on file timestamp + <<>>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 + <<>>Language: (auto) && Language of shown messages and LOGs. EN=English, FR=French, ES=Español, DE=German, Not defined = AUTOMATIC [DEFAULT] + <<>>ExcludeDBFAutoincNextval: 0 && [0=Do not exclude this value from db2], 1=Exclude this value from db2 + <<>>PRG_Compat_Level: 0 && [0=Legacy], 1=Use HELPSTRING as Class Procedure comment + <<>> + <<>>-- Convertion options: + <<>>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 TXT only (Diff), 2=Generate TXT and BIN (Merge/Only Structure!), 4=Generate TXT with DATA (Diff), 8=Export and Import DATA (Merge/Structure & Data) + <<>>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 + <<>> + <<>>-- Class per file options (UseClassPerFile: 1) + <<>>UseClassPerFile: 0 && 0=One library tx2 file, 1=Multiple file.class.tx2 files, 2=Multiple file.baseclass.class.tx2 files including DBC members + <<>>RedirectClassPerFileToMain: 0 && 0=Don't redirect to file.tx2, 1=Redirect to file.tx2 when selecting file.class.tx2 + <<>>ClassPerFileCheck: 0 && 0=Don't check file.class.tx2 inclusion, 1=Check file.class.tx2 inclusion + <<>> + <<>>-- Example configuration for SourceSafe compatibility: + <<>>extension: pj2=pja + <<>>extension: vc2=vca + <<>>extension: sc2=sca + <<>>extension: fr2=fra + <<>>extension: lb2=lba + <<>>extension: mn2=mna + <<>>extension: db2=dba + <<>>extension: dc2=dca + <<>> + <<>> + <<>>-- Individual DBF configuration file (syntax: filename.dbf.cfg) + <<>>DBF_Conversion_Support: <1,2,4,8> && See same config in upper side + <<>>DBF_Conversion_Order: && Field expresion. ie: name+str(age,3) + <<>>DBF_Conversion_Condition: && Logical expression. ie: age > 10 AND NOT DELETED() + <<>> + ENDTEXT .C_FOXBIN2PRG_JUST_VFP_9_LOC = "FOXBIN2PRG is only for Visual FoxPro 9.0!" .C_FOXBIN2PRG_WARN_CAPTION_LOC = "WARNING!" .C_GENERATED_FILE_SIZE_LOC = "Generated file size" @@ -28693,3 +29310,1361 @@ DEFINE CLASS CL_DBF_CFG AS CUSTOM DBF_Conversion_Condition = '' DBF_Conversion_Support = NULL ENDDEFINE + + + +DEFINE CLASS CL_MACRO AS CL_COL_BASE + #IF .F. + LOCAL THIS AS CL_MACRO OF 'FOXBIN2PRG.PRG' + #ENDIF + + _MEMBERDATA = [] ; + + [] ; + + [] ; + + [] ; + + [] ; + + [] ; + + [] ; + + [] + + + c_InputFile = '' + + *-- Macro Header + _Signature = '' + _Debug = .F. + _NumberOfMacros = '' + _Macros = NULL && Colección de macros + + + + PROCEDURE INIT + DODEFAULT() + THIS._Macros = CREATEOBJECT("COLLECTION") + ENDPROC + + + PROCEDURE get_DataFromMacroFKY(tcInputFile as String, toFoxBin2Prg) + *--------------------------------------------------------------------------------------------------- + * PARÁMETROS: (v=Pasar por valor | @=Pasar por referencia) (!=Obligatorio | ?=Opcional) (IN/OUT) + * tcInputFile (!v IN ) Archivo de entrada + * toFoxBin2Prg (!@ IN ) Referencia al objeto principal + *--------------------------------------------------------------------------------------------------- + #IF .F. + LOCAL toFoxBin2Prg AS c_foxbin2prg OF 'FOXBIN2PRG.PRG' + #ENDIF + + LOCAL lnHandle, lnFileLen, lcMsg, lcStr, lnNumberOfMacros ; + , loMRec as CL_MACRO_RECORD OF 'FOXBIN2PRG.PRG' ; + , loColl as Collection ; + , loEx as Exception + + TRY + lnHandle = -1 + + WITH THIS AS CL_MACRO OF 'FOXBIN2PRG.PRG' + loColl = ._Macros + lnHandle = FOPEN(tcInputFile, 0) + + IF lnHandle = -1 + lcMsg = toFoxBin2Prg.FERROR_Message(tcInputFile) + ERROR (lcMsg) + ENDIF + + lnFileLen = FSEEK(lnHandle, 0, 2) + + IF lnFileLen < 17 + ERROR 'Invalid FKY Macro File size' + ELSE + =FSEEK(lnHandle, 0, 0) + ENDIF + + ._Signature = FREAD(lnHandle, 2) + + IF ._Signature <> CHR(0xFF)+CHR(0x79) + ERROR 'Invalid FKY Macro signature' + ENDIF + + =FSEEK(lnHandle, 14, 1) && Saltar bytes ignorados + + ._NumberOfMacros = FREAD(lnHandle, 2) + lnNumberOfMacros = CTOBIN(._NumberOfMacros,'2RS') + + IF lnFileLen < 17 + 25 * lnNumberOfMacros + * 25 caracteres es el tamaño mínimo de una macro sin teclas guardadas (solo la estructura) + ERROR 'Invalid FKY Macro File size' + ENDIF + + FOR I = 1 TO lnNumberOfMacros + loMRec = CREATEOBJECT("CL_MACRO_RECORD") + + IF NOT loMRec.ReadNextMacro(lnHandle) + EXIT + ENDIF + + loColl.Add( loMRec, loMRec.get_Macro_Keystrokes(loMRec.Keystroke, .T.) ) + loMRec = NULL + ENDFOR + + * Ordenar alfabéticamente por keystroke + loColl.KeySort = 2 + + ENDWITH + + CATCH TO loEx + *loEx.UserValue = loEx.UserValue + 'lcAsignacion = [' + TRANSFORM(lcAsignacion) + ']' + CR_LF + + IF THIS.n_Debug > 0 AND _VFP.STARTMODE = 0 + SET STEP ON + ENDIF + + THROW + + FINALLY + IF lnHandle <> -1 + =FCLOSE(lnHandle) + ENDIF + ENDTRY + + RETURN + ENDPROC + + + PROCEDURE toText + *--------------------------------------------------------------------------------------------------- + * PARÁMETROS: (v=Pasar por valor | @=Pasar por referencia) (!=Obligatorio | ?=Opcional) (IN/OUT) + *--------------------------------------------------------------------------------------------------- + LOCAL lcText, loMRec AS CL_MACRO_RECORD OF 'FOXBIN2PRG.PRG' + lcText = '' + + WITH THIS AS CL_MACRO OF 'FOXBIN2PRG.PRG' + + *-- Macros + FOR EACH loMRec AS CL_MACRO_RECORD OF 'FOXBIN2PRG.PRG' IN ._Macros + lcText = lcText + CR_LF + loMRec.toText() + ENDFOR + + ENDWITH + + RETURN lcText + ENDPROC + + +ENDDEFINE + + + +DEFINE CLASS CL_MACRO_RECORD AS CL_CUS_BASE + _MEMBERDATA = [] ; + + [] ; + + [] ; + + [] ; + + [] ; + + [] ; + + [] ; + + [] ; + + [] ; + + [] ; + + [] + + *-- + Macro_Name = '' + Macro_Length = '' + Keystroke = '' + Macro_Keystrokes = '' + + + PROCEDURE ReadNextMacro(tnHandle as Integer) + *--------------------------------------------------------------------------------------------------- + * PARÁMETROS: (v=Pasar por valor | @=Pasar por referencia) (!=Obligatorio | ?=Opcional) (IN/OUT) + * tnHandle (!v IN ) FKY file handle + *--------------------------------------------------------------------------------------------------- + LOCAL lnMacro_Length + + TRY + WITH THIS AS CL_MACRO_RECORD OF 'FOXBIN2PRG.PRG' + .Macro_Name = FREAD(tnHandle, 20) + .Macro_Length = FREAD(tnHandle, 2) + .Keystroke = FREAD(tnHandle, 2) + lnMacro_Length = CTOBIN(.Macro_Length, '2RS') + .Macro_Keystrokes = FREAD(tnHandle, lnMacro_Length * 2) + ENDWITH + ENDTRY + + RETURN + ENDPROC + + + PROCEDURE toBin as String + *--------------------------------------------------------------------------------------------------- + * PARÁMETROS: (v=Pasar por valor | @=Pasar por referencia) (!=Obligatorio | ?=Opcional) (IN/OUT) + *--------------------------------------------------------------------------------------------------- + LOCAL lcText + + WITH THIS AS CL_MACRO_RECORD OF 'FOXBIN2PRG.PRG' + + ENDWITH + + RETURN lcText + ENDPROC + + + PROCEDURE toText as String + *--------------------------------------------------------------------------------------------------- + * PARÁMETROS: (v=Pasar por valor | @=Pasar por referencia) (!=Obligatorio | ?=Opcional) (IN/OUT) + *--------------------------------------------------------------------------------------------------- + LOCAL lcText, loField AS CL_MACRO_RECORD OF 'FOXBIN2PRG.PRG' + lcText = '' + + WITH THIS AS CL_MACRO_RECORD OF 'FOXBIN2PRG.PRG' + TEXT TO lcText ADDITIVE TEXTMERGE NOSHOW FLAGS 1+2 PRETEXT 1+2 + <<>> + <<>> Macro_Name : <> + <<>> Keystroke : <<.get_Macro_Keystrokes(.Keystroke, .T.)>> + <<>> Macro_Keystrokes: <<.get_Macro_Keystrokes(.Macro_Keystrokes)>> + <<>> + ENDTEXT + + ENDWITH + + RETURN lcText + ENDPROC + + + FUNCTION get_Macro_Keystrokes(tcMacroStr, tlLiteralForCaption) + *--------------------------------------------------------------------------------------------------- + * DEVLUELVE LOS LITERALES DE TODAS LAS TECLAS + *--------------------------------------------------------------------------------------------------- + * PARÁMETROS: (v=Pasar por valor | @=Pasar por referencia) (!=Obligatorio | ?=Opcional) (IN/OUT) + *--------------------------------------------------------------------------------------------------- + LOCAL lcKeystrokes, I + + WITH THIS AS CL_MACRO_RECORD OF 'FOXBIN2PRG.PRG' + lcKeystrokes = '' + + FOR I = 1 TO LEN(tcMacroStr) STEP 2 + lcKeystrokes = lcKeystrokes + .get_KeyText(@tcMacroStr, @I, tlLiteralForCaption) + ENDFOR + ENDWITH + + RETURN lcKeystrokes + ENDFUNC + + + FUNCTION get_KeyText(tcMacroStr as String, I as Integer, tlLiteralForCaption as Boolean) as String + *--------------------------------------------------------------------------------------------------- + * DEVLUELVE EL LITERAL DE UNA TECLA + *--------------------------------------------------------------------------------------------------- + * PARÁMETROS: (v=Pasar por valor | @=Pasar por referencia) (!=Obligatorio | ?=Opcional) (IN/OUT) + * tcMacroStr (!@ IN ) Cadena de teclas de la macro + * I (!@ IN ) Posición actualmente analizada de la cadena + * tlLiteralForCaption (?v IN ) Indica si algunos caracteres especiales se deben convertir a literal (ej: ";" => "SHIFT+SEMICOLON") + *--------------------------------------------------------------------------------------------------- + LOCAL lcMod, lcKey, lcKeyName, lcKeyMod, lcTecla, lnKeyVal, lcKeyPair, lnCntMod ; + , llComplementar, llKeyCodeShift, llKeyCodeCtrl, llKeyCodeAlt, lnMod, lnKey + + STORE '' TO lcTecla, lcKeyName, lcKeyMod, lcKey + lcKeyPair = SUBSTR(tcMacroStr,I,2) + lnKeyVal = CTOBIN(lcKeyPair, '2RS') + lcKey = LEFT(lcKeyPair,1) + lcMod = RIGHT(lcKeyPair,1) + lnMod = ASC(lcMod) + lnKey = ASC(lcKey) + lnCntMod = 0 + + * Tratamiento de modificadores + IF NOT lcKeyPair == CHR(0xFE)+CHR(0xFF) + IF BITAND(lnMod, 0x80) = 0x80 && LITERAL + lcKeyMod = lcKeyMod + IIF(EMPTY(lcKeyMod),'','+') + 'LITERAL' + ENDIF + IF BITAND(lnMod, 0x40) = 0x40 && ALT + *lcKeyMod = lcKeyMod + IIF(EMPTY(lcKeyMod),'','+') + 'ALT' + llKeyCodeAlt = .T. + lnCntMod = lnCntMod + 1 + ENDIF + IF BITAND(lnMod, 0x20) = 0x20 && CTRL + *lcKeyMod = lcKeyMod + IIF(EMPTY(lcKeyMod),'','+') + 'CTRL' + llKeyCodeCtrl = .T. + lnCntMod = lnCntMod + 1 + ENDIF + IF BITAND(lnMod, 0x10) = 0x10 && SHIFT + *lcKeyMod = lcKeyMod + IIF(EMPTY(lcKeyMod),'','+') + 'SHIFT' + llKeyCodeShift = .T. + lnCntMod = lnCntMod + 1 + ENDIF + ENDIF + + llComplementar = llKeyCodeAlt OR llKeyCodeCtrl OR llKeyCodeShift + *llComplementar = llKeyCodeShift + + * Tratamiento de teclas normales + * (Ordenar de mayor valor a menor: 0xFFF > 0x000) + DO CASE + CASE lcKeyPair == CHR(0xFE)+CHR(0xFF) + lcKeyName = 'PAUSE ' + * Buscar el tiempo + I = I + 2 + lcKeyPair = SUBSTR(tcMacroStr,I,2) + + IF lcKeyPair == CHR(0xFF)+CHR(0xFF) + lcKeyName = lcKeyName + 'KEY' + ELSE + lnKeyVal = CTOBIN(lcKeyPair, '2RS') + lcKeyName = lcKeyName + LTRIM(STR(lnKeyVal/100,5,2)) + ENDIF + + CASE BITAND(lnMod, 0x01) = 0x01 ; + OR BITAND(lnMod, 0x10) = 0x10 ; + OR BITAND(lnMod, 0x20) = 0x20 ; + OR BITAND(lnMod, 0x40) = 0x40 + *llComplementar = .F. + + DO CASE + CASE BITAND(lnKeyVal, 0x41A3) = 0x41A3 + lcKeyName = 'ALT+DEL' + + CASE BITAND(lnKeyVal, 0x41A2) = 0x41A2 + lcKeyName = 'ALT+INS' + + CASE BITAND(lnKeyVal, 0x41A1) = 0x41A1 + lcKeyName = 'ALT+PGND' + + CASE BITAND(lnKeyVal, 0x41A0) = 0x41A0 + lcKeyName = 'ALT+DNARROW' + + CASE BITAND(lnKeyVal, 0x419F) = 0x419F + lcKeyName = 'ALT+END' + + CASE BITAND(lnKeyVal, 0x419D) = 0x419D + lcKeyName = 'ALT+RIGHTARROW' + + CASE BITAND(lnKeyVal, 0x419B) = 0x419B + lcKeyName = 'ALT+LEFTARROW' + + CASE BITAND(lnKeyVal, 0x4199) = 0x4199 + lcKeyName = 'ALT+PGUP' + + CASE BITAND(lnKeyVal, 0x4198) = 0x4198 + lcKeyName = 'ALT+UPARROW' + + CASE BITAND(lnKeyVal, 0x4197) = 0x4197 + lcKeyName = 'ALT+HOME' + + CASE BITAND(lnKeyVal, 0x418C) = 0x418C + lcKeyName = 'ALT+F12' + + CASE BITAND(lnKeyVal, 0x418B) = 0x418B + lcKeyName = 'ALT+F11' + + CASE BITAND(lnKeyVal, 0x4181) = 0x4181 + lcKeyName = 'ALT+0' + + CASE BITAND(lnKeyVal, 0x4180) = 0x4180 + lcKeyName = 'ALT+9' + + CASE BITAND(lnKeyVal, 0x417F) = 0x417F + lcKeyName = 'ALT+8' + + CASE BITAND(lnKeyVal, 0x417E) = 0x417E + lcKeyName = 'ALT+7' + + CASE BITAND(lnKeyVal, 0x417D) = 0x417D + lcKeyName = 'ALT+6' + + CASE BITAND(lnKeyVal, 0x417C) = 0x417C + lcKeyName = 'ALT+5' + + CASE BITAND(lnKeyVal, 0x417B) = 0x417B + lcKeyName = 'ALT+4' + + CASE BITAND(lnKeyVal, 0x417A) = 0x417A + lcKeyName = 'ALT+3' + + CASE BITAND(lnKeyVal, 0x4179) = 0x4179 + lcKeyName = 'ALT+2' + + CASE BITAND(lnKeyVal, 0x4178) = 0x4178 + lcKeyName = 'ALT+1' + + CASE BITAND(lnKeyVal, 0x4171) = 0x4171 + lcKeyName = 'ALT+F10' + + CASE BITAND(lnKeyVal, 0x4170) = 0x4170 + lcKeyName = 'ALT+F9' + + CASE BITAND(lnKeyVal, 0x416F) = 0x416F + lcKeyName = 'ALT+F8' + + CASE BITAND(lnKeyVal, 0x416E) = 0x416E + lcKeyName = 'ALT+F7' + + CASE BITAND(lnKeyVal, 0x416D) = 0x416D + lcKeyName = 'ALT+F6' + + CASE BITAND(lnKeyVal, 0x416C) = 0x416C + lcKeyName = 'ALT+F5' + + CASE BITAND(lnKeyVal, 0x416B) = 0x416B + lcKeyName = 'ALT+F4' + + CASE BITAND(lnKeyVal, 0x416A) = 0x416A + lcKeyName = 'ALT+F3' + + CASE BITAND(lnKeyVal, 0x4169) = 0x4169 + lcKeyName = 'ALT+F2' + + CASE BITAND(lnKeyVal, 0x4168) = 0x4168 + lcKeyName = 'ALT+F1' + + CASE BITAND(lnKeyVal, 0x4132) = 0x4132 + lcKeyName = 'ALT+M' + + CASE BITAND(lnKeyVal, 0x4131) = 0x4131 + lcKeyName = 'ALT+N' + + CASE BITAND(lnKeyVal, 0x4130) = 0x4130 + lcKeyName = 'ALT+B' + + CASE BITAND(lnKeyVal, 0x412F) = 0x412F + lcKeyName = 'ALT+V' + + CASE BITAND(lnKeyVal, 0x412E) = 0x412E + lcKeyName = 'ALT+C' + + CASE BITAND(lnKeyVal, 0x412D) = 0x412D + lcKeyName = 'ALT+X' + + CASE BITAND(lnKeyVal, 0x412C) = 0x412C + lcKeyName = 'ALT+Z' + + CASE BITAND(lnKeyVal, 0x4126) = 0x4126 + lcKeyName = 'ALT+L' + + CASE BITAND(lnKeyVal, 0x4125) = 0x4125 + lcKeyName = 'ALT+K' + + CASE BITAND(lnKeyVal, 0x4124) = 0x4124 + lcKeyName = 'ALT+J' + + CASE BITAND(lnKeyVal, 0x4123) = 0x4123 + lcKeyName = 'ALT+H' + + CASE BITAND(lnKeyVal, 0x4122) = 0x4122 + lcKeyName = 'ALT+G' + + CASE BITAND(lnKeyVal, 0x4121) = 0x4121 + lcKeyName = 'ALT+F' + + CASE BITAND(lnKeyVal, 0x4120) = 0x4120 + lcKeyName = 'ALT+D' + + CASE BITAND(lnKeyVal, 0x411F) = 0x411F + lcKeyName = 'ALT+S' + + CASE BITAND(lnKeyVal, 0x411E) = 0x411E + lcKeyName = 'ALT+A' + + CASE BITAND(lnKeyVal, 0x4119) = 0x4119 + lcKeyName = 'ALT+P' + + CASE BITAND(lnKeyVal, 0x4118) = 0x4118 + lcKeyName = 'ALT+O' + + CASE BITAND(lnKeyVal, 0x4117) = 0x4117 + lcKeyName = 'ALT+I' + + CASE BITAND(lnKeyVal, 0x4116) = 0x4116 + lcKeyName = 'ALT+U' + + CASE BITAND(lnKeyVal, 0x4115) = 0x4115 + lcKeyName = 'ALT+Y' + + CASE BITAND(lnKeyVal, 0x4114) = 0x4114 + lcKeyName = 'ALT+T' + + CASE BITAND(lnKeyVal, 0x4113) = 0x4113 + lcKeyName = 'ALT+R' + + CASE BITAND(lnKeyVal, 0x4112) = 0x4112 + lcKeyName = 'ALT+E' + + CASE BITAND(lnKeyVal, 0x4111) = 0x4111 + lcKeyName = 'ALT+U' + + CASE BITAND(lnKeyVal, 0x4110) = 0x4110 + lcKeyName = 'ALT+Q' + + CASE BITAND(lnKeyVal, 0x410C) = 0x410C + lcKeyName = [ALT+'] && No está en la ayuda de VFP + + CASE BITAND(lnKeyVal, 0x2194) = 0x2194 + lcKeyName = 'CTRL+TAB' + + CASE BITAND(lnKeyVal, 0x2193) = 0x2193 + lcKeyName = 'CTRL+DEL' + + CASE BITAND(lnKeyVal, 0x2192) = 0x2192 + lcKeyName = 'CTRL+INS' + + CASE BITAND(lnKeyVal, 0x2191) = 0x2191 + lcKeyName = 'CTRL+DNARROW' + + CASE BITAND(lnKeyVal, 0x218D) = 0x218D + lcKeyName = 'CTRL+UPARROW' + + CASE BITAND(lnKeyVal, 0x218A) = 0x218A + lcKeyName = 'CTRL+F12' + + CASE BITAND(lnKeyVal, 0x2189) = 0x2189 + lcKeyName = 'CTRL+F11' + + CASE BITAND(lnKeyVal, 0x2184) = 0x2184 + lcKeyName = 'CTRL+PGUP' + + CASE BITAND(lnKeyVal, 0x2177) = 0x2177 + lcKeyName = 'CTRL+HOME' + + CASE BITAND(lnKeyVal, 0x2176) = 0x2176 + lcKeyName = 'CTRL+PGDN' + + CASE BITAND(lnKeyVal, 0x2175) = 0x2175 + lcKeyName = 'CTRL+END' + + CASE BITAND(lnKeyVal, 0x2174) = 0x2174 + lcKeyName = 'CTRL+RIGHTARROW' + + CASE BITAND(lnKeyVal, 0x2173) = 0x2173 + lcKeyName = 'CTRL+LEFTARROW' + + CASE BITAND(lnKeyVal, 0x2167) = 0x2167 + lcKeyName = 'CTRL+F10' + + CASE BITAND(lnKeyVal, 0x2166) = 0x2166 + lcKeyName = 'CTRL+F9' + + CASE BITAND(lnKeyVal, 0x2165) = 0x2165 + lcKeyName = 'CTRL+F8' + + CASE BITAND(lnKeyVal, 0x2164) = 0x2164 + lcKeyName = 'CTRL+F7' + + CASE BITAND(lnKeyVal, 0x2163) = 0x2163 + lcKeyName = 'CTRL+F6' + + CASE BITAND(lnKeyVal, 0x2162) = 0x2162 + lcKeyName = 'CTRL+F5' + + CASE BITAND(lnKeyVal, 0x2161) = 0x2161 + lcKeyName = 'CTRL+F4' + + CASE BITAND(lnKeyVal, 0x2160) = 0x2160 + lcKeyName = 'CTRL+F3' + + CASE BITAND(lnKeyVal, 0x215F) = 0x215F + lcKeyName = 'CTRL+F2' + + CASE BITAND(lnKeyVal, 0x215E) = 0x215E + lcKeyName = 'CTRL+F1' + + CASE BITAND(lnKeyVal, 0x2020) = 0x2020 + lcKeyName = 'CTRL+SPACEBAR' + + CASE BITAND(lnKeyVal, 0x201F) = 0x201F + lcKeyName = 'CTRL+HYPHEN' + + CASE BITAND(lnKeyVal, 0x201E) = 0x201E + lcKeyName = 'CTRL+CARET' + + CASE BITAND(lnKeyVal, 0x201D) = 0x201D + lcKeyName = 'CTRL+RBRACKET' + + CASE BITAND(lnKeyVal, 0x201C) = 0x201C + lcKeyName = 'CTRL+BACKSLASH' + + CASE BITAND(lnKeyVal, 0x201B) = 0x201B + lcKeyName = 'CTRL+LBRACKET' + + CASE BITAND(lnKeyVal, 0x201A) = 0x201A + lcKeyName = 'CTRL+Z' + + CASE BITAND(lnKeyVal, 0x2019) = 0x2019 + lcKeyName = 'CTRL+Y' + + CASE BITAND(lnKeyVal, 0x2018) = 0x2018 + lcKeyName = 'CTRL+X' + + CASE BITAND(lnKeyVal, 0x2017) = 0x2017 + lcKeyName = 'CTRL+W' + + CASE BITAND(lnKeyVal, 0x2016) = 0x2016 + lcKeyName = 'CTRL+V' + + CASE BITAND(lnKeyVal, 0x2015) = 0x2015 + lcKeyName = 'CTRL+U' + + CASE BITAND(lnKeyVal, 0x2014) = 0x2014 + lcKeyName = 'CTRL+T' + + CASE BITAND(lnKeyVal, 0x2013) = 0x2013 + lcKeyName = 'CTRL+S' + + CASE BITAND(lnKeyVal, 0x2012) = 0x2012 + lcKeyName = 'CTRL+R' + + CASE BITAND(lnKeyVal, 0x2011) = 0x2011 + lcKeyName = 'CTRL+Q' + + CASE BITAND(lnKeyVal, 0x2010) = 0x2010 + lcKeyName = 'CTRL+P' + + CASE BITAND(lnKeyVal, 0x200F) = 0x200F + lcKeyName = 'CTRL+O' + + CASE BITAND(lnKeyVal, 0x200E) = 0x200E + lcKeyName = 'CTRL+N' + + CASE BITAND(lnKeyVal, 0x200D) = 0x200D + lcKeyName = 'CTRL+M' + + CASE BITAND(lnKeyVal, 0x200C) = 0x200C + lcKeyName = 'CTRL+L' + + CASE BITAND(lnKeyVal, 0x200B) = 0x200B + lcKeyName = 'CTRL+K' + + CASE BITAND(lnKeyVal, 0x200A) = 0x200A + lcKeyName = 'CTRL+ENTER' + + CASE BITAND(lnKeyVal, 0x200A) = 0x200A + lcKeyName = 'CTRL+J' + + CASE BITAND(lnKeyVal, 0x2009) = 0x2009 + lcKeyName = 'CTRL+I' + + CASE BITAND(lnKeyVal, 0x2008) = 0x2008 + lcKeyName = 'CTRL+H' + + CASE BITAND(lnKeyVal, 0x2007) = 0x2007 + lcKeyName = 'CTRL+G' + + CASE BITAND(lnKeyVal, 0x2006) = 0x2006 + lcKeyName = 'CTRL+F' + + CASE BITAND(lnKeyVal, 0x2005) = 0x2005 + lcKeyName = 'CTRL+E' + + CASE BITAND(lnKeyVal, 0x2004) = 0x2004 + lcKeyName = 'CTRL+D' + + CASE BITAND(lnKeyVal, 0x2003) = 0x2003 + lcKeyName = 'CTRL+C' + + CASE BITAND(lnKeyVal, 0x2002) = 0x2002 + lcKeyName = 'CTRL+B' + + CASE BITAND(lnKeyVal, 0x2001) = 0x2001 + lcKeyName = 'CTRL+A' + + CASE BITAND(lnKeyVal, 0x1188) = 0x1188 + lcKeyName = 'SHIFT+F12' + + CASE BITAND(lnKeyVal, 0x1187) = 0x1187 + lcKeyName = 'SHIFT+F11' + + CASE BITAND(lnKeyVal, 0x115D) = 0x115D + lcKeyName = 'SHIFT+F10' + + CASE BITAND(lnKeyVal, 0x115C) = 0x115C + lcKeyName = 'SHIFT+F9' + + CASE BITAND(lnKeyVal, 0x115B) = 0x115B + lcKeyName = 'SHIFT+F8' + + CASE BITAND(lnKeyVal, 0x115A) = 0x115A + lcKeyName = 'SHIFT+F7' + + CASE BITAND(lnKeyVal, 0x1159) = 0x1159 + lcKeyName = 'SHIFT+F6' + + CASE BITAND(lnKeyVal, 0x1158) = 0x1158 + lcKeyName = 'SHIFT+F5' + + CASE BITAND(lnKeyVal, 0x1157) = 0x1157 + lcKeyName = 'SHIFT+F4' + + CASE BITAND(lnKeyVal, 0x1156) = 0x1156 + lcKeyName = 'SHIFT+F3' + + CASE BITAND(lnKeyVal, 0x1155) = 0x1155 + lcKeyName = 'SHIFT+F2' + + CASE BITAND(lnKeyVal, 0x1154) = 0x1154 + lcKeyName = 'SHIFT+F1' + + CASE BITAND(lnKeyVal, 0x0186) = 0x0186 + lcKeyName = 'F12' + + CASE BITAND(lnKeyVal, 0x0185) = 0x0185 + lcKeyName = 'F11' + + CASE INLIST(lnKeyVal, 0x0153, 0x1153) + lcKeyName = 'DEL' + + CASE INLIST(lnKeyVal, 0x0152, 0x1152) + lcKeyName = 'INS' + + CASE INLIST(lnKeyVal, 0x0151, 0x1151) + lcKeyName = 'PGDN' + + CASE INLIST(lnKeyVal, 0x0150, 0x1150) + lcKeyName = 'DNARROW' + + CASE INLIST(lnKeyVal, 0x014F, 0x114F) + lcKeyName = 'END' + + CASE INLIST(lnKeyVal, 0x014D, 0x114D) + lcKeyName = 'RIGHTARROW' + + CASE INLIST(lnKeyVal, 0x014B, 0x114B) + lcKeyName = 'LEFTARROW' + + CASE INLIST(lnKeyVal, 0x0149, 0x1149) + lcKeyName = 'PGUP' + + CASE INLIST(lnKeyVal, 0x0148, 0x1148) + lcKeyName = 'UPARROW' + + CASE BITAND(lnKeyVal, 0x0147) = 0x0147 + lcKeyName = 'HOME' + + CASE lnKeyVal = 0x0144 + lcKeyName = 'F10' + + CASE lnKeyVal = 0x0143 + lcKeyName = 'F9' + + CASE lnKeyVal = 0x0142 + lcKeyName = 'F8' + + CASE lnKeyVal = 0x0141 + lcKeyName = 'F7' + + CASE lnKeyVal = 0x0140 + lcKeyName = 'F6' + + CASE lnKeyVal = 0x013F + lcKeyName = 'F5' + + CASE lnKeyVal = 0x013E + lcKeyName = 'F4' + + CASE lnKeyVal = 0x013D + lcKeyName = 'F3' + + CASE lnKeyVal = 0x013C + lcKeyName = 'F2' + + CASE lnKeyVal = 0x013B + lcKeyName = 'F1' + + CASE lnKeyVal = 0x010F + lcKeyName = 'BACKTAB' + + CASE lnKeyVal = 0x0100 + lcKeyName = 'LEFTMOUSE' + + OTHERWISE + *lcKeyName = CHR(lnKeyVal) + + ENDCASE + + ENDCASE + + IF EMPTY(lcKeyName) + + DO CASE + CASE BETWEEN(lnKey, 0x41, 0x5A) OR BETWEEN(lnKey, 0x61, 0x7A) OR INLIST(lnKey, 0x7C, 0x7E) && A..Z, a..z, |, ~ + lcKeyName = lcKey + llKeyCodeShift = .F. + + CASE BETWEEN(lnKey, 0x21, 0x7A) AND NOT (lnKey = 0x3B) + llKeyCodeShift = .F. + lcKeyName = lcKey + + CASE lnKey = 0x7F + lcKeyName = 'DEL' + + CASE lnKey = 0x7D && "{" + lcKeyName = 'RBRACE' + + CASE lnKey = 0x7B && "}" + lcKeyName = 'LBRACE' + + CASE lnKey = 0x3B && ";" + lcKeyName = 'SEMICOLON' + + CASE lnKey = 0x2C && "," + lcKeyName = 'SEMICOLON' + + CASE lnKey = 0x20 && " " + lcKeyName = 'SPACEBAR' + + CASE lnKey = 0x1B + lcKeyName = 'ESCAPE' + + CASE lnKey = 0x0D + lcKeyName = 'ENTER' + + CASE lnKey = 0x09 + lcKeyName = 'TAB' + + CASE lnKey = 0x08 + lcKeyName = 'BACKSPACE' + + OTHERWISE + llComplementar = .F. + lcKeyName = 'x' + RIGHT( TRANSFORM(lnKeyVal,'@0'), 4) + + ENDCASE + + *ENDCASE + ENDIF + + * Tratamiento de modificadores + IF NOT lcKeyPair == CHR(0xFE)+CHR(0xFF) AND llComplementar + IF llKeyCodeShift AND AT("SHIFT",lcKeyName) = 0 && SHIFT + lcKeyMod = lcKeyMod + IIF(EMPTY(lcKeyMod),'','+') + 'SHIFT' + ENDIF + IF llKeyCodeCtrl AND AT("CTRL",lcKeyName) = 0 && CTRL + lcKeyMod = lcKeyMod + IIF(EMPTY(lcKeyMod),'','+') + 'CTRL' + ENDIF + IF llKeyCodeAlt AND AT("ALT",lcKeyName) = 0 && ALT + lcKeyMod = lcKeyMod + IIF(EMPTY(lcKeyMod),'','+') + 'ALT' + ENDIF + *IF BITAND(lnKeyVal, 0x8000) = 0x8000 && LITERAL + * lcKeyMod = lcKeyMod + IIF(EMPTY(lcKeyMod),'','+') + 'LITERAL' + *ENDIF + ENDIF + + * Tratamiento de combinación final + DO CASE + CASE LEN(lcKeyName) > 1 AND (NOT llComplementar OR EMPTY(lcKeyMod)) + IF tlLiteralForCaption + lcTecla = lcKeyName + ELSE + lcTecla = '{' + lcKeyName + '}' + ENDIF + + CASE EMPTY(lcKeyMod) + lcTecla = lcKeyName + + OTHERWISE + IF tlLiteralForCaption + lcTecla = lcKeyMod + '+' + lcKeyName + ELSE + lcTecla = '{' + lcKeyMod + '+' + lcKeyName + '}' + ENDIF + + ENDCASE + + RETURN lcTecla + ENDFUNC + + +ENDDEFINE + + + +DEFINE CLASS CL_MEMVAR AS CL_COL_BASE + * .MEM FILE STRUCTURE (Based on observation and testing) - Fernando D. Bozzo. 2018/03/24 + * Complementary documentation: https://www.clicketyclick.dk/databases/xbase/format/mem.html#MEM_STRUCT + + + * STRUCTURE OF VARIABLES + * Byte Offset Description + * ----------- ------------------------------------------------------------------------------------------------- + * 0 - 10 NULL terminated VarName. If VarName is empty, then VarName starts at offset 32 + * 11 VarType (A,C,N,Y,B,F,I,Q,D,T,L,0). If VarType is lowercase, then next VarName + * begins with 2 bytes for VarName length. + * 12 - 15 Reserved + * 16 Value length + * 17 Decimal count + * 18 - 24 Reserved + * 25 0x00 if it is an array element, 0x03 if it isn't an array element + * 26 - 31 Reserved + * 32 - n If VarName (offset 0-10) is NULL then goto TABLE 1, If VarType=A then continue in TABLE 2, + * if VarType=0 then continue in TABLE 3, else continue in TABLE 4 + * ... + * eof Last character is EOF (0x1A) character + * ----------- ------------------------------------------------------------------------------------------------- + + + * TABLE 1 - ARRAY STRUCTURE (VarType=A) + * Byte Offset Description + * ----------- ------------------------------------------------------------------------------------------------- + * 32 - 33 VarName length + * 34 - n VarName + * n + 1 Next TABLE: If VarType=A then continue in TABLE 2, if VarType=0 then continue in TABLE 3, + * else continue in TABLE 4 + * ----------- ------------------------------------------------------------------------------------------------- + + + * TABLE 2 - ARRAY STRUCTURE (VarType=A) + * Byte Offset Description + * ----------- ------------------------------------------------------------------------------------------------- + * n - n+1 Array rows + * n+2 - n+3 Array cols + * n+4 - x Next Variable structure, or EOF (0x1A) + * ----------- ------------------------------------------------------------------------------------------------- + + + * TABLE 3 - NULL VALUE STRUCTURE (VarType=0) + * Byte Offset Description + * ----------- ------------------------------------------------------------------------------------------------- + * n VarType. + * n+1 - x Next Variable structure, or EOF (0x1A) + * ----------- ------------------------------------------------------------------------------------------------- + + + * TABLE 4 - NORMAL VALUE STRUCTURE + * Byte Offset Description + * ----------- ------------------------------------------------------------------------------------------------- + * n - x Value of length "value length". If ValTye is a Char type then Value length is the value's width, + * else the width is 8 for numbers and dates + * x Next Variable structure, or EOF (0x1A) + * ----------- ------------------------------------------------------------------------------------------------- + + #IF .F. + LOCAL THIS AS CL_MEMVAR OF 'FOXBIN2PRG.PRG' + #ENDIF + + _MEMBERDATA = [] ; + + [] ; + + [] ; + + [] ; + + [] ; + + [] + + + c_InputFile = '' + _Debug = .F. + _MemVars = NULL && Colección de variables de memoria + + + + PROCEDURE INIT + DODEFAULT() + THIS._MemVars = CREATEOBJECT("COLLECTION") + ENDPROC + + + PROCEDURE get_DataFromMEM(tcInputFile as String, toFoxBin2Prg) + *--------------------------------------------------------------------------------------------------- + * PARÁMETROS: (v=Pasar por valor | @=Pasar por referencia) (!=Obligatorio | ?=Opcional) (IN/OUT) + * tcInputFile (!v IN ) Archivo de entrada + * toFoxBin2Prg (!@ IN ) Referencia al objeto principal + *--------------------------------------------------------------------------------------------------- + #IF .F. + LOCAL toFoxBin2Prg AS c_foxbin2prg OF 'FOXBIN2PRG.PRG' + #ENDIF + + LOCAL lnHandle, lnFileLen, lcMsg, lcStr, lnNumberOfMacros ; + , loMVRec as CL_MEMVAR_RECORD OF 'FOXBIN2PRG.PRG' ; + , loColl as Collection ; + , loEx as Exception + + TRY + lnHandle = -1 + + WITH THIS AS CL_MEMVAR OF 'FOXBIN2PRG.PRG' + loColl = ._MemVars + lnHandle = FOPEN(tcInputFile, 0) + + IF lnHandle = -1 + lcMsg = toFoxBin2Prg.FERROR_Message(tcInputFile) + ERROR (lcMsg) + ENDIF + + lnFileLen = FSEEK(lnHandle, 0, 2) + + IF lnFileLen < 1 + ERROR 'Invalid MEM File size' + ELSE + =FSEEK(lnHandle, 0, 0) + ENDIF + + *IF lnFileLen < 17 + 25 * lnNumberOfMacros + * * 25 caracteres es el tamaño mínimo de una macro sin teclas guardadas (solo la estructura) + * ERROR 'Invalid FKY Macro File size' + *ENDIF + + IF lnFileLen > 1 + DO WHILE NOT FEOF(lnHandle) AND FSEEK(lnHandle, 0, 1) < (lnFileLen - 1) + loMVRec = CREATEOBJECT("CL_MEMVAR_RECORD") + + IF NOT loMVRec.ReadNextMemVar(lnHandle) + EXIT + ENDIF + + loColl.Add( loMVRec, loMVRec.getName() + PADL(pnElement, 5, '0') ) + loMVRec = NULL + ENDDO + + * Ordenar alfabéticamente por nombre de variable + loColl.KeySort = 2 + ENDIF + + ENDWITH + + CATCH TO loEx + *loEx.UserValue = loEx.UserValue + 'lcAsignacion = [' + TRANSFORM(lcAsignacion) + ']' + CR_LF + + IF THIS.n_Debug > 0 AND _VFP.STARTMODE = 0 + SET STEP ON + ENDIF + + THROW + + FINALLY + IF lnHandle <> -1 + =FCLOSE(lnHandle) + ENDIF + ENDTRY + + RETURN + ENDPROC + + + PROCEDURE toText + *--------------------------------------------------------------------------------------------------- + * PARÁMETROS: (v=Pasar por valor | @=Pasar por referencia) (!=Obligatorio | ?=Opcional) (IN/OUT) + *--------------------------------------------------------------------------------------------------- + LOCAL lcText, loMVRec AS CL_MEMVAR_RECORD OF 'FOXBIN2PRG.PRG' + lcText = '' + + WITH THIS AS CL_MEMVAR OF 'FOXBIN2PRG.PRG' + + *-- Macros + FOR EACH loMVRec IN ._MemVars &&FOXOBJECT + lcText = lcText + CR_LF + loMVRec.toText() + ENDFOR + + ENDWITH + + RETURN lcText + ENDPROC + + +ENDDEFINE + + + +DEFINE CLASS CL_MEMVAR_RECORD AS CL_CUS_BASE + _MEMBERDATA = [] ; + + [] ; + + [] ; + + [] ; + + [] ; + + [] ; + + [] ; + + [] ; + + [] ; + + [] ; + + [] ; + + [] ; + + [] ; + + [] ; + + [] ; + + [] ; + + [] ; + + [] ; + + [] ; + + [] ; + + [] ; + + [] + + *-- + MemVar_Name = '' + MemVar_NameLength = '' + MemVar_Type = '' + MemVar_Rows = '' + MemVar_Cols = '' + MemVar_Length = '' + MemVar_Dec = '' + MemVar_Value = '' + MemVar_ElemType = '' + + + PROCEDURE ReadNextMemVar(tnHandle as Integer) + *--------------------------------------------------------------------------------------------------- + * PARÁMETROS: (v=Pasar por valor | @=Pasar por referencia) (!=Obligatorio | ?=Opcional) (IN/OUT) + * tnHandle (!v IN ) FKY file handle + *--------------------------------------------------------------------------------------------------- + LOCAL lnVarLength, lnVarDec, lnVarNameLength, lcVarNameLength, llVarTypeIsChar + + TRY + WITH THIS AS CL_MEMVAR_RECORD OF 'FOXBIN2PRG.PRG' + .MemVar_Name = FREAD(tnHandle, 11) + .MemVar_Type = FREAD(tnHandle, 1) + =FSEEK(tnHandle, 4, 1) && Skip 4 bytes + .MemVar_Length = FREAD(tnHandle, 1) + .MemVar_Dec = FREAD(tnHandle, 1) + + DO CASE + CASE INLIST( UPPER(.MemVar_Type), 'C', 'Q', 'L') + llVarTypeIsChar = .T. + lnVarLength = .getLength() + + CASE UPPER(.MemVar_Type) = 'A' + * Array + + OTHERWISE && Numeric + lnVarLength = 8 + lnVarDec = .getDec() + + ENDCASE + + =FSEEK(tnHandle, 7, 1) && Skip 7 bytes + .MemVar_ElemType = FREAD(tnHandle, 1) && 0x00 if it is an array element, else 0x03 + =FSEEK(tnHandle, 6, 1) && Skip 6 bytes + + IF .isArrayElement() + * Mantiene el contador de elemento + pnElement = pnElement + 1 + ELSE + * Reinicia el conteo de filas, columnas y elemento actual + STORE 0 TO pnCols, pnRows, pnElement + ENDIF + + IF EMPTY( RTRIM(.MemVar_Name, 0, CHR(0)) ) + * Long VarName + lcVarNameLength = FREAD(tnHandle, 2) + lnVarNameLength = CTOBIN(lcVarNameLength, '2RS') + .MemVar_Name = FREAD(tnHandle, lnVarNameLength) + ENDIF + + DO CASE + CASE INLIST(.MemVar_Type, 'A', 'a') + * ARRAY + * Rows/Cols + .MemVar_Rows = FREAD(tnHandle, 2) + .MemVar_Cols = FREAD(tnHandle, 2) + pnCols = .getCols() + pnRows = .getRows() + + CASE .MemVar_Type = '0' + * NULL + * VarType + .MemVar_Type = FREAD(tnHandle, 1) + .MemVar_Value = NULL + + OTHERWISE + * NORMAL VALUE + * Value + .MemVar_Value = FREAD(tnHandle, lnVarLength) + + ENDCASE + ENDWITH + ENDTRY + + RETURN + ENDPROC + + + FUNCTION isArrayElement + #IF .F. + LOCAL THIS AS CL_MEMVAR_RECORD OF 'FOXBIN2PRG.PRG' + #ENDIF + RETURN ASC(THIS.MemVar_ElemType) = 0 + ENDFUNC + + + FUNCTION getRows + #IF .F. + LOCAL THIS AS CL_MEMVAR_RECORD OF 'FOXBIN2PRG.PRG' + #ENDIF + RETURN CTOBIN(THIS.MemVar_Rows, '2RS') + ENDFUNC + + + FUNCTION getCols + #IF .F. + LOCAL THIS AS CL_MEMVAR_RECORD OF 'FOXBIN2PRG.PRG' + #ENDIF + RETURN CTOBIN(THIS.MemVar_Cols, '2RS') + ENDFUNC + + + FUNCTION getLength + #IF .F. + LOCAL THIS AS CL_MEMVAR_RECORD OF 'FOXBIN2PRG.PRG' + #ENDIF + RETURN ASC(THIS.MemVar_Length) + ENDFUNC + + + FUNCTION getDec + #IF .F. + LOCAL THIS AS CL_MEMVAR_RECORD OF 'FOXBIN2PRG.PRG' + #ENDIF + RETURN ASC(THIS.MemVar_Dec) + ENDFUNC + + + FUNCTION getName + #IF .F. + LOCAL THIS AS CL_MEMVAR_RECORD OF 'FOXBIN2PRG.PRG' + #ENDIF + RETURN RTRIM(THIS.MemVar_Name, 0, CHR(0)) + ENDFUNC + + + FUNCTION getValue + WITH THIS AS CL_MEMVAR_RECORD OF 'FOXBIN2PRG.PRG' + LOCAL lxValue + + DO CASE + CASE ISNULL(.MemVar_Value) + lxValue = NULL + + CASE UPPER(.MemVar_Type) = 'L' + lxValue = ( ASC(.MemVar_Value) = 1 ) + + CASE INLIST( UPPER(.MemVar_Type), 'C', 'M') + lxValue = ["] + RTRIM(.MemVar_Value, 0, CHR(0)) + ["] + + CASE INLIST( UPPER(.MemVar_Type), 'Q') + lxValue = '0h' + STRCONV(.MemVar_Value,15) + + CASE UPPER(.MemVar_Type) = 'D' + lxValue = SYS(10, CTOBIN(.MemVar_Value, '8S')) + + CASE UPPER(.MemVar_Type) = 'T' + lxValue =.julianToDateTime( CTOBIN(.MemVar_Value, '8S') ) + + CASE UPPER(.MemVar_Type) = 'Y' + lxValue = CTOBIN(.MemVar_Value, '8YRS') + + CASE UPPER(.MemVar_Type) = 'B' + lxValue = CTOBIN(.MemVar_Value, '8BRS') + + OTHERWISE && 'N' + lxValue = CTOBIN(.MemVar_Value, '8S') + + *IF .getDec() = 0 + * lxValue = ROUND(lxValue,0) + *ENDIF + + ENDCASE + ENDWITH + + RETURN lxValue + ENDFUNC + + + FUNCTION julianToDateTime(tnJulian as Double) + LOCAL lnInt, lnDec, ltValue, ldDate, lcTime ; + , lnSecs, lnMins, lnHours + + ltValue = {/:} + lnInt = INT(tnJulian) + lnDec = tnJulian - lnInt + ldDate = EVALUATE( '{^' + SYS(10, lnInt) + '}' ) + lnSecs = 24 * 60 * 60 * lnDec + lnHours = INT(lnSecs / 3600) + lnSecs = lnSecs - lnHours * 3600 + lnMins = INT(lnSecs / 60) + lnSecs = lnSecs - lnMins * 60 + ltValue = DATETIME( YEAR(ldDate), MONTH(ldDate), DAY(ldDate), lnHours, lnMins, lnSecs) + + RETURN ltValue + ENDFUNC + + + PROCEDURE toText as String + *--------------------------------------------------------------------------------------------------- + * PARÁMETROS: (v=Pasar por valor | @=Pasar por referencia) (!=Obligatorio | ?=Opcional) (IN/OUT) + *--------------------------------------------------------------------------------------------------- + LOCAL lcText, lcVarName, lcVarType, lnVarLen, lnVarDec, lcPrecision, lnLenName ; + , loField AS CL_MACRO_RECORD OF 'FOXBIN2PRG.PRG' + lnLenName = 16 + lcText = '' + lcPrecision = '' + lcVarName = '' + + WITH THIS AS CL_MEMVAR_RECORD OF 'FOXBIN2PRG.PRG' + lcVarType = UPPER(.MemVar_Type) + lnVarLen = .getLength() + lnVarDec = .getDec() + lcVarName = .getName() + + IF LEN(lcVarName) < lnLenName + lcVarName = PADR(lcVarName, lnLenName) + ENDIF + + IF lcVarType = 'N' + IF lnVarDec > 0 + lcPrecision = TEXTMERGE( '(<>,<>)' ) + ELSE + lcPrecision = TEXTMERGE( '(<>)' ) + ENDIF + ENDIF + + lcPrecision = PADR(lcPrecision, 10) + + IF lcVarType = 'A' + pnCols = .getCols() + pnRows = .getRows() + pnElement = 0 + + IF CTOBIN(.MemVar_Cols, '2RS') = 0 + * Array Unidimensional + TEXT TO lcText ADDITIVE TEXTMERGE NOSHOW FLAGS 1 PRETEXT 1+2 + <> <>(<<.getRows()>>) + ENDTEXT + ELSE + * Array Bidimensional + TEXT TO lcText ADDITIVE TEXTMERGE NOSHOW FLAGS 1 PRETEXT 1+2 + <> <>(<<.getRows()>>,<<.getCols()>>) + ENDTEXT + ENDIF + + ELSE + + IF .isArrayElement() + * Elemento de array + pnElement = pnElement + 1 + + IF pnCols = 0 + * Elemento de Array Unidimensional + TEXT TO lcText ADDITIVE TEXTMERGE NOSHOW FLAGS 1 PRETEXT 1+2 + <<>> (<>) <><> <<.getValue()>> + ENDTEXT + + ELSE + * Elemento de Array Bidimensional + TEXT TO lcText ADDITIVE TEXTMERGE NOSHOW FLAGS 1 PRETEXT 1+2 + <<>> (<>,<>) <><> <<.getValue()>> + ENDTEXT + + ENDIF + + ELSE + * Variable normal + TEXT TO lcText ADDITIVE TEXTMERGE NOSHOW FLAGS 1 PRETEXT 1+2 + <> <><> <<.getValue()>> + ENDTEXT + ENDIF + + ENDIF + + ENDWITH + + RETURN lcText + ENDPROC + + +ENDDEFINE + + +