147 lines
5.6 KiB
Plaintext
Executable File
147 lines
5.6 KiB
Plaintext
Executable File
; Script generated by the Inno Setup Script Wizard.
|
|
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
|
|
|
|
[Setup]
|
|
; NOTE: The value of AppId uniquely identifies this application.
|
|
; Do not use the same AppId value in installers for other applications.
|
|
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
|
|
#ifndef sourceDir
|
|
#define sourceDir='T:\Jenkins\workspace\TDS-OC-64-Trunk\TDS-rpm'
|
|
#endif
|
|
|
|
#ifndef buildDir
|
|
#define buildDir='T:\Jenkins\workspace\TDS-OC-64-Trunk\TDS-build-rpm'
|
|
#endif
|
|
|
|
#ifndef instDir
|
|
#define instDir='T:\Jenkins\workspace\TDS-OC-64-Trunk\TDS-inst'
|
|
#endif
|
|
|
|
#ifndef licenceDir
|
|
#define licenceDir='T:\Jenkins\workspace\TDS-OC-64-Trunk\TDS-rpm\Lts\Projects\Guez'
|
|
#endif
|
|
|
|
#ifndef helpDir
|
|
#define helpDir='T:\OnlineHelp\guez'
|
|
#endif
|
|
|
|
#ifndef dbname
|
|
#define dbName='guez_pro_db.sql'
|
|
#endif
|
|
|
|
#ifndef Version
|
|
#define Version="7.2"
|
|
#endif
|
|
|
|
AppId={{3F4F4542-E83F-4414-8D3D-AF18E2F795F6}
|
|
AppName=GÜZ Ausbilderterminal
|
|
AppVersion={#Version}
|
|
AppPublisher=Rheinmetall Electronics GmbH
|
|
AppPublisherURL=defence.com/de/rheinmetall_defence/company/divisions_and_subsidiaries/rheinmetall_electronics/index.php
|
|
AppSupportURL=defence.com/de/rheinmetall_defence/company/divisions_and_subsidiaries/rheinmetall_electronics/index.php
|
|
AppUpdatesURL=defence.com/de/rheinmetall_defence/company/divisions_and_subsidiaries/rheinmetall_electronics/index.php
|
|
Compression=lzma
|
|
DefaultDirName=C:\Rheinmetall\Lts
|
|
DisableDirPage=yes
|
|
DefaultGroupName=GÜZ Ausbilderterminal
|
|
DisableProgramGroupPage=yes
|
|
OutputBaseFilename=GÜZ_Ausbilderterminal_{#SetupSetting("AppVersion")}
|
|
SetupIconFile={#sourceDir}\Lts\Plugins\Styles\Light\resources\icons\16x16\rde.ico
|
|
SolidCompression=yes
|
|
UsePreviousAppDir=no
|
|
UsePreviousGroup=no
|
|
|
|
|
|
[Languages]
|
|
Name: "english"; MessagesFile: "compiler:Default.isl"
|
|
Name: "german"; MessagesFile: "compiler:Languages\German.isl"
|
|
|
|
[Types]
|
|
Name: full; Description: "Full installation";
|
|
Name: custom; Description: "Custom installation"; Flags: isCustom
|
|
|
|
[Components]
|
|
Name: ABT; Description: ABT Application; Types: full
|
|
#ifndef noHelp
|
|
Name: HELP; Description: Online Help; Types: full
|
|
#endif
|
|
|
|
#ifndef noSV
|
|
Name: SV; Description: Server Services; Types: full
|
|
#endif
|
|
|
|
#ifndef noDB
|
|
Name: DB; Description: Database; Types: full
|
|
#endif
|
|
[Files]
|
|
;Component WS
|
|
Source: "{#instDir}\srt\*"; DestDir: "{app}\WS"; Components: ABT; Flags: ignoreversion recursesubdirs createallsubdirs
|
|
Source: "{#buildDir}\lts-cc.conf"; DestDir: "{app}\"; Components: ABT; Flags: ignoreversion
|
|
|
|
#ifndef noSV
|
|
;Component SV
|
|
Source: "{#instDir}\srv\*"; DestDir: "{app}\SV\"; Components: SV; Flags: ignoreversion recursesubdirs createallsubdirs
|
|
;Source: "{#buildDir}\lts-cc.conf"; DestDir: "{app}\"; Components: SV; Flags: ignoreversion ; Do not copy on SV
|
|
Source: "{#sourceDir}\Lts\Proxies\TrainingAreaBaseOC\taboc.dat"; DestDir: "{app}\SV\"; Components: SV; Flags: ignoreversion
|
|
Source: "{#licenceDir}\oc_licence_file.crl"; DestDir: "{app}\SV\share\Lts\Licence"; Components: SV; Flags: ignoreversion
|
|
Source: "{#licenceDir}\licence_file.crl"; DestDir: "{app}\SV\share\Lts\Licence"; Components: SV; Flags: ignoreversion
|
|
#endif
|
|
|
|
#ifndef noHelp
|
|
;Component HELP
|
|
Source: "{#helpDir}\share\*"; DestDir: "{app}\WS\share"; Components: HELP; Flags: ignoreversion recursesubdirs createallsubdirs
|
|
#endif
|
|
|
|
;Component DB
|
|
#ifndef noDB
|
|
Source: "{#buildDir}\bin\test\create_excon_db.py"; DestDir: "{app}\DB"; Components: DB; Flags: ignoreversion
|
|
Source: "{#buildDir}\bin\test\init_db_users_grants.sql"; DestDir: "{app}\DB"; Components: DB; Flags: ignoreversion
|
|
Source: "{#buildDir}\bin\test\init_db_procedures.sql"; DestDir: "{app}\DB"; Components: DB; Flags: ignoreversion
|
|
Source: "{#instDir}\{#dbName}"; DestDir: "{app}\DB"; Components: DB; Flags: ignoreversion
|
|
Source: "{#buildDir}\lts-cc.conf"; DestDir: "{app}\DB"; Components: DB; Flags: ignoreversion
|
|
#endif
|
|
|
|
;Source: "Redist\vc_redist.x64.exe"; DestDir: {tmp}; Flags: deleteafterinstall
|
|
|
|
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
|
|
|
|
[Icons]
|
|
Name: "{group}\Legatus EXCON"; Filename: "{app}\OperatorApplication.exe"
|
|
|
|
[Run]
|
|
Filename: "{app}\WS\vc_redist.x64.exe"; Check: VCRedistNeedsInstall
|
|
[Run]
|
|
#ifndef noDB
|
|
Filename: "cmd"; Parameters: "/c{app}\DB\create_excon_db.py -d lts_ets_pro -p guez -f {#dbName}"; WorkingDir: "{app}\DB"; Components: DB; Flags: waituntilterminated
|
|
#endif
|
|
|
|
[Code]
|
|
#IFDEF UNICODE
|
|
#DEFINE AW "W"
|
|
#ELSE
|
|
#DEFINE AW "A"
|
|
#ENDIF
|
|
type
|
|
INSTALLSTATE = Longint;
|
|
const
|
|
INSTALLSTATE_INVALIDARG = -2; { An invalid parameter was passed to the function. }
|
|
INSTALLSTATE_UNKNOWN = -1; { The product is neither advertised or installed. }
|
|
INSTALLSTATE_ADVERTISED = 1; { The product is advertised but not installed. }
|
|
INSTALLSTATE_ABSENT = 2; { The product is installed for a different user. }
|
|
INSTALLSTATE_DEFAULT = 5; { The product is installed for the current user. }
|
|
|
|
VC_2017_REDIST_X64 = '{F106B700-BFF8-3065-B305-14D36AD40539}';
|
|
|
|
function MsiQueryProductState(szProduct: string): INSTALLSTATE;
|
|
external 'MsiQueryProductState{#AW}@msi.dll stdcall';
|
|
|
|
function VCVersionInstalled(const ProductID: string): Boolean;
|
|
begin
|
|
Result := MsiQueryProductState(ProductID) = INSTALLSTATE_DEFAULT;
|
|
end;
|
|
|
|
function VCRedistNeedsInstall: Boolean;
|
|
begin
|
|
Result := VCVersionInstalled(VC_2017_REDIST_X64);
|
|
end;
|