diff --git a/.github/workflows/build-windows.yml b/.github/workflows/build-windows.yml index 2a8948244..4b67d2f2b 100644 --- a/.github/workflows/build-windows.yml +++ b/.github/workflows/build-windows.yml @@ -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/Inno-Setup-Action@v1.2.2 + 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 diff --git a/.gitignore b/.gitignore index 6d7281f74..b7b08d476 100644 --- a/.gitignore +++ b/.gitignore @@ -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 diff --git a/gui/CMakeLists.txt b/gui/CMakeLists.txt index 68fec5391..6caf39e89 100755 --- a/gui/CMakeLists.txt +++ b/gui/CMakeLists.txt @@ -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() diff --git a/gui/chiaking.rc b/gui/chiaking.rc deleted file mode 100644 index d6e9c607b..000000000 --- a/gui/chiaking.rc +++ /dev/null @@ -1 +0,0 @@ -IDI_ICON1 ICON DISCARDABLE "chiaking.ico" \ No newline at end of file diff --git a/gui/chiaking.rc.in b/gui/chiaking.rc.in new file mode 100644 index 000000000..908d93843 --- /dev/null +++ b/gui/chiaking.rc.in @@ -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@.@CHIAKI_VERSION_PATCH@.0\0" + +#define VER_PRODUCTVERSION @CHIAKI_VERSION_MAJOR@,@CHIAKI_VERSION_MINOR@,@CHIAKI_VERSION_PATCH@,0 +#define VER_PRODUCTVERSION_STR "@CHIAKI_VERSION_MAJOR@.@CHIAKI_VERSION_MINOR@.@CHIAKI_VERSION_PATCH@.0\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" \ No newline at end of file diff --git a/scripts/chiaki-ng.iss b/scripts/chiaki-ng.iss new file mode 100644 index 000000000..eeb1eb929 --- /dev/null +++ b/scripts/chiaki-ng.iss @@ -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 +