diff --git a/.github/workflows/rolling-release.yml b/.github/workflows/rolling-release.yml
index 7d51a5162..b7edcac00 100644
--- a/.github/workflows/rolling-release.yml
+++ b/.github/workflows/rolling-release.yml
@@ -161,95 +161,95 @@ jobs:
path: "duckstation-windows-arm64-release.zip"
- windows-uwp-build:
- runs-on: windows-2022
- steps:
- - uses: actions/checkout@v2.3.1
- with:
- fetch-depth: 0
- submodules: false
-
- - name: Tag as preview build
- if: github.ref == 'refs/heads/master'
- shell: cmd
- run: |
- echo #pragma once > src/scmversion/tag.h
- echo #define SCM_RELEASE_ASSET "duckstation-windows-x64-release.zip" >> src/scmversion/tag.h
- echo #define SCM_RELEASE_TAGS {"latest", "preview"} >> src/scmversion/tag.h
- echo #define SCM_RELEASE_TAG "preview" >> src/scmversion/tag.h
-
-
- - name: Tag as dev build
- if: github.ref == 'refs/heads/dev'
- shell: cmd
- run: |
- echo #pragma once > src/scmversion/tag.h
- echo #define SCM_RELEASE_ASSET "duckstation-windows-x64-release.zip" >> src/scmversion/tag.h
- echo #define SCM_RELEASE_TAGS {"latest", "preview"} >> src/scmversion/tag.h
- echo #define SCM_RELEASE_TAG "latest" >> src/scmversion/tag.h
-
- - name: Write signing key
- id: write_signing_key
- if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/dev'
- uses: timheuer/base64-to-file@v1
- with:
- fileName: 'duckstation-uwp.pfx'
- encodedString: ${{ secrets.UWP_PFX_KEY }}
-
- - name: Copy signing key
- if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/dev'
- shell: cmd
- run: |
- copy ${{ steps.write_signing_key.outputs.filePath }} src\duckstation-uwp\duckstation-uwp.pfx
-
- - name: Disable AppX signing
- if: github.ref != 'refs/heads/master' && github.ref != 'refs/heads/dev'
- shell: powershell
- run: |
- (gc .\src\duckstation-uwp\duckstation-uwp.vcxproj) -replace 'True', 'False' | Out-File -encoding ASCII .\src\duckstation-uwp\duckstation-uwp.vcxproj
-
- - name: Restore nuget packages
- shell: cmd
- run: |
- nuget restore duckstation-uwp.sln
-
- - name: Compile x64 release build without bundle
- if: github.ref != 'refs/heads/master' && github.ref != 'refs/heads/dev'
- shell: cmd
- run: |
- call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64
- msbuild duckstation-uwp.sln /p:Configuration="ReleaseUWP" /p:Platform="x64" /t:Build
-
- - name: Compile x64 release build with bundle
- if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/dev'
- shell: cmd
- run: |
- call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64
- msbuild duckstation-uwp.sln /p:AppxBundle=Always /p:AppxPackageIsForStore=true /p:BuildAppxUploadPackageForUap=true /p:AppxBundlePlatforms="x64" /p:Configuration="ReleaseUWP" /p:Platform="x64" /t:Build
-
- - name: Grab AppX package
- shell: cmd
- run: |
- copy build\ReleaseUWP-x64\duckstation-uwp\duckstation-uwp_1.0.0.0_Bundle\duckstation-uwp_1.0.0.0_x64_ReleaseUWP.appx duckstation-uwp.appx
-
- - name: Export certificate
- if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/dev'
- shell: powershell
- run: |
- Get-PfxCertificate -FilePath .\src\duckstation-uwp\duckstation-uwp.pfx | Export-Certificate -FilePath duckstation-uwp.der -Type CERT
-
- - name: Upload AppX package
- uses: actions/upload-artifact@v1
- with:
- name: "windows-uwp"
- path: "duckstation-uwp.appx"
-
- - name: Upload certificate
- if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/dev'
- uses: actions/upload-artifact@v1
- with:
- name: "windows-uwp"
- path: "duckstation-uwp.der"
+# windows-uwp-build:
+# runs-on: windows-2022
+# steps:
+# - uses: actions/checkout@v2.3.1
+# with:
+# fetch-depth: 0
+# submodules: false
+#
+# - name: Tag as preview build
+# if: github.ref == 'refs/heads/master'
+# shell: cmd
+# run: |
+# echo #pragma once > src/scmversion/tag.h
+# echo #define SCM_RELEASE_ASSET "duckstation-windows-x64-release.zip" >> src/scmversion/tag.h
+# echo #define SCM_RELEASE_TAGS {"latest", "preview"} >> src/scmversion/tag.h
+# echo #define SCM_RELEASE_TAG "preview" >> src/scmversion/tag.h
+#
+#
+# - name: Tag as dev build
+# if: github.ref == 'refs/heads/dev'
+# shell: cmd
+# run: |
+# echo #pragma once > src/scmversion/tag.h
+# echo #define SCM_RELEASE_ASSET "duckstation-windows-x64-release.zip" >> src/scmversion/tag.h
+# echo #define SCM_RELEASE_TAGS {"latest", "preview"} >> src/scmversion/tag.h
+# echo #define SCM_RELEASE_TAG "latest" >> src/scmversion/tag.h
+#
+# - name: Write signing key
+# id: write_signing_key
+# if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/dev'
+# uses: timheuer/base64-to-file@v1
+# with:
+# fileName: 'duckstation-uwp.pfx'
+# encodedString: ${{ secrets.UWP_PFX_KEY }}
+#
+# - name: Copy signing key
+# if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/dev'
+# shell: cmd
+# run: |
+# copy ${{ steps.write_signing_key.outputs.filePath }} src\duckstation-uwp\duckstation-uwp.pfx
+#
+# - name: Disable AppX signing
+# if: github.ref != 'refs/heads/master' && github.ref != 'refs/heads/dev'
+# shell: powershell
+# run: |
+# (gc .\src\duckstation-uwp\duckstation-uwp.vcxproj) -replace 'True', 'False' | Out-File -encoding ASCII .\src\duckstation-uwp\duckstation-uwp.vcxproj
+#
+# - name: Restore nuget packages
+# shell: cmd
+# run: |
+# nuget restore duckstation-uwp.sln
+#
+# - name: Compile x64 release build without bundle
+# if: github.ref != 'refs/heads/master' && github.ref != 'refs/heads/dev'
+# shell: cmd
+# run: |
+# call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64
+# msbuild duckstation-uwp.sln /p:Configuration="ReleaseUWP" /p:Platform="x64" /t:Build
+#
+# - name: Compile x64 release build with bundle
+# if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/dev'
+# shell: cmd
+# run: |
+# call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64
+# msbuild duckstation-uwp.sln /p:AppxBundle=Always /p:AppxPackageIsForStore=true /p:BuildAppxUploadPackageForUap=true /p:AppxBundlePlatforms="x64" /p:Configuration="ReleaseUWP" /p:Platform="x64" /t:Build
+#
+# - name: Grab AppX package
+# shell: cmd
+# run: |
+# copy build\ReleaseUWP-x64\duckstation-uwp\duckstation-uwp_1.0.0.0_Bundle\duckstation-uwp_1.0.0.0_x64_ReleaseUWP.appx duckstation-uwp.appx
+#
+# - name: Export certificate
+# if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/dev'
+# shell: powershell
+# run: |
+# Get-PfxCertificate -FilePath .\src\duckstation-uwp\duckstation-uwp.pfx | Export-Certificate -FilePath duckstation-uwp.der -Type CERT
+#
+# - name: Upload AppX package
+# uses: actions/upload-artifact@v1
+# with:
+# name: "windows-uwp"
+# path: "duckstation-uwp.appx"
+#
+# - name: Upload certificate
+# if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/dev'
+# uses: actions/upload-artifact@v1
+# with:
+# name: "windows-uwp"
+# path: "duckstation-uwp.der"
linux-build:
@@ -263,79 +263,93 @@ jobs:
shell: bash
run: |
sudo apt-get update
- sudo apt-get -y install cmake ninja-build ccache libsdl2-dev libgtk-3-dev qtbase5-dev qtbase5-dev-tools qtbase5-private-dev qt5-default qttools5-dev qtwayland5 libegl1-mesa-dev libevdev-dev libgbm-dev libdrm-dev libqt5waylandclient5-dev libqt5waylandcompositor5-dev libwayland-dev libwayland-egl-backend-dev extra-cmake-modules libcurl4-gnutls-dev libxrandr-dev
+ sudo apt-get -y install cmake ninja-build ccache libsdl2-dev libgtk-3-dev libegl1-mesa-dev libevdev-dev libgbm-dev libdrm-dev libwayland-dev libwayland-egl-backend-dev extra-cmake-modules libcurl4-gnutls-dev libxrandr-dev llvm-12 lld-12 clang-12
+
+ - name: Cache Dependencies
+ id: cache-deps
+ uses: actions/cache@v3
+ with:
+ path: ~/deps
+ key: deps ${{ hashFiles('scripts/build-dependencies.sh') }}
+
+ - name: Build Dependencies
+ if: steps.cache-deps.outputs.cache-hit != 'true'
+ run: scripts/build-dependencies.sh
- name: Compile build
shell: bash
run: |
mkdir build
cd build
- cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_NOGUI_FRONTEND=ON -DBUILD_QT_FRONTEND=ON -DUSE_DRMKMS=ON -DUSE_EGL=ON -DUSE_SDL2=ON -DUSE_WAYLAND=ON -DUSE_X11=ON -G Ninja ..
+ cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_NOGUI_FRONTEND=OFF -DBUILD_QT_FRONTEND=ON -DUSE_DRMKMS=ON -DUSE_EGL=ON -DUSE_SDL2=ON -DUSE_WAYLAND=ON -DUSE_X11=ON -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON -DCMAKE_PREFIX_PATH=$HOME/deps -DCMAKE_TOOLCHAIN_FILE=../scripts/clang-toolchain.cmake ..
cmake --build . --parallel
- ../scripts/generate_appimages.sh $(pwd)
+ cd ..
+ scripts/make-appimage.sh $(realpath ./build) $(realpath .) $HOME/deps DuckStation-x64
- - name: Upload NoGUI AppImage
- uses: actions/upload-artifact@v1
- with:
- name: "linux-x64-appimage-nogui"
- path: "build/duckstation-nogui-x64.AppImage"
-
- - name: Upload NoGUI AppImage zsync
- uses: actions/upload-artifact@v1
- with:
- name: "linux-x64-appimage-nogui-zsync"
- path: "build/duckstation-nogui-x64.AppImage.zsync"
+# - name: Upload NoGUI AppImage
+# uses: actions/upload-artifact@v1
+# with:
+# name: "linux-x64-appimage-nogui"
+# path: "build/duckstation-nogui-x64.AppImage"
+#
+# - name: Upload NoGUI AppImage zsync
+# uses: actions/upload-artifact@v1
+# with:
+# name: "linux-x64-appimage-nogui-zsync"
+# path: "build/duckstation-nogui-x64.AppImage.zsync"
- name: Upload Qt AppImage
uses: actions/upload-artifact@v1
with:
name: "linux-x64-appimage-qt"
- path: "build/duckstation-qt-x64.AppImage"
+ path: "DuckStation-x64.AppImage"
- - name: Upload Qt AppImage zsync
- uses: actions/upload-artifact@v1
- with:
- name: "linux-x64-appimage-qt-zsync"
- path: "build/duckstation-qt-x64.AppImage.zsync"
+# - name: Upload Qt AppImage zsync
+# uses: actions/upload-artifact@v1
+# with:
+# name: "linux-x64-appimage-qt-zsync"
+# path: "build/duckstation-qt-x64.AppImage.zsync"
-
- macos-build:
- runs-on: macos-10.15
- steps:
- - uses: actions/checkout@v2.3.1
- with:
- fetch-depth: 0
-
- - name: Install packages
- shell: bash
- run: |
- brew install qt5 sdl2 curl ninja
-
- - name: Clone mac externals
- shell: bash
- run: |
- git clone https://github.com/stenzek/duckstation-ext-mac.git dep/mac
-
- - name: Compile and zip .app
- shell: bash
- run: |
- mkdir build
- cd build
- export MACOSX_DEPLOYMENT_TARGET=10.14
- cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_NOGUI_FRONTEND=OFF -DBUILD_QT_FRONTEND=ON -DUSE_SDL2=ON -DQt5_DIR=/usr/local/opt/qt@5/lib/cmake/Qt5 -G Ninja ..
- cmake --build . --parallel
- cd bin
- zip -r duckstation-mac-release.zip DuckStation.app/
-
- - name: Upload macOS .app
- uses: actions/upload-artifact@v1
- with:
- name: "macos-x64"
- path: "build/bin/duckstation-mac-release.zip"
+# Disabled until we switch to macdeployqt
+# macos-build:
+# runs-on: macos-11
+# steps:
+# - uses: actions/checkout@v2.3.1
+# with:
+# fetch-depth: 0
+#
+# - name: Install packages
+# shell: bash
+# run: |
+# brew install qt6 sdl2 curl ninja
+#
+# - name: Clone mac externals
+# shell: bash
+# run: |
+# git clone https://github.com/stenzek/duckstation-ext-mac.git dep/mac
+#
+# - name: Compile and zip .app
+# shell: bash
+# run: |
+# mkdir build
+# cd build
+# ls -lh /usr/local/opt
+# export MACOSX_DEPLOYMENT_TARGET=10.14
+# cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_NOGUI_FRONTEND=OFF -DBUILD_QT_FRONTEND=ON -DUSE_SDL2=ON -DQt6_DIR=/usr/local/opt/qt@6/lib/cmake/Qt6 -G Ninja ..
+# cmake --build . --parallel
+# cd bin
+# zip -r duckstation-mac-release.zip DuckStation.app/
+#
+# - name: Upload macOS .app
+# uses: actions/upload-artifact@v1
+# with:
+# name: "macos-x64"
+# path: "build/bin/duckstation-mac-release.zip"
create-release:
- needs: [windows-build, windows-arm64-build, linux-build, windows-uwp-build]
+ #needs: [windows-build, windows-arm64-build, linux-build, windows-uwp-build]
+ needs: [windows-build, windows-arm64-build, linux-build]
runs-on: "ubuntu-20.04"
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/dev'
steps:
@@ -349,30 +363,30 @@ jobs:
with:
name: "windows-arm64"
- - name: Download Windows UWP Artifact
- uses: actions/download-artifact@v1
- with:
- name: "windows-uwp"
-
- - name: Download NoGUI AppImage Artifact
- uses: actions/download-artifact@v1
- with:
- name: "linux-x64-appimage-nogui"
-
- - name: Download NoGUI AppImage zsync Artifact
- uses: actions/download-artifact@v1
- with:
- name: "linux-x64-appimage-nogui-zsync"
+# - name: Download Windows UWP Artifact
+# uses: actions/download-artifact@v1
+# with:
+# name: "windows-uwp"
+#
+# - name: Download NoGUI AppImage Artifact
+# uses: actions/download-artifact@v1
+# with:
+# name: "linux-x64-appimage-nogui"
+#
+# - name: Download NoGUI AppImage zsync Artifact
+# uses: actions/download-artifact@v1
+# with:
+# name: "linux-x64-appimage-nogui-zsync"
- name: Download Qt AppImage Artifact
uses: actions/download-artifact@v1
with:
name: "linux-x64-appimage-qt"
- - name: Download Qt AppImage zsync Artifact
- uses: actions/download-artifact@v1
- with:
- name: "linux-x64-appimage-qt-zsync"
+# - name: Download Qt AppImage zsync Artifact
+# uses: actions/download-artifact@v1
+# with:
+# name: "linux-x64-appimage-qt-zsync"
- name: Create preview release
if: github.ref == 'refs/heads/master'
@@ -387,12 +401,13 @@ jobs:
windows/duckstation-windows-x64-release-symbols.zip
windows-arm64/duckstation-windows-arm64-release.zip
windows-arm64/duckstation-windows-arm64-release-symbols.zip
- windows-uwp/duckstation-uwp.appx
- windows-uwp/duckstation-uwp.der
- linux-x64-appimage-nogui/duckstation-nogui-x64.AppImage
- linux-x64-appimage-nogui-zsync/duckstation-nogui-x64.AppImage.zsync
- linux-x64-appimage-qt/duckstation-qt-x64.AppImage
- linux-x64-appimage-qt-zsync/duckstation-qt-x64.AppImage.zsync
+ linux-x64-appimage-qt/DuckStation-x64
+# linux-x64-appimage-qt/duckstation-qt-x64.AppImage
+# linux-x64-appimage-qt-zsync/duckstation-qt-x64.AppImage.zsync
+# windows-uwp/duckstation-uwp.appx
+# windows-uwp/duckstation-uwp.der
+# linux-x64-appimage-nogui/duckstation-nogui-x64.AppImage
+# linux-x64-appimage-nogui-zsync/duckstation-nogui-x64.AppImage.zsync
- name: Create dev release
if: github.ref == 'refs/heads/dev'
@@ -407,9 +422,10 @@ jobs:
windows/duckstation-windows-x64-release-symbols.zip
windows-arm64/duckstation-windows-arm64-release.zip
windows-arm64/duckstation-windows-arm64-release-symbols.zip
- windows-uwp/duckstation-uwp.appx
- windows-uwp/duckstation-uwp.der
- linux-x64-appimage-nogui/duckstation-nogui-x64.AppImage
- linux-x64-appimage-nogui-zsync/duckstation-nogui-x64.AppImage.zsync
- linux-x64-appimage-qt/duckstation-qt-x64.AppImage
- linux-x64-appimage-qt-zsync/duckstation-qt-x64.AppImage.zsync
+ linux-x64-appimage-qt/DuckStation-x64
+# linux-x64-appimage-qt/duckstation-qt-x64.AppImage
+# linux-x64-appimage-qt-zsync/duckstation-qt-x64.AppImage.zsync
+# windows-uwp/duckstation-uwp.appx
+# windows-uwp/duckstation-uwp.der
+# linux-x64-appimage-nogui/duckstation-nogui-x64.AppImage
+# linux-x64-appimage-nogui-zsync/duckstation-nogui-x64.AppImage.zsync
diff --git a/scripts/build-dependencies.sh b/scripts/build-dependencies.sh
new file mode 100755
index 000000000..4d737ec95
--- /dev/null
+++ b/scripts/build-dependencies.sh
@@ -0,0 +1,130 @@
+#!/usr/bin/env bash
+
+set -e
+
+sudo apt-get install -y build-essential git cmake ccache ninja-build libclang-dev libclang-11-dev libclang-12-dev patchelf \
+ libglib2.0-dev libfontconfig1-dev libharfbuzz-dev libjpeg-dev libpng-dev libfreetype-dev libinput-dev libxcb-*-dev \
+ libxkbcommon-dev libxkbcommon-x11-dev libxrender-dev libwayland-dev libgl1-mesa-dev libegl-dev libegl1-mesa-dev \
+ libgl1-mesa-dev libssl-dev
+
+INSTALLDIR="$HOME/deps"
+NPROCS="$(getconf _NPROCESSORS_ONLN)"
+SDL=SDL2-2.0.22
+QT=6.3.1
+
+mkdir -p deps-build
+cd deps-build
+
+cat > SHASUMS <
+
+if [ "$#" -ne 4 ]; then
+ echo "Syntax: $0