Skip to content

Commit f17c5ac

Browse files
authored
Merge pull request #6 from cloudy-org/feat/innosetup-workflow
feat: innosetup workflow
2 parents 6a90c89 + a78e478 commit f17c5ac

File tree

5 files changed

+107
-2
lines changed

5 files changed

+107
-2
lines changed

.github/workflows/release.yaml

Lines changed: 44 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99
- v[0-9]+.*
1010

1111
jobs:
12-
upload-assets:
12+
build-zip:
1313
strategy:
1414
matrix:
1515
include:
@@ -61,4 +61,46 @@ jobs:
6161
tar: unix
6262
zip: windows
6363
features: 'package'
64-
token: ${{ secrets.GITHUB_TOKEN }}
64+
token: ${{ secrets.GITHUB_TOKEN }}
65+
66+
inno-installer:
67+
strategy:
68+
matrix:
69+
include:
70+
- target: x86_64-pc-windows-msvc
71+
os: windows-latest
72+
73+
runs-on: ${{ matrix.os }}
74+
steps:
75+
- uses: actions/checkout@v4
76+
with:
77+
submodules: 'true'
78+
79+
- id: os_lower
80+
uses: ASzc/change-string-case-action@v6
81+
with:
82+
string: upscayl-bin-20240601-103425-${{ runner.os }}
83+
84+
- uses: robinraju/release-downloader@v1
85+
name: download upscayl
86+
with:
87+
repository: 'upscayl/upscayl-ncnn'
88+
tag: '20240601-103425'
89+
fileName: '${{ steps.os_lower.outputs.lowercase }}.zip'
90+
91+
- name: Unpack Upscayl
92+
run: 7z x ${{ steps.os_lower.outputs.lowercase }}.zip
93+
94+
- name: Build Aeternum
95+
run: cargo build --release --features "package"
96+
97+
- name: Compile .ISS to .EXE Installer
98+
uses: Minionguyjpro/Inno-Setup-Action@v1.2.2
99+
with:
100+
path: assets/aeternum.iss
101+
options: /O+ /version=${{ github.ref_name }}
102+
103+
- name: Upload Setup
104+
env:
105+
GH_TOKEN: ${{ github.token }}
106+
run: gh release upload ${{ github.ref_name }} .\assets\Output\aeternum-setup.exe

Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,5 +42,8 @@ egui = "0.29.1"
4242
toml = "0.8.19"
4343
serde = {version = "1.0.215", features = ["derive"]}
4444

45+
[target.'cfg(windows)'.build-dependencies]
46+
winres = "0.1"
47+
4548
[features]
4649
package = []

assets/aeternum.ico

165 KB
Binary file not shown.

assets/aeternum.iss

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
; Script generated by the Inno Setup Script Wizard.
2+
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
3+
4+
#define MyAppName "Aeternum"
5+
#define MyAppPublisher "r3tr0ananas @ cloudy-org"
6+
#define MyAppURL "https://github.com/cloudy-org/aeternum"
7+
#define MyAppExeName "aeternum.exe"
8+
9+
[Setup]
10+
; NOTE: The value of AppId uniquely identifies this application. Do not use the same AppId value in installers for other applications.
11+
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
12+
AppId={{3F3466F8-DBF4-41C6-8D6F-6AF8914CA262}
13+
AppName={#MyAppName}
14+
AppVersion={param:version}
15+
AppPublisher={#MyAppPublisher}
16+
AppPublisherURL={#MyAppURL}
17+
AppSupportURL={#MyAppURL}
18+
AppUpdatesURL={#MyAppURL}
19+
DefaultDirName={autopf}\aeternum
20+
ArchitecturesAllowed=x64compatible
21+
ArchitecturesInstallIn64BitMode=x64compatible
22+
DisableProgramGroupPage=yes
23+
LicenseFile=..\LICENSE
24+
; Remove the following line to run in administrative install mode (install for all users).
25+
PrivilegesRequired=lowest
26+
PrivilegesRequiredOverridesAllowed=dialog
27+
OutputBaseFilename=aeternum-setup
28+
SetupIconFile=.\aeternum.ico
29+
SolidCompression=yes
30+
WizardStyle=modern
31+
32+
[Languages]
33+
Name: "english"; MessagesFile: "compiler:Default.isl"
34+
35+
[Tasks]
36+
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
37+
38+
[Files]
39+
Source: "..\target\release\{#MyAppExeName}"; DestDir: "{app}"; Flags: ignoreversion
40+
Source: "..\upscayl-bin-20240601-103425-windows\upscayl-bin.exe"; DestDir: "{app}"; Flags: ignoreversion
41+
Source: "models\*"; DestDir: "{app}\models"; Flags: ignoreversion
42+
43+
[Icons]
44+
Name: "{autoprograms}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
45+
Name: "{autodesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon
46+
47+
[Run]
48+
Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent

build.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#[cfg(windows)]
2+
extern crate winres;
3+
4+
#[cfg(windows)]
5+
fn main() {
6+
let mut res = winres::WindowsResource::new();
7+
res.set_icon("assets/aeternum.ico");
8+
res.compile().unwrap();
9+
}
10+
11+
#[cfg(unix)]
12+
fn main() {}

0 commit comments

Comments
 (0)