Skip to navigation
Build an innosetup installer in linux for windows
23.04.23
1. Install wine ```bash su root dpkg --add-architecture i386 wget https://dl.winehq.org/wine-builds/Release.key apt-key add Release.key echo 'deb https://dl.winehq.org/wine-builds/debian/ bullseye main' > /etc/apt/sources.list.d/wine.list wget -nc https://dl.winehq.org/wine-builds/winehq.key && sudo apt-key add winehq.key apt-get update apt-get install winehq-devel ```bash 2. Download ispack and install it via wine wget http://files.jrsoftware.org/ispack/ispack-5.2.3.exe wine ./ispack-5.2.3.exe 3. Create a bash script wrapper iscc.sh ```bash #!/bin/sh unset DISPLAY scriptname=$1 [ -f "$scriptname" ] && scriptname=$(winepath -w "$scriptname") wine "C:\Program Files (x86)\Inno Setup 5\ISCC.exe" "$scriptname" "$2" "$3" "$4" "$5" "$6" "$7" "$8" "$9" ``` 4. Add execute permission to the sudo chmod +x iscc.sh 5. Create an iss setup file like aaa.iss ```text ; Script generated by the Inno Setup Script Wizard. ; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES! #define MyAppName "aaa" #define MyAppVerName "aaa" #define MyAppPublisher "aaa" #define MyAppURL "http://www.example.com/" #define MyAppExeName "main.exe" [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.) AppId={{1C43EBBF-E654-4AA6-AA2D-04D4ABE3B832} AppName={#MyAppName} AppVerName={#MyAppVerName} AppPublisher={#MyAppPublisher} AppPublisherURL={#MyAppURL} AppSupportURL={#MyAppURL} AppUpdatesURL={#MyAppURL} DefaultDirName={pf}\{#MyAppName} DefaultGroupName={#MyAppName} OutputBaseFilename=setup Compression=lzma SolidCompression=yes [Languages] Name: "english"; MessagesFile: "compiler:Default.isl" [Tasks] Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked [Files] Source: "Z:\home\veto\webs\m3\scripts\exe\dist\windows\main\main.exe"; DestDir: "{app}"; Flags: ignoreversion Source: "Z:\home\veto\webs\m3\scripts\exe\dist\windows\main\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs ; NOTE: Don't use "Flags: ignoreversion" on any shared system files [Icons] Name: "{group}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}" Name: "{commondesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon [Run] Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#MyAppName}}"; Flags: nowait postinstall skipifsilent ``` 6. Run it, and it should create an installation setup file into the Output folder ./iscc.sh aaa.iss
https://github.com/nfouka/InnoSetup5
Reply
Anonymous
Information Epoch 1730248192
Choose portability over efficiency.
Home
Notebook
Contact us