100 lines
2.8 KiB
Plaintext
100 lines
2.8 KiB
Plaintext
|
|
[Setup]
|
|||
|
|
AppName=FactuGES
|
|||
|
|
AppVerName=FactuGES 2.2.2
|
|||
|
|
AppPublisher=Rodax Software S.L.
|
|||
|
|
AppPublisherURL=http://www.rodax-software.com
|
|||
|
|
AppSupportURL=http://www.rodax-software.com
|
|||
|
|
AppUpdatesURL=http://www.rodax-software.com
|
|||
|
|
OutputBaseFilename=instalar
|
|||
|
|
Compression=lzma
|
|||
|
|
SolidCompression=yes
|
|||
|
|
CreateAppDir=no
|
|||
|
|
Uninstallable=no
|
|||
|
|
DisableStartupPrompt=yes
|
|||
|
|
DisableFinishedPage=yes
|
|||
|
|
|
|||
|
|
[Languages]
|
|||
|
|
Name: "sp"; MessagesFile: "compiler:languages\Spanish.isl"
|
|||
|
|
|
|||
|
|
[Files]
|
|||
|
|
Source: "files\*"; DestDir: {code:GetDir}; CopyMode: alwaysoverwrite; Flags: uninsneveruninstall overwritereadonly
|
|||
|
|
;Source: "files\Informes\*"; DestDir: "{code:GetDir}\Informes\"; Flags: ignoreversion recursesubdirs createallsubdirs
|
|||
|
|
;Source: "files\Financiacion\*"; DestDir: "{code:GetDir}\Financiacion\"; Flags: ignoreversion recursesubdirs createallsubdirs
|
|||
|
|
|
|||
|
|
[Registry]
|
|||
|
|
;Root: HKLM; Subkey: "Software\FactuGES\Update"; ValueType: string; ValueName: "edLocation_Text"; ValueData: "http://www.rodax-software.com/luisleon/update"; Flags: createvalueifdoesntexist
|
|||
|
|
|
|||
|
|
[Code]
|
|||
|
|
var
|
|||
|
|
TipoActualizacion : String;
|
|||
|
|
Ruta : String;
|
|||
|
|
VerAnterior : String;
|
|||
|
|
VerNueva : String;
|
|||
|
|
|
|||
|
|
function GetDir(Param: String): String;
|
|||
|
|
begin
|
|||
|
|
Result := Ruta;
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
procedure HacerBackupVerAnterior;
|
|||
|
|
var
|
|||
|
|
RutaBack : String;
|
|||
|
|
FindRec: TFindRec;
|
|||
|
|
begin
|
|||
|
|
RutaBack := Ruta + 'Otras versiones\' + VerAnterior + '\';
|
|||
|
|
|
|||
|
|
ForceDirectories(RutaBack);
|
|||
|
|
ForceDirectories(RutaBack + 'Informes');
|
|||
|
|
|
|||
|
|
FileCopy(Ruta + 'FactuGES.exe', RutaBack + 'FactuGES.exe', FALSE);
|
|||
|
|
if FindFirst(ExpandConstant(Ruta + 'Informes\*.*'), FindRec) then begin
|
|||
|
|
try
|
|||
|
|
repeat
|
|||
|
|
// Don't count directories
|
|||
|
|
if FindRec.Attributes and FILE_ATTRIBUTE_DIRECTORY = 0 then
|
|||
|
|
FileCopy(Ruta + 'Informes\' + FindRec.Name, RutaBack + 'Informes\' + FindRec.Name, FALSE);
|
|||
|
|
until not FindNext(FindRec);
|
|||
|
|
finally
|
|||
|
|
FindClose(FindRec);
|
|||
|
|
end;
|
|||
|
|
end;
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
{function NextButtonClick(CurPageID: Integer): Boolean;
|
|||
|
|
begin
|
|||
|
|
if CurPageID = 1 then
|
|||
|
|
begin
|
|||
|
|
if not RegQueryStringValue(HKEY_LOCAL_MACHINE, 'Software\FactuGES\Update',
|
|||
|
|
'TipoActualizacion', TipoActualizacion) then
|
|||
|
|
Abort;
|
|||
|
|
|
|||
|
|
if not DirExists(Ruta) then
|
|||
|
|
Abort;
|
|||
|
|
|
|||
|
|
if TipoActualizacion = 'INTERNET' then
|
|||
|
|
HacerBackupVerAnterior();
|
|||
|
|
end;
|
|||
|
|
Result := True;
|
|||
|
|
end;}
|
|||
|
|
|
|||
|
|
function InitializeSetup(): Boolean;
|
|||
|
|
var
|
|||
|
|
p: HWND;
|
|||
|
|
begin
|
|||
|
|
// Comprobar que FactuGES no est<73> en ejecuci<63>n
|
|||
|
|
p := FindWindowByWindowName('FactuGES');
|
|||
|
|
if p > 0 then
|
|||
|
|
begin
|
|||
|
|
MsgBox('Debe salir de FactuGES para poder instalar esta actualizaci<63>n',mbInformation, MB_OK);
|
|||
|
|
Result := False
|
|||
|
|
end
|
|||
|
|
else begin
|
|||
|
|
// Comprobar que la ruta del programa est<73> en el registro
|
|||
|
|
Result := RegQueryStringValue(HKEY_LOCAL_MACHINE, 'Software\FactuGES', 'Ruta', Ruta);
|
|||
|
|
end;
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
|
|||
|
|
|
|||
|
|
|