toolkit/extras/ghidra/setup.iss

148 lines
6.0 KiB
Plaintext
Raw Normal View History

2022-05-12 11:30:35 -03:00
; Script generated by the Inno Setup Script Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
2022-12-27 16:42:34 -03:00
#define MyAppName "Indetectables Toolkit Extras: Ghidra"
2022-05-27 22:27:12 -03:00
#define MyAppNameOriginal "Indetectables Toolkit"
2023-07-31 20:57:28 -03:00
#define MyAppVersion "2023.8"
2022-05-12 11:30:35 -03:00
#define MyAppPublisher "Indetectables"
#define MyAppURL "https://www.indetectables.net/"
#define MyAppToolsFolder "{app}\toolkit"
#define MyAppBinsFolder "{app}\bin"
#define MyAppToolsIconsFolder "{app}\assets\icons"
2023-02-27 15:36:07 -03:00
#define MySrcDir "C:\code\toolkit"
#define MyOutputDir "C:\code"
2022-05-12 11:30:35 -03:00
[Setup]
2022-05-27 22:27:12 -03:00
AppId={{3F02E24E-404C-415F-A360-C52C612E5127}
2022-05-12 11:30:35 -03:00
AppName={#MyAppName}
AppVersion={#MyAppVersion}
VersionInfoVersion={#MyAppVersion}
AppVerName={#MyAppName} - {#MyAppVersion}
AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
2023-02-27 15:54:38 -03:00
DefaultDirName={sd}\{#MyAppNameOriginal}
2022-05-27 22:27:12 -03:00
DefaultGroupName={#MyAppNameOriginal}
2022-05-12 11:30:35 -03:00
PrivilegesRequired=admin
;PrivilegesRequiredOverridesAllowed=dialog
OutputBaseFilename=Toolkit_{#MyAppVersion}_Extras_Ghidra
2022-08-01 19:12:43 -03:00
Compression=lzma2/max
2022-05-12 11:30:35 -03:00
SolidCompression=yes
WizardStyle=modern
ArchitecturesInstallIn64BitMode=x64
2023-02-27 15:36:07 -03:00
SetupIconFile="{#MySrcDir}\extras\ghidra\icon.ico"
2022-05-12 11:30:35 -03:00
OutputDir={#MyOutputDir}
2022-05-27 22:27:12 -03:00
Uninstallable=no
2023-02-27 15:36:07 -03:00
DirExistsWarning=no
2022-05-12 11:30:35 -03:00
[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"
Name: "spanish"; MessagesFile: "compiler:Languages\Spanish.isl"
Name: "catalan"; MessagesFile: "compiler:Languages\Catalan.isl"
Name: "portuguese"; MessagesFile: "compiler:Languages\BrazilianPortuguese.isl"
2023-02-27 15:54:38 -03:00
[CustomMessages]
english.FolderValidationError=The toolkit was not found in the selected folder. You must install it before you can continue.
spanish.FolderValidationError=No se ha encontrado el kit de herramientas en la carpeta seleccionada. Debe instalarlo antes de continuar.
catalan.FolderValidationError=El conjunt d'eines no s'ha trobat a la carpeta seleccionada. Heu d'instal·lar-lo abans de poder continuar.
portuguese.FolderValidationError=O conjunto de ferramentas não foi encontrado na pasta seleccionada. Deve ser instalado antes de poder continuar.
2022-05-12 11:30:35 -03:00
[Components]
Name: "ghidra"; Description: "Install Ghidra via Updater"; ExtraDiskSpaceRequired: 996147200; Types: full compact custom; Flags: fixed;
[Components]
Name: "updater"; Description: "Tools auto updater"; Types: full compact custom; Flags: fixed;
2023-02-27 15:54:38 -03:00
2022-05-12 11:30:35 -03:00
; Updater
[Components]
Name: "updater\main"; Description: "Updater"; Types: full compact custom; Flags: fixed;
[Files]
2023-03-06 01:29:59 -03:00
Source: "{#MySrcDir}\bin\updater\*"; DestDir: "{#MyAppBinsFolder}\updater"; Components: "updater\main"; Flags: ignoreversion recursesubdirs createallsubdirs; BeforeInstall: BeforeInstallScript;
2022-05-12 11:30:35 -03:00
Source: "{#MySrcDir}\bin\hstart\*"; Destdir: "{#MyAppBinsFolder}\hstart\"; Components: "updater\main"; Flags: ignoreversion recursesubdirs createallsubdirs;
[Icons]
2023-02-27 15:36:07 -03:00
Name: "{group}\Toolkit Updater"; Filename: "{#MyAppBinsFolder}\updater\updater.exe"; WorkingDir: "{#MyAppBinsFolder}\updater"; Components: "updater\main";
2022-05-27 22:27:12 -03:00
Name: "{userdesktop}\{#MyAppNameOriginal}\Toolkit Updater"; Filename: "{#MyAppBinsFolder}\updater\updater.exe"; WorkingDir: "{#MyAppBinsFolder}\updater"; Components: "updater\main";
2022-05-12 11:30:35 -03:00
; Fix default update config
[INI]
2022-12-29 18:45:38 -03:00
Filename: {#MyAppBinsFolder}\updater\tools.ini; Section: UpdaterConfig; Key: disable_clean; String: True; Components: "updater\main";
Filename: {#MyAppBinsFolder}\updater\tools.ini; Section: UpdaterConfig; Key: disable_repack; String: True; Components: "updater\main";
2022-05-12 11:30:35 -03:00
[Components]
Name: "extras"; Description: "Extras"; Types: full compact custom;
2023-02-27 15:54:38 -03:00
2022-05-12 11:30:35 -03:00
; Install Choco
[Components]
Name: "extras\choco"; Description: "Install Chocolatey package manager"; ExtraDiskSpaceRequired: 16777216; Types: full compact custom;
[Files]
Source: "{#MySrcDir}\bin\choco\*"; DestDir: "{#MyAppBinsFolder}\choco"; Components: "extras\choco"; Flags: ignoreversion recursesubdirs createallsubdirs;
[Run]
Filename: "{#MyAppBinsFolder}\choco\installChocolatey.cmd"; Components: "extras\choco or extras\javajdk"; Flags: shellexec waituntilterminated;
; Install Java JDK (for Ghidra!)
[Components]
2023-01-05 12:45:49 -03:00
Name: "extras\javajdk"; Description: "Install Java Temurin JDK 17+ (via Chocolatey)"; ExtraDiskSpaceRequired: 315621376; Types: full compact custom;
2022-05-12 11:30:35 -03:00
[Run]
2023-01-05 12:45:49 -03:00
Filename: "{sd}\ProgramData\chocolatey\bin\choco.exe"; Parameters: "install -y temurin"; Components: "extras\javajdk"; Flags: shellexec waituntilterminated;
2022-05-12 11:30:35 -03:00
;;; etc
[Run]
2023-03-06 01:29:59 -03:00
; Install Ghidra
2022-05-12 11:30:35 -03:00
Filename: "{#MyAppBinsFolder}\updater\updater.exe"; Parameters: "-f -u Ghidra -dic"; Flags: shellexec waituntilterminated;
2023-03-06 01:29:59 -03:00
; Configure installed tools
Filename: "{#MyAppBinsFolder}\updater\bin\auto-config-ini.exe"; Parameters: "/FOLDER={#MyAppBinsFolder}\updater /TYPE=clean"; Flags: runhidden;
; Sync tools versions
Filename: "{#MyAppBinsFolder}\updater\bin\auto-config-ini.exe"; Parameters: "/FOLDER={#MyAppBinsFolder}\updater /TYPE=sync"; Flags: runhidden;
2022-05-12 11:30:35 -03:00
[Icons]
2023-02-27 15:36:07 -03:00
Name: "{group}\Ghidra"; Filename: "{#MyAppToolsFolder}\Dissasembler\Ghidra\ghidraRun.bat"; WorkingDir: "{#MyAppToolsFolder}\Dissasembler\Ghidra"; IconFilename: "{#MyAppToolsIconsFolder}\ghidra.ico"
2022-05-12 11:30:35 -03:00
Name: "{#MyAppBinsFolder}\sendto\sendto\Dissasembler\Ghidra"; Filename: "{#MyAppToolsFolder}\Dissasembler\Ghidra\ghidraRun.bat"; WorkingDir: "{#MyAppToolsFolder}\Dissasembler\Ghidra"; IconFilename: "{#MyAppToolsIconsFolder}\ghidra.ico"
2023-02-27 15:36:07 -03:00
[code]
2023-03-06 01:29:59 -03:00
function GetFileName(const FileName: string): string;
begin
Result := ExpandConstant('{#MyAppBinsFolder}\updater\' + FileName);
end;
procedure BeforeInstallScript();
begin
if FileExists(GetFileName('tools.ini')) then
begin
RenameFile(GetFileName('tools.ini'), GetFileName('tools.ini.old'));
end;
end;
2023-02-27 15:36:07 -03:00
function NextButtonClick(PageId: Integer): Boolean;
begin
Result := True;
2023-03-06 01:29:59 -03:00
if (PageId = wpSelectDir) and not FileExists(ExpandConstant('{app}\CHANGELOG.md')) then
begin
2023-02-27 15:54:38 -03:00
MsgBox(ExpandConstant('{cm:FolderValidationError}'), mbError, MB_OK);
2023-02-27 15:36:07 -03:00
Result := False;
exit;
end;
end;
2023-03-06 01:29:59 -03:00
procedure CurStepChanged(CurStep: TSetupStep);
begin
if (CurStep = ssDone) and FileExists(GetFileName('tools.ini.old')) then
begin
DeleteFile(GetFileName('tools.ini.old'));
end;
end;