mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2026-02-16 02:30:52 +00:00
Switch to GitHub Actions for Windows and macOS builds
This commit is contained in:
113
.github/workflows/build-win-mac.yml
vendored
Normal file
113
.github/workflows/build-win-mac.yml
vendored
Normal file
@@ -0,0 +1,113 @@
|
|||||||
|
name: Build Windows and macOS
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
pull_request:
|
||||||
|
branches: [ "master" ]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
# Windows
|
||||||
|
- os: windows-2025
|
||||||
|
qt_version: 6.10.0
|
||||||
|
# macOS
|
||||||
|
- os: macos-15
|
||||||
|
qt_version: 6.10.0
|
||||||
|
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout Repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
submodules: 'recursive'
|
||||||
|
fetch-depth: 1
|
||||||
|
|
||||||
|
- name: Set CI version
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
CI_VERSION=`echo $GITHUB_SHA | cut -c1-6`
|
||||||
|
echo "CI_VERSION=$CI_VERSION" >> $GITHUB_ENV
|
||||||
|
|
||||||
|
- name: Install create-dmg (macOS)
|
||||||
|
if: runner.os == 'macOS'
|
||||||
|
run: |
|
||||||
|
brew install node
|
||||||
|
npm install --global create-dmg
|
||||||
|
|
||||||
|
- name: Install Qt
|
||||||
|
uses: jurplel/install-qt-action@v4
|
||||||
|
with:
|
||||||
|
cache: true
|
||||||
|
set-env: ${{ runner.os != 'Windows' }}
|
||||||
|
add-tools-to-path: ${{ runner.os != 'Windows' }}
|
||||||
|
version: ${{ matrix.qt_version }}
|
||||||
|
|
||||||
|
- name: Install Qt ARM64 (Windows)
|
||||||
|
if: runner.os == 'Windows'
|
||||||
|
uses: jurplel/install-qt-action@v4
|
||||||
|
with:
|
||||||
|
cache: true
|
||||||
|
set-env: false
|
||||||
|
add-tools-to-path: false
|
||||||
|
arch: win64_msvc2022_arm64_cross_compiled
|
||||||
|
version: ${{ matrix.qt_version }}
|
||||||
|
|
||||||
|
- name: Build x64 binaries (Windows)
|
||||||
|
if: runner.os == 'Windows'
|
||||||
|
shell: cmd
|
||||||
|
run: |
|
||||||
|
set "PATH=%QT_PATH%;%PATH%"
|
||||||
|
scripts\build-arch.bat Release x64
|
||||||
|
env:
|
||||||
|
QT_PATH: ${{ runner.workspace }}\Qt\${{ matrix.qt_version }}\msvc2022_64\bin
|
||||||
|
|
||||||
|
- name: Build ARM64 binaries (Windows)
|
||||||
|
if: runner.os == 'Windows'
|
||||||
|
shell: cmd
|
||||||
|
run: |
|
||||||
|
set "PATH=%QT_PATH%;%PATH%"
|
||||||
|
scripts\build-arch.bat Release arm64
|
||||||
|
env:
|
||||||
|
QT_PATH: ${{ runner.workspace }}\Qt\${{ matrix.qt_version }}\msvc2022_arm64\bin
|
||||||
|
|
||||||
|
- name: Build Package
|
||||||
|
shell: pwsh
|
||||||
|
run: |
|
||||||
|
if ($Env:RUNNER_OS -eq "Windows") {
|
||||||
|
cmd /c scripts\generate-bundle.bat Release
|
||||||
|
} else {
|
||||||
|
bash scripts/generate-dmg.sh Release
|
||||||
|
}
|
||||||
|
|
||||||
|
- name: Collect Artifacts
|
||||||
|
shell: pwsh
|
||||||
|
run: |
|
||||||
|
New-Item -Path archive -ItemType Directory
|
||||||
|
if ($Env:RUNNER_OS -eq "Windows") {
|
||||||
|
Copy-Item -Path "build/installer-x64-release/*" -Destination archive
|
||||||
|
Copy-Item -Path "build/installer-arm64-release/*" -Destination archive
|
||||||
|
} else {
|
||||||
|
Copy-Item -Path "build/installer-Release/*.dmg" -Destination archive
|
||||||
|
}
|
||||||
|
|
||||||
|
- name: Upload Binaries
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: Moonlight-${{ runner.os }}-${{ env.CI_VERSION }}
|
||||||
|
path: archive/*
|
||||||
|
compression-level: 0
|
||||||
|
if-no-files-found: error
|
||||||
|
|
||||||
|
- name: Upload Symbols
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: zDevDbgSyms-${{ runner.os }}-${{ env.CI_VERSION }}
|
||||||
|
path: |
|
||||||
|
build/installer-*/*.dsym/*
|
||||||
|
build/symbols-*/*.pdb
|
||||||
|
if-no-files-found: error
|
||||||
@@ -6,6 +6,7 @@ Moonlight also has mobile versions for [Android](https://github.com/moonlight-st
|
|||||||
|
|
||||||
You can follow development on our [Discord server](https://moonlight-stream.org/discord) and help translate Moonlight into your language on [Weblate](https://hosted.weblate.org/projects/moonlight/moonlight-qt/).
|
You can follow development on our [Discord server](https://moonlight-stream.org/discord) and help translate Moonlight into your language on [Weblate](https://hosted.weblate.org/projects/moonlight/moonlight-qt/).
|
||||||
|
|
||||||
|
[](https://github.com/moonlight-stream/moonlight-qt/actions/workflows/build-win-mac.yml?query=branch%3Amaster)
|
||||||
[](https://ci.appveyor.com/project/cgutman/moonlight-qt/branch/master)
|
[](https://ci.appveyor.com/project/cgutman/moonlight-qt/branch/master)
|
||||||
[](https://github.com/moonlight-stream/moonlight-qt/releases)
|
[](https://github.com/moonlight-stream/moonlight-qt/releases)
|
||||||
[](https://hosted.weblate.org/projects/moonlight/moonlight-qt/)
|
[](https://hosted.weblate.org/projects/moonlight/moonlight-qt/)
|
||||||
|
|||||||
32
appveyor.yml
32
appveyor.yml
@@ -4,11 +4,6 @@ clone_depth: 1
|
|||||||
|
|
||||||
environment:
|
environment:
|
||||||
matrix:
|
matrix:
|
||||||
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022
|
|
||||||
QTDIR: C:\Qt\6.9
|
|
||||||
- APPVEYOR_BUILD_WORKER_IMAGE: macOS-Sonoma
|
|
||||||
BUILD_TARGET: macos
|
|
||||||
QTDIR: Qt/6.6
|
|
||||||
- APPVEYOR_BUILD_WORKER_IMAGE: Ubuntu1604
|
- APPVEYOR_BUILD_WORKER_IMAGE: Ubuntu1604
|
||||||
BUILD_TARGET: steamlink
|
BUILD_TARGET: steamlink
|
||||||
- APPVEYOR_BUILD_WORKER_IMAGE: Ubuntu2204
|
- APPVEYOR_BUILD_WORKER_IMAGE: Ubuntu2204
|
||||||
@@ -16,11 +11,6 @@ environment:
|
|||||||
FFMPEG_CONFIGURE_ARGS: --enable-pic --disable-static --enable-shared --disable-all --enable-avcodec --enable-avformat --enable-swscale --enable-decoder=h264 --enable-decoder=hevc --enable-decoder=av1 --enable-hwaccel=h264_vaapi --enable-hwaccel=hevc_vaapi --enable-hwaccel=av1_vaapi --enable-hwaccel=h264_vdpau --enable-hwaccel=hevc_vdpau --enable-hwaccel=av1_vdpau --enable-libdrm --enable-hwaccel=h264_vulkan --enable-hwaccel=hevc_vulkan --enable-hwaccel=av1_vulkan --enable-libdav1d --enable-decoder=libdav1d
|
FFMPEG_CONFIGURE_ARGS: --enable-pic --disable-static --enable-shared --disable-all --enable-avcodec --enable-avformat --enable-swscale --enable-decoder=h264 --enable-decoder=hevc --enable-decoder=av1 --enable-hwaccel=h264_vaapi --enable-hwaccel=hevc_vaapi --enable-hwaccel=av1_vaapi --enable-hwaccel=h264_vdpau --enable-hwaccel=hevc_vdpau --enable-hwaccel=av1_vdpau --enable-libdrm --enable-hwaccel=h264_vulkan --enable-hwaccel=hevc_vulkan --enable-hwaccel=av1_vulkan --enable-libdav1d --enable-decoder=libdav1d
|
||||||
|
|
||||||
install:
|
install:
|
||||||
- cmd: 'copy /y scripts\appveyor\qmake.bat %QTDIR%\msvc2022_arm64\bin\'
|
|
||||||
- cmd: 'copy /y scripts\appveyor\qtpaths.bat %QTDIR%\msvc2022_arm64\bin\'
|
|
||||||
- cmd: 'copy /y scripts\appveyor\target_qt.conf %QTDIR%\msvc2022_arm64\bin\'
|
|
||||||
- sh: '[ "$BUILD_TARGET" != macos ] || nvm use node'
|
|
||||||
- sh: '[ "$BUILD_TARGET" != macos ] || npm install --global create-dmg'
|
|
||||||
- sh: '[ "$BUILD_TARGET" != steamlink ] || sudo apt install -y libc6:i386 libstdc++6:i386'
|
- sh: '[ "$BUILD_TARGET" != steamlink ] || sudo apt install -y libc6:i386 libstdc++6:i386'
|
||||||
- sh: '[ "$BUILD_TARGET" != steamlink ] || git clone --depth=1 https://github.com/ValveSoftware/steamlink-sdk.git $HOME/steamlink-sdk'
|
- sh: '[ "$BUILD_TARGET" != steamlink ] || git clone --depth=1 https://github.com/ValveSoftware/steamlink-sdk.git $HOME/steamlink-sdk'
|
||||||
- sh: '[ "$BUILD_TARGET" != linux ] || wget -qO - https://packages.lunarg.com/lunarg-signing-key-pub.asc | sudo apt-key add -'
|
- sh: '[ "$BUILD_TARGET" != linux ] || wget -qO - https://packages.lunarg.com/lunarg-signing-key-pub.asc | sudo apt-key add -'
|
||||||
@@ -37,30 +27,16 @@ install:
|
|||||||
- sh: 'if [[ "$BUILD_TARGET" = linux ]]; then mkdir $HOME/bin && wget -O $HOME/bin/linuxdeployqt https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-x86_64.AppImage && chmod a+x $HOME/bin/linuxdeployqt; fi'
|
- sh: 'if [[ "$BUILD_TARGET" = linux ]]; then mkdir $HOME/bin && wget -O $HOME/bin/linuxdeployqt https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-x86_64.AppImage && chmod a+x $HOME/bin/linuxdeployqt; fi'
|
||||||
|
|
||||||
before_build:
|
before_build:
|
||||||
- 'git -c submodule.libs.update=none submodule update --init --recursive'
|
- sh: 'git -c submodule.libs.update=none submodule update --init --recursive'
|
||||||
- cmd: 'git submodule update --init --recursive'
|
|
||||||
- sh: '[ "$BUILD_TARGET" = linux ] || git submodule update --init --recursive'
|
- sh: '[ "$BUILD_TARGET" = linux ] || git submodule update --init --recursive'
|
||||||
- cmd: 'set OLDPATH=%PATH%'
|
- sh: 'export CI_VERSION=r$APPVEYOR_BUILD_NUMBER'
|
||||||
- cmd: 'set /p VERSION=<app\version.txt'
|
|
||||||
- sh: 'export VERSION=`cat app/version.txt`'
|
|
||||||
|
|
||||||
build_script:
|
build_script:
|
||||||
- cmd: 'set PATH=%OLDPATH%;%QTDIR%\msvc2022_64\bin'
|
|
||||||
- cmd: 'scripts\build-arch.bat Release'
|
|
||||||
- cmd: 'set PATH=%OLDPATH%;%QTDIR%\msvc2022_arm64\bin'
|
|
||||||
- cmd: 'scripts\build-arch.bat Release'
|
|
||||||
- cmd: 'scripts\generate-bundle.bat Release'
|
|
||||||
- sh: '[ "$BUILD_TARGET" != linux ] || PATH=$PATH:$HOME/bin scripts/build-appimage.sh'
|
- sh: '[ "$BUILD_TARGET" != linux ] || PATH=$PATH:$HOME/bin scripts/build-appimage.sh'
|
||||||
- sh: '[ "$BUILD_TARGET" != macos ] || PATH=$PATH:$HOME/$QTDIR/macos/bin scripts/generate-dmg.sh Release'
|
|
||||||
- sh: '[ "$BUILD_TARGET" != steamlink ] || STEAMLINK_SDK_PATH=$HOME/steamlink-sdk scripts/build-steamlink-app.sh'
|
- sh: '[ "$BUILD_TARGET" != steamlink ] || STEAMLINK_SDK_PATH=$HOME/steamlink-sdk scripts/build-steamlink-app.sh'
|
||||||
|
|
||||||
after_build:
|
after_build:
|
||||||
- cmd: 'appveyor PushArtifact build\installer-x64-Release\MoonlightPortable-x64-%VERSION%.zip -FileName MoonlightPortable-x64-r%APPVEYOR_BUILD_NUMBER%.zip'
|
- sh: '[ "$BUILD_TARGET" != steamlink ] || appveyor PushArtifact build/installer-release/Moonlight-SteamLink-$CI_VERSION.zip'
|
||||||
- cmd: 'appveyor PushArtifact build\symbols-x64-Release\MoonlightDebuggingSymbols-x64-%VERSION%.zip -FileName MoonlightDebuggingSymbols-x64-r%APPVEYOR_BUILD_NUMBER%.zip'
|
- sh: '[ "$BUILD_TARGET" != linux ] || appveyor PushArtifact build/installer-release/Moonlight-$CI_VERSION-x86_64.AppImage'
|
||||||
- cmd: 'appveyor PushArtifact build\installer-arm64-Release\MoonlightPortable-arm64-%VERSION%.zip -FileName MoonlightPortable-arm64-r%APPVEYOR_BUILD_NUMBER%.zip'
|
|
||||||
- cmd: 'appveyor PushArtifact build\symbols-arm64-Release\MoonlightDebuggingSymbols-arm64-%VERSION%.zip -FileName MoonlightDebuggingSymbols-arm64-r%APPVEYOR_BUILD_NUMBER%.zip'
|
|
||||||
- sh: '[ "$BUILD_TARGET" != steamlink ] || appveyor PushArtifact build/installer-release/Moonlight-SteamLink-$VERSION.zip -FileName Moonlight-SteamLink-r$APPVEYOR_BUILD_NUMBER.zip'
|
|
||||||
- sh: '[ "$BUILD_TARGET" != macos ] || appveyor PushArtifact build/installer-Release/Moonlight-$VERSION.dmg -FileName Moonlight-r$APPVEYOR_BUILD_NUMBER.dmg'
|
|
||||||
- sh: '[ "$BUILD_TARGET" != linux ] || appveyor PushArtifact build/installer-release/Moonlight-$VERSION-x86_64.AppImage -FileName Moonlight-r$APPVEYOR_BUILD_NUMBER-x86_64.AppImage'
|
|
||||||
|
|
||||||
deploy: off
|
deploy: off
|
||||||
|
|||||||
@@ -11,7 +11,12 @@ SOURCE_ROOT=$PWD
|
|||||||
BUILD_FOLDER=$BUILD_ROOT/build-$BUILD_CONFIG
|
BUILD_FOLDER=$BUILD_ROOT/build-$BUILD_CONFIG
|
||||||
DEPLOY_FOLDER=$BUILD_ROOT/deploy-$BUILD_CONFIG
|
DEPLOY_FOLDER=$BUILD_ROOT/deploy-$BUILD_CONFIG
|
||||||
INSTALLER_FOLDER=$BUILD_ROOT/installer-$BUILD_CONFIG
|
INSTALLER_FOLDER=$BUILD_ROOT/installer-$BUILD_CONFIG
|
||||||
VERSION=`cat $SOURCE_ROOT/app/version.txt`
|
|
||||||
|
if [ -n "$CI_VERSION" ]; then
|
||||||
|
VERSION=$CI_VERSION
|
||||||
|
else
|
||||||
|
VERSION=`cat $SOURCE_ROOT/app/version.txt`
|
||||||
|
fi
|
||||||
|
|
||||||
command -v qmake6 >/dev/null 2>&1 || fail "Unable to find 'qmake6' in your PATH!"
|
command -v qmake6 >/dev/null 2>&1 || fail "Unable to find 'qmake6' in your PATH!"
|
||||||
command -v linuxdeployqt >/dev/null 2>&1 || fail "Unable to find 'linuxdeployqt' in your PATH!"
|
command -v linuxdeployqt >/dev/null 2>&1 || fail "Unable to find 'linuxdeployqt' in your PATH!"
|
||||||
|
|||||||
@@ -96,7 +96,13 @@ set BUILD_FOLDER=%BUILD_ROOT%\build-%ARCH%-%BUILD_CONFIG%
|
|||||||
set DEPLOY_FOLDER=%BUILD_ROOT%\deploy-%ARCH%-%BUILD_CONFIG%
|
set DEPLOY_FOLDER=%BUILD_ROOT%\deploy-%ARCH%-%BUILD_CONFIG%
|
||||||
set INSTALLER_FOLDER=%BUILD_ROOT%\installer-%ARCH%-%BUILD_CONFIG%
|
set INSTALLER_FOLDER=%BUILD_ROOT%\installer-%ARCH%-%BUILD_CONFIG%
|
||||||
set SYMBOLS_FOLDER=%BUILD_ROOT%\symbols-%ARCH%-%BUILD_CONFIG%
|
set SYMBOLS_FOLDER=%BUILD_ROOT%\symbols-%ARCH%-%BUILD_CONFIG%
|
||||||
set /p VERSION=<%SOURCE_ROOT%\app\version.txt
|
|
||||||
|
rem Allow CI to override the version.txt with an environment variable
|
||||||
|
if defined CI_VERSION (
|
||||||
|
set VERSION=%CI_VERSION%
|
||||||
|
) else (
|
||||||
|
set /p VERSION=<%SOURCE_ROOT%\app\version.txt
|
||||||
|
)
|
||||||
|
|
||||||
rem Use the correct VC tools for the specified architecture
|
rem Use the correct VC tools for the specified architecture
|
||||||
if /I "%ARCH%" EQU "x64" (
|
if /I "%ARCH%" EQU "x64" (
|
||||||
@@ -237,7 +243,7 @@ if "%ML_SYMBOL_STORE%" NEQ "" (
|
|||||||
)
|
)
|
||||||
|
|
||||||
echo Building MSI
|
echo Building MSI
|
||||||
msbuild -Restore %SOURCE_ROOT%\wix\Moonlight\Moonlight.wixproj /p:Configuration=%BUILD_CONFIG% /p:Platform=%ARCH% /p:MSBuildProjectExtensionsPath=%BUILD_FOLDER%\
|
cmd /c "set VERSION= && msbuild -Restore %SOURCE_ROOT%\wix\Moonlight\Moonlight.wixproj /p:Configuration=%BUILD_CONFIG% /p:Platform=%ARCH% /p:MSBuildProjectExtensionsPath=%BUILD_FOLDER%\"
|
||||||
if !ERRORLEVEL! NEQ 0 goto Error
|
if !ERRORLEVEL! NEQ 0 goto Error
|
||||||
|
|
||||||
echo Copying application binary to deployment directory
|
echo Copying application binary to deployment directory
|
||||||
|
|||||||
@@ -16,7 +16,12 @@ SOURCE_ROOT=$PWD
|
|||||||
BUILD_FOLDER=$BUILD_ROOT/build-$BUILD_CONFIG
|
BUILD_FOLDER=$BUILD_ROOT/build-$BUILD_CONFIG
|
||||||
DEPLOY_FOLDER=$BUILD_ROOT/deploy-$BUILD_CONFIG
|
DEPLOY_FOLDER=$BUILD_ROOT/deploy-$BUILD_CONFIG
|
||||||
INSTALLER_FOLDER=$BUILD_ROOT/installer-$BUILD_CONFIG
|
INSTALLER_FOLDER=$BUILD_ROOT/installer-$BUILD_CONFIG
|
||||||
VERSION=`cat $SOURCE_ROOT/app/version.txt`
|
|
||||||
|
if [ -n "$CI_VERSION" ]; then
|
||||||
|
VERSION=$CI_VERSION
|
||||||
|
else
|
||||||
|
VERSION=`cat $SOURCE_ROOT/app/version.txt`
|
||||||
|
fi
|
||||||
|
|
||||||
echo Cleaning output directories
|
echo Cleaning output directories
|
||||||
rm -rf $BUILD_FOLDER
|
rm -rf $BUILD_FOLDER
|
||||||
|
|||||||
@@ -38,7 +38,13 @@ set BUILD_ROOT=%cd%\build
|
|||||||
set SOURCE_ROOT=%cd%
|
set SOURCE_ROOT=%cd%
|
||||||
set BUILD_FOLDER=%BUILD_ROOT%\build-%BUILD_CONFIG%
|
set BUILD_FOLDER=%BUILD_ROOT%\build-%BUILD_CONFIG%
|
||||||
set INSTALLER_FOLDER=%BUILD_ROOT%\installer-%BUILD_CONFIG%
|
set INSTALLER_FOLDER=%BUILD_ROOT%\installer-%BUILD_CONFIG%
|
||||||
set /p VERSION=<%SOURCE_ROOT%\app\version.txt
|
|
||||||
|
rem Allow CI to override the version.txt with an environment variable
|
||||||
|
if defined CI_VERSION (
|
||||||
|
set VERSION=%CI_VERSION%
|
||||||
|
) else (
|
||||||
|
set /p VERSION=<%SOURCE_ROOT%\app\version.txt
|
||||||
|
)
|
||||||
|
|
||||||
rem Ensure that all architectures have been built before the final bundle
|
rem Ensure that all architectures have been built before the final bundle
|
||||||
if not exist "%BUILD_ROOT%\build-x64-%BUILD_CONFIG%\Moonlight.msi" (
|
if not exist "%BUILD_ROOT%\build-x64-%BUILD_CONFIG%\Moonlight.msi" (
|
||||||
@@ -67,7 +73,7 @@ if !ERRORLEVEL! NEQ 0 goto Error
|
|||||||
|
|
||||||
echo Building bundle
|
echo Building bundle
|
||||||
rem Bundles are always x86 binaries
|
rem Bundles are always x86 binaries
|
||||||
msbuild -Restore %SOURCE_ROOT%\wix\MoonlightSetup\MoonlightSetup.wixproj /p:Configuration=%BUILD_CONFIG% /p:Platform=x86 /p:MSBuildProjectExtensionsPath=%BUILD_FOLDER%\
|
cmd /c "set VERSION= && msbuild -Restore %SOURCE_ROOT%\wix\MoonlightSetup\MoonlightSetup.wixproj /p:Configuration=%BUILD_CONFIG% /p:Platform=x86 /p:MSBuildProjectExtensionsPath=%BUILD_FOLDER%\"
|
||||||
if !ERRORLEVEL! NEQ 0 goto Error
|
if !ERRORLEVEL! NEQ 0 goto Error
|
||||||
|
|
||||||
rem Rename the installer to match the publishing convention
|
rem Rename the installer to match the publishing convention
|
||||||
|
|||||||
@@ -15,7 +15,12 @@ BUILD_ROOT=$PWD/build
|
|||||||
SOURCE_ROOT=$PWD
|
SOURCE_ROOT=$PWD
|
||||||
BUILD_FOLDER=$BUILD_ROOT/build-$BUILD_CONFIG
|
BUILD_FOLDER=$BUILD_ROOT/build-$BUILD_CONFIG
|
||||||
INSTALLER_FOLDER=$BUILD_ROOT/installer-$BUILD_CONFIG
|
INSTALLER_FOLDER=$BUILD_ROOT/installer-$BUILD_CONFIG
|
||||||
VERSION=`cat $SOURCE_ROOT/app/version.txt`
|
|
||||||
|
if [ -n "$CI_VERSION" ]; then
|
||||||
|
VERSION=$CI_VERSION
|
||||||
|
else
|
||||||
|
VERSION=`cat $SOURCE_ROOT/app/version.txt`
|
||||||
|
fi
|
||||||
|
|
||||||
if [ "$SIGNING_PROVIDER_SHORTNAME" == "" ]; then
|
if [ "$SIGNING_PROVIDER_SHORTNAME" == "" ]; then
|
||||||
SIGNING_PROVIDER_SHORTNAME=$SIGNING_IDENTITY
|
SIGNING_PROVIDER_SHORTNAME=$SIGNING_IDENTITY
|
||||||
@@ -65,9 +70,9 @@ fi
|
|||||||
|
|
||||||
echo Creating DMG
|
echo Creating DMG
|
||||||
if [ "$SIGNING_IDENTITY" != "" ]; then
|
if [ "$SIGNING_IDENTITY" != "" ]; then
|
||||||
create-dmg $BUILD_FOLDER/app/Moonlight.app $INSTALLER_FOLDER --identity="$SIGNING_IDENTITY" || fail "create-dmg failed!"
|
create-dmg $BUILD_FOLDER/app/Moonlight.app $INSTALLER_FOLDER --identity="$SIGNING_IDENTITY" --no-version-in-filename || fail "create-dmg failed!"
|
||||||
else
|
else
|
||||||
create-dmg $BUILD_FOLDER/app/Moonlight.app $INSTALLER_FOLDER
|
create-dmg $BUILD_FOLDER/app/Moonlight.app $INSTALLER_FOLDER --no-version-in-filename
|
||||||
case $? in
|
case $? in
|
||||||
0) ;;
|
0) ;;
|
||||||
2) ;;
|
2) ;;
|
||||||
@@ -77,11 +82,11 @@ fi
|
|||||||
|
|
||||||
if [ "$NOTARY_KEYCHAIN_PROFILE" != "" ]; then
|
if [ "$NOTARY_KEYCHAIN_PROFILE" != "" ]; then
|
||||||
echo Uploading to App Notary service
|
echo Uploading to App Notary service
|
||||||
xcrun notarytool submit --keychain-profile "$NOTARY_KEYCHAIN_PROFILE" --wait $INSTALLER_FOLDER/Moonlight\ $VERSION.dmg || fail "Notary submission failed"
|
xcrun notarytool submit --keychain-profile "$NOTARY_KEYCHAIN_PROFILE" --wait $INSTALLER_FOLDER/Moonlight.dmg || fail "Notary submission failed"
|
||||||
|
|
||||||
echo Stapling notary ticket to DMG
|
echo Stapling notary ticket to DMG
|
||||||
xcrun stapler staple -v $INSTALLER_FOLDER/Moonlight\ $VERSION.dmg || fail "Notary ticket stapling failed!"
|
xcrun stapler staple -v $INSTALLER_FOLDER/Moonlight.dmg || fail "Notary ticket stapling failed!"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
mv $INSTALLER_FOLDER/Moonlight\ $VERSION.dmg $INSTALLER_FOLDER/Moonlight-$VERSION.dmg
|
mv $INSTALLER_FOLDER/Moonlight.dmg $INSTALLER_FOLDER/Moonlight-$VERSION.dmg
|
||||||
echo Build successful
|
echo Build successful
|
||||||
Reference in New Issue
Block a user