fix(packaging): don't hardcode arch/version in appmanifest

Signed-off-by: seth <getchoo@tuta.io>
This commit is contained in:
seth 2023-06-10 18:44:32 -04:00
parent c3770a9a32
commit 862acca151
No known key found for this signature in database
GPG Key ID: D31BD0D494BBEE86
2 changed files with 8 additions and 8 deletions

View File

@ -429,22 +429,22 @@ jobs:
Get-ChildItem ${{ env.INSTALL_PORTABLE_DIR }} -Recurse | ForEach FullName | Resolve-Path -Relative | %{ $_.TrimStart('.\') } | %{ $_.TrimStart('${{ env.INSTALL_PORTABLE_DIR }}') } | %{ $_.TrimStart('\') } | Out-File -FilePath ${{ env.INSTALL_DIR }}/manifest.txt Get-ChildItem ${{ env.INSTALL_PORTABLE_DIR }} -Recurse | ForEach FullName | Resolve-Path -Relative | %{ $_.TrimStart('.\') } | %{ $_.TrimStart('${{ env.INSTALL_PORTABLE_DIR }}') } | %{ $_.TrimStart('\') } | Out-File -FilePath ${{ env.INSTALL_DIR }}/manifest.txt
- name: Package (Windows MinGW-w64, installer) - name: Package (Windows MinGW-w64, installer)
if: runner.os == 'Windows' && (matrix.msystem != '' || matrix.architecture == "win32") if: runner.os == 'Windows' && (matrix.msystem != '' || matrix.architecture == 'win32')
run: | run: |
cd ${{ env.INSTALL_DIR }} cd ${{ env.INSTALL_DIR }}
makensis -NOCD "${{ github.workspace }}/${{ env.BUILD_DIR }}/program_info/win_install.nsi" makensis -NOCD "${{ github.workspace }}/${{ env.BUILD_DIR }}/program_info/win_install.nsi"
- name: Package (Windows MSVC, installer) - name: Package (Windows MSVC, installer)
if: runner.os == 'Windows' && matrix.msystem == '' && matrix.architecture != "win32" if: runner.os == 'Windows' && matrix.msystem == '' && matrix.architecture != 'win32'
shell: pwsh shell: pwsh
run: | run: |
cd ${{ env.INSTALL_DIR }} cd ${{ env.INSTALL_DIR }}
Copy-Item ..\program_info\prismlauncher_*x*.png . Copy-Item ..\program_info\prismlauncher_*x*.png .
Copy-Item ..\program_info\AppxManifest.xml . (Get-Content ..\program_info\AppxManifest.xml) -replace "PRISM_VERSION_REPLACEME","${{ env.VERSION }}.0.0" -replace "PRISM_ARCH_REPLACEME","${{ matrix.architecture }}" > ${{ env.INSTALL_DIR }}\AppxManifest.xml
makeappx.exe pack /v /h SHA256 /d . /p prismlauncher.msix makeappx.exe pack /v /h SHA256 /d . /p prismlauncher.msix
- name: Sign installer (Windows MinGW-w64/MSVC Legacy) - name: Sign installer (Windows MinGW-w64/MSVC Legacy)
if: runner.os == 'Windows' && (matrix.msystem != '' || matrix.architecture == "win32") if: runner.os == 'Windows' && (matrix.msystem != '' || matrix.architecture == 'win32')
run: | run: |
if (Get-Content ./codesign.pfx){ if (Get-Content ./codesign.pfx){
SignTool sign /fd sha256 /td sha256 /f codesign.pfx /p '${{ secrets.WINDOWS_CODESIGN_PASSWORD }}' /tr http://timestamp.digicert.com PrismLauncher-Setup.exe SignTool sign /fd sha256 /td sha256 /f codesign.pfx /p '${{ secrets.WINDOWS_CODESIGN_PASSWORD }}' /tr http://timestamp.digicert.com PrismLauncher-Setup.exe
@ -453,7 +453,7 @@ jobs:
} }
- name: Sign installer (Windows MSVC) - name: Sign installer (Windows MSVC)
if: runner.os == 'Windows' && matrix.msystem == '' && matrix.architecture != "win32" if: runner.os == 'Windows' && matrix.msystem == '' && matrix.architecture != 'win32'
run: | run: |
if (Get-Content ./codesign.pfx){ if (Get-Content ./codesign.pfx){
SignTool sign /fd sha256 /td sha256 /f codesign.pfx /p '${{ secrets.WINDOWS_CODESIGN_PASSWORD }}' /tr http://timestamp.digicert.com ${{ env.INSTALL_DIR }}/prismlauncher.msix SignTool sign /fd sha256 /td sha256 /f codesign.pfx /p '${{ secrets.WINDOWS_CODESIGN_PASSWORD }}' /tr http://timestamp.digicert.com ${{ env.INSTALL_DIR }}/prismlauncher.msix
@ -540,14 +540,14 @@ jobs:
path: ${{ env.INSTALL_PORTABLE_DIR }}/** path: ${{ env.INSTALL_PORTABLE_DIR }}/**
- name: Upload installer (Windows MinGW-w64/MSVC Legacy) - name: Upload installer (Windows MinGW-w64/MSVC Legacy)
if: runner.os == 'Windows' && (matrix.msystem != '' || matrix.architecture == "win32") if: runner.os == 'Windows' && (matrix.msystem != '' || matrix.architecture == 'win32')
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v3
with: with:
name: PrismLauncher-${{ matrix.name }}-Setup-${{ env.VERSION }}-${{ inputs.build_type }} name: PrismLauncher-${{ matrix.name }}-Setup-${{ env.VERSION }}-${{ inputs.build_type }}
path: PrismLauncher-Setup.exe path: PrismLauncher-Setup.exe
- name: Upload installer (Windows MSVC) - name: Upload installer (Windows MSVC)
if: runner.os == 'Windows' && matrix.msystem == '' && matrix.architecture != "win32" if: runner.os == 'Windows' && matrix.msystem == '' && matrix.architecture != 'win32'
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v3
with: with:
name: PrismLauncher-${{ matrix.name }}-MSIX-${{ env.VERSION }}-${{ inputs.build_type }} name: PrismLauncher-${{ matrix.name }}-MSIX-${{ env.VERSION }}-${{ inputs.build_type }}

View File

@ -7,7 +7,7 @@
xmlns:virtualization="http://schemas.microsoft.com/appx/manifest/virtualization/windows10" xmlns:virtualization="http://schemas.microsoft.com/appx/manifest/virtualization/windows10"
xmlns:desktop6="http://schemas.microsoft.com/appx/manifest/desktop/windows10/6" xmlns:desktop6="http://schemas.microsoft.com/appx/manifest/desktop/windows10/6"
IgnorableNamespaces="rescap virtualization desktop6"> IgnorableNamespaces="rescap virtualization desktop6">
<Identity Name="github.PrismLauncher.PrismLauncher" Version="7.0.0.0" Publisher="CN=PrismLauncher, O=PrismLauncher, L=MyCity, S=MyState, C=MyCountry" ProcessorArchitecture="x64" /> <Identity Name="github.PrismLauncher.PrismLauncher" Version="PRISM_VERSION_REPLACEME" Publisher="CN=PrismLauncher, O=PrismLauncher, L=MyCity, S=MyState, C=MyCountry" ProcessorArchitecture="PRISM_ARCH_REPLACEME" />
<Properties> <Properties>
<DisplayName>Prism Launcher</DisplayName> <DisplayName>Prism Launcher</DisplayName>
<PublisherDisplayName>Prism Launcher</PublisherDisplayName> <PublisherDisplayName>Prism Launcher</PublisherDisplayName>