Skip to content

Commit 06804ef

Browse files
Update build-and-release workflow to install Inno Setup and build installer
1 parent cc1291f commit 06804ef

File tree

7 files changed

+152
-3
lines changed

7 files changed

+152
-3
lines changed

.github/workflows/build-and-release.yml

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
- name: Set up Python
2020
uses: actions/setup-python@v4
2121
with:
22-
python-version: '3.11'
22+
python-version: '3.11'
2323

2424
- name: Install dependencies
2525
run: |
@@ -31,6 +31,20 @@ jobs:
3131
run: |
3232
pyinstaller main.py --onefile --noconsole --name ChiX --icon=generated-icon.png
3333
34+
- name: Copy EXE to setup input location
35+
run: |
36+
mkdir installer_input
37+
copy dist\ChiX.exe installer_input\ChiX.exe
38+
39+
- name: Install Inno Setup
40+
run: |
41+
choco install innosetup --yes
42+
43+
- name: Build Inno Setup installer
44+
run: |
45+
"C:\Program Files (x86)\Inno Setup 6\ISCC.exe" installer_script.iss
46+
# Make sure installer_script.iss is in the root of the repo
47+
3448
- name: Get short commit hash
3549
id: vars
3650
shell: pwsh
@@ -45,6 +59,8 @@ jobs:
4559
name: "ChiX Editor Build ${{ env.SHORT_SHA }}"
4660
draft: false
4761
prerelease: false
48-
files: dist/ChiX.exe
62+
files: |
63+
dist/ChiX.exe
64+
chix-setup.exe # name matches OutputBaseFilename from .iss script
4965
env:
50-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
66+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

X.ico

7.66 KB
Binary file not shown.

inno setup/Output/chix-setup.exe

18.7 MB
Binary file not shown.

inno setup/inno.iss

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
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 "ChiX - C Editor"
5+
#define MyAppVersion "1.0"
6+
#define MyAppPublisher "ProTec Games"
7+
#define MyAppURL "https://prakhardoneria.tech/"
8+
#define MyAppExeName "ChiX.exe"
9+
#define MyAppAssocName MyAppName + " File"
10+
#define MyAppAssocExt ".myp"
11+
#define MyAppAssocKey StringChange(MyAppAssocName, " ", "") + MyAppAssocExt
12+
13+
[Setup]
14+
; NOTE: The value of AppId uniquely identifies this application. Do not use the same AppId value in installers for other applications.
15+
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
16+
AppId={{2EF91213-2059-40ED-AFF3-34314A97ED04}
17+
AppName={#MyAppName}
18+
AppVersion={#MyAppVersion}
19+
;AppVerName={#MyAppName} {#MyAppVersion}
20+
AppPublisher={#MyAppPublisher}
21+
AppPublisherURL={#MyAppURL}
22+
AppSupportURL={#MyAppURL}
23+
AppUpdatesURL={#MyAppURL}
24+
DefaultDirName={autopf}\{#MyAppName}
25+
UninstallDisplayIcon={app}\{#MyAppExeName}
26+
; "ArchitecturesAllowed=x64compatible" specifies that Setup cannot run
27+
; on anything but x64 and Windows 11 on Arm.
28+
ArchitecturesAllowed=x64compatible
29+
; "ArchitecturesInstallIn64BitMode=x64compatible" requests that the
30+
; install be done in "64-bit mode" on x64 or Windows 11 on Arm,
31+
; meaning it should use the native 64-bit Program Files directory and
32+
; the 64-bit view of the registry.
33+
ArchitecturesInstallIn64BitMode=x64compatible
34+
ChangesAssociations=yes
35+
DisableProgramGroupPage=yes
36+
LicenseFile=C:\Users\lenovo\Downloads\LICENSE.txt
37+
; Uncomment the following line to run in non administrative install mode (install for current user only).
38+
;PrivilegesRequired=lowest
39+
OutputBaseFilename=chix-setup
40+
SetupIconFile=C:\Users\lenovo\Downloads\X.ico
41+
SolidCompression=yes
42+
WizardStyle=modern
43+
44+
[Languages]
45+
Name: "english"; MessagesFile: "compiler:Default.isl"
46+
47+
[Tasks]
48+
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
49+
50+
[Files]
51+
Source: "C:\Users\lenovo\Downloads\{#MyAppExeName}"; DestDir: "{app}"; Flags: ignoreversion
52+
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
53+
54+
[Registry]
55+
Root: HKA; Subkey: "Software\Classes\{#MyAppAssocExt}\OpenWithProgids"; ValueType: string; ValueName: "{#MyAppAssocKey}"; ValueData: ""; Flags: uninsdeletevalue
56+
Root: HKA; Subkey: "Software\Classes\{#MyAppAssocKey}"; ValueType: string; ValueName: ""; ValueData: "{#MyAppAssocName}"; Flags: uninsdeletekey
57+
Root: HKA; Subkey: "Software\Classes\{#MyAppAssocKey}\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{app}\{#MyAppExeName},0"
58+
Root: HKA; Subkey: "Software\Classes\{#MyAppAssocKey}\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{app}\{#MyAppExeName}"" ""%1"""
59+
60+
[Icons]
61+
Name: "{autoprograms}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
62+
Name: "{autodesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon
63+
64+
[Run]
65+
Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent
66+

installer_script.iss

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
; Inno Setup Script for ChiX - C Editor (CI/CD Friendly)
2+
3+
#define MyAppName "ChiX - C Editor"
4+
#define MyAppVersion "1.0"
5+
#define MyAppPublisher "ProTec Games"
6+
#define MyAppURL "https://prakhardoneria.tech/"
7+
#define MyAppExeName "ChiX.exe"
8+
#define MyAppAssocName MyAppName + " File"
9+
#define MyAppAssocExt ".myp"
10+
#define MyAppAssocKey StringChange(MyAppAssocName, " ", "") + MyAppAssocExt
11+
12+
[Setup]
13+
AppId={{2EF91213-2059-40ED-AFF3-34314A97ED04}
14+
AppName={#MyAppName}
15+
AppVersion={#MyAppVersion}
16+
AppPublisher={#MyAppPublisher}
17+
AppPublisherURL={#MyAppURL}
18+
AppSupportURL={#MyAppURL}
19+
AppUpdatesURL={#MyAppURL}
20+
DefaultDirName={autopf}\{#MyAppName}
21+
UninstallDisplayIcon={app}\{#MyAppExeName}
22+
ArchitecturesAllowed=x64compatible
23+
ArchitecturesInstallIn64BitMode=x64compatible
24+
ChangesAssociations=yes
25+
DisableProgramGroupPage=yes
26+
LicenseFile=LICENSE.txt
27+
OutputBaseFilename=chix-setup
28+
SetupIconFile=X.ico
29+
SolidCompression=yes
30+
WizardStyle=modern
31+
OutputDir=dist
32+
33+
[Languages]
34+
Name: "english"; MessagesFile: "compiler:Default.isl"
35+
36+
[Tasks]
37+
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
38+
39+
[Files]
40+
Source: "installer_input\{#MyAppExeName}"; DestDir: "{app}"; Flags: ignoreversion
41+
42+
[Registry]
43+
Root: HKA; Subkey: "Software\Classes\{#MyAppAssocExt}\OpenWithProgids"; ValueType: string; ValueName: "{#MyAppAssocKey}"; ValueData: ""; Flags: uninsdeletevalue
44+
Root: HKA; Subkey: "Software\Classes\{#MyAppAssocKey}"; ValueType: string; ValueName: ""; ValueData: "{#MyAppAssocName}"; Flags: uninsdeletekey
45+
Root: HKA; Subkey: "Software\Classes\{#MyAppAssocKey}\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{app}\{#MyAppExeName},0"
46+
Root: HKA; Subkey: "Software\Classes\{#MyAppAssocKey}\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{app}\{#MyAppExeName}"" ""%1"""
47+
48+
[Icons]
49+
Name: "{autoprograms}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
50+
Name: "{autodesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon
51+
52+
[Run]
53+
Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent

temp/program.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#include <stdio.h>
2+
#include <conio.h>
3+
4+
void main(){
5+
printf("hello");
6+
getch();
7+
}

test files/print function.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#include <stdio.h>
2+
#include <conio.h>
3+
4+
void main(){
5+
printf("hello");
6+
getch();
7+
}

0 commit comments

Comments
 (0)