Skip to content

Commit a7ce924

Browse files
committed
Add windows installer build
Fix build dir and var name Fix onefile in build.yaml
1 parent 42de440 commit a7ce924

File tree

3 files changed

+64
-4
lines changed

3 files changed

+64
-4
lines changed

.github/workflows/build.yaml

+10-3
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,15 @@ jobs:
3636
with:
3737
nuitka-version: main
3838
script-name: ytm2spt.py
39-
enable-plugins: pyside6
40-
user-package-configuration-file: ytmusicapi.nuitka-package.config.yaml
39+
onefile: false
40+
# enable-plugins: pyside6
41+
# user-package-configuration-file: ytmusicapi.nuitka-package.config.yaml
42+
43+
- name: Build Windows Installer
44+
if: matrix.os == 'windows-latest'
45+
uses: Minionguyjpro/[email protected]
46+
with:
47+
path: windows-installer.iss
4148

4249
- id: runnerOS
4350
uses: ASzc/change-string-case-action@v6
@@ -70,7 +77,7 @@ jobs:
7077
- name: Zip Windows Executable
7178
run: |
7279
cd *windows-build
73-
zip -9 ytm2spt-${{ github.ref_name }}-windows.zip *.exe
80+
zip -9 ytm2spt-${{ github.ref_name }}-windows.zip *-installer.exe
7481
7582
- name: Tar Linux Executable
7683
run: |

windows-installer.iss

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
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 "ytm2spt"
5+
#define MyAppVersion "1.0.0"
6+
#define MyAppPublisher "Abhishek M J"
7+
#define MyAppURL "https://github.com/abhishekmj303/ytm2spt"
8+
#define MyAppExeName "ytm2spt.exe"
9+
10+
[Setup]
11+
; NOTE: The value of AppId uniquely identifies this application. Do not use the same AppId value in installers for other applications.
12+
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
13+
AppId={{1D3251C7-B28D-4C1D-9477-6244D52CA08E}
14+
AppName={#MyAppName}
15+
AppVersion={#MyAppVersion}
16+
;AppVerName={#MyAppName} {#MyAppVersion}
17+
AppPublisher={#MyAppPublisher}
18+
AppPublisherURL={#MyAppURL}
19+
AppSupportURL={#MyAppURL}
20+
AppUpdatesURL={#MyAppURL}
21+
DefaultDirName={autopf}\{#MyAppName}
22+
DisableProgramGroupPage=yes
23+
; Remove the following line to run in administrative install mode (install for all users.)
24+
PrivilegesRequired=lowest
25+
PrivilegesRequiredOverridesAllowed=dialog
26+
OutputDir=.\build
27+
OutputBaseFilename=ytm2spt-installer
28+
Compression=lzma
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: ".\build\ytm2spt.dist\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
40+
41+
[Icons]
42+
Name: "{autoprograms}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
43+
Name: "{autodesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon
44+
45+
[Run]
46+
Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent
47+

ytm2spt.py

+7-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
1+
# Nuitka Configuration
2+
# nuitka-project: --enable-plugins=pyside6
3+
# nuitka-project: --user-package-configuration-file=ytmusicapi.nuitka-package.config.yaml
4+
#
15
# Compilation mode, standalone everywhere, except on macOS there app bundle
2-
# nuitka-project-if: {OS} in ("Windows", "Linux", "FreeBSD"):
6+
# nuitka-project-if: {OS} in ("Linux", "FreeBSD"):
37
# nuitka-project: --onefile
8+
# nuitka-project-if: {OS} == "Windows":
9+
# nuitka-project: --standalone
410
# nuitka-project-if: {OS} == "Darwin":
511
# nuitka-project: --standalone
612
# nuitka-project: --macos-create-app-bundle

0 commit comments

Comments
 (0)