Skip to content

Commit

Permalink
Merge pull request #467 from streetpea/windows-installer
Browse files Browse the repository at this point in the history
Add Windows installer
  • Loading branch information
streetpea authored Nov 11, 2024
2 parents 997f1e2 + a019262 commit d26d3c4
Show file tree
Hide file tree
Showing 6 changed files with 144 additions and 12 deletions.
18 changes: 7 additions & 11 deletions .github/workflows/build-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -173,20 +173,16 @@ jobs:
cp "${{ github.workspace }}\${{ env.dep_folder }}\bin\spirv-cross-c-shared.dll" chiaki-ng-VC
windeployqt.exe --no-translations --qmldir=gui/src/qml/ chiaki-ng-VC\chiaki.exe
- name: Package chiaki-ng
run: |
$CHIAKI_VERSION_MAJOR = (Select-String -Path .\CMakeLists.txt -Pattern 'set\(CHIAKI_VERSION_MAJOR ([0-9]+)\)') | %{$_.Matches.Groups[1].value}
$CHIAKI_VERSION_MINOR = (Select-String -Path .\CMakeLists.txt -Pattern 'set\(CHIAKI_VERSION_MINOR ([0-9]+)\)') | %{$_.Matches.Groups[1].value}
$CHIAKI_VERSION_PATCH = (Select-String -Path .\CMakeLists.txt -Pattern 'set\(CHIAKI_VERSION_PATCH ([0-9]+)\)') | %{$_.Matches.Groups[1].value}
$RELEASE_PACKAGE_FILE = "chiaki-ng-win_x64-VC-$CHIAKI_VERSION_MAJOR.$CHIAKI_VERSION_MINOR.$CHIAKI_VERSION_PATCH.zip"
Compress-Archive chiaki-ng-VC $RELEASE_PACKAGE_FILE
$release_filepath = Get-ChildItem $RELEASE_PACKAGE_FILE | %{$_[0].FullName}
echo "RELEASE_PACKAGE_PATH=$release_filepath" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append
- name: Compile .ISS to .EXE Installer
uses: Minionguyjpro/[email protected]
with:
path: "scripts/chiaki-ng.iss"
options: /O+

- name: Upload chiaki-ng Artifact
uses: actions/upload-artifact@v4
with:
name: chiaki-ng-win_x64-VC-Release
path: ${{ env.RELEASE_PACKAGE_PATH }}
name: chiaki-ng-win_x64-VC-installer.zip
path: chiaki-ng-windows-installer.exe
if-no-files-found: error
retention-days: 7
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,12 @@ appdir
/sdl2-*
/protoc*
/openssl*
scripts/chiaki-ng.iss
scripts/Output
.vs
CMakeSettings.json
chiaki.rb
gui/chiaking.rc
*.jks
secret.tar
keystore-env.sh
Expand Down
4 changes: 4 additions & 0 deletions gui/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ set(RESOURCE_FILES "")
if(APPLE)
list(APPEND RESOURCE_FILES "chiaking.icns")
elseif(WIN32)
configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/chiaking.rc.in
${CMAKE_CURRENT_SOURCE_DIR}/chiaking.rc
@ONLY)
list(APPEND RESOURCE_FILES "chiaking.rc")
endif()

Expand Down
1 change: 0 additions & 1 deletion gui/chiaking.rc

This file was deleted.

40 changes: 40 additions & 0 deletions gui/chiaking.rc.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
#define VER_FILEVERSION @CHIAKI_VERSION_MAJOR@,@CHIAKI_VERSION_MINOR@,@CHIAKI_VERSION_PATCH@,0
#define VER_FILEVERSION_STR "@CHIAKI_VERSION_MAJOR@.@CHIAKI_VERSION_MINOR@.@[email protected]\0"

#define VER_PRODUCTVERSION @CHIAKI_VERSION_MAJOR@,@CHIAKI_VERSION_MINOR@,@CHIAKI_VERSION_PATCH@,0
#define VER_PRODUCTVERSION_STR "@CHIAKI_VERSION_MAJOR@.@CHIAKI_VERSION_MINOR@.@[email protected]\0"

1 VERSIONINFO
FILEVERSION VER_FILEVERSION
PRODUCTVERSION VER_PRODUCTVERSION
FILEFLAGSMASK 0x17L
#ifdef _DEBUG
FILEFLAGS 0x1L
#else
FILEFLAGS 0x0L
#endif
FILEOS 0x4L
FILETYPE 0x1L
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "080904b0"
BEGIN
VALUE "Comments", "next-generation of Chiaki"
VALUE "CompanyName", "Stret Pea"
VALUE "FileDescription", "Open-Source PlayStation Remote Play App"
VALUE "FileVersion", VER_FILEVERSION_STR
VALUE "InternalName", "chiaki-ng"
VALUE "LegalCopyright", "AGPLv3 Stret Pea 2022"
VALUE "OriginalFilename", "chiaki.exe"
VALUE "ProductName", "chiaki-ng"
VALUE "ProductVersion", VER_PRODUCTVERSION_STR
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x809, 1200
END
END
IDI_ICON1 ICON DISCARDABLE "chiaking.ico"
90 changes: 90 additions & 0 deletions scripts/chiaki-ng.iss
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
; Script generated by the Inno Setup Script Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!

#define MyAppName "chiaki-ng"
#define MyAppPublisher "Street Pea"
#define MyAppURL "https://streetpea.github.io/chiaki-ng/"
#define MyAppExeName "chiaki.exe"
#define MyAppPath "..\build\gui"
#define MyAppVersion() \
GetVersionComponents(MyAppPath + "\" + MyAppExeName, Local[0], Local[1], Local[2], Local[3]), \
Str(Local[0]) + "." + Str(Local[1]) + "." + Str(Local[2])

[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={{A329DCDE-074D-4C82-959A-3CFAC9A26B1F}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
;AppVerName={#MyAppName} {#MyAppVersion}
AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
DefaultDirName={autopf}\{#MyAppName}
; "ArchitecturesAllowed=x64compatible" specifies that Setup cannot run
; on anything but x64 and Windows 11 on Arm.
ArchitecturesAllowed=x64compatible
; "ArchitecturesInstallIn64BitMode=x64compatible" requests that the
; install be done in "64-bit mode" on x64 or Windows 11 on Arm,
; meaning it should use the native 64-bit Program Files directory and
; the 64-bit view of the registry.
ArchitecturesInstallIn64BitMode=x64compatible
ChangesAssociations=yes
DefaultGroupName={#MyAppName}
AllowNoIcons=yes
LicenseFile=..\LICENSES\AGPL-3.0-only-OpenSSL.txt
; Uncomment the following line to run in non administrative install mode (install for current user only.)
;PrivilegesRequired=lowest
PrivilegesRequiredOverridesAllowed=dialog
OutputBaseFilename=chiaki-ng-windows-installer
OutputDir=..
SetupIconFile=..\gui\chiaking.ico
Compression=lzma
SolidCompression=yes
WizardStyle=modern

[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"
Name: "armenian"; MessagesFile: "compiler:Languages\Armenian.isl"
Name: "brazilianportuguese"; MessagesFile: "compiler:Languages\BrazilianPortuguese.isl"
Name: "bulgarian"; MessagesFile: "compiler:Languages\Bulgarian.isl"
Name: "catalan"; MessagesFile: "compiler:Languages\Catalan.isl"
Name: "corsican"; MessagesFile: "compiler:Languages\Corsican.isl"
Name: "czech"; MessagesFile: "compiler:Languages\Czech.isl"
Name: "danish"; MessagesFile: "compiler:Languages\Danish.isl"
Name: "dutch"; MessagesFile: "compiler:Languages\Dutch.isl"
Name: "finnish"; MessagesFile: "compiler:Languages\Finnish.isl"
Name: "french"; MessagesFile: "compiler:Languages\French.isl"
Name: "german"; MessagesFile: "compiler:Languages\German.isl"
Name: "hebrew"; MessagesFile: "compiler:Languages\Hebrew.isl"
Name: "hungarian"; MessagesFile: "compiler:Languages\Hungarian.isl"
Name: "icelandic"; MessagesFile: "compiler:Languages\Icelandic.isl"
Name: "italian"; MessagesFile: "compiler:Languages\Italian.isl"
Name: "japanese"; MessagesFile: "compiler:Languages\Japanese.isl"
Name: "korean"; MessagesFile: "compiler:Languages\Korean.isl"
Name: "norwegian"; MessagesFile: "compiler:Languages\Norwegian.isl"
Name: "polish"; MessagesFile: "compiler:Languages\Polish.isl"
Name: "portuguese"; MessagesFile: "compiler:Languages\Portuguese.isl"
Name: "russian"; MessagesFile: "compiler:Languages\Russian.isl"
Name: "slovak"; MessagesFile: "compiler:Languages\Slovak.isl"
Name: "slovenian"; MessagesFile: "compiler:Languages\Slovenian.isl"
Name: "spanish"; MessagesFile: "compiler:Languages\Spanish.isl"
Name: "turkish"; MessagesFile: "compiler:Languages\Turkish.isl"
Name: "ukrainian"; MessagesFile: "compiler:Languages\Ukrainian.isl"

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

[Files]
Source: "{#MyAppPath}\{#MyAppExeName}"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#MyAppPath}\*"; 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: "{autodesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon

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

0 comments on commit d26d3c4

Please sign in to comment.