Skip to content

Commit

Permalink
add inno setup step
Browse files Browse the repository at this point in the history
  • Loading branch information
Dawid Ciepiela committed Nov 15, 2023
1 parent 77dafad commit 3da4baf
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 1 deletion.
8 changes: 7 additions & 1 deletion .github/workflows/build_and_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 }}"
55 changes: 55 additions & 0 deletions scripts/setup.iss
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 3da4baf

Please sign in to comment.