Skip to content

Commit

Permalink
CI: Package NoGUI AppImage on Linux instead of SDL
Browse files Browse the repository at this point in the history
  • Loading branch information
stenzek committed Jan 31, 2021
1 parent 85b4a02 commit 2dabccf
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 29 deletions.
32 changes: 16 additions & 16 deletions .github/workflows/rolling-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -173,21 +173,21 @@ jobs:
run: |
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_SDL_FRONTEND=ON -DBUILD_QT_FRONTEND=ON -DUSE_SDL2=ON -G Ninja ..
cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_NOGUI_FRONTEND=ON -DBUILD_QT_FRONTEND=ON -DUSE_SDL2=ON -G Ninja ..
ninja
../appimage/generate_appimages.sh $(pwd)
- name: Upload SDL AppImage
- name: Upload NoGUI AppImage
uses: actions/upload-artifact@v1
with:
name: "linux-x64-appimage-sdl"
path: "build/duckstation-sdl-x64.AppImage"
name: "linux-x64-appimage-nogui"
path: "build/duckstation-nogui-x64.AppImage"

- name: Upload SDL AppImage zsync
- name: Upload NoGUI AppImage zsync
uses: actions/upload-artifact@v1
with:
name: "linux-x64-appimage-sdl-zsync"
path: "build/duckstation-sdl-x64.AppImage.zsync"
name: "linux-x64-appimage-nogui-zsync"
path: "build/duckstation-nogui-x64.AppImage.zsync"

- name: Upload Qt AppImage
uses: actions/upload-artifact@v1
Expand Down Expand Up @@ -262,7 +262,7 @@ jobs:
mkdir build
cd build
export MACOSX_DEPLOYMENT_TARGET=10.14
cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_SDL_FRONTEND=OFF -DBUILD_QT_FRONTEND=ON -DUSE_SDL2=ON -DQt5_DIR=/usr/local/opt/qt/lib/cmake/Qt5 ..
cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_NOGUI_FRONTEND=OFF -DBUILD_QT_FRONTEND=ON -DUSE_SDL2=ON -DQt5_DIR=/usr/local/opt/qt/lib/cmake/Qt5 ..
cmake --build . --parallel 2
cd bin
zip -r duckstation-mac-release.zip DuckStation.app/
Expand All @@ -289,15 +289,15 @@ jobs:
with:
name: "windows-arm64"

- name: Download SDL AppImage Artifact
- name: Download NoGUI AppImage Artifact
uses: actions/download-artifact@v1
with:
name: "linux-x64-appimage-sdl"
name: "linux-x64-appimage-nogui"

- name: Download SDL AppImage zsync Artifact
- name: Download NoGUI AppImage zsync Artifact
uses: actions/download-artifact@v1
with:
name: "linux-x64-appimage-sdl-zsync"
name: "linux-x64-appimage-nogui-zsync"

- name: Download Qt AppImage Artifact
uses: actions/download-artifact@v1
Expand Down Expand Up @@ -332,8 +332,8 @@ jobs:
windows/duckstation-windows-x64-release-symbols.zip
windows-arm64/duckstation-windows-arm64-release.zip
windows-arm64/duckstation-windows-arm64-release-symbols.zip
linux-x64-appimage-sdl/duckstation-sdl-x64.AppImage
linux-x64-appimage-sdl-zsync/duckstation-sdl-x64.AppImage.zsync
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
android/duckstation-android.apk
Expand All @@ -351,8 +351,8 @@ jobs:
windows/duckstation-windows-x64-release-symbols.zip
windows-arm64/duckstation-windows-arm64-release.zip
windows-arm64/duckstation-windows-arm64-release-symbols.zip
linux-x64-appimage-sdl/duckstation-sdl-x64.AppImage
linux-x64-appimage-sdl-zsync/duckstation-sdl-x64.AppImage.zsync
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
android/duckstation-android.apk
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ set(CMAKE_OSX_DEPLOYMENT_TARGET "10.14.0" CACHE STRING "")

# Global options.
if(NOT ANDROID)
option(BUILD_SDL_FRONTEND "Build the SDL frontend" ON)
option(BUILD_SDL_FRONTEND "Build the SDL frontend" OFF)
option(BUILD_NOGUI_FRONTEND "Build the NoGUI frontend" ON)
option(BUILD_QT_FRONTEND "Build the Qt frontend" ON)
option(ENABLE_DISCORD_PRESENCE "Build with Discord Rich Presence support" ON)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[Desktop Entry]
Type=Application
Name=DuckStation SDL
Name=DuckStation NoGUI
GenericName=PlayStation 1 Emulator
Comment=Fast-ish PlayStation 1 emulator
Icon=duckstation-sdl
TryExec=duckstation-sdl
Exec=duckstation-sdl %f
Icon=duckstation-nogui
TryExec=duckstation-nogui
Exec=duckstation-nogui %f
Terminal=true
Categories=Game;Emulator;
16 changes: 8 additions & 8 deletions appimage/generate_appimages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ chmod a+x ${BUILD_DIR}/linuxdeploy-plugin-appimage-x86_64.AppImage

# Copy icons into the <resolution>/<app_name>.<ext> directory structure that linuxdeploy nominally expects,
# e.g. 16x16/duckstation-qt.png, 32x32/duckstation-qt.png, etc.
FRONTENDS=("qt" "sdl")
FRONTENDS=("qt" "nogui")
ICONS_QT=()
ICONS_SDL=()
ICONS_NOGUI=()

for filename in ${APPIMAGE_RESOURCES_DIR}/icon-*px.png; do
[[ ${filename} =~ ${APPIMAGE_RESOURCES_DIR}/icon-(.*)px.png ]];
Expand Down Expand Up @@ -81,11 +81,11 @@ OUTPUT="duckstation-qt-x64.AppImage" \
${BUILD_DIR}/linuxdeploy-plugin-appimage-x86_64.AppImage \
--appdir=${BUILD_DIR}/duckstation-qt.AppDir

UPDATE_INFORMATION="zsync|https://github.com/stenzek/duckstation/releases/download/latest/duckstation-sdl-x64.AppImage.zsync" \
OUTPUT="duckstation-sdl-x64.AppImage" \
UPDATE_INFORMATION="zsync|https://github.com/stenzek/duckstation/releases/download/latest/duckstation-nogui-x64.AppImage.zsync" \
OUTPUT="duckstation-nogui-x64.AppImage" \
${BUILD_DIR}/linuxdeploy-x86_64.AppImage \
--appdir=${BUILD_DIR}/duckstation-sdl.AppDir \
--executable=${BUILD_DIR}/bin/duckstation-sdl \
--desktop-file=${APPIMAGE_RESOURCES_DIR}/duckstation-sdl.desktop \
${ICONS_SDL[@]/#/--icon-file=} \
--appdir=${BUILD_DIR}/duckstation-nogui.AppDir \
--executable=${BUILD_DIR}/bin/duckstation-nogui \
--desktop-file=${APPIMAGE_RESOURCES_DIR}/duckstation-nogui.desktop \
${ICONS_NOGUI[@]/#/--icon-file=} \
--output=appimage

0 comments on commit 2dabccf

Please sign in to comment.