Changeset: 144 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 - El parámetro cRecompile ahora permite poner un Path base de compilación (el del PJX)
This commit is contained in:
@@ -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
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ _LegalTrademark = "Open Source"
|
|||||||
_ProductName = " FOXBIN2PRG"
|
_ProductName = " FOXBIN2PRG"
|
||||||
_MajorVer = "1"
|
_MajorVer = "1"
|
||||||
_MinorVer = "19"
|
_MinorVer = "19"
|
||||||
_Revision = " 194"
|
_Revision = " 209"
|
||||||
_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="1144485039" ID="1130644423" ObjRev="544" />
|
||||||
*</BuildProj>
|
*</BuildProj>
|
||||||
|
|
||||||
.ITEM('__newproject.f2b').Remove()
|
.ITEM('__newproject.f2b').Remove()
|
||||||
|
|||||||
BIN
foxbin2prg.pjt
BIN
foxbin2prg.pjt
Binary file not shown.
BIN
foxbin2prg.pjx
BIN
foxbin2prg.pjx
Binary file not shown.
275
foxbin2prg.prg
275
foxbin2prg.prg
@@ -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,15 @@
|
|||||||
* 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.
|
||||||
|
* NOTA: Si en vez de '1' se indica un Path (p.ej, el del proyecto, se usar<61> como base para recompilar
|
||||||
*
|
*
|
||||||
* 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 +280,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 +304,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
|
||||||
@@ -328,6 +343,7 @@ DEFINE CLASS c_foxbin2prg AS CUSTOM
|
|||||||
+ [<memberdata name="c_pj2" display="c_PJ2"/>] ;
|
+ [<memberdata name="c_pj2" display="c_PJ2"/>] ;
|
||||||
+ [<memberdata name="c_sc2" display="c_SC2"/>] ;
|
+ [<memberdata name="c_sc2" display="c_SC2"/>] ;
|
||||||
+ [<memberdata name="c_vc2" display="c_VC2"/>] ;
|
+ [<memberdata name="c_vc2" display="c_VC2"/>] ;
|
||||||
|
+ [<memberdata name="compilefoxprobinary" display="compileFoxProBinary"/>] ;
|
||||||
+ [<memberdata name="dobackup" display="doBackup"/>] ;
|
+ [<memberdata name="dobackup" display="doBackup"/>] ;
|
||||||
+ [<memberdata name="ejecutar" display="Ejecutar"/>] ;
|
+ [<memberdata name="ejecutar" display="Ejecutar"/>] ;
|
||||||
+ [<memberdata name="exception2str" display="Exception2Str"/>] ;
|
+ [<memberdata name="exception2str" display="Exception2Str"/>] ;
|
||||||
@@ -337,6 +353,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 +385,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 +415,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
|
||||||
|
|
||||||
|
|
||||||
@@ -416,6 +435,32 @@ DEFINE CLASS c_foxbin2prg AS CUSTOM
|
|||||||
ENDPROC
|
ENDPROC
|
||||||
|
|
||||||
|
|
||||||
|
PROCEDURE compileFoxProBinary
|
||||||
|
LPARAMETERS tcFilename
|
||||||
|
LOCAL lcType
|
||||||
|
tcFilename = EVL(tcFilename, THIS.c_OutputFile)
|
||||||
|
lcType = UPPER(JUSTEXT(tcFilename))
|
||||||
|
|
||||||
|
DO CASE
|
||||||
|
CASE lcType = 'VCX'
|
||||||
|
COMPILE CLASSLIB (tcFilename)
|
||||||
|
|
||||||
|
CASE lcType = 'SCX'
|
||||||
|
COMPILE FORM (tcFilename)
|
||||||
|
|
||||||
|
CASE lcType = 'FRX'
|
||||||
|
COMPILE REPORT (tcFilename)
|
||||||
|
|
||||||
|
CASE lcType = 'LBX'
|
||||||
|
COMPILE LABEL (tcFilename)
|
||||||
|
|
||||||
|
CASE lcType = 'DBC'
|
||||||
|
COMPILE DATABASE (tcFilename)
|
||||||
|
|
||||||
|
ENDCASE
|
||||||
|
ENDPROC
|
||||||
|
|
||||||
|
|
||||||
PROCEDURE doBackup
|
PROCEDURE doBackup
|
||||||
*---------------------------------------------------------------------------------------------------
|
*---------------------------------------------------------------------------------------------------
|
||||||
* 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)
|
||||||
@@ -502,6 +547,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,17 +567,22 @@ 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.
|
||||||
|
* NOTA: Si en vez de '1' se indica un Path (p.ej, el del proyecto, se usar<61> como base para recompilar
|
||||||
*--------------------------------------------------------------------------------------------------------------
|
*--------------------------------------------------------------------------------------------------------------
|
||||||
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, lnCodError, lcFileSpec, lcFile, laFiles(1,5), laConfig(1), lcConfigFile, lcExt ;
|
||||||
, llExisteConfig, lcConfData, lnFileCount ;
|
, llExisteConfig, lcConfData, lnFileCount ;
|
||||||
, loEx AS EXCEPTION ;
|
, loEx AS EXCEPTION ;
|
||||||
, loFSO AS Scripting.FileSystemObject
|
, loFSO AS Scripting.FileSystemObject
|
||||||
|
|
||||||
lnResp = 0
|
lnCodError = 0
|
||||||
|
|
||||||
SET DELETED ON
|
SET DELETED ON
|
||||||
SET DATE YMD
|
SET DATE YMD
|
||||||
@@ -546,21 +601,22 @@ DEFINE CLASS c_foxbin2prg AS CUSTOM
|
|||||||
CASE VERSION(5) < 900
|
CASE VERSION(5) < 900
|
||||||
*-- '<27>FOXBIN2PRG es solo para Visual FoxPro 9.0!'
|
*-- '<27>FOXBIN2PRG es solo para Visual FoxPro 9.0!'
|
||||||
MESSAGEBOX( C_FOXBIN2PRG_JUST_VFP_9_LOC, 0+64+4096, C_FOXBIN2PRG_WARN_CAPTION_LOC, 60000 )
|
MESSAGEBOX( C_FOXBIN2PRG_JUST_VFP_9_LOC, 0+64+4096, C_FOXBIN2PRG_WARN_CAPTION_LOC, 60000 )
|
||||||
lnResp = 1
|
lnCodError = 1
|
||||||
|
|
||||||
CASE EMPTY(tc_InputFile)
|
CASE EMPTY(tc_InputFile)
|
||||||
*-- (Ejemplo de sintaxis y uso)
|
*-- (Ejemplo de sintaxis y uso)
|
||||||
MESSAGEBOX( FOXBIN2PRG_INFO_SINTAX_LOC, 0+64+4096, 'FOXBIN2PRG: SINTAXIS INFO', 60000 )
|
MESSAGEBOX( FOXBIN2PRG_INFO_SINTAX_LOC, 0+64+4096, 'FOXBIN2PRG: SINTAXIS INFO', 60000 )
|
||||||
lnResp = 1
|
lnCodError = 1
|
||||||
|
|
||||||
OTHERWISE
|
OTHERWISE
|
||||||
*-- 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 = (NOT EMPTY(tcRecompile) AND (TRANSFORM(tcRecompile) == '1' OR DIRECTORY(tcRecompile)))
|
||||||
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
|
||||||
@@ -592,7 +648,12 @@ DEFINE CLASS c_foxbin2prg AS CUSTOM
|
|||||||
CASE '*' $ JUSTSTEM( tc_InputFile )
|
CASE '*' $ JUSTSTEM( tc_InputFile )
|
||||||
*-- SE QUIEREN TODOS LOS ARCHIVOS DE UNA EXTENSI<53>N
|
*-- SE QUIEREN TODOS LOS ARCHIVOS DE UNA EXTENSI<53>N
|
||||||
lcFileSpec = FULLPATH( tc_InputFile )
|
lcFileSpec = FULLPATH( tc_InputFile )
|
||||||
CD (JUSTPATH(lcFileSpec))
|
|
||||||
|
IF THIS.l_Recompile AND LEN(tcRecompile) > 3 AND DIRECTORY(tcRecompile)
|
||||||
|
CD (tcRecompile)
|
||||||
|
ELSE
|
||||||
|
CD (JUSTPATH(lcFileSpec))
|
||||||
|
ENDIF
|
||||||
THIS.c_LogFile = ADDBS( JUSTPATH( lcFileSpec ) ) + STRTRAN( JUSTFNAME( lcFileSpec ), '*', '_ALL' ) + '.LOG'
|
THIS.c_LogFile = ADDBS( JUSTPATH( lcFileSpec ) ) + STRTRAN( JUSTFNAME( lcFileSpec ), '*', '_ALL' ) + '.LOG'
|
||||||
|
|
||||||
IF THIS.l_Debug
|
IF THIS.l_Debug
|
||||||
@@ -621,14 +682,20 @@ DEFINE CLASS c_foxbin2prg AS CUSTOM
|
|||||||
ENDIF
|
ENDIF
|
||||||
|
|
||||||
IF FILE( lcFile )
|
IF FILE( lcFile )
|
||||||
lnResp = THIS.Convertir( lcFile, toModulo, toEx, tlRelanzarError, tcOriginalFileName )
|
lnCodError = THIS.Convertir( lcFile, toModulo, toEx, tlRelanzarError, tcOriginalFileName )
|
||||||
ENDIF
|
ENDIF
|
||||||
ENDFOR
|
ENDFOR
|
||||||
|
|
||||||
OTHERWISE
|
OTHERWISE
|
||||||
*-- UN ARCHIVO INDIVIDUAL
|
*-- UN ARCHIVO INDIVIDUAL
|
||||||
IF FILE(tc_InputFile)
|
IF FILE(tc_InputFile)
|
||||||
CD (JUSTPATH(tc_InputFile))
|
|
||||||
|
IF THIS.l_Recompile AND LEN(tcRecompile) > 3 AND DIRECTORY(tcRecompile)
|
||||||
|
CD (tcRecompile)
|
||||||
|
ELSE
|
||||||
|
CD (JUSTPATH(tc_InputFile))
|
||||||
|
ENDIF
|
||||||
|
|
||||||
THIS.c_LogFile = tc_InputFile + '.LOG'
|
THIS.c_LogFile = tc_InputFile + '.LOG'
|
||||||
|
|
||||||
IF THIS.l_Debug
|
IF THIS.l_Debug
|
||||||
@@ -638,13 +705,15 @@ DEFINE CLASS c_foxbin2prg AS CUSTOM
|
|||||||
THIS.writeLog( THIS.c_Foxbin2prg_FullPath + ' - FileSpec: ' + EVL(tc_InputFile,'') )
|
THIS.writeLog( THIS.c_Foxbin2prg_FullPath + ' - FileSpec: ' + EVL(tc_InputFile,'') )
|
||||||
ENDIF
|
ENDIF
|
||||||
|
|
||||||
lnResp = THIS.Convertir( tc_InputFile, toModulo, toEx, tlRelanzarError, tcOriginalFileName )
|
lnCodError = THIS.Convertir( tc_InputFile, toModulo, toEx, tlRelanzarError, tcOriginalFileName )
|
||||||
ENDIF
|
ENDIF
|
||||||
ENDCASE
|
ENDCASE
|
||||||
|
|
||||||
ENDCASE
|
ENDCASE
|
||||||
|
|
||||||
CATCH TO toEx
|
CATCH TO toEx
|
||||||
|
lnCodError = toEx.ErrorNo
|
||||||
|
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 +724,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
|
||||||
@@ -664,7 +733,7 @@ DEFINE CLASS c_foxbin2prg AS CUSTOM
|
|||||||
*SET PATH TO (lcPath)
|
*SET PATH TO (lcPath)
|
||||||
ENDTRY
|
ENDTRY
|
||||||
|
|
||||||
RETURN lnResp
|
RETURN lnCodError
|
||||||
ENDPROC
|
ENDPROC
|
||||||
|
|
||||||
|
|
||||||
@@ -1020,18 +1089,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 +4143,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 +4163,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 +4231,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 +4354,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
|
||||||
|
toFoxbin2prg.compileFoxProBinary()
|
||||||
|
ENDIF
|
||||||
|
|
||||||
|
|
||||||
CATCH TO loEx
|
CATCH TO loEx
|
||||||
@@ -4351,7 +4424,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 +4444,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 +4512,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 +4636,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
|
||||||
|
toFoxbin2prg.compileFoxProBinary()
|
||||||
|
ENDIF
|
||||||
|
|
||||||
|
|
||||||
CATCH TO loEx
|
CATCH TO loEx
|
||||||
@@ -5358,7 +5435,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 +5457,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 +5509,8 @@ 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)
|
toFoxbin2prg.compileFoxProBinary()
|
||||||
ELSE
|
|
||||||
COMPILE LABEL (THIS.c_OutputFile)
|
|
||||||
ENDIF
|
ENDIF
|
||||||
|
|
||||||
|
|
||||||
@@ -6024,7 +6100,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 +6122,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 +6136,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
|
||||||
|
toFoxbin2prg.compileFoxProBinary()
|
||||||
|
ENDIF
|
||||||
|
|
||||||
|
|
||||||
CATCH TO loEx
|
CATCH TO loEx
|
||||||
lnCodError = loEx.ERRORNO
|
lnCodError = loEx.ERRORNO
|
||||||
@@ -8401,7 +8482,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 +8849,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 +9060,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 +10058,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 +10135,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 +11015,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 +11256,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 +11411,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 +11731,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 +12042,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 +12312,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 +12645,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 +13011,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 +16330,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 +16420,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 +16650,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
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user