From 3da4baf912bb8b6ebc40168f2bec49f12752cd31 Mon Sep 17 00:00:00 2001 From: Dawid Ciepiela <71898979-sarumaj@users.noreply.github.com> Date: Wed, 15 Nov 2023 15:31:08 +0100 Subject: [PATCH] add inno setup step --- .github/workflows/build_and_release.yml | 8 +++- scripts/setup.iss | 55 +++++++++++++++++++++++++ 2 files changed, 62 insertions(+), 1 deletion(-) create mode 100644 scripts/setup.iss diff --git a/.github/workflows/build_and_release.yml b/.github/workflows/build_and_release.yml index bb47cd3..86a59f2 100644 --- a/.github/workflows/build_and_release.yml +++ b/.github/workflows/build_and_release.yml @@ -14,7 +14,7 @@ jobs: python: [3.11] os: [windows-latest] runs-on: ${{ matrix.os }} - name: Build and release gh-gr + name: Build and release kanjireader steps: - name: Check out repository uses: actions/checkout@v4 @@ -27,3 +27,9 @@ jobs: python_ver: ${{ matrix.python }} spec: "scripts/pyinstaller.spec" requirements: "requirements.txt" + + - name: Compile .ISS to .EXE Installer + uses: Minionguyjpro/Inno-Setup-Action@v1.1.0 + with: + path: /scripts/setup.iss + options: /DVersion="${{ github.ref_name }}" diff --git a/scripts/setup.iss b/scripts/setup.iss new file mode 100644 index 0000000..95d2b71 --- /dev/null +++ b/scripts/setup.iss @@ -0,0 +1,55 @@ +; Script generated by the Inno Setup Script Wizard. +; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES! + +#define MyAppName "KanjiReader" +#define MyAppVersion "{#Version}" +#define MyAppPublisher "Dawid Ciepiela" +#define MyAppExeName "kanjireader.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={{C367BA1F-BF2F-4278-84D1-3E7042BB7999} +AppName={#MyAppName} +AppVersion={#MyAppVersion} +;AppVerName={#MyAppName} {#MyAppVersion} +AppPublisher={#MyAppPublisher} +DefaultDirName={autopf}\{#MyAppName} +DefaultGroupName={#MyAppName} +AllowNoIcons=yes +; Remove the following line to run in administrative install mode (install for all users.) +PrivilegesRequired=lowest +PrivilegesRequiredOverridesAllowed=dialog +OutputDir=..\dist +OutputBaseFilename=kr_setup +SetupIconFile={app}/data/img/ico/app.ico +UninstallDisplayIcon={app}/data/img/ico/app.ico +Compression=lzma +SolidCompression=yes +WizardStyle=modern + +[Languages] +Name: "english"; MessagesFile: "compiler:Default.isl" + +[CustomMessages] +CreateStartupEntry=Run on logon + +[Tasks] +Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked +Name: "startentry"; Description: "{cm:CreateStartupEntry}"; GroupDescription: "{cm:AdditionalIcons}" + +[Files] +Source: "..\dist\kanjireader\{#MyAppExeName}"; DestDir: "{app}"; Flags: ignoreversion +Source: "..\dist\kanjireader\*"; 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: "{group}\{cm:UninstallProgram,{#MyAppName}}"; Filename: "{uninstallexe}" +Name: "{autodesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon +Name: "{commonstartup}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: startentry; Check: IsAdmin +Name: "{userstartup}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: startentry; Check: not IsAdmin + +[Run] +Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent +