diff --git a/FoxBin2PRGVersionFile.txt b/FoxBin2PRGVersionFile.txt index 7e20099..5dc3b10 100644 --- a/FoxBin2PRGVersionFile.txt +++ b/FoxBin2PRGVersionFile.txt @@ -2,8 +2,8 @@ Lparameters toUpdateInfo Local lcNote With toUpdateInfo - .VersionNumber = 'v1.19.47' - .VersionDate = Date(2016,06,08) + .VersionNumber = 'v1.19.48' + .VersionDate = Date(2016,07,11) .SourceFileUrl = 'http://vfpxrepository.com/dl/thorupdate/Projects/FoxBin2Prg/FoxBin2Prg.Zip' .Link = 'http://vfpx.codeplex.com/wikipage?title=FoxBin2PRG' @@ -11,12 +11,26 @@ With toUpdateInfo EndWith Text to lcNote NoShow -2-way conversor for Visual FoxPro 9 binary files intended to be used with SCM tools (Diff and Merge operations) or just for backup +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 Demo video using FoxBin2Prg with PlasticSCM: http://youtu.be/sE4wQ50Itqg Change History ------------------------------------------------------------- +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) diff --git a/README.md b/README.md new file mode 100644 index 0000000..057152f --- /dev/null +++ b/README.md @@ -0,0 +1,153 @@ +## FoxBin2Prg v1.19 - Binary/Text Conversor for Microsoft Visual FoxPro 9 + +### Fernando D. Bozzo + +Blog: http://fdbozzo.blogspot.com.es/ - Project info: https://vfpx.codeplex.com/wikipage?title=FoxBin2Prg + + Donate! + +Thank you for your support! +
+### ENGLISH/ESPAÑOL +
+
+### ENGLISH +
+ +### What is FOXBIN2PRG? +It is a program intended to be used with **SCM tools** (Source Code Managers, like VSS, CVS, SVN) and *DVCS tools* (like Git, Mercurial, Plastic, and others), or as **standalone** program for **Diff** (viewing differences) and **Merge** operations, that pretends to substitute **SccText/X**, **TwoFox** and others, and enhance their functionality, generating bidirectional PRG-Style versions that allow recreating the original binary file + +**Advantages:** + +* It generates "PRG" style programs (not compilable), for visual comparison +* It enables the change of the Text version as easy as modifying a PRG +* All the program code is in just one PRG, to simplify its maintainability +* With Text versions you can regenerate the original binaries, so it is useful as backup +* The extensions are configurable if you create the FOXBIN2PRG.CFG file +* Inheritance of CFG configuration files between directories +* Methods and properties of Text version are alphabetically sorted for easy comparison +* Can set "UseClassPerFile" setting to create individual files by class or DBC member +* Takes advantage of the API using foxbin2prg as an object +* It has compatibility with SccText/X at parameter level so can be used as substitute with SourceSafe +* Productivity: You can create a shortcut in the "SendTo" folder on your user Windows Profile, so you can "send" the selected file (pjx,pj2,etc) to Foxbin2prg.exe and make on-the-fly conversions +* Modify TX2 Prg-Style versions with MODIFY COMMAND (without compile) to see colored syntax, or even use the Document View to navigate the procedures +* Get back your SourceSafe projects (.pjx) from their .pjm file + + +Actually supports conversions between PJX,SCX,VCX,FRX,LBX,DBC,DBF and MNX files, for which it generates TEXT versions with extension PJ2,SC2,VC2,FR2,LB2,DC2,DB2 and MN2 that can be reconfigured to compatibilize with SourceSafe. + +__Example of FOXBIN2PRG.CFG configuration file if need to change extensions for using with VSS (SourceSafe)__ +``` +extension: SC2=SCA +extension: VC2=VCA +extension: PJ2=PJA +extension: MN2=MNA +extension: FR2=FRA +extension: LB2=LBA +extension: DB2=DBA +extension: DC2=DCA +``` + +### USE: +```dbase +DO FOXBIN2PRG.PRG WITH "\archivo.scx" ==> Generates the TEXT version sc2 extension +DO FOXBIN2PRG.PRG WITH "\archivo.sc2" ==> Regenerates the binary version with scx extension +``` + +### USEFUL SETUP: +You can create 3 shortcuts of FoxBin2Prg.exe and move them to "SendTo" folder on your Windows profile, so you can "send" the selected file (pjx,pj2,etc) to the selected option, and make on-the-fly conversions, then rename them as this (make sure you can see system file extensions): + + +Name | Right-click/Properties/destination | What you can do with this option +---------------------------- | ------------------------------------------- | -------------------------------- +FoxBin2Prg - Binary2Text.lnk | \foxbin2prg.exe "BIN2PRG-SHOWMSG" | Process directories or individual files +FoxBin2Prg - Text2Binary.lnk | \foxbin2prg.exe "PRG2BIN-SHOWMSG" | Process directories or individual files +FoxBin2Prg.lnk | \foxbin2prg.exe "INTERACTIVE-SHOWMSG" | Process individual files or directories asking what to convert + +In example: Select a file, right-click, SendTo -> FoxBin2Prg + + +### LOCALIZATION: +Is automatic starting at v1.19.38 (Languages: EN,ES,FR,DE) + + +### FINAL NOTE: +This program is Open Source and "libre", and I don't make any garanties that it fulfills your espectations or that it will be free of bugs, that I will try to fix if my obligations let me do it. + +

Project info and updates: https://vfpx.codeplex.com/wikipage?title=FoxBin2Prg

+ + +### LICENCE: +This work is licensed under the Creative Commons Attribution 4.0 International License. +To view a copy of this license, visit http://creativecommons.org/licenses/by/4.0/. + +
+
+### ESPAÑOL +
+ +### ¿Que es FOXBIN2PRG? +Es un programa pensado para ser utilizado con herramientas SCM (Administradores de Control de Código Fuente, como VSS, CVS, SVN) y herramientas DVCS (como Git, Mercurial, Plastic, and others), o como programa independiente, para hacer operaciones de Diff (ver diferencias) y Merge (mezclar cambios), que pretende sustituir a SccText/X y TwoFox y mejorar sus funcionalidades, generando versiones de texto estilo-PRG que permiten recrear el binario original. + +**Ventajas:** + +* Genera archivos estilo "PRG" (no compilables), para comparación visual +* Permite hacer cambios en la versión Texto tan fácil como modificar PRG +* Todo el código de programa está en un solo PRG, para simplificar su mantenimiento +* Con las versiones Texto puedes regenerar los binarios originales, así que es útil como backup +* Las extensiones usadas son configurables si se crea el archivo FOXBIN2PRG.CFG +* Los métodos y propiedades de la versión Texto son ordenados alfabéticamente para acilitar su comparación +* Puede usar el seteo "UseClassPerFile" para crear archivos individuales por clase o miembro de DBC +* Aproveche la API usando foxbin2prg como un objeto +* Tiene compatibilidad con el SccText/X a nivel de parámetros, así puede ser usado como sustituto con SourceSafe +* Productividad: Puedes crear un acceso directo en la carpeta "SendTo" de tu Perfil de Windows, así puedes "enviar" el archivo seleccionado (pjx,pj2,etc) a Foxbin2prg.exe y a los scripts vbs incluidos, y hacer conversiones al vuelo +* Modifique los archivos TX2 estilo-prg con MODIFY COMMAND (sin compilar) para ver la sintaxis coloreada, o incluso usar el Document View para navegar los procedimientos +* Recupere sus proyectos SourceSafe (.pjx) desde sus archivos .pjm + +Actualmente soporta las conversiones de archivos PJX,SCX,VCX,FRX,LBX,DBC,DBF y MNX para los que genera las versiones TEXTO con extensión PJ2,SC2,VC2,FR2,LB2,DC2,DB2 y MN2, que pueden reconfigurarse para compatibilizar con SourceSafe. + +__Ejemplo del archivo de configuración FOXBIN2PRG.CFG si se necesitan cambiar las extensiones para VSS (SourceSafe)__ +``` +extension: SC2=SCA +extension: VC2=VCA +extension: PJ2=PJA +extension: MN2=MNA +extension: FR2=FRA +extension: LB2=LBA +extension: DB2=DBA +extension: DC2=DCA +``` + +### USO: +``` +DO FOXBIN2PRG.PRG WITH "\archivo.scx" ==> Genera la versión TEXTO con extensión sc2 +DO FOXBIN2PRG.PRG WITH "\archivo.sc2" ==> Regenera la versión binaria con extensión scx +``` + +### CONFIGURACIÓN UTIL: +Se puede crear 3 accesos directos de FoxBin2Prg.exe y moverlos a la carpeta "SendTo" de su perfil de usuario Windows, para poder "enviar" el archivo elegido (pjx,pj2,etc) a la opción seleccionada, y así hacer conversiones al vuelo, luego puede renombrar y modificar esos accesos directos como sigue (asegúrese de que puede ver las extensiones del sistema): + + +Nombre | Click-Derecho/Propiedades/destino | Qué puede hacer con esta opción +---------------------------- | ------------------------------------------- | ------------------------------- +FoxBin2Prg - Binary2Text.lnk | \foxbin2prg.exe "BIN2PRG-SHOWMSG" | Procesar directorios o archivos individuales +FoxBin2Prg - Text2Binary.lnk | \foxbin2prg.exe "PRG2BIN-SHOWMSG" | Procesar directorios o archivos individuales +FoxBin2Prg.lnk | \foxbin2prg.exe "INTERACTIVE-SHOWMSG" | Procesar archivos individuales o directorios preguntando qué convertir + + +Por ejemplo: Seleccionar un archivo, click-derecho, Enviar A -> FoxBin2Prg + + +### LOCALIZACIÓN: +Es automática desde la v1.19.38 (Lenguajes: EN,ES,FR,DE) + + +### NOTA FINAL: +Este programa es Open Source y "libre", y como tal no ofrezco garantías de que cumpla con sus espectativas o de que está libre de fallos, que intentaré solucionar si me reporta y mis obligaciones me lo permiten. + +

Información del proyecto y actualizaciones: https://vfpx.codeplex.com/wikipage?title=FoxBin2Prg

+ + +### LICENCIA: +Esta obra está sujeta a la licencia Reconocimiento-CompartirIgual 4.0 Internacional de Creative Commons. Para ver una copia de esta licencia, visite http://creativecommons.org/licenses/by-sa/4.0/deed.es_ES. + diff --git a/README.txt b/README.txt deleted file mode 100644 index c2c7b1e..0000000 --- a/README.txt +++ /dev/null @@ -1,124 +0,0 @@ -13/12/2014 FOXBIN2PRG v1.19 FOR VISUAL FOXPRO 9 BINARIES Fernando D. Bozzo (fdbozzo@gmail.com) -Blog: http://fdbozzo.blogspot.com.es/ -Project info: https://vfpx.codeplex.com/wikipage?title=FoxBin2Prg - -ENGLISH/ESPAÑOL - - -ENGLISH -------------------------------------------------------------------------------------------- - -What is FOXBIN2PRG? -It is a program intended to be used with SCM tools (Source Code Managers), that pretends to sustitute -SCCTEXT and enhance it, generating bidirectional TEXT versions that permits to recreate the original -binary file. - -Advantages: -- It generates "PRG" style programas (no compilables), for visual comparison -- It enables the the change of the TEXT version as easy as modifying a PRG -- All the program code is in just one PRG, to simplify its copy and maintainability -- With TEXT versions you can regenerate the original binaries, so it is useful as backup -- The extensions are configurable if you create the FOXBIN2PRG.CFG file -- Methods and properties of TEXT version are alphabetically sorted for easy comparison -- It has compatibility with SCCTEXT at parameter level so can be used as sustitute with SourceSafe - -Actually supports conversions between PJX,SCX,VCX,FRX,LBX,DBC,DBF and MNX files, for which it generates -TEXT versions with extension PJ2,SC2,VC2,FR2,LB2,DC2,DB2 and MN2 that can be reconfigured to compatibilize -with SourceSafe. - -Structure of configuration file FOXBIN2PRG.CFG -extension: SC2=SCA -extension: VC2=VCA -extension: PJ2=PJA - -USE: -DO FOXBIN2PRG.PRG WITH "\archivo.scx" ==> Generates the TEXT version sc2 extension -DO FOXBIN2PRG.PRG WITH "\archivo.sc2" ==> Regenerates the binary version with scx extension - -USEFUL SETUP: -You can create 3 shortcuts of FoxBin2Prg.exe and move them to "SendTo" folder on your Windows profile, -so you can "send" the selected file (pjx,pj2,etc) to the selected option, and make on-the-fly conversions, -then rename them as this (make sure you can see system file extensions): - -Name------------------------ Right-click/Properties/destination----------- What you can do with this option--------- -FoxBin2Prg - Binary2Text.lnk \foxbin2prg.exe "BIN2PRG-SHOWMSG" Process directories or individual files -FoxBin2Prg - Text2Binary.lnk \foxbin2prg.exe "PRG2BIN-SHOWMSG" Process directories or individual files -FoxBin2Prg.lnk \foxbin2prg.exe "INTERACTIVE-SHOWMSG" Process individual files or directories asking what to convert - -In example: Select a file, right-click, SendTo -> FoxBin2Prg - - -LOCALIZATION: -Is automatic starting at v1.19.38 (Languages: EN,ES,FR,DE) - - -FINAL NOTE: -This program is Open Source and "libre", and I don't make any garanties that it fulfills your espectations -or that it will be free of bugs, that I will try to fix if my obligations let me do it. -Project info and updated: https://vfpx.codeplex.com/wikipage?title=FoxBin2Prg - - -LICENCE: -This work is licensed under the Creative Commons Attribution 4.0 International License. -To view a copy of this license, visit http://creativecommons.org/licenses/by/4.0/. - - - - -ESPAÑOL -------------------------------------------------------------------------------------------- - -¿Que es FOXBIN2PRG? -Es un programa pensado para ser usado con herramientas SCM (Source Code Managers) que pretende -sustituir a SCCTEXT y mejorarlo, generando versiones TEXTO bidireccionales que permiten volver -a generar el archivo binario original. - -Ventajas: -- Genera versiones tipo "PRG" (no compilables), para comparación visual -- Permite modificar la versión TEXTO tan fácilmente como si se modificara un PRG -- Todo el código del programa está en un solo PRG, para simplificar su copia y mantenimiento -- Con las versiones TEXTO se pueden volver a generar los binarios, lo que sirve como backup -- Las extensiones son configurables si se crea un archivo FOXBIN2PRG.CFG -- Los métodos y propiedades de la versión TEXTO se ordenan alfabéticamente para facilitar su comparación -- Tiene compatibilidad con SCCTEXT a nivel de parámetros para usarlo como sustituto en SourceSafe - -Actualmente soporta las conversiones de archivos PJX,SCX,VCX,FRX,LBX,DBC,DBF y MNX para los que genera las -versiones TEXTO con extensión PJ2,SC2,VC2,FR2,LB2,DC2,DB2 y MN2, que pueden reconfigurarse para compatibilizar -con SourceSafe. - -Estructura del archivo de configuración FOXBIN2PRG.CFG -extension: SC2=SCA -extension: VC2=VCA -extension: PJ2=PJA - -USO: -DO FOXBIN2PRG.PRG WITH "\archivo.scx" ==> Genera la versión TEXTO con extensión sc2 -DO FOXBIN2PRG.PRG WITH "\archivo.sc2" ==> Regenera la versión binaria con extensión scx - -CONFIGURACIÓN UTIL: -Se puede crear 3 accesos directos de FoxBin2Prg.exe y moverlos a la carpeta "SendTo" de su perfil de usuario Windows, -para poder "enviar" el archivo elegido (pjx,pj2,etc) a la opción seleccionada, y así hacer conversiones al vuelo, -luego puede renombrar y modificar esos accesos directos como sigue (asegúrese de que puede ver las extensiones del sistema): - -Nombre------------------------ Click-Derecho/Propiedades/destino------------ Qué puede hacer con esta opción---------- -FoxBin2Prg - Binary2Text.lnk \foxbin2prg.exe "BIN2PRG-SHOWMSG" Procesar directorios o archivos individuales -FoxBin2Prg - Text2Binary.lnk \foxbin2prg.exe "PRG2BIN-SHOWMSG" Procesar directorios o archivos individuales -FoxBin2Prg.lnk \foxbin2prg.exe "INTERACTIVE-SHOWMSG" Procesar archivos individuales o directorios preguntando qué convertir - -Por ejemplo: Seleccionar un archivo, click-derecho, Enviar A -> FoxBin2Prg - - -LOCALIZACIÓN: -Es automática desde la v1.19.38 (Lenguajes: EN,ES,FR,DE) - - -NOTA FINAL: -Este programa es Open Source y "libre", y como tal no ofrezco garantías de que cumpla con sus espectativas -o de que está libre de fallos, que intentaré solucionar si me reporta y mis obligaciones me lo permiten. -Información del proyecto y actualizaciones: https://vfpx.codeplex.com/wikipage?title=FoxBin2Prg_es - - -LICENCIA: -Esta obra está sujeta a la licencia Reconocimiento-CompartirIgual 4.0 Internacional de Creative Commons. -Para ver una copia de esta licencia, visite http://creativecommons.org/licenses/by-sa/4.0/deed.es_ES. - - - diff --git a/foxbin2prg.exe b/foxbin2prg.exe index 4f1db04..4adf091 100644 Binary files a/foxbin2prg.exe and b/foxbin2prg.exe differ diff --git a/foxbin2prg.pj2 b/foxbin2prg.pj2 index 190b5c3..41380e2 100644 --- a/foxbin2prg.pj2 +++ b/foxbin2prg.pj2 @@ -26,7 +26,7 @@ _LegalTrademark = "Creative Commons 4: Reconocimiento - CompartirIgual (by-sa): _ProductName = "FOXBIN2PRG" _MajorVer = "1" _MinorVer = "19" -_Revision = "47" +_Revision = "48" _LanguageID = "1034" _AutoIncrement = "0" * diff --git a/foxbin2prg.pjt b/foxbin2prg.pjt index fec17fc..228074e 100644 Binary files a/foxbin2prg.pjt and b/foxbin2prg.pjt differ diff --git a/foxbin2prg.pjx b/foxbin2prg.pjx index 7254432..5c8ba18 100644 Binary files a/foxbin2prg.pjx and b/foxbin2prg.pjx differ diff --git a/foxbin2prg.prg b/foxbin2prg.prg index 08d52eb..5f2280a 100644 --- a/foxbin2prg.prg +++ b/foxbin2prg.prg @@ -184,6 +184,14 @@ * 04/02/2016 FDBOZZO v1.19.46 Bug Fix: Cuando se procesa un archivo en el directorio raiz, se genera un error 2062 (Aurélien Dellieux) * 10/02/2016 FDBOZZO v1.19.47 Bug Fix: Cuando se indica como nombre de archivo "*" y como tipo "*", se regeneran automáticamente todos los archivos binarios desde los archivos de texto (Alejandro Sosa) * 25/05/2016 FDBOZZO v1.19.47 Mejora DBF-Data: Permitir importar datos de los DB2 a los DBF con el nuevo valor DBF_Conversion_Support=8. Todos los tipos de datos excepto General. (Walter Nicholls) +* 24/06/2016 AndyGK63 v1.19.48 Bug Fix: Error en variable usada en una de las traducciones al Alemán (Andy Kasper) +* 24/06/2016 AndyGK63 v1.19.48 Bug Fix: Posición de menú BEFORE siempre cambiada a AFTER al convertir (Andy Kasper) +* 30/06/2016 FDBOZZO v1.19.48 Bug Fix: No se respetan algunas restricciones de conversión para DBFs cuando se usan CFGs particulares por tabla (Nathan Brown) +* 09/07/2016 FDBOZZO v1.19.48 Bug Fix db2: Cuando se lee un memo multilínea de un db2 con datos antiguo, se produce un error de índice fuera de rango +* 10/07/2016 FDBOZZO v1.19.48 Bug Fix db2: Cuando se usa ExcludeDBFAutoincNextval: 1 en FoxBin2Prg.cfg y a la vez la importación de datos de una tabla con campo AutoInc, se produce el error "Error 2088, Field is read-only" (Nathan Brown) +* 10/07/2016 FDBOZZO v1.19.48 Fix defecto db2: Cuando se arregló el bug del memo multi-línea, se introdujo un nuevo defecto por el cual un memo de linea-simple se decodifica mal (Nathan Brown) +* 11/07/2016 FDBOZZO v1.19.48 Bug Fix pj2: Cuando se regenera el binario de un PJ2 con archivos en una ruta con paréntesis y espacios, se genera un error "Error 36, Command contains unrecognized phrase/keyword" (Nathan Brown) +* 11/07/2016 FDBOZZO v1.19.48 Bug Fix frx: Los ControlSource de objetos OLE que contienen comillas se generan mal (Nathan Brown) * * *--------------------------------------------------------------------------------------------------- @@ -285,6 +293,13 @@ * 24/11/2015 edyshor Mejora dbf v1.19.45: Nuevo parámetro ExcludeDBFAutoincNextval para evitar diferencias por este dato (Agregado en v1.19.46 Preview-9) * 01/02/2016 Aurélien Dellieux Reporte bug v1.19.45: Cuando se procesa un archivo en el directorio raiz, se genera un error 2062 (Arreglado en v1.19.46 Preview-10) * 10/02/2016 Alejandro Sosa Reporte bug v1.19.46: Cuando se indica como nombre de archivo "*" y como tipo "*", se regeneran automáticamente todos los archivos binarios desde los archivos de texto (Arreglado en v1.19.47 Preview-1) +* 24/06/2016 Andy Kasper Reporte bug v1.19.47: Error en variable usada en una de las traducciones al Alemán (Arreglado en v1.19.48 Preview-1) +* 24/06/2016 Andy Kasper Reporte bug v1.19.47: Posición de menú BEFORE siempre cambiada a AFTER al convertir (Arreglado en v1.19.48 Preview-1) +* 30/06/2016 Nathan Brown Reporte bug v1.19.47: No se respetan algunas restricciones de conversión para DBFs cuando se usan CFGs particulares por tabla (Arreglado en v1.19.48 Preview-2) +* 30/06/2016 Nathan Brown Reporte bug v1.19.47: Cuando se usa ExcludeDBFAutoincNextval: 1 en FoxBin2Prg.cfg y a la vez la importación de datos de una tabla con campo AutoInc, se produce el error "Error 2088, Field is read-only" (Arreglado en v1.19.48 Preview-3) +* 10/07/2016 Nathan Brown Reporte defecto v1.19.48-Preview3: Cuando se arregló el bug del memo multi-línea, se introdujo un nuevo defecto por el cual un memo de linea-simple se decodifica mal (Arreglado en v1.19.48 Preview-4) +* 11/07/2016 Nathan Brown Reporte bug pj2 v1.19.48-Preview4: Cuando se regenera el binario de un PJ2 con archivos en una ruta con paréntesis y espacios, se genera un error "Error 36, Command contains unrecognized phrase/keyword" (Arreglado en v1.19.48 Preview-5) +* 11/07/2016 Nathan Brown Reporte bug frx v1.19.48-Preview5: Los ControlSource de objetos OLE que contienen comillas se generan mal (Arreglado en v1.19.48 Preview-6) * * *--------------------------------------------------------------------------------------------------- @@ -2481,7 +2496,7 @@ 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 == 'DBF', .DBF_Conversion_Support > 0 OR NOT ISNULL(loDBF_CFG) ; + , 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. ) ENDWITH && THIS @@ -2521,7 +2536,9 @@ 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_DB2, INLIST(.DBF_Conversion_Support, 2, 8) OR NOT ISNULL(loDBF_CFG) AND loDBF_CFG.DBF_Conversion_Support = 8 ; + , 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))) ; , lcExt == .c_DC2, .DBC_Conversion_Support = 2 ; , .F. ) ENDWITH && THIS @@ -2624,6 +2641,7 @@ DEFINE CLASS c_foxbin2prg AS Session , loLang AS CL_LANG OF 'FOXBIN2PRG.PRG' ; , loFrm_Interactive AS frm_interactive OF 'FOXBIN2PRG.PRG' ; , loFrm_Main AS frm_main OF 'FOXBIN2PRG.PRG' ; + , loDBF_CFG AS CL_DBF_CFG OF 'FOXBIN2PRG.PRG' ; , loWSH AS WScript.Shell WITH THIS AS c_foxbin2prg OF 'FOXBIN2PRG.PRG' @@ -2911,7 +2929,7 @@ DEFINE CLASS c_foxbin2prg AS Session .doWriteErrorLog( @toEx ) ENDCASE ENDCASE - ENDFOR + ENDFOR && I = 1 TO lnFileCount IF llError .l_Error = .T. @@ -2953,7 +2971,7 @@ DEFINE CLASS c_foxbin2prg AS Session toModulo = NULL lcFile = laFiles(I) - IF NOT .hasSupport_Bin2Prg( JUSTEXT(lcFile) ) OR NOT ADIR(laDirInfo, lcFile) > 0 THEN + IF NOT .hasSupport_Bin2Prg( lcFile ) OR NOT ADIR(laDirInfo, lcFile) > 0 THEN LOOP ENDIF @@ -2968,12 +2986,12 @@ DEFINE CLASS c_foxbin2prg AS Session CASE lnCodError > 0 .doWriteErrorLog( @toEx ) ENDCASE - ENDFOR + ENDFOR && I = 1 TO lnFileCount .updateProgressbar( loLang.C_END_OF_PROCESS_LOC, lnFileCount, lnFileCount, 0 ) EXIT - CASE NOT .hasSupport_Bin2Prg( JUSTEXT(tc_InputFile) ) OR NOT ADIR(laDirInfo, tc_InputFile) > 0 + CASE NOT .hasSupport_Bin2Prg( tc_InputFile ) OR NOT ADIR(laDirInfo, tc_InputFile) > 0 .writeLog( '> InputFile ' + loLang.C_IS_UNSUPPORTED_LOC ) .writeLog() EXIT @@ -3014,7 +3032,7 @@ DEFINE CLASS c_foxbin2prg AS Session toModulo = NULL lcFile = laFiles(I) - IF NOT .hasSupport_Prg2Bin( JUSTEXT(lcFile) ) OR NOT ADIR(laDirInfo, lcFile) > 0 THEN + IF NOT .hasSupport_Prg2Bin( lcFile ) OR NOT ADIR(laDirInfo, lcFile) > 0 THEN LOOP ENDIF @@ -3029,12 +3047,12 @@ DEFINE CLASS c_foxbin2prg AS Session CASE lnCodError > 0 .doWriteErrorLog( @toEx ) ENDCASE - ENDFOR + ENDFOR && I = 1 TO lnFileCount .updateProgressbar( loLang.C_END_OF_PROCESS_LOC, lnFileCount, lnFileCount, 0 ) EXIT - CASE NOT .hasSupport_Prg2Bin( JUSTEXT(tc_InputFile) ) OR NOT ADIR(laDirInfo, tc_InputFile) > 0 + CASE NOT .hasSupport_Prg2Bin( tc_InputFile ) OR NOT ADIR(laDirInfo, tc_InputFile) > 0 .writeLog( '> InputFile ' + loLang.C_IS_UNSUPPORTED_LOC ) .writeLog() EXIT @@ -3249,7 +3267,7 @@ DEFINE CLASS c_foxbin2prg AS Session ENDIF SET NOTIFY &lc_OldSetNotify. - STORE NULL TO loFSO, loWSH + STORE NULL TO loFSO, loWSH, loDBF_CFG RELEASE I, lcPath, lcFileSpec, lcFile, laFiles, lnFileCount, lcErrorInfo, lcErrorFile, loEx, loFSO ENDTRY @@ -3537,7 +3555,8 @@ DEFINE CLASS c_foxbin2prg AS Session , ltFilestamp, lcExtA, lcExtB, laEvents(1,1), lcForceAttribs, lnIDInputFile ; , loLang as CL_LANG OF 'FOXBIN2PRG.PRG' ; , loConversor as c_conversor_base OF 'FOXBIN2PRG.PRG' ; - , loFSO AS Scripting.FileSystemObject + , loFSO AS Scripting.FileSystemObject ; + , loDBF_CFG AS CL_DBF_CFG OF 'FOXBIN2PRG.PRG' lnCodError = 0 WITH THIS AS c_foxbin2prg OF 'FOXBIN2PRG.PRG' @@ -3678,6 +3697,7 @@ DEFINE CLASS c_foxbin2prg AS Session .changeFileAttribute( FORCEEXT( .c_InputFile, .c_LB2 ), lcForceAttribs ) CASE lcExtension = 'DBF' + lnFileCount = .get_DBF_Configuration( FORCEEXT(.c_InputFile, 'DBF'), @loDBF_CFG ) IF NOT INLIST(.DBF_Conversion_Support, 1, 2, 4, 8) ERROR (TEXTMERGE(loLang.C_FILE_NAME_IS_NOT_SUPPORTED_LOC)) ENDIF @@ -11433,7 +11453,7 @@ DEFINE CLASS c_conversor_prg_a_pjx AS c_conversor_prg_a_bin EXIT OTHERWISE - lcFile = LOWER( ALLTRIM( STRTRAN( CHRTRAN( NORMALIZE( STREXTRACT( tcLine, ".ITEM(", ")", 1, 1 ) ), ["], [] ), 'lcCurDir+', '', 1, 1, 1) ) ) + lcFile = LOWER( ALLTRIM( STRTRAN( CHRTRAN( NORMALIZE( STREXTRACT( tcLine, ".ITEM(", ").Type", 1, 1 ) ), ["], [] ), 'lcCurDir+', '', 1, 1, 1) ) ) lcType = ALLTRIM( CHRTRAN( STREXTRACT( tcLine, "=", "", 1, 2 ), ['], [] ) ) loFile = toProject( lcFile ) loFile._Type = lcType @@ -11885,6 +11905,10 @@ DEFINE CLASS c_conversor_prg_a_frx AS c_conversor_prg_a_bin lnLenPropName = LEN(laProps(X)) lnPos2 = AT( '"', SUBSTR( tcLine, lnPos + lnLenPropName + 2 ) ) lcValue = SUBSTR( tcLine, lnPos + lnLenPropName + 2, lnPos2 - 1 ) + + IF laProps(X) == ' NAME' AND NOT EMPTY(lcValue) + lcValue = THIS.denormalizeXMLValue(lcValue) + ENDIF ADDPROPERTY( toReg, laProps(X), lcValue ) ENDIF @@ -12038,12 +12062,40 @@ DEFINE CLASS c_conversor_prg_a_dbf AS c_conversor_prg_a_bin TRY LOCAL lnCodError, loEx AS EXCEPTION, laCodeLines(1), lnCodeLines, laLineasExclusion(1), lnBloquesExclusion, I ; , lnIDInputFile, lnFileCount, laConfig(1), lcConfigItem, lc_DBF_Conversion_Support, lcAlterTable ; + , loLang as CL_LANG OF 'FOXBIN2PRG.PRG' ; , lcTempDBC, llImportData ; , loDBF_CFG AS CL_DBF_CFG OF 'FOXBIN2PRG.PRG' STORE 0 TO lnCodError, lnCodeLines WITH THIS AS c_conversor_prg_a_dbf OF 'FOXBIN2PRG.PRG' lnIDInputFile = toFoxBin2Prg.n_ProcessedFiles + loLang = _SCREEN.o_FoxBin2Prg_Lang + + *-- If table CFG exists, use it for DBF-specific configuration. FDBOZZO. 2014/06/15 + lnFileCount = toFoxBin2Prg.get_DBF_Configuration( FORCEEXT(.c_InputFile, 'DBF'), @loDBF_CFG, .T. ) + lcTempDBC = FORCEPATH( '_FB2P', JUSTPATH(.c_OutputFile) ) + + DO CASE + CASE lnFileCount = 1 AND loDBF_CFG.DBF_Conversion_Support > 0 AND NOT INLIST(loDBF_CFG.DBF_Conversion_Support, 2, 8) + WITH toFoxBin2Prg + ERROR (TEXTMERGE(loLang.C_FILE_NAME_IS_NOT_SUPPORTED_LOC)) + ENDWITH + + CASE lnFileCount = 1 AND loDBF_CFG.DBF_Conversion_Support > 0 && Implica 2 u 8 + llImportData = (loDBF_CFG.DBF_Conversion_Support = 8) + + CASE toFoxBin2Prg.DBF_Conversion_Support = 8 && TXT2BIN (DATA IMPORT) + llImportData = .T. + + CASE toFoxBin2Prg.DBF_Conversion_Support <> 2 + WITH toFoxBin2Prg + ERROR (TEXTMERGE(loLang.C_FILE_NAME_IS_NOT_SUPPORTED_LOC)) + ENDWITH + + OTHERWISE + * Asume llImportData = .F. + + ENDCASE IF NOT toFoxBin2Prg.l_ProcessFiles THEN *-- addProcessedFile( tcFile, tcInOutType, tcProcessed, tcHasErrors, tcSupported, tcExpanded ) @@ -12054,17 +12106,6 @@ DEFINE CLASS c_conversor_prg_a_dbf AS c_conversor_prg_a_bin EXIT && Si se indicó no procesar, se sale aquí. (Modo de simulación) ENDIF - *-- If table CFG exists, use it for DBF-specific configuration. FDBOZZO. 2014/06/15 - lnFileCount = toFoxBin2Prg.get_DBF_Configuration( FORCEEXT(.c_InputFile, 'DBF'), @loDBF_CFG, .T. ) - lcTempDBC = FORCEPATH( '_FB2P', JUSTPATH(.c_OutputFile) ) - - DO CASE - CASE toFoxBin2Prg.DBF_Conversion_Support = 8 && TXT2BIN (DATA IMPORT) - llImportData = .T. - CASE INLIST(toFoxBin2Prg.DBF_Conversion_Support, 1, 2, 4) AND lnFileCount = 1 - llImportData = (loDBF_CFG.DBF_Conversion_Support = 8) - ENDCASE - C_FB2PRG_CODE = FILETOSTR( .c_InputFile ) lnCodeLines = ALINES( laCodeLines, C_FB2PRG_CODE ) @@ -12222,7 +12263,7 @@ DEFINE CLASS c_conversor_prg_a_dbf AS c_conversor_prg_a_bin IF toFoxBin2Prg.n_ExcludeDBFAutoincNextval = 1 *-- If AutoIncNextVal is excluded from text, then assign 1 for allowing regeneration *-- of DBF with this field. - lcFieldDef = lcFieldDef + ' AUTOINC NEXTVAL 1 STEP ' + loField._AutoInc_Step + tcAlterTable = tcAlterTable + ' ;' + CR_LF + ' ALTER ' + loField._Name + ' ' + loField._Type + ' AUTOINC NEXTVAL 1 STEP ' + loField._AutoInc_Step ELSE tcAlterTable = tcAlterTable + ' ;' + CR_LF + ' ALTER ' + loField._Name + ' ' + loField._Type + ' AUTOINC NEXTVAL ' + loField._AutoInc_NextVal + ' STEP ' + loField._AutoInc_Step ENDIF @@ -14688,7 +14729,7 @@ DEFINE CLASS c_conversor_bin_a_prg AS c_conversor_base ENDTEXT TEXT TO C_FB2PRG_CODE ADDITIVE TEXTMERGE NOSHOW FLAGS 1 PRETEXT 1+2 - objcode="<>" name="<>" <<>> + objcode="<>" name="<>" <<>> ENDTEXT TEXT TO C_FB2PRG_CODE ADDITIVE TEXTMERGE NOSHOW FLAGS 1 PRETEXT 1+2 @@ -23104,10 +23145,20 @@ DEFINE CLASS CL_DBF_TABLE AS CL_CUS_BASE lnFileCount = toFoxBin2Prg.get_DBF_Configuration( FORCEEXT(tc_InputFile, 'DBF'), @loDBF_CFG, .T. ) DO CASE - CASE INLIST(toFoxBin2Prg.DBF_Conversion_Support, 4, 8) ; && BIN2TXT (DATA EXPORT FOR DIFF) - OR INLIST(toFoxBin2Prg.DBF_Conversion_Support, 1, 2) AND lnFileCount = 1 - *-- ASUNCIÓN: Si hay un archivo DBF.CFG, es porque se quiere exportar datos, si no, no debe crearse el DBF.CFG + CASE lnFileCount = 1 AND INLIST(loDBF_CFG.DBF_Conversion_Support, 4, 8) + *-- Si hay un archivo DBF.CFG, manda sobre la configuración general llExportData = .T. + + CASE lnFileCount = 1 AND loDBF_CFG.DBF_Conversion_Support > 0 + *-- Si hay un archivo DBF.CFG, manda sobre la configuración general + * Asume llExportData=.F. + + CASE INLIST(toFoxBin2Prg.DBF_Conversion_Support, 4, 8) && BIN2TXT (DATA EXPORT FOR DIFF) + llExportData = .T. + + OTHERWISE + * Asume llExportData=.F. + ENDCASE IF llExportData THEN @@ -23938,7 +23989,7 @@ DEFINE CLASS CL_DBF_RECORD AS CL_CUS_BASE #ENDIF TRY - LOCAL llBloqueEncontrado, lcFieldName, lcValue, luValue, loEx AS EXCEPTION ; + LOCAL llBloqueEncontrado, lcFieldName, lcValue, luValue, llOneLineOnly, loEx AS EXCEPTION ; , loField as CL_DBF_FIELD OF 'FOXBIN2PRG.PRG' STORE '' TO lcFieldName, lcValue @@ -23959,12 +24010,13 @@ DEFINE CLASS CL_DBF_RECORD AS CL_CUS_BASE OTHERWISE && Campo de RECORD *-- Estructura a reconocer: * VALOR - lcFieldName = STREXTRACT( tcLine, '<', '>', 1, 0 ) - lcValue = STREXTRACT( tcLine, '<' + lcFieldName + '>', '', 1, 0+2 ) - loField = toFields.Item(lcFieldName) + lcFieldName = STREXTRACT( tcLine, '<', '>', 1, 0 ) + lcValue = STREXTRACT( tcLine, '<' + lcFieldName + '>', '', 1, 0+2 ) + loField = toFields.Item(lcFieldName) + llOneLineOnly = ('' $ tcLine) - lcFieldType = loField._Type - llNoCPTran = CAST( loField._NoCPTran as Logical) + lcFieldType = loField._Type + llNoCPTran = CAST( loField._NoCPTran as Logical) DO CASE CASE lcFieldType == 'L' && Logical (Boolean) @@ -23992,18 +24044,22 @@ DEFINE CLASS CL_DBF_RECORD AS CL_CUS_BASE *-- If NoCPTran, then must encode in b64binary luValue = STRCONV(lcValue,14) ELSE - * Si el memo es multi-línea, leer hasta encontrar el final ']]>' del CDATA. - luValue = '' - DO WHILE NOT EMPTY(lcValue) - IF ']]>' $ tcLine THEN - luValue = .Decode(lcValue, .T.) - EXIT - ELSE - I = I + 1 - .set_Line( @tcLine, @taCodeLines, I ) - lcValue = lcValue + CR_LF + tcLine - ENDIF - ENDDO + IF llOneLineOnly AND ATC('' del CDATA. + luValue = '' + DO WHILE NOT EMPTY(lcValue) + IF ']]>' $ tcLine OR '' $ tcLine THEN + luValue = .Decode(lcValue, .T.) + EXIT + ELSE + I = I + 1 + .set_Line( @tcLine, @taCodeLines, I ) + lcValue = lcValue + CR_LF + tcLine + ENDIF + ENDDO + ENDIF ENDIF CASE lcFieldType == 'D' && Date @@ -24930,7 +24986,7 @@ DEFINE CLASS CL_MENU AS CL_MENU_COL_BASE CASE toConversor.c_MenuLocation == 'APPEND' loReg.Location = C_MENULOCATION_APPEND OTHERWISE - IF LEFT(toConversor.c_MenuLocation,7) == 'BEFORE' + IF LEFT(toConversor.c_MenuLocation,6) == 'BEFORE' loReg.Location = C_MENULOCATION_BEFORE ELSE loReg.Location = C_MENULOCATION_AFTER @@ -27792,7 +27848,7 @@ DEFINE CLASS CL_LANG AS Custom .C_END_OF_PROCESS_LOC = "Ende desr Prozesses" .C_ERROR_LOC = "FEHLER" .C_ERRORS_FOUND_IN_FILE_LOC = "FEHLER IN FILE GEFUNDEN" - .C_EXTENSION_RECONFIGURATION_LOC = "Nneukonfiguration der Erweiterungen:" &&wir wollen es mal nicht übertreiben, mit den zusammengesetzten Substantiven + .C_EXTENSION_RECONFIGURATION_LOC = "Neukonfiguration der Erweiterungen:" &&wir wollen es mal nicht übertreiben, mit den zusammengesetzten Substantiven .C_EXTERNAL_CLASS_COUNT_DOES_NOT_MATCH_FOUND_CLASSES_LOC = "Die Anzahl externee Klassen (<< toModulo._ExternalClasses_Count >>) entspricht nicht der der gefunden Klassen (<< toModulo._Clases_Count >>), Datei: [<< toFoxBin2Prg.c_InputFile >>]" .C_EXTERNAL_CLASS_NAME_WAS_NOT_FOUND_LOC = "Keine externe Klasse gefunden" .C_EXTERNAL_MEMBER_NAME_WAS_NOT_FOUND_LOC = "Externe Mitglied wurde nicht gefunden" @@ -27845,7 +27901,7 @@ DEFINE CLASS CL_LANG AS Custom .C_OPTION_LOC = "Option" .C_OUTER_CLASS_DOES_NOT_MATCH_INNER_CLASSES_LOC = "Die äußere Klasse nicht die innere Klassifizierung anzeigen lassen" .C_OUTER_MEMBER_DOES_NOT_MATCH_INNER_MEMBERS_LOC = "Das äußere Element nicht den inneren Elementen entsprechen" - .C_OUTPUT_FILE_IS_NOT_OVERWRITEN_LOC = "Optimierung: Ausgabedatei [<>] wurde nicht überschrieben, da sie dieselbe ist wie die neu generierte." + .C_OUTPUT_FILE_IS_NOT_OVERWRITEN_LOC = "Optimierung: Ausgabedatei [<>] wurde nicht überschrieben, da sie dieselbe ist wie die neu generierte." .C_OUTPUTFILE_TIMESTAMP_EQUAL_THAN_INPUTFILE_TIMESTAMP_LOC = "Optimierung: Ausgabedatei [<>] wurde nicht verlängert, weil seine Zeitmarke ist die gleiche wie die Quelldatei." .C_OUTPUTFILE_TIMESTAMP_NEWER_THAN_INPUTFILE_TIMESTAMP_LOC = "Optimierung: Ausgabedatei [<>] wurde nicht erneuert, da sie neuer ist als die Ursprungsdatei." .C_PRESS_ESC_TO_CANCEL = "Drücken Sie Esc für Abbrechen" @@ -27999,5 +28055,5 @@ DEFINE CLASS CL_DBF_CFG AS CUSTOM *-- Configuration class. By default asumes master value, except when overriding one. DBF_Conversion_Order = '' DBF_Conversion_Condition = '' - DBF_Conversion_Support = 0 + DBF_Conversion_Support = NULL ENDDEFINE