Skip to content

Commit

Permalink
Add windows installer build
Browse files Browse the repository at this point in the history
Fix build dir and var name

Fix onefile in build.yaml
  • Loading branch information
abhishekmj303 committed Sep 16, 2024
1 parent 42de440 commit a7ce924
Show file tree
Hide file tree
Showing 3 changed files with 64 additions and 4 deletions.
13 changes: 10 additions & 3 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,15 @@ jobs:
with:
nuitka-version: main
script-name: ytm2spt.py
enable-plugins: pyside6
user-package-configuration-file: ytmusicapi.nuitka-package.config.yaml
onefile: false
# enable-plugins: pyside6
# user-package-configuration-file: ytmusicapi.nuitka-package.config.yaml

- name: Build Windows Installer
if: matrix.os == 'windows-latest'
uses: Minionguyjpro/[email protected]
with:
path: windows-installer.iss

- id: runnerOS
uses: ASzc/change-string-case-action@v6
Expand Down Expand Up @@ -70,7 +77,7 @@ jobs:
- name: Zip Windows Executable
run: |
cd *windows-build
zip -9 ytm2spt-${{ github.ref_name }}-windows.zip *.exe
zip -9 ytm2spt-${{ github.ref_name }}-windows.zip *-installer.exe
- name: Tar Linux Executable
run: |
Expand Down
47 changes: 47 additions & 0 deletions windows-installer.iss
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
; Script generated by the Inno Setup Script Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!

#define MyAppName "ytm2spt"
#define MyAppVersion "1.0.0"
#define MyAppPublisher "Abhishek M J"
#define MyAppURL "https://github.com/abhishekmj303/ytm2spt"
#define MyAppExeName "ytm2spt.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={{1D3251C7-B28D-4C1D-9477-6244D52CA08E}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
;AppVerName={#MyAppName} {#MyAppVersion}
AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
DefaultDirName={autopf}\{#MyAppName}
DisableProgramGroupPage=yes
; Remove the following line to run in administrative install mode (install for all users.)
PrivilegesRequired=lowest
PrivilegesRequiredOverridesAllowed=dialog
OutputDir=.\build
OutputBaseFilename=ytm2spt-installer
Compression=lzma
SolidCompression=yes
WizardStyle=modern

[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"

[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked

[Files]
Source: ".\build\ytm2spt.dist\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs

[Icons]
Name: "{autoprograms}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
Name: "{autodesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon

[Run]
Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent

8 changes: 7 additions & 1 deletion ytm2spt.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
# Nuitka Configuration
# nuitka-project: --enable-plugins=pyside6
# nuitka-project: --user-package-configuration-file=ytmusicapi.nuitka-package.config.yaml
#
# Compilation mode, standalone everywhere, except on macOS there app bundle
# nuitka-project-if: {OS} in ("Windows", "Linux", "FreeBSD"):
# nuitka-project-if: {OS} in ("Linux", "FreeBSD"):
# nuitka-project: --onefile
# nuitka-project-if: {OS} == "Windows":
# nuitka-project: --standalone
# nuitka-project-if: {OS} == "Darwin":
# nuitka-project: --standalone
# nuitka-project: --macos-create-app-bundle
Expand Down

0 comments on commit a7ce924

Please sign in to comment.