Changeset: 139 v1.19.4

- Nuevo parámetro Recompile para forzar la recompilación. Ahora por defecto el binario no se recompila para ganar velocidad y evitar errores. Debe recompilar manualmente.
- DBC: Agregado soporte para comentarios multilínea (propiedad Comment)
- Agregada barra de progreso a los scripts de conversión batch VBS
This commit is contained in:
fernando
2014-01-22 14:44:13 +01:00
parent a57790bb56
commit ae70d7b3f2
6 changed files with 288 additions and 134 deletions

View File

@@ -13,8 +13,8 @@
'--------------------------------------------------------------------------------------------------- '---------------------------------------------------------------------------------------------------
Const ForReading = 1 Const ForReading = 1
Dim WSHShell, FileSystemObject Dim WSHShell, FileSystemObject
Dim oVFP9, nExitCode, cEXETool, cCMD, nDebug, cConvertType, aExtensions(8), foxbin2prg_cfg Dim oVFP9, nExitCode, cEXETool, cCMD, nDebug, cConvertType, aExtensions(8), foxbin2prg_cfg, aFiles(), nFile_Count
Dim i, x, str_cfg, aConf, cErrMsg, cFlagGenerateLog, cFlagDontShowErrMsg, cFlagJustShowCall Dim i, x, str_cfg, aConf, cErrMsg, cFlagGenerateLog, cFlagDontShowErrMsg, cFlagJustShowCall, cFlagRecompile
Set WSHShell = WScript.CreateObject("WScript.Shell") Set WSHShell = WScript.CreateObject("WScript.Shell")
Set FileSystemObject = WScript.CreateObject("Scripting.FileSystemObject") Set FileSystemObject = WScript.CreateObject("Scripting.FileSystemObject")
Set oVFP9 = CreateObject("VisualFoxPro.Application.9") Set oVFP9 = CreateObject("VisualFoxPro.Application.9")
@@ -22,7 +22,7 @@ foxbin2prg_cfg = Replace(WScript.ScriptFullName, WScript.ScriptName, "foxbin2prg
nExitCode = 0 nExitCode = 0
cConvertType = "BIN2PRG" '<<< This is the only difference between the 2 scripts cConvertType = "BIN2PRG" '<<< This is the only difference between the 2 scripts
'--------------------------------------------------------------------------------------------------- '---------------------------------------------------------------------------------------------------
nDebug = 13 'Cumulative Flags: 0=OFF, 1=Create FoxBin2prg LOG, 2=Only show script calls, 4=Don't show FoxBin2prg error modal messages, 8=Show end of process message nDebug = 1+0+4+0 'Cumulative Flags: 0=OFF, 1=Create FoxBin2prg LOG, 2=Only show script calls, 4=Don't show FoxBin2prg error modal messages, 8=Show end of process message
'--------------------------------------------------------------------------------------------------- '---------------------------------------------------------------------------------------------------
If cConvertType = "BIN2PRG" Then If cConvertType = "BIN2PRG" Then
@@ -90,11 +90,59 @@ If WScript.Arguments.Count = 0 Then
MsgBox cErrMsg, 64, "No parameters - Debug Status" MsgBox cErrMsg, 64, "No parameters - Debug Status"
Else Else
cEXETool = Replace(WScript.ScriptFullName, WScript.ScriptName, "foxbin2prg.exe") cEXETool = Replace(WScript.ScriptFullName, WScript.ScriptName, "foxbin2prg.exe")
nFile_Count = 0
oVFP9.DoCmd( "SET PROCEDURE TO '" & cEXETool & "'" )
oVFP9.DoCmd( "PUBLIC oFoxBin2prg" )
oVFP9.DoCmd( "oFoxBin2prg = CREATEOBJECT('c_foxbin2prg')" )
oVFP9.DoCmd( "oFoxBin2prg.cargar_frm_avance()" )
For i = 0 To WScript.Arguments.Count-1 For i = 0 To WScript.Arguments.Count-1
scanDirs( WScript.Arguments(i) ) scanDirs( WScript.Arguments(i) )
Next Next
cFlagGenerateLog = "'0'"
cFlagDontShowErrMsg = "'0'"
cFlagShowCall = "'0'"
cFlagRecompile = "'0'"
If GetBit(nDebug, 1) Then
cFlagGenerateLog = "'1'"
End If
If GetBit(nDebug, 2) Then
cFlagJustShowCall = "1"
End If
If GetBit(nDebug, 3) Then
cFlagDontShowErrMsg = "'1'"
End If
oVFP9.DoCmd( "oFoxBin2prg.o_Frm_Avance.nMAX_VALUE = " & nFile_Count )
oVFP9.DoCmd( "oFoxBin2prg.o_Frm_Avance.nVALUE = " & 0 )
oVFP9.DoCmd( "oFoxBin2prg.o_Frm_Avance.AlwaysOnTop = .T." )
oVFP9.DoCmd( "oFoxBin2prg.o_Frm_Avance.SHOW()" )
For i = 1 To nFile_Count
oVFP9.DoCmd( "oFoxBin2prg.o_Frm_Avance.lbl_TAREA.CAPTION = 'Procesando " & aFiles(i) & "...'" )
oVFP9.DoCmd( "oFoxBin2prg.o_Frm_Avance.nVALUE = " & i )
If nDebug = 0 Or nDebug = 2 Then
cCMD = "oFoxBin2prg.ejecutar( '" & aFiles(i) & "' )"
Else
cCMD = "oFoxBin2prg.ejecutar( '" & aFiles(i) & "','0','0','0'," _
& cFlagDontShowErrMsg & "," & cFlagGenerateLog & ",'1','','',.F.,''," & cFlagRecompile & " )"
End If
If cFlagJustShowCall = "1" Then
MsgBox cCMD, 64, "PARAMETROS ENVIADOS"
Else
oVFP9.DoCmd( cCMD )
nExitCode = oVFP9.Eval("_SCREEN.ExitCode")
End If
Next
oVFP9.DoCmd( "oFoxBin2prg.o_Frm_Avance.HIDE()" )
oVFP9.DoCmd( "oFoxBin2prg.o_Frm_Avance = NULL" )
oVFP9.DoCmd( "oFoxBin2prg = NULL" )
If GetBit(nDebug, 4) Then If GetBit(nDebug, 4) Then
MsgBox "Fin del Proceso!", 64, WScript.ScriptName MsgBox "Fin del Proceso!", 64, WScript.ScriptName
End If End If
@@ -122,33 +170,11 @@ End Sub
Private Sub evaluateFile( tcFile ) Private Sub evaluateFile( tcFile )
For x = 1 TO 8 For x = 1 TO UBound(aExtensions,1)
If aExtensions(x) = UCase( FileSystemObject.GetExtensionName( tcFile ) ) Then If aExtensions(x) = UCase( FileSystemObject.GetExtensionName( tcFile ) ) Then
cFlagGenerateLog = "'0'" nFile_Count = nFile_Count + 1
cFlagDontShowErrMsg = "'0'" ReDim Preserve aFiles(nFile_Count)
cFlagShowCall = "'0'" aFiles(nFile_Count) = tcFile
If GetBit(nDebug, 1) Then
cFlagGenerateLog = "'1'"
End If
If GetBit(nDebug, 2) Then
cFlagJustShowCall = "1"
End If
If GetBit(nDebug, 3) Then
cFlagDontShowErrMsg = "'1'"
End If
If nDebug = 0 Or nDebug = 2 Then
cCMD = "DO " & chr(34) & cEXETool & chr(34) & " WITH " & chr(34) & tcFile & chr(34)
Else
cCMD = "DO " & chr(34) & cEXETool & chr(34) & " WITH '" & tcFile & "','0','0','0'," & cFlagDontShowErrMsg & "," & cFlagGenerateLog
End If
If cFlagJustShowCall = "1" Then
MsgBox cCMD, 64, "PARAMETROS ENVIADOS"
Else
oVFP9.DoCmd( cCMD )
nExitCode = oVFP9.Eval("_SCREEN.ExitCode")
End If
Exit For Exit For
End If End If
Next Next

View File

@@ -13,8 +13,8 @@
'--------------------------------------------------------------------------------------------------- '---------------------------------------------------------------------------------------------------
Const ForReading = 1 Const ForReading = 1
Dim WSHShell, FileSystemObject Dim WSHShell, FileSystemObject
Dim oVFP9, nExitCode, cEXETool, cCMD, nDebug, cConvertType, aExtensions(8), foxbin2prg_cfg Dim oVFP9, nExitCode, cEXETool, cCMD, nDebug, cConvertType, aExtensions(8), foxbin2prg_cfg, aFiles(), nFile_Count
Dim i, x, str_cfg, aConf, cErrMsg, cFlagGenerateLog, cFlagDontShowErrMsg, cFlagJustShowCall Dim i, x, str_cfg, aConf, cErrMsg, cFlagGenerateLog, cFlagDontShowErrMsg, cFlagJustShowCall, cFlagRecompile
Set WSHShell = WScript.CreateObject("WScript.Shell") Set WSHShell = WScript.CreateObject("WScript.Shell")
Set FileSystemObject = WScript.CreateObject("Scripting.FileSystemObject") Set FileSystemObject = WScript.CreateObject("Scripting.FileSystemObject")
Set oVFP9 = CreateObject("VisualFoxPro.Application.9") Set oVFP9 = CreateObject("VisualFoxPro.Application.9")
@@ -22,7 +22,7 @@ foxbin2prg_cfg = Replace(WScript.ScriptFullName, WScript.ScriptName, "foxbin2prg
nExitCode = 0 nExitCode = 0
cConvertType = "PRG2BIN" '<<< This is the only difference between the 2 scripts cConvertType = "PRG2BIN" '<<< This is the only difference between the 2 scripts
'--------------------------------------------------------------------------------------------------- '---------------------------------------------------------------------------------------------------
nDebug = 13 'Cumulative Flags: 0=OFF, 1=Create FoxBin2prg LOG, 2=Only show script calls, 4=Don't show FoxBin2prg error modal messages, 8=Show end of process message nDebug = 1+0+4+0 'Cumulative Flags: 0=OFF, 1=Create FoxBin2prg LOG, 2=Only show script calls, 4=Don't show FoxBin2prg error modal messages, 8=Show end of process message
'--------------------------------------------------------------------------------------------------- '---------------------------------------------------------------------------------------------------
If cConvertType = "BIN2PRG" Then If cConvertType = "BIN2PRG" Then
@@ -90,11 +90,59 @@ If WScript.Arguments.Count = 0 Then
MsgBox cErrMsg, 64, "No parameters - Debug Status" MsgBox cErrMsg, 64, "No parameters - Debug Status"
Else Else
cEXETool = Replace(WScript.ScriptFullName, WScript.ScriptName, "foxbin2prg.exe") cEXETool = Replace(WScript.ScriptFullName, WScript.ScriptName, "foxbin2prg.exe")
nFile_Count = 0
oVFP9.DoCmd( "SET PROCEDURE TO '" & cEXETool & "'" )
oVFP9.DoCmd( "PUBLIC oFoxBin2prg" )
oVFP9.DoCmd( "oFoxBin2prg = CREATEOBJECT('c_foxbin2prg')" )
oVFP9.DoCmd( "oFoxBin2prg.cargar_frm_avance()" )
For i = 0 To WScript.Arguments.Count-1 For i = 0 To WScript.Arguments.Count-1
scanDirs( WScript.Arguments(i) ) scanDirs( WScript.Arguments(i) )
Next Next
cFlagGenerateLog = "'0'"
cFlagDontShowErrMsg = "'0'"
cFlagShowCall = "'0'"
cFlagRecompile = "'0'"
If GetBit(nDebug, 1) Then
cFlagGenerateLog = "'1'"
End If
If GetBit(nDebug, 2) Then
cFlagJustShowCall = "1"
End If
If GetBit(nDebug, 3) Then
cFlagDontShowErrMsg = "'1'"
End If
oVFP9.DoCmd( "oFoxBin2prg.o_Frm_Avance.nMAX_VALUE = " & nFile_Count )
oVFP9.DoCmd( "oFoxBin2prg.o_Frm_Avance.nVALUE = " & 0 )
oVFP9.DoCmd( "oFoxBin2prg.o_Frm_Avance.AlwaysOnTop = .T." )
oVFP9.DoCmd( "oFoxBin2prg.o_Frm_Avance.SHOW()" )
For i = 1 To nFile_Count
oVFP9.DoCmd( "oFoxBin2prg.o_Frm_Avance.lbl_TAREA.CAPTION = 'Procesando " & aFiles(i) & "...'" )
oVFP9.DoCmd( "oFoxBin2prg.o_Frm_Avance.nVALUE = " & i )
If nDebug = 0 Or nDebug = 2 Then
cCMD = "oFoxBin2prg.ejecutar( '" & aFiles(i) & "' )"
Else
cCMD = "oFoxBin2prg.ejecutar( '" & aFiles(i) & "','0','0','0'," _
& cFlagDontShowErrMsg & "," & cFlagGenerateLog & ",'1','','',.F.,''," & cFlagRecompile & " )"
End If
If cFlagJustShowCall = "1" Then
MsgBox cCMD, 64, "PARAMETROS ENVIADOS"
Else
oVFP9.DoCmd( cCMD )
nExitCode = oVFP9.Eval("_SCREEN.ExitCode")
End If
Next
oVFP9.DoCmd( "oFoxBin2prg.o_Frm_Avance.HIDE()" )
oVFP9.DoCmd( "oFoxBin2prg.o_Frm_Avance = NULL" )
oVFP9.DoCmd( "oFoxBin2prg = NULL" )
If GetBit(nDebug, 4) Then If GetBit(nDebug, 4) Then
MsgBox "Fin del Proceso!", 64, WScript.ScriptName MsgBox "Fin del Proceso!", 64, WScript.ScriptName
End If End If
@@ -122,33 +170,11 @@ End Sub
Private Sub evaluateFile( tcFile ) Private Sub evaluateFile( tcFile )
For x = 1 TO 8 For x = 1 TO UBound(aExtensions,1)
If aExtensions(x) = UCase( FileSystemObject.GetExtensionName( tcFile ) ) Then If aExtensions(x) = UCase( FileSystemObject.GetExtensionName( tcFile ) ) Then
cFlagGenerateLog = "'0'" nFile_Count = nFile_Count + 1
cFlagDontShowErrMsg = "'0'" ReDim Preserve aFiles(nFile_Count)
cFlagShowCall = "'0'" aFiles(nFile_Count) = tcFile
If GetBit(nDebug, 1) Then
cFlagGenerateLog = "'1'"
End If
If GetBit(nDebug, 2) Then
cFlagJustShowCall = "1"
End If
If GetBit(nDebug, 3) Then
cFlagDontShowErrMsg = "'1'"
End If
If nDebug = 0 Or nDebug = 2 Then
cCMD = "DO " & chr(34) & cEXETool & chr(34) & " WITH " & chr(34) & tcFile & chr(34)
Else
cCMD = "DO " & chr(34) & cEXETool & chr(34) & " WITH '" & tcFile & "','0','0','0'," & cFlagDontShowErrMsg & "," & cFlagGenerateLog
End If
If cFlagJustShowCall = "1" Then
MsgBox cCMD, 64, "PARAMETROS ENVIADOS"
Else
oVFP9.DoCmd( cCMD )
nExitCode = oVFP9.Eval("_SCREEN.ExitCode")
End If
Exit For Exit For
End If End If
Next Next

View File

@@ -26,7 +26,7 @@ _LegalTrademark = "Open Source"
_ProductName = " FOXBIN2PRG" _ProductName = " FOXBIN2PRG"
_MajorVer = "1" _MajorVer = "1"
_MinorVer = "19" _MinorVer = "19"
_Revision = " 194" _Revision = " 205"
_LanguageID = "1034" _LanguageID = "1034"
_AutoIncrement = "1" _AutoIncrement = "1"
*</DevInfo> *</DevInfo>
@@ -51,7 +51,7 @@ loProject = _VFP.Projects('foxbin2prg.pjx')
WITH loProject.FILES WITH loProject.FILES
.ADD('config\config.fpw') && *< FileMetadata: Type="T" Cpid="1252" Timestamp="1132857145" ID="1131721714" ObjRev="0" /> .ADD('config\config.fpw') && *< FileMetadata: Type="T" Cpid="1252" Timestamp="1132857145" ID="1131721714" ObjRev="0" />
.ADD('foxbin2prg.prg') && *< FileMetadata: Type="P" Cpid="1252" Timestamp="1144160955" ID="1130644423" ObjRev="544" /> .ADD('foxbin2prg.prg') && *< FileMetadata: Type="P" Cpid="1252" Timestamp="1144393743" ID="1130644423" ObjRev="544" />
*</BuildProj> *</BuildProj>
.ITEM('__newproject.f2b').Remove() .ITEM('__newproject.f2b').Remove()

Binary file not shown.

Binary file not shown.

View File

@@ -37,25 +37,35 @@
* *
*--------------------------------------------------------------------------------------------------- *---------------------------------------------------------------------------------------------------
* <HISTORIAL DE CAMBIOS Y NOTAS IMPORTANTES> * <HISTORIAL DE CAMBIOS Y NOTAS IMPORTANTES>
* 04/11/2013 FDBOZZO v1.0 Creaci<EFBFBD>n inicial de las clases y soporte de los archivos VCX/SCX/PJX * 04/11/2013 FDBOZZO v1.0 Creaci<EFBFBD>n inicial de las clases y soporte de los archivos VCX/SCX/PJX
* 22/11/2013 FDBOZZO v1.1 Correcci<EFBFBD>n de bugs * 22/11/2013 FDBOZZO v1.1 Correcci<EFBFBD>n de bugs
* 23/11/2013 FDBOZZO v1.2 Correcci<EFBFBD>n de bugs, limpieza de c<>digo y refactorizaci<63>n * 23/11/2013 FDBOZZO v1.2 Correcci<EFBFBD>n de bugs, limpieza de c<>digo y refactorizaci<63>n
* 24/11/2013 FDBOZZO v1.3 Correcci<EFBFBD>n de bugs, limpieza de c<>digo y refactorizaci<63>n * 24/11/2013 FDBOZZO v1.3 Correcci<EFBFBD>n de bugs, limpieza de c<>digo y refactorizaci<63>n
* 27/11/2013 FDBOZZO v1.4 Agregado soporte comodines *.VCX, configuraci<63>n de extensiones (vca), par<61>metro p/log * 27/11/2013 FDBOZZO v1.4 Agregado soporte comodines *.VCX, configuraci<63>n de extensiones (vca), par<61>metro p/log
* 27/11/2013 FDBOZZO v1.5 Arreglo bug que no generaba form completo * 27/11/2013 FDBOZZO v1.5 Arreglo bug que no generaba form completo
* 01/12/2013 FDBOZZO v1.6 Refactorizaci<EFBFBD>n completa generaci<63>n BIN y PRG, cambio de algoritmos, arreglo de bugs, Unit Testing con FoxUnit * 01/12/2013 FDBOZZO v1.6 Refactorizaci<EFBFBD>n completa generaci<63>n BIN y PRG, cambio de algoritmos, arreglo de bugs, Unit Testing con FoxUnit
* 02/12/2013 FDBOZZO v1.7 Arreglo bug "Name", barra de progreso, agregado mensaje de ayuda si se llama sin par<61>metros, verificaci<63>n y logueo de archivos READONLY con debug activa * 02/12/2013 FDBOZZO v1.7 Arreglo bug "Name", barra de progreso, agregado mensaje de ayuda si se llama sin par<61>metros, verificaci<63>n y logueo de archivos READONLY con debug activa
* 03/12/2013 FDBOZZO v1.8 Arreglo bug "Name" (otra vez), sort encapsulado y reutilizado para versiones TEXTO y BIN por seguridad * 03/12/2013 FDBOZZO v1.8 Arreglo bug "Name" (otra vez), sort encapsulado y reutilizado para versiones TEXTO y BIN por seguridad
* 06/12/2013 FDBOZZO v1.9 Arreglo bug p<>rdida de propiedades causado por una mejora anterior * 06/12/2013 FDBOZZO v1.9 Arreglo bug p<>rdida de propiedades causado por una mejora anterior
* 06/12/2013 FDBOZZO v1.10 Arreglo del bug de mezcla de m<>todos de una clase con la siguiente * 06/12/2013 FDBOZZO v1.10 Arreglo del bug de mezcla de m<>todos de una clase con la siguiente
* 07/12/2013 FDBOZZO v1.11 Arreglo del bug de _amembers detectado por Edgar K.con la clase BlowFish.vcx (http://www.tortugaproductiva.galeon.com/docs/blowfish/index.html) * 07/12/2013 FDBOZZO v1.11 Arreglo del bug de _amembers detectado por Edgar K.con la clase BlowFish.vcx (http://www.tortugaproductiva.galeon.com/docs/blowfish/index.html)
* 07/12/2013 FDBOZZO v1.12 Agregado soporte preliminar de conversi<73>n de reportes y etiquetas (FRX/LBX) * 07/12/2013 FDBOZZO v1.12 Agregado soporte preliminar de conversi<73>n de reportes y etiquetas (FRX/LBX)
* 08/12/2013 FDBOZZO v1.13 Arreglo bug "Error 1924, TOREG is not an object" * 08/12/2013 FDBOZZO v1.13 Arreglo bug "Error 1924, TOREG is not an object"
* 15/12/2013 FDBOZZO v1.14 Arreglo de bug AutoCenter y registro COMMENT en regeneraci<63>n de forms * 15/12/2013 FDBOZZO v1.14 Arreglo de bug AutoCenter y registro COMMENT en regeneraci<63>n de forms
* 08/12/2013 FDBOZZO v1.15 Agregado soporte preliminar de conversi<73>n de tablas, <20>ndices y bases de datos (DBF,CDX,DBC) * 08/12/2013 FDBOZZO v1.15 Agregado soporte preliminar de conversi<73>n de tablas, <20>ndices y bases de datos (DBF,CDX,DBC)
* 18/12/2013 FDBOZZO v1.16 Agregado soporte para men<65>s (MNX) * 18/12/2013 FDBOZZO v1.16 Agregado soporte para men<65>s (MNX)
* 03/01/2014 FDBOZZO v1.17 Agregado Unit Testing de men<65>s y arreglo de las incidencias del menu * 03/01/2014 FDBOZZO v1.17 Agregado Unit Testing de men<65>s y arreglo de las incidencias del menu
* 05/01/2013 FDBOZZO v1.18 Agregado soporte para generar estructuras TEXTO de DBFs anteriores a VFP 9, pero los binarios a VFP 9 // Arreglado bug de datos faltantes en campos de vistas // Arreglado bug mnx * 05/01/2013 FDBOZZO v1.18 Agregado soporte para generar estructuras TEXTO de DBFs anteriores a VFP 9, pero los binarios a VFP 9 // Arreglado bug de datos faltantes en campos de vistas // Arreglado bug mnx
* 08/01/2014 FDBOZZO v1.19 Arreglo bug SCX-VCX: Orden incorrecto en Reserved3 ocaciona que no se disparen eventos ACCESS (y probablemente ASIGN)
* 08/01/2014 FDBOZZO v1.19 Arreglo bug DBF: Tipo de <20>ndice generado incorrecto en DB2 cuando es Candidate
* 08/01/2014 FDBOZZO v1.19 Agregado soporte para convertir PJM a PJ2
* 08/01/2014 FDBOZZO v1.19 Agregada validaci<63>n al convertir Men<65>s con estructura anterior a VFP9
* 08/01/2014 FDBOZZO v1.19 Cambiada la propiedad "Autor" por "Author" en los archivos MN2
* 08/01/2014 FDBOZZO v1.19.1 Cambio en los headers de los archivos TX2 para quitar el timestamp "Generated" que causa diferencias innecesarias
* 08/01/2014 FDBOZZO v1.19.2 Arreglo de bug PJ2: Al regenerar da un error por buscar "Autor" en vez de "Author"
* 08/01/2014 FDBOZZO v1.19.3 Cambio en los timestamps de los TXT para mantener los valores vac<61>os que generaban much<63>simas diferencias
* 22/01/2014 FDBOZZO v1.19.4 Nuevo par<61>metro Recompile para forzar la recompilaci<63>n. Ahora por defecto el binario no se recompila para ganar velocidad y evitar errores. Debe recompilar manualmente.
* 22/01/2014 FDBOZZO v1.19.4 DBC: Agregado soporte para comentarios multil<69>nea (propiedad Comment)
* </HISTORIAL DE CAMBIOS Y NOTAS IMPORTANTES> * </HISTORIAL DE CAMBIOS Y NOTAS IMPORTANTES>
* *
*--------------------------------------------------------------------------------------------------- *---------------------------------------------------------------------------------------------------
@@ -92,10 +102,14 @@
* tcDontShowProgress (v? IN ) '1' para NO mostrar la ventana de progreso * tcDontShowProgress (v? IN ) '1' para NO mostrar la ventana de progreso
* tcOriginalFileName (v? IN ) Sirve para los casos en los que inputFile es un nombre temporal y se quiere generar * tcOriginalFileName (v? IN ) Sirve para los casos en los que inputFile es un nombre temporal y se quiere generar
* el nombre correcto dentro de la versi<73>n texto (por ej: en los PJ2 y las cabeceras) * el nombre correcto dentro de la versi<73>n texto (por ej: en los PJ2 y las cabeceras)
* tcRecompile (v? IN ) Indica recompilar ('1') el binario una vez regenerado. [Cambio de funcionamiento por defecto]
* Este cambio es para ganar tiempo, velocidad y seguridad. Adem<65>s la recompilaci<63>n que hace FoxBin2Prg
* se hace desde el directorio del archivo, con lo que las referencias relativas pueden
* generar errores de compilaci<63>n, t<>picamente los #include.
* *
* Ej: DO FOXBIN2PRG.PRG WITH "C:\DESA\INTEGRACION\LIBRERIA.VCX" * Ej: DO FOXBIN2PRG.PRG WITH "C:\DESA\INTEGRACION\LIBRERIA.VCX"
*--------------------------------------------------------------------------------------------------- *---------------------------------------------------------------------------------------------------
LPARAMETERS tc_InputFile, tcType_na, tcTextName_na, tlGenText_na, tcDontShowErrors, tcDebug, tcDontShowProgress, tcOriginalFileName LPARAMETERS tc_InputFile, tcType_na, tcTextName_na, tlGenText_na, tcDontShowErrors, tcDebug, tcDontShowProgress, tcOriginalFileName, tcRecompile
*-- Internacionalizaci<63>n / Internationalization *-- Internacionalizaci<63>n / Internationalization
*-- Fin / End *-- Fin / End
@@ -265,7 +279,7 @@ LPARAMETERS tc_InputFile, tcType_na, tcTextName_na, tlGenText_na, tcDontShowErro
#ELSE && English #ELSE && English
#DEFINE C_FOXBIN2PRG_JUST_VFP_9_LOC 'FOXBIN2PRG is only for Visual FoxPro 9.0!' #DEFINE C_FOXBIN2PRG_JUST_VFP_9_LOC 'FOXBIN2PRG is only for Visual FoxPro 9.0!'
#DEFINE C_FOXBIN2PRG_WARN_CAPTION_LOC 'FOXBIN2PRG: WARNING!' #DEFINE C_FOXBIN2PRG_WARN_CAPTION_LOC 'FOXBIN2PRG: WARNING!'
#DEFINE FOXBIN2PRG_INFO_SINTAX_LOC 'FOXBIN2PRG <cFileSpec.Ext> [cType_NA cTextName_NA cGenText_NA cDontShowErrors cDebug]' + CR_LF + CR_LF ; #DEFINE FOXBIN2PRG_INFO_SINTAX_LOC 'FOXBIN2PRG <cFileSpec.Ext> [cType_NA cTextName_NA cGenText_NA cDontShowErrors cDebug cDontShowProgress cOriginalFileName cRecompile]' + CR_LF + CR_LF ;
+ 'Example to generate TXT of all VCX of "c:\desa\clases", without showing error window and generating LOG file: ' + CR_LF ; + 'Example to generate TXT of all VCX of "c:\desa\clases", without showing error window and generating LOG file: ' + CR_LF ;
+ ' FOXBIN2PRG "c:\desa\clases\*.vcx" "0" "0" "0" "1" "1"' + CR_LF + CR_LF ; + ' FOXBIN2PRG "c:\desa\clases\*.vcx" "0" "0" "0" "1" "1"' + CR_LF + CR_LF ;
+ 'Example to generate TXT of all VCX of "c:\desa\clases", without showing error window and without LOG file: ' + CR_LF ; + 'Example to generate TXT of all VCX of "c:\desa\clases", without showing error window and without LOG file: ' + CR_LF ;
@@ -289,7 +303,7 @@ PUBLIC goCnv AS c_foxbin2prg OF 'FOXBIN2PRG.PRG'
LOCAL lnResp LOCAL lnResp
goCnv = CREATEOBJECT("c_foxbin2prg") goCnv = CREATEOBJECT("c_foxbin2prg")
lnResp = goCnv.ejecutar( tc_InputFile, tcType_na, tcTextName_na, tlGenText_na, tcDontShowErrors, tcDebug ; lnResp = goCnv.ejecutar( tc_InputFile, tcType_na, tcTextName_na, tlGenText_na, tcDontShowErrors, tcDebug ;
, '', NULL, NULL, .F., tcOriginalFileName ) , '', NULL, NULL, .F., tcOriginalFileName, tcRecompile )
ADDPROPERTY(_SCREEN, 'ExitCode', lnResp) ADDPROPERTY(_SCREEN, 'ExitCode', lnResp)
IF _VFP.STARTMODE <= 1 IF _VFP.STARTMODE <= 1
@@ -337,6 +351,7 @@ DEFINE CLASS c_foxbin2prg AS CUSTOM
+ [<memberdata name="l_debug" display="l_Debug"/>] ; + [<memberdata name="l_debug" display="l_Debug"/>] ;
+ [<memberdata name="l_methodsort_enabled" display="l_MethodSort_Enabled"/>] ; + [<memberdata name="l_methodsort_enabled" display="l_MethodSort_Enabled"/>] ;
+ [<memberdata name="l_propsort_enabled" display="l_PropSort_Enabled"/>] ; + [<memberdata name="l_propsort_enabled" display="l_PropSort_Enabled"/>] ;
+ [<memberdata name="l_recompile" display="l_Recompile"/>] ;
+ [<memberdata name="l_reportsort_enabled" display="l_ReportSort_Enabled"/>] ; + [<memberdata name="l_reportsort_enabled" display="l_ReportSort_Enabled"/>] ;
+ [<memberdata name="l_test" display="l_Test"/>] ; + [<memberdata name="l_test" display="l_Test"/>] ;
+ [<memberdata name="l_showerrors" display="l_ShowErrors"/>] ; + [<memberdata name="l_showerrors" display="l_ShowErrors"/>] ;
@@ -368,6 +383,7 @@ DEFINE CLASS c_foxbin2prg AS CUSTOM
l_Test = .F. l_Test = .F.
l_ShowErrors = .F. l_ShowErrors = .F.
l_ShowProgress = .T. l_ShowProgress = .T.
l_Recompile = .T.
l_MethodSort_Enabled = .T. && Para Unit Testing se puede cambiar a .F. para buscar diferencias l_MethodSort_Enabled = .T. && Para Unit Testing se puede cambiar a .F. para buscar diferencias
l_PropSort_Enabled = .T. && Para Unit Testing se puede cambiar a .F. para buscar diferencias l_PropSort_Enabled = .T. && Para Unit Testing se puede cambiar a .F. para buscar diferencias
l_ReportSort_Enabled = .T. && Para Unit Testing se puede cambiar a .F. para buscar diferencias l_ReportSort_Enabled = .T. && Para Unit Testing se puede cambiar a .F. para buscar diferencias
@@ -397,6 +413,7 @@ DEFINE CLASS c_foxbin2prg AS CUSTOM
THIS.c_Foxbin2prg_FullPath = SUBSTR( SYS(16), AT( 'C_FOXBIN2PRG.INIT', SYS(16) ) + LEN('C_FOXBIN2PRG.INIT') + 1 ) THIS.c_Foxbin2prg_FullPath = SUBSTR( SYS(16), AT( 'C_FOXBIN2PRG.INIT', SYS(16) ) + LEN('C_FOXBIN2PRG.INIT') + 1 )
THIS.c_CurDir = SYS(5) + CURDIR() THIS.c_CurDir = SYS(5) + CURDIR()
THIS.o_FSO = NEWOBJECT("Scripting.FileSystemObject") THIS.o_FSO = NEWOBJECT("Scripting.FileSystemObject")
ADDPROPERTY(_SCREEN, 'ExitCode', 0)
ENDPROC ENDPROC
@@ -502,6 +519,11 @@ DEFINE CLASS c_foxbin2prg AS CUSTOM
ENDPROC ENDPROC
PROCEDURE cargar_frm_avance
THIS.o_Frm_Avance = CREATEOBJECT("frm_avance")
ENDPROC
PROCEDURE ejecutar PROCEDURE ejecutar
*-------------------------------------------------------------------------------------------------------------- *--------------------------------------------------------------------------------------------------------------
* PAR<41>METROS: (!=Obligatorio | ?=Opcional) (@=Pasar por referencia | v=Pasar por valor) (IN/OUT) * PAR<41>METROS: (!=Obligatorio | ?=Opcional) (@=Pasar por referencia | v=Pasar por valor) (IN/OUT)
@@ -517,9 +539,13 @@ DEFINE CLASS c_foxbin2prg AS CUSTOM
* tlRelanzarError (?v IN ) Indica si el error debe relanzarse o no * tlRelanzarError (?v IN ) Indica si el error debe relanzarse o no
* tcOriginalFileName (v? IN ) Sirve para los casos en los que inputFile es un nombre temporal y se quiere generar * tcOriginalFileName (v? IN ) Sirve para los casos en los que inputFile es un nombre temporal y se quiere generar
* el nombre correcto dentro de la versi<73>n texto (por ej: en los PJ2 y las cabeceras) * el nombre correcto dentro de la versi<73>n texto (por ej: en los PJ2 y las cabeceras)
* tcRecompile (v? IN ) Indica recompilar ('1') el binario una vez regenerado. [Cambio de funcionamiento por defecto]
* Este cambio es para ganar tiempo, velocidad y seguridad. Adem<65>s la recompilaci<63>n que hace FoxBin2Prg
* se hace desde el directorio del archivo, con lo que las referencias relativas pueden
* generar errores de compilaci<63>n, t<>picamente los #include.
*-------------------------------------------------------------------------------------------------------------- *--------------------------------------------------------------------------------------------------------------
LPARAMETERS tc_InputFile, tcType_na, tcTextName_na, tlGenText_na, tcDontShowErrors, tcDebug, tcDontShowProgress ; LPARAMETERS tc_InputFile, tcType_na, tcTextName_na, tlGenText_na, tcDontShowErrors, tcDebug, tcDontShowProgress ;
, toModulo, toEx AS EXCEPTION, tlRelanzarError, tcOriginalFileName , toModulo, toEx AS EXCEPTION, tlRelanzarError, tcOriginalFileName, tcRecompile
TRY TRY
LOCAL I, lcPath, lnResp, lcFileSpec, lcFile, laFiles(1,5), laConfig(1), lcConfigFile, lcExt ; LOCAL I, lcPath, lnResp, lcFileSpec, lcFile, laFiles(1,5), laConfig(1), lcConfigFile, lcExt ;
@@ -557,10 +583,11 @@ DEFINE CLASS c_foxbin2prg AS CUSTOM
*-- Ejecuci<63>n normal *-- Ejecuci<63>n normal
THIS.l_ShowProgress = NOT (TRANSFORM(tcDontShowProgress)=='1') THIS.l_ShowProgress = NOT (TRANSFORM(tcDontShowProgress)=='1')
THIS.l_ShowErrors = NOT (TRANSFORM(tcDontShowErrors) == '1') THIS.l_ShowErrors = NOT (TRANSFORM(tcDontShowErrors) == '1')
THIS.l_Recompile = (TRANSFORM(tcRecompile) == '1')
THIS.l_Debug = (TRANSFORM(tcDebug)=='1' OR FILE(FORCEEXT(THIS.c_Foxbin2prg_FullPath,'LOG'))) THIS.l_Debug = (TRANSFORM(tcDebug)=='1' OR FILE(FORCEEXT(THIS.c_Foxbin2prg_FullPath,'LOG')))
IF THIS.l_ShowProgress IF THIS.l_ShowProgress
THIS.o_Frm_Avance = CREATEOBJECT("frm_avance") THIS.cargar_frm_avance()
ENDIF ENDIF
*-- Configuraci<63>n *-- Configuraci<63>n
@@ -645,6 +672,7 @@ DEFINE CLASS c_foxbin2prg AS CUSTOM
ENDCASE ENDCASE
CATCH TO toEx CATCH TO toEx
ADDPROPERTY(_SCREEN, 'ExitCode', toEx.ERRORNO)
IF llExisteConfig IF llExisteConfig
THIS.writeLog( 'ERROR: ' + TRANSFORM(toEx.ERRORNO) + ', ' + toEx.MESSAGE + CR_LF ; THIS.writeLog( 'ERROR: ' + TRANSFORM(toEx.ERRORNO) + ', ' + toEx.MESSAGE + CR_LF ;
+ toEx.PROCEDURE + ', line ' + TRANSFORM(toEx.LINENO) + CR_LF ; + toEx.PROCEDURE + ', line ' + TRANSFORM(toEx.LINENO) + CR_LF ;
@@ -655,7 +683,7 @@ DEFINE CLASS c_foxbin2prg AS CUSTOM
ENDIF ENDIF
FINALLY FINALLY
IF VARTYPE(THIS.o_Frm_Avance) = "O" IF THIS.l_ShowProgress
THIS.o_Frm_Avance.HIDE() THIS.o_Frm_Avance.HIDE()
THIS.o_Frm_Avance.RELEASE() THIS.o_Frm_Avance.RELEASE()
STORE NULL TO THIS.o_Frm_Avance STORE NULL TO THIS.o_Frm_Avance
@@ -1020,18 +1048,18 @@ DEFINE CLASS frm_avance AS FORM
ADD OBJECT shp_base AS SHAPE WITH ; ADD OBJECT shp_base AS SHAPE WITH ;
TOP = 40, ; TOP = 50, ;
LEFT = 12, ; LEFT = 12, ;
HEIGHT = 21, ; HEIGHT = 13, ;
WIDTH = 601, ; WIDTH = 601, ;
CURVATURE = 15, ; CURVATURE = 15, ;
NAME = "shp_base" NAME = "shp_base"
ADD OBJECT shp_avance AS SHAPE WITH ; ADD OBJECT shp_avance AS SHAPE WITH ;
TOP = 40, ; TOP = 50, ;
LEFT = 12, ; LEFT = 12, ;
HEIGHT = 21, ; HEIGHT = 13, ;
WIDTH = 36, ; WIDTH = 36, ;
CURVATURE = 15, ; CURVATURE = 15, ;
BACKCOLOR = RGB(255,255,128), ; BACKCOLOR = RGB(255,255,128), ;
@@ -4074,7 +4102,7 @@ DEFINE CLASS c_conversor_prg_a_vcx AS c_conversor_prg_a_bin
*-- Identifico el inicio/fin de bloque, definici<63>n, cabecera y cuerpo de cada clase *-- Identifico el inicio/fin de bloque, definici<63>n, cabecera y cuerpo de cada clase
THIS.identificarBloquesDeCodigo( @laCodeLines, lnCodeLines, @laBloquesExclusion, lnBloquesExclusion, @toModulo ) THIS.identificarBloquesDeCodigo( @laCodeLines, lnCodeLines, @laBloquesExclusion, lnBloquesExclusion, @toModulo )
THIS.escribirArchivoBin( @toModulo ) THIS.escribirArchivoBin( @toModulo, toFoxbin2prg )
CATCH TO toEx CATCH TO toEx
@@ -4094,7 +4122,7 @@ DEFINE CLASS c_conversor_prg_a_vcx AS c_conversor_prg_a_bin
******************************************************************************************************************* *******************************************************************************************************************
PROCEDURE escribirArchivoBin PROCEDURE escribirArchivoBin
LPARAMETERS toModulo LPARAMETERS toModulo, toFoxbin2prg
*-- Estructura del objeto toModulo generado: *-- Estructura del objeto toModulo generado:
*-- ----------------------------------------------------------------------------------------------------------- *-- -----------------------------------------------------------------------------------------------------------
*-- Version Versi<73>n usada para generar la versi<73>n PRG analizada *-- Version Versi<73>n usada para generar la versi<73>n PRG analizada
@@ -4162,6 +4190,7 @@ DEFINE CLASS c_conversor_prg_a_vcx AS c_conversor_prg_a_bin
*-- ----------------------------------------------------------------------------------------------------------- *-- -----------------------------------------------------------------------------------------------------------
#IF .F. #IF .F.
LOCAL toModulo AS CL_MODULO OF 'FOXBIN2PRG.PRG' LOCAL toModulo AS CL_MODULO OF 'FOXBIN2PRG.PRG'
LOCAL toFoxbin2prg AS c_foxbin2prg OF 'FOXBIN2PRG.PRG'
#ENDIF #ENDIF
TRY TRY
@@ -4284,7 +4313,10 @@ DEFINE CLASS c_conversor_prg_a_vcx AS c_conversor_prg_a_bin
ENDFOR && I = 1 TO toModulo._Clases_Count ENDFOR && I = 1 TO toModulo._Clases_Count
USE IN (SELECT("TABLABIN")) USE IN (SELECT("TABLABIN"))
COMPILE CLASSLIB (THIS.c_OutputFile)
IF toFoxbin2prg.l_Recompile
COMPILE CLASSLIB (THIS.c_OutputFile)
ENDIF
CATCH TO loEx CATCH TO loEx
@@ -4351,7 +4383,7 @@ DEFINE CLASS c_conversor_prg_a_scx AS c_conversor_prg_a_bin
*-- Identifico el inicio/fin de bloque, definici<63>n, cabecera y cuerpo de cada clase *-- Identifico el inicio/fin de bloque, definici<63>n, cabecera y cuerpo de cada clase
THIS.identificarBloquesDeCodigo( @laCodeLines, lnCodeLines, @laBloquesExclusion, lnBloquesExclusion, @toModulo ) THIS.identificarBloquesDeCodigo( @laCodeLines, lnCodeLines, @laBloquesExclusion, lnBloquesExclusion, @toModulo )
THIS.escribirArchivoBin( @toModulo ) THIS.escribirArchivoBin( @toModulo, toFoxbin2prg )
CATCH TO toEx CATCH TO toEx
@@ -4371,7 +4403,7 @@ DEFINE CLASS c_conversor_prg_a_scx AS c_conversor_prg_a_bin
******************************************************************************************************************* *******************************************************************************************************************
PROCEDURE escribirArchivoBin PROCEDURE escribirArchivoBin
LPARAMETERS toModulo LPARAMETERS toModulo, toFoxbin2prg
*-- Estructura del objeto toModulo generado: *-- Estructura del objeto toModulo generado:
*-- ----------------------------------------------------------------------------------------------------------- *-- -----------------------------------------------------------------------------------------------------------
*-- Version Versi<73>n usada para generar la versi<73>n PRG analizada *-- Version Versi<73>n usada para generar la versi<73>n PRG analizada
@@ -4439,6 +4471,7 @@ DEFINE CLASS c_conversor_prg_a_scx AS c_conversor_prg_a_bin
*-- ----------------------------------------------------------------------------------------------------------- *-- -----------------------------------------------------------------------------------------------------------
#IF .F. #IF .F.
LOCAL toModulo AS CL_MODULO OF 'FOXBIN2PRG.PRG' LOCAL toModulo AS CL_MODULO OF 'FOXBIN2PRG.PRG'
LOCAL toFoxbin2prg AS c_foxbin2prg OF 'FOXBIN2PRG.PRG'
#ENDIF #ENDIF
TRY TRY
@@ -4562,7 +4595,10 @@ DEFINE CLASS c_conversor_prg_a_scx AS c_conversor_prg_a_bin
, '' ) , '' )
USE IN (SELECT("TABLABIN")) USE IN (SELECT("TABLABIN"))
COMPILE FORM (THIS.c_OutputFile)
IF toFoxbin2prg.l_Recompile
COMPILE FORM (THIS.c_OutputFile)
ENDIF
CATCH TO loEx CATCH TO loEx
@@ -5358,7 +5394,7 @@ DEFINE CLASS c_conversor_prg_a_frx AS c_conversor_prg_a_bin
*-- Identifico el inicio/fin de bloque, definici<63>n, cabecera y cuerpo del reporte *-- Identifico el inicio/fin de bloque, definici<63>n, cabecera y cuerpo del reporte
THIS.identificarBloquesDeCodigo( @laCodeLines, lnCodeLines, @laBloquesExclusion, lnBloquesExclusion, @toReport ) THIS.identificarBloquesDeCodigo( @laCodeLines, lnCodeLines, @laBloquesExclusion, lnBloquesExclusion, @toReport )
THIS.escribirArchivoBin( @toReport ) THIS.escribirArchivoBin( @toReport, toFoxbin2prg )
CATCH TO loEx CATCH TO loEx
@@ -5380,10 +5416,11 @@ DEFINE CLASS c_conversor_prg_a_frx AS c_conversor_prg_a_bin
******************************************************************************************************************* *******************************************************************************************************************
PROCEDURE escribirArchivoBin PROCEDURE escribirArchivoBin
LPARAMETERS toReport LPARAMETERS toReport, toFoxbin2prg
*-- ----------------------------------------------------------------------------------------------------------- *-- -----------------------------------------------------------------------------------------------------------
#IF .F. #IF .F.
LOCAL toReport AS CL_REPORT OF 'FOXBIN2PRG.PRG' LOCAL toReport AS CL_REPORT OF 'FOXBIN2PRG.PRG'
LOCAL toFoxbin2prg AS c_foxbin2prg OF 'FOXBIN2PRG.PRG'
#ENDIF #ENDIF
TRY TRY
@@ -5431,10 +5468,12 @@ DEFINE CLASS c_conversor_prg_a_frx AS c_conversor_prg_a_bin
USE IN (SELECT("TABLABIN")) USE IN (SELECT("TABLABIN"))
IF THIS.c_Type = 'FRX' IF toFoxbin2prg.l_Recompile
COMPILE REPORT (THIS.c_OutputFile) IF THIS.c_Type = 'FRX'
ELSE COMPILE REPORT (THIS.c_OutputFile)
COMPILE LABEL (THIS.c_OutputFile) ELSE
COMPILE LABEL (THIS.c_OutputFile)
ENDIF
ENDIF ENDIF
@@ -6024,7 +6063,7 @@ DEFINE CLASS c_conversor_prg_a_dbc AS c_conversor_prg_a_bin
*-- Identifico el inicio/fin de bloque, definici<63>n, cabecera y cuerpo del reporte *-- Identifico el inicio/fin de bloque, definici<63>n, cabecera y cuerpo del reporte
THIS.identificarBloquesDeCodigo( @laCodeLines, lnCodeLines, @laBloquesExclusion, lnBloquesExclusion, @toDatabase ) THIS.identificarBloquesDeCodigo( @laCodeLines, lnCodeLines, @laBloquesExclusion, lnBloquesExclusion, @toDatabase )
THIS.escribirArchivoBin( @toDatabase ) THIS.escribirArchivoBin( @toDatabase, toFoxbin2prg )
CATCH TO loEx CATCH TO loEx
@@ -6046,10 +6085,11 @@ DEFINE CLASS c_conversor_prg_a_dbc AS c_conversor_prg_a_bin
******************************************************************************************************************* *******************************************************************************************************************
PROCEDURE escribirArchivoBin PROCEDURE escribirArchivoBin
LPARAMETERS toDatabase LPARAMETERS toDatabase, toFoxbin2prg
*-- ----------------------------------------------------------------------------------------------------------- *-- -----------------------------------------------------------------------------------------------------------
#IF .F. #IF .F.
LOCAL toDatabase AS CL_DBC OF 'FOXBIN2PRG.PRG' LOCAL toDatabase AS CL_DBC OF 'FOXBIN2PRG.PRG'
LOCAL toFoxbin2prg AS c_foxbin2prg OF 'FOXBIN2PRG.PRG'
#ENDIF #ENDIF
TRY TRY
@@ -6059,6 +6099,10 @@ DEFINE CLASS c_conversor_prg_a_dbc AS c_conversor_prg_a_bin
toDatabase.updateDBC( THIS.c_OutputFile ) toDatabase.updateDBC( THIS.c_OutputFile )
IF toFoxbin2prg.l_Recompile
COMPILE DATABASE (THIS.c_OutputFile)
ENDIF
CATCH TO loEx CATCH TO loEx
lnCodError = loEx.ERRORNO lnCodError = loEx.ERRORNO
@@ -8401,7 +8445,6 @@ DEFINE CLASS c_conversor_pjx_a_prg AS c_conversor_bin_a_prg
CASE toFoxbin2prg.doBackup( .F., .T., '', '', '' ) AND STRTOFILE( C_FB2PRG_CODE, THIS.c_OutputFile ) = 0 CASE toFoxbin2prg.doBackup( .F., .T., '', '', '' ) AND STRTOFILE( C_FB2PRG_CODE, THIS.c_OutputFile ) = 0
ERROR 'No se puede generar el archivo [' + THIS.c_OutputFile + '] porque es ReadOnly' ERROR 'No se puede generar el archivo [' + THIS.c_OutputFile + '] porque es ReadOnly'
ENDCASE ENDCASE
*COMPILE ( THIS.c_outputFile )
ENDIF ENDIF
@@ -8769,7 +8812,6 @@ DEFINE CLASS c_conversor_pjm_a_prg AS c_conversor_bin_a_prg
CASE toFoxbin2prg.doBackup( .F., .T., '', '', '' ) AND STRTOFILE( C_FB2PRG_CODE, THIS.c_OutputFile ) = 0 CASE toFoxbin2prg.doBackup( .F., .T., '', '', '' ) AND STRTOFILE( C_FB2PRG_CODE, THIS.c_OutputFile ) = 0
ERROR 'No se puede generar el archivo [' + THIS.c_OutputFile + '] porque es ReadOnly' ERROR 'No se puede generar el archivo [' + THIS.c_OutputFile + '] porque es ReadOnly'
ENDCASE ENDCASE
*COMPILE ( THIS.c_outputFile )
ENDIF ENDIF
@@ -8981,21 +9023,21 @@ DEFINE CLASS c_conversor_dbf_a_prg AS c_conversor_bin_a_prg
CATCH TO toEx CATCH TO toEx
DO CASE DO CASE
CASE toEx.ErrorNo = 13 && Alias not found CASE toEx.ERRORNO = 13 && Alias not found
toEx.UserValue = 'WARNING!!' + CR_LF ; toEx.USERVALUE = 'WARNING!!' + CR_LF ;
+ 'MAKE SURE YOU ARE NOT USING A TABLE ALIAS ON INDEX KEY EXPRESSIONS!! (ex: index on ' ; + 'MAKE SURE YOU ARE NOT USING A TABLE ALIAS ON INDEX KEY EXPRESSIONS!! (ex: index on ' ;
+ UPPER(JUSTSTEM(THIS.c_InputFile)) + '.field tag keyname)' + CR_LF + CR_LF ; + UPPER(JUSTSTEM(THIS.c_InputFile)) + '.field tag keyname)' + CR_LF + CR_LF ;
+ '<27><>ATENCI<43>N!!' + CR_LF ; + '<27><>ATENCI<43>N!!' + CR_LF ;
+ 'ASEG<45>RESE DE QUE NO EST<53> USANDO UN ALIAS DE TABLA EN LAS EXPRESIONES DE LOS <20>NDICES!! (ej: index on ' ; + 'ASEG<45>RESE DE QUE NO EST<53> USANDO UN ALIAS DE TABLA EN LAS EXPRESIONES DE LOS <20>NDICES!! (ej: index on ' ;
+ UPPER(JUSTSTEM(THIS.c_InputFile)) + '.campo tag nombreclave)' + UPPER(JUSTSTEM(THIS.c_InputFile)) + '.campo tag nombreclave)'
*!* CASE toEx.ErrorNo = 1976 && Cannot resolve backlink *!* CASE toEx.ErrorNo = 1976 && Cannot resolve backlink
*!* toEx.UserValue = 'WARNING!!' + CR_LF ; *!* toEx.UserValue = 'WARNING!!' + CR_LF ;
*!* + "MAY BE DATABASE FIELDS DOESN'T" ; *!* + "MAY BE DATABASE FIELDS DOESN'T" ;
*!* + UPPER(JUSTSTEM(THIS.c_InputFile)) + '.field tag keyname)' + CR_LF + CR_LF ; *!* + UPPER(JUSTSTEM(THIS.c_InputFile)) + '.field tag keyname)' + CR_LF + CR_LF ;
*!* + '<27><>ATENCI<43>N!!' + CR_LF ; *!* + '<27><>ATENCI<43>N!!' + CR_LF ;
*!* + 'ASEG<45>RESE DE QUE NO EST<53> USANDO UN ALIAS DE TABLA EN LAS EXPRESIONES DE LOS <20>NDICES!! (ej: index on ' ; *!* + 'ASEG<45>RESE DE QUE NO EST<53> USANDO UN ALIAS DE TABLA EN LAS EXPRESIONES DE LOS <20>NDICES!! (ej: index on ' ;
*!* + UPPER(JUSTSTEM(THIS.c_InputFile)) + '.campo tag nombreclave)' *!* + UPPER(JUSTSTEM(THIS.c_InputFile)) + '.campo tag nombreclave)'
ENDCASE ENDCASE
IF THIS.l_Debug AND _VFP.STARTMODE = 0 IF THIS.l_Debug AND _VFP.STARTMODE = 0
@@ -9979,6 +10021,7 @@ DEFINE CLASS CL_DBC_BASE AS CL_CUS_BASE
_MEMBERDATA = [<VFPData>] ; _MEMBERDATA = [<VFPData>] ;
+ [<memberdata name="add_property" display="Add_Property"/>] ; + [<memberdata name="add_property" display="Add_Property"/>] ;
+ [<memberdata name="analizarbloque_comment" display="analizarBloque_Comment"/>] ;
+ [<memberdata name="_name" display="_Name"/>] ; + [<memberdata name="_name" display="_Name"/>] ;
+ [<memberdata name="__objectid" display="__ObjectID"/>] ; + [<memberdata name="__objectid" display="__ObjectID"/>] ;
+ [<memberdata name="dbgetprop" display="DBGETPROP"/>] ; + [<memberdata name="dbgetprop" display="DBGETPROP"/>] ;
@@ -10055,6 +10098,41 @@ DEFINE CLASS CL_DBC_BASE AS CL_CUS_BASE
ENDFUNC ENDFUNC
PROCEDURE analizarBloque_Comment
*---------------------------------------------------------------------------------------------------
* PAR<41>METROS: (!=Obligatorio | ?=Opcional) (@=Pasar por referencia | v=Pasar por valor) (IN/OUT)
* tcLine (@! IN/OUT) Contenido de la l<>nea en an<61>lisis
* taCodeLines (@! IN ) Array de l<>neas del programa analizado
* I (@! IN/OUT) N<>mero de l<>nea en an<61>lisis
* tnCodeLines (@! IN ) Cantidad de l<>neas del programa analizado
*---------------------------------------------------------------------------------------------------
LPARAMETERS tcLine, taCodeLines, I, tnCodeLines
IF LEFT(tcLine, LEN('<Comment>')) == '<Comment>'
LOCAL lcValue
llBloqueEncontrado = .T.
lcValue = STREXTRACT( taCodeLines(I), '<Comment>', '</Comment>', 1, 2 )
IF NOT '</Comment>' $ tcLine THEN
FOR I = I + 1 TO tnCodeLines
THIS.set_Line( @tcLine, @taCodeLines, I )
DO CASE
CASE '</Comment>' $ tcLine && Fin
lcValue = lcValue + CR_LF + LEFT( taCodeLines(I), AT( '</Comment>', taCodeLines(I) ) - 1 )
EXIT
OTHERWISE && L<>nea de Stored Procedure
lcValue = lcValue + CR_LF + taCodeLines(I)
ENDCASE
ENDFOR
ENDIF
THIS.ADDPROPERTY( '_Comment', lcValue )
ENDIF
ENDPROC
PROCEDURE getAllPropertiesFromObjectname PROCEDURE getAllPropertiesFromObjectname
*--------------------------------------------------------------------------------------------------- *---------------------------------------------------------------------------------------------------
* PAR<41>METROS: (!=Obligatorio | ?=Opcional) (@=Pasar por referencia | v=Pasar por valor) (IN/OUT) * PAR<41>METROS: (!=Obligatorio | ?=Opcional) (@=Pasar por referencia | v=Pasar por valor) (IN/OUT)
@@ -10900,6 +10978,9 @@ DEFINE CLASS CL_DBC AS CL_DBC_BASE
CASE C_STORED_PROC_I $ tcLine CASE C_STORED_PROC_I $ tcLine
THIS.analizarBloque_SP( @tcLine, @taCodeLines, @I, tnCodeLines ) THIS.analizarBloque_SP( @tcLine, @taCodeLines, @I, tnCodeLines )
CASE '<Comment>' $ tcLine
THIS.analizarBloque_Comment( @tcLine, @taCodeLines, @I, tnCodeLines )
OTHERWISE && Otro valor OTHERWISE && Otro valor
*-- Estructura a reconocer: *-- Estructura a reconocer:
* <tagname>ID<tagname> * <tagname>ID<tagname>
@@ -11138,6 +11219,9 @@ DEFINE CLASS CL_DBC_CONNECTIONS AS CL_DBC_COL_BASE
loConnection.analizarBloque( @tcLine, @taCodeLines, @I, tnCodeLines ) loConnection.analizarBloque( @tcLine, @taCodeLines, @I, tnCodeLines )
THIS.ADD( loConnection, loConnection._Name ) THIS.ADD( loConnection, loConnection._Name )
CASE '<Comment>' $ tcLine
THIS.analizarBloque_Comment( @tcLine, @taCodeLines, @I, tnCodeLines )
OTHERWISE && Otro valor OTHERWISE && Otro valor
*-- No hay otros valores *-- No hay otros valores
ENDCASE ENDCASE
@@ -11290,6 +11374,9 @@ DEFINE CLASS CL_DBC_CONNECTION AS CL_DBC_BASE
CASE C_CONNECTION_F $ tcLine && Fin CASE C_CONNECTION_F $ tcLine && Fin
EXIT EXIT
CASE '<Comment>' $ tcLine
THIS.analizarBloque_Comment( @tcLine, @taCodeLines, @I, tnCodeLines )
OTHERWISE && Propiedad de CONNECTION OTHERWISE && Propiedad de CONNECTION
*-- Estructura a reconocer: *-- Estructura a reconocer:
* <name>NOMBRE</name> * <name>NOMBRE</name>
@@ -11607,6 +11694,9 @@ DEFINE CLASS CL_DBC_TABLE AS CL_DBC_BASE
loRelations = THIS._Relations loRelations = THIS._Relations
loRelations.analizarBloque( @tcLine, @taCodeLines, @I, tnCodeLines ) loRelations.analizarBloque( @tcLine, @taCodeLines, @I, tnCodeLines )
CASE '<Comment>' $ tcLine
THIS.analizarBloque_Comment( @tcLine, @taCodeLines, @I, tnCodeLines )
OTHERWISE && Propiedad de TABLE OTHERWISE && Propiedad de TABLE
*-- Estructura a reconocer: *-- Estructura a reconocer:
* <name>NOMBRE</name> * <name>NOMBRE</name>
@@ -11915,6 +12005,9 @@ DEFINE CLASS CL_DBC_FIELD_DB AS CL_DBC_BASE
CASE C_FIELD_F $ tcLine && Fin CASE C_FIELD_F $ tcLine && Fin
EXIT EXIT
CASE '<Comment>' $ tcLine
THIS.analizarBloque_Comment( @tcLine, @taCodeLines, @I, tnCodeLines )
OTHERWISE && Propiedad de FIELD OTHERWISE && Propiedad de FIELD
*-- Estructura a reconocer: *-- Estructura a reconocer:
* <name>NOMBRE</name> * <name>NOMBRE</name>
@@ -12182,6 +12275,9 @@ DEFINE CLASS CL_DBC_INDEX_DB AS CL_DBC_BASE
CASE C_INDEX_F $ tcLine && Fin CASE C_INDEX_F $ tcLine && Fin
EXIT EXIT
CASE '<Comment>' $ tcLine
THIS.analizarBloque_Comment( @tcLine, @taCodeLines, @I, tnCodeLines )
OTHERWISE && Propiedad de FIELD OTHERWISE && Propiedad de FIELD
*-- Estructura a reconocer: *-- Estructura a reconocer:
* <name>NOMBRE</name> * <name>NOMBRE</name>
@@ -12512,6 +12608,9 @@ DEFINE CLASS CL_DBC_VIEW AS CL_DBC_BASE
loRelations = THIS._Relations loRelations = THIS._Relations
loRelations.analizarBloque( @tcLine, @taCodeLines, @I, tnCodeLines ) loRelations.analizarBloque( @tcLine, @taCodeLines, @I, tnCodeLines )
CASE '<Comment>' $ tcLine
THIS.analizarBloque_Comment( @tcLine, @taCodeLines, @I, tnCodeLines )
OTHERWISE && Propiedad de VIEW OTHERWISE && Propiedad de VIEW
*-- Estructura a reconocer: *-- Estructura a reconocer:
* <name>NOMBRE</name> * <name>NOMBRE</name>
@@ -12875,6 +12974,9 @@ DEFINE CLASS CL_DBC_FIELD_VW AS CL_DBC_BASE
CASE C_FIELD_F $ tcLine && Fin CASE C_FIELD_F $ tcLine && Fin
EXIT EXIT
CASE '<Comment>' $ tcLine
THIS.analizarBloque_Comment( @tcLine, @taCodeLines, @I, tnCodeLines )
OTHERWISE && Propiedad de FIELD OTHERWISE && Propiedad de FIELD
*-- Estructura a reconocer: *-- Estructura a reconocer:
* <name>NOMBRE</name> * <name>NOMBRE</name>
@@ -16191,11 +16293,11 @@ DEFINE CLASS CL_DBF_UTILS AS SESSION
n_NumberOfRecords = 0 n_NumberOfRecords = 0
n_NumberOfRecordsReal = 0 n_NumberOfRecordsReal = 0
n_PosOfFirstDataRecord = 0 n_PosOfFirstDataRecord = 0
Fields = NULL FIELDS = NULL
PROCEDURE INIT PROCEDURE INIT
THIS.Fields = CREATEOBJECT("COLLECTION") THIS.FIELDS = CREATEOBJECT("COLLECTION")
ENDPROC ENDPROC
@@ -16281,7 +16383,7 @@ DEFINE CLASS CL_DBF_UTILS AS SESSION
lcStr = FREAD(lnHandle,8) lcStr = FREAD(lnHandle,8)
ENDWITH ENDWITH
.Fields.Add(loField) .FIELDS.ADD(loField)
loField = NULL loField = NULL
ENDFOR ENDFOR
*--- *---
@@ -16511,10 +16613,10 @@ DEFINE CLASS CL_DBF_UTILS AS SESSION
ENDTEXT ENDTEXT
*-- Fields *-- Fields
loField = THIS.Fields.Item(1) loField = THIS.FIELDS.ITEM(1)
lcText = lcText + CR_LF + loField.toText(.T.) lcText = lcText + CR_LF + loField.toText(.T.)
FOR EACH loField AS CL_DBF_UTILS_FIELD OF 'FOXBIN2PRG.PRG' IN THIS.Fields FOR EACH loField AS CL_DBF_UTILS_FIELD OF 'FOXBIN2PRG.PRG' IN THIS.FIELDS
lcText = lcText + CR_LF + loField.toText() lcText = lcText + CR_LF + loField.toText()
ENDFOR ENDFOR