ci: fix builds and update Playback codes

Update ci to use matrices and move playback codes into the repo
This commit is contained in:
Nikhil Narayana 2021-10-30 15:38:06 -07:00 committed by GitHub
commit af3fcbccd6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 2857 additions and 384 deletions

View file

@ -1,8 +1,9 @@
name: PR Builds x64
name: Builds
on:
push:
branches: [ master ]
branches:
- master
paths-ignore:
- "**.md"
- "**.ini"
@ -13,274 +14,211 @@ on:
- "**.ini"
jobs:
# windows64-netplay:
# env:
# DXSDK_DIR: "C:\\Program Files (x86)\\Microsoft DirectX SDK (June 2010)\\"
# name: "Windows Netplay"
# runs-on: windows-2019
# steps:
# - name: "Remove Redistributable"
# shell: cmd
# run: |
# MsiExec.exe /passive /X{F0C3E5D1-1ADE-321E-8167-68EF0DE699A5}
# - name: "Setup MSBuild"
# uses: microsoft/setup-msbuild@v1
# - name: "Install DirectX SDK"
# shell: powershell
# run: |
# choco install directx-sdk
# - name: "Checkout"
# uses: actions/checkout@v2.3.1
# - name: 'Fetch Git Tags'
# if: success()
# shell: bash
# run: |
# git fetch --prune --unshallow
# echo ::set-env name=GIT_BRANCH::$(git rev-parse --abbrev-ref HEAD)
# echo ::set-env name=GIT_HASH::$(git rev-parse --short HEAD)
# echo ::set-env name=GIT_TAG::$(git describe --tags --abbrev=0)
# echo ::set-env name=CURR_DATE::$(date +%Y-%m-%d)
# - name: "Build Netplay Dolphin"
# shell: cmd
# run: |
# msbuild /p:Configuration=Release /p:Platform=x64 ${{ github.workspace }}\Source\Dolphin.sln
# - name: "Package Netplay"
# working-directory: ${{ github.workspace }}
# run: |
# $env:FILE_NAME="${{ env.CURR_DATE }}-${{ env.OBS_GIT_HASH }}-${{ env.OBS_GIT_TAG }}-win64-netplay.zip"
# mkdir artifact
# Xcopy /Y /E /I .\Data\Sys .\Binary\x64\Sys
# cd .\Binary\x64\
# fsutil file createnew portable.txt 0
# fsutil file createnew FIX-VCRUNTIME140-ERROR.txt 0
# echo "Download and install this: https://aka.ms/vs/16/release/vc_redist.x64.exe" > .\FIX-VCRUNTIME140-ERROR.txt
# 7z a ${env:FILE_NAME} .\*
# move ${env:FILE_NAME} ..\..\artifact\
# - name: "Publish"
# if: success()
# uses: actions/upload-artifact@v2-preview
# with:
# name: "windows64-netplay"
# path: "./artifact/"
# windows64-playback:
# env:
# DXSDK_DIR: "C:\\Program Files (x86)\\Microsoft DirectX SDK (June 2010)\\"
# name: "Windows Playback"
# runs-on: windows-2019
# steps:
# - name: "Remove Redistributable"
# shell: cmd
# run: |
# MsiExec.exe /passive /X{F0C3E5D1-1ADE-321E-8167-68EF0DE699A5}
# - name: "Setup MSBuild"
# uses: microsoft/setup-msbuild@v1
# - name: "Install DirectX SDK"
# shell: powershell
# run: |
# choco install directx-sdk
# - name: "Checkout"
# uses: actions/checkout@v2.3.1
# - name: 'Fetch Git Tags'
# if: success()
# shell: bash
# run: |
# git fetch --prune --unshallow
# echo ::set-env name=GIT_BRANCH::$(git rev-parse --abbrev-ref HEAD)
# echo ::set-env name=GIT_HASH::$(git rev-parse --short HEAD)
# echo ::set-env name=GIT_TAG::$(git describe --tags --abbrev=0)
# echo ::set-env name=CURR_DATE::$(date +%Y-%m-%d)
# - name: "Build Playback Dolphin"
# shell: cmd
# run: |
# msbuild /p:Configuration=ReleasePlayback /p:Platform=x64 ${{ github.workspace }}\Source\Dolphin.sln
# - name: "Package Playback"
# if: success()
# working-directory: ${{ github.workspace }}
# run: |
# $env:FILE_NAME="${{ env.CURR_DATE }}-${{ env.OBS_GIT_HASH }}-${{ env.OBS_GIT_TAG }}-win64-playback.zip"
# mkdir artifact
# git clone https://github.com/project-slippi/slippi-desktop-app
# Xcopy /Y /E /I .\Data\Sys .\Binary\x64\Sys
# Xcopy /Y /E /I .\slippi-desktop-app\app\dolphin-dev\overwrite\Sys .\Binary\x64\Sys
# Xcopy /Y /E /I .\slippi-desktop-app\app\dolphin-dev\overwrite\User .\Binary\x64\User
# cd .\Binary\x64\
# fsutil file createnew portable.txt 0
# 7z a ${env:FILE_NAME} .\*
# move ${env:FILE_NAME} ..\..\artifact\
# - name: "Publish"
# if: success()
# uses: actions/upload-artifact@v2-preview
# with:
# name: "windows64-playback"
# path: "./artifact/"
ubuntu64-netplay:
name: "Ubuntu Netplay"
runs-on: ubuntu-18.04
steps:
- name: "Checkout"
uses: actions/checkout@v2
- name: 'Fetch Git Tags'
if: success()
run: |
git fetch --prune --unshallow
echo "GIT_BRANCH=$(git rev-parse --abbrev-ref HEAD)" >> $GITHUB_ENV
echo "GIT_HASH=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
echo "GIT_TAG=$(git describe --tags --abbrev=0)" >> $GITHUB_ENV
echo "CURR_DATE=$(date +%Y-%m-%d)" >> $GITHUB_ENV
- name: "Install prerequisites"
if: success()
shell: bash
run: |
sudo dpkg --add-architecture amd64
sudo apt update
sudo apt install \
cmake \
pkg-config \
git \
wget \
libao-dev \
libasound2-dev \
libavcodec-dev \
libavformat-dev \
libbluetooth-dev \
libenet-dev \
libgtk2.0-dev \
liblzo2-dev \
libminiupnpc-dev \
libopenal-dev \
libpulse-dev \
libreadline-dev \
libsfml-dev \
libsoil-dev \
libsoundtouch-dev \
libswscale-dev \
libusb-1.0-0-dev \
libxext-dev \
libxrandr-dev \
portaudio19-dev \
zlib1g-dev \
libudev-dev \
libevdev-dev \
libmbedtls-dev \
libcurl4-openssl-dev \
libegl1-mesa-dev \
libpng-dev \
qtbase5-private-dev \
libxxf86vm-dev \
x11proto-xinerama-dev
- name: "Build Netplay Dolphin"
if: success()
working-directory: ${{ github.workspace }}
run: |
chmod +x ./build-linux.sh
./build-linux.sh
- name: "Build Netplay AppImage"
if: success()
working-directory: ${{ github.workspace }}
run: |
chmod +x ./build-appimage.sh
./build-appimage.sh
- name: "Package Netplay"
if: success()
working-directory: ${{ github.workspace }}
run: |
mkdir artifact
FILE_NAME=${{ env.CURR_DATE }}-${{ env.GIT_HASH }}-${{ env.GIT_TAG }}-linux-appimage-netplay.zip
zip -r "${FILE_NAME}" ./*.AppImage*
mv "${FILE_NAME}" ./artifact/
- name: "Publish"
if: success()
uses: actions/upload-artifact@v2-preview
with:
name: "linux-netplay"
path: "./artifact/"
ubuntu64-playback:
name: "Ubuntu Playback"
runs-on: ubuntu-18.04
steps:
- name: "Checkout"
uses: actions/checkout@v2
- name: 'Fetch Git Tags'
if: success()
run: |
git fetch --prune --unshallow
echo "GIT_BRANCH=$(git rev-parse --abbrev-ref HEAD)" >> $GITHUB_ENV
echo "GIT_HASH=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
echo "GIT_TAG=$(git describe --tags --abbrev=0)" >> $GITHUB_ENV
echo "CURR_DATE=$(date +%Y-%m-%d)" >> $GITHUB_ENV
- name: "Install prerequisites"
if: success()
shell: bash
run: |
sudo dpkg --add-architecture amd64
sudo apt update
sudo apt install \
cmake \
pkg-config \
git \
wget \
libao-dev \
libasound2-dev \
libavcodec-dev \
libavformat-dev \
libbluetooth-dev \
libenet-dev \
libgtk2.0-dev \
liblzo2-dev \
libminiupnpc-dev \
libopenal-dev \
libpulse-dev \
libreadline-dev \
libsfml-dev \
libsoil-dev \
libsoundtouch-dev \
libswscale-dev \
libusb-1.0-0-dev \
libxext-dev \
libxrandr-dev \
portaudio19-dev \
zlib1g-dev \
libudev-dev \
libevdev-dev \
libmbedtls-dev \
libcurl4-openssl-dev \
libegl1-mesa-dev \
libpng-dev \
qtbase5-private-dev \
libxxf86vm-dev \
x11proto-xinerama-dev
- name: "Build Playback Dolphin"
if: success()
working-directory: ${{ github.workspace }}
run: |
chmod +x ./build-linux.sh
./build-linux.sh playback
- name: "Build Playback AppImage"
if: success()
working-directory: ${{ github.workspace }}
run: |
chmod +x ./build-appimage.sh
./build-appimage.sh playback
- name: "Package Playback"
if: success()
working-directory: ${{ github.workspace }}
run: |
mkdir artifact
FILE_NAME=${{ env.CURR_DATE }}-${{ env.GIT_HASH }}-${{ env.GIT_TAG }}-linux-appimage-playback.zip
zip -r "${FILE_NAME}" ./*.AppImage
mv "${FILE_NAME}" ./artifact/
- name: "Publish"
if: success()
uses: actions/upload-artifact@v2-preview
with:
name: "linux-playback"
path: "./artifact/"
macOS64-netplay:
name: "macOS Netplay"
# windows:
# strategy:
# fail-fast: false
# matrix:
# build_type: [Netplay, Playback]
# include:
# - build_type: Netplay
# artifact_name: windows64-netplay
# build_config: -G "Ninja" -DCMAKE_BUILD_TYPE="Release" -DQt5_DIR:STRING="D:\a\dolphin\dolphin\Externals\Qt\Qt5.15.0\msvc2019_64\lib\cmake\Qt5" -DSLIPPI_PLAYBACK=false
# - build_type: Playback
# artifact_name: windows64-playback
# build_config: -G "Ninja" -DCMAKE_BUILD_TYPE="Release" -DQt5_DIR:STRING="D:\a\dolphin\dolphin\Externals\Qt\Qt5.15.0\msvc2019_64\lib\cmake\Qt5"
# env:
# DXSDK_DIR: "C:\\Program Files (x86)\\Microsoft DirectX SDK (June 2010)\\"
# name: "Windows ${{ matrix.build_type }}"
# runs-on: windows-2019
# steps:
# - name: "Checkout"
# uses: actions/checkout@v2
# with:
# submodules: recursive
# # - name: "Remove Redistributable"
# # shell: cmd
# # run: |
# # MsiExec.exe /passive /X{F0C3E5D1-1ADE-321E-8167-68EF0DE699A5}
# # MsiExec.exe /passive /X{1D8E6291-B0D5-35EC-8441-6616F567A0F7}
# # mkdir .\Tools\DX
# # - name: "Setup MSBuild"
# # uses: microsoft/setup-msbuild@v1
# # - name: Cache DXSDK_Jun10.exe
# # uses: actions/cache@v2
# # with:
# # path: ./Tools/DX/
# # key: ${{ runner.os }}
# # - name: "Download DirectX SDK"
# # working-directory: ${{ github.workspace }}
# # shell: powershell
# # run: |
# # if (!(Test-Path ".\Tools\DX\DXSDK_Jun10.exe" -PathType Leaf)) { Invoke-WebRequest -Uri https://github.com/project-slippi/Ishiiruka/releases/download/v2.2.5/DXSDK_Jun10.exe -UseBasicParsing -OutFile ".\Tools\DX\DXSDK_Jun10.exe" }
# # - name: "Install DirectX SDK"
# # working-directory: ${{ github.workspace }}
# # shell: cmd
# # run: |
# # .\Tools\DX\DXSDK_Jun10.exe /U /F
# - name: 'Fetch Git Tags'
# shell: bash
# if: success()
# run: |
# git fetch --prune --unshallow
# echo "GIT_BRANCH=$(git rev-parse --abbrev-ref HEAD)" >> $GITHUB_ENV
# echo "GIT_HASH=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
# echo "GIT_TAG=$(git describe --tags --abbrev=0)" >> $GITHUB_ENV
# echo "CURR_DATE=$(date +%Y-%m-%d)" >> $GITHUB_ENV
# - uses: seanmiddleditch/gha-setup-ninja@master
# - uses: egor-tensin/vs-shell@v2
# - name: "Build ${{ matrix.build_type }} Dolphin"
# shell: cmd
# working-directory: ${{ github.workspace }}
# run: |
# mkdir build
# cd build
# dir ..\Externals\Qt\Qt5.15.0\msvc2019_64\lib\cmake\Qt5
# cmake ${{ matrix.build_config }} ..
# ninja
# - name: "Package ${{ matrix.build_type }}"
# working-directory: ${{ github.workspace }}
# run: |
# Xcopy /Y /E /I .\Data\Sys .\Binary\x64\Sys
# cd .\Binary\x64\
# fsutil file createnew FIX-VCRUNTIME140-ERROR.txt 0
# echo "Download and install this: https://aka.ms/vs/16/release/vc_redist.x64.exe" > .\FIX-VCRUNTIME140-ERROR.txt
# - name: "Add Playback codes"
# working-directory: ${{ github.workspace }}
# if: matrix.build_type == 'Playback'
# run: |
# Xcopy /Y /E /I .\Data\Sys .\Binary\x64\Sys
# Xcopy /Y /E /I .\Data\PlaybackGeckoCodes\* .\Binary\x64\Sys\GameSettings\
# - name: Package Artifact
# working-directory: ${{ github.workspace }}
# run: |
# $FILE_NAME="${{ env.CURR_DATE }}-${{ env.GIT_HASH }}-${{ env.GIT_TAG }}-${{ matrix.artifact_name }}.zip"
# mkdir artifact
# cd .\Binary\x64\
# fsutil file createnew portable.txt 0
# 7z a $FILE_NAME .\*
# move $FILE_NAME ..\..\artifact\
# - name: "Publish"
# if: success()
# uses: actions/upload-artifact@v2-preview
# with:
# name: ${{ matrix.artifact_name }}
# path: "./artifact/"
linux:
strategy:
fail-fast: false
matrix:
build_type: [Netplay, Playback]
include:
- build_type: Netplay
artifact_name: linux-netplay
build_config: netplay
- build_type: Playback
artifact_name: linux-playback
build_config: playback
name: "Linux ${{ matrix.build_type }}"
runs-on: ubuntu-18.04
steps:
- name: "Checkout"
uses: actions/checkout@v2
with:
submodules: recursive
- name: 'Fetch Git Tags'
if: success()
run: |
git fetch --prune --unshallow
echo "GIT_BRANCH=$(git rev-parse --abbrev-ref HEAD)" >> $GITHUB_ENV
echo "GIT_HASH=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
echo "GIT_TAG=$(git describe --tags --abbrev=0)" >> $GITHUB_ENV
echo "CURR_DATE=$(date +%Y-%m-%d)" >> $GITHUB_ENV
- name: "Install prerequisites"
if: success()
shell: bash
run: |
sudo dpkg --add-architecture amd64
sudo apt update
sudo apt install \
cmake \
pkg-config \
git \
wget \
libao-dev \
libasound2-dev \
libavcodec-dev \
libavformat-dev \
libbluetooth-dev \
libenet-dev \
libgtk2.0-dev \
liblzo2-dev \
libminiupnpc-dev \
libopenal-dev \
libpulse-dev \
libreadline-dev \
libsfml-dev \
libsoil-dev \
libsoundtouch-dev \
libswscale-dev \
libusb-1.0-0-dev \
libwebkit2gtk-4.0-dev \
libxext-dev \
libxrandr-dev \
portaudio19-dev \
zlib1g-dev \
libudev-dev \
libevdev-dev \
libmbedtls-dev \
libcurl4-openssl-dev \
libegl1-mesa-dev \
libpng-dev \
qtbase5-private-dev \
libxxf86vm-dev \
x11proto-xinerama-dev
- name: "Build ${{ matrix.build_type }} Dolphin"
if: success()
working-directory: ${{ github.workspace }}
run: |
chmod +x ./build-linux.sh && ./build-linux.sh ${{ matrix.build_config }}
- name: "Build ${{ matrix.build_type }} AppImage"
if: success()
working-directory: ${{ github.workspace }}
run: |
chmod +x ./build-appimage.sh && ./build-appimage.sh ${{ matrix.build_config }}
- name: "Package"
if: success()
working-directory: ${{ github.workspace }}
run: |
mkdir artifact
FILE_NAME=${{ env.CURR_DATE }}-${{ env.GIT_HASH }}-${{ env.GIT_TAG }}-${{ matrix.artifact_name }}.zip
chmod +x ./*.AppImage
zip -r "${FILE_NAME}" ./*.AppImage*
mv "${FILE_NAME}" ./artifact/
- name: "Publish"
if: success()
uses: actions/upload-artifact@v2-preview
with:
name: ${{ matrix.artifact_name }}
path: "./artifact/"
macOS:
strategy:
fail-fast: false
matrix:
build_type: [Netplay, Playback]
include:
- build_type: Netplay
artifact_name: macOS-netplay
build_config: netplay
- build_type: Playback
artifact_name: macOS-playback
build_config: playback
name: "macOS ${{ matrix.build_type }}"
runs-on: macos-10.15
steps:
- name: "Checkout"
uses: actions/checkout@v2
with:
submodules: recursive
- name: 'Fetch Git Tags'
if: success()
run: |
@ -303,7 +241,7 @@ jobs:
shell: bash
run: |
rm '/usr/local/bin/2to3' || true
brew update
echo "HOMEBREW_NO_AUTO_UPDATE=1" >> $GITHUB_ENV
brew upgrade cmake
brew install \
ffmpeg \
@ -313,99 +251,26 @@ jobs:
libao \
sound-touch \
hidapi \
qt
- name: "Build Netplay"
qt@5
- name: "Build ${{ matrix.build_type }} Dolphin"
if: success()
shell: bash
working-directory: ${{ github.workspace }}
run: |
mkdir build
cd build
export LIBRARY_PATH=/usr/lib/
cmake -DSLIPPI_PLAYBACK=false -DQt5_DIR=$(brew --prefix qt)/lib/cmake/Qt5 -DENABLE_NOGUI=false ..
make -j7
- name: "Package Netplay"
chmod +x ./build-mac.sh && ./build-mac.sh ${{ matrix.build_config }}
- name: Package ${{ matrix.build_type }}
if: success()
shell: bash
working-directory: ${{ github.workspace }}
run: |
FILE_NAME=${{ env.CURR_DATE }}-${{ env.GIT_HASH }}-${{ env.GIT_TAG }}-macOS-netplay.tar.gz
cp -Rf Data/Sys build/Binaries/Dolphin.app/Contents/Resources/
FILE_NAME=${{ env.CURR_DATE }}-${{ env.GIT_HASH }}-${{ env.GIT_TAG }}-${{ matrix.artifact_name }}.tar.gz
mkdir artifact
cd ./build/Binaries/
zip -r "${FILE_NAME}" Dolphin.app
zip -r "${FILE_NAME}" "Slippi_Dolphin.app"
mv "${FILE_NAME}" ../../artifact/
- name: "Publish"
if: success()
uses: actions/upload-artifact@v2-preview
with:
name: "macOS-netplay"
path: "./artifact/"
macOS64-playback:
name: "macOS Playback"
runs-on: macos-10.15
steps:
- name: "Checkout"
uses: actions/checkout@v2
- name: 'Fetch Git Tags'
if: success()
run: |
git fetch --prune --unshallow
echo "GIT_BRANCH=$(git rev-parse --abbrev-ref HEAD)" >> $GITHUB_ENV
echo "GIT_HASH=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
echo "GIT_TAG=$(git describe --tags --abbrev=0)" >> $GITHUB_ENV
echo "CURR_DATE=$(date +%Y-%m-%d)" >> $GITHUB_ENV
- name: "Install 10.14 SDK"
if: success()
shell: bash
working-directory: ${{ github.workspace }}
run: |
wget https://github.com/phracker/MacOSX-SDKs/releases/download/10.15/MacOSX10.14.sdk.tar.xz
tar -xf MacOSX10.14.sdk.tar.xz
rm MacOSX10.14.sdk.tar.xz
sudo mv MacOSX10.14.sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/
- name: "Download and Install prerequisites"
if: success()
shell: bash
run: |
rm '/usr/local/bin/2to3' || true
brew update
brew upgrade cmake
brew install \
ffmpeg \
libpng \
libav \
pkgconfig \
libao \
sound-touch \
hidapi \
qt
- name: "Build Playback"
if: success()
shell: bash
working-directory: ${{ github.workspace }}
run: |
mkdir build
export LD_LIBRARY_PATH=/usr/lib/
cd build
cmake -DQt5_DIR=$(brew --prefix qt)/lib/cmake/Qt5 -DENABLE_NOGUI=false ..
make -j7
- name: "Package Playback"
if: success()
shell: bash
working-directory: ${{ github.workspace }}
run: |
mkdir artifact
git clone https://github.com/project-slippi/slippi-desktop-app
cd ./build/Binaries/
cp -Rf ../../Data/Sys ./Dolphin.app/Contents/Resources
cp -Rf ../../slippi-desktop-app/app/dolphin-dev/overwrite/Sys ./Dolphin.app/Contents/Resources
FILE_NAME=${{ env.CURR_DATE }}-${{ env.GIT_HASH }}-${{ env.GIT_TAG }}-macOS-playback.zip
zip -r "${FILE_NAME}" Dolphin.app
mv "${FILE_NAME}" ../../artifact/
- name: "Publish"
if: success()
uses: actions/upload-artifact@v2-preview
with:
name: "macOS-playback"
name: ${{ matrix.artifact_name }}
path: "./artifact/"

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

15
Data/linux-env.sh Normal file
View file

@ -0,0 +1,15 @@
#!/bin/bash -e
# linux-env.sh
# Add /usr/lib/ to LD_LIBRARY_PATH cause Ubuntu is dumb
export LD_LIBRARY_PATH="/usr/lib/:$LD_LIBRARY_PATH"
if [[ $(env | grep -i wayland) ]]; then
# wxWidgets 3.14 is GTK3, which seemingly has an issue or two when
# running under Wayland. Explicitly setting this for Slippi avoids
# those issues.
export GDK_BACKEND=x11
# Disable Webkit compositing on Wayland cause it breaks stuff
export WEBKIT_DISABLE_COMPOSITING_MODE=1
fi

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

BIN
Data/slippi_dmg_icon.icns Normal file

Binary file not shown.

View file

@ -438,13 +438,13 @@ endif()
if(APPLE)
include(BundleUtilities)
set(BUNDLE_PATH ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/Dolphin.app)
set(BUNDLE_PATH "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/Slippi_Dolphin.app")
# Ask for an application bundle.
set_target_properties(dolphin-emu PROPERTIES
MACOSX_BUNDLE true
MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist.in
OUTPUT_NAME Dolphin
OUTPUT_NAME "Slippi_Dolphin"
)
# Copy qt.conf into the bundle

View file

@ -29,11 +29,15 @@
</dict>
</array>
<key>CFBundleExecutable</key>
<string>Dolphin</string>
<string>Slippi_Dolphin</string>
<key>CFBundleName</key>
<string>Slippi_Dolphin</string>
<key>CFBundleDisplayName</key>
<string>Slippi_Dolphin</string>
<key>CFBundleIconFile</key>
<string>Dolphin.icns</string>
<key>CFBundleIdentifier</key>
<string>org.dolphin-emu.dolphin</string>
<string>com.project-slippi.dolphin</string>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundlePackageType</key>

View file

@ -1,7 +1,8 @@
#!/bin/bash -e
# build-online-appimage.sh
# build-appimage.sh
ZSYNC_STRING="gh-releases-zsync|project-slippi|Ishiiruka|latest|Slippi_Online-x86_64.AppImage.zsync"
NETPLAY_APPIMAGE_STRING="Slippi_Online-x86_64.AppImage"
PLAYBACK_APPIMAGE_STRING="Slippi_Playback-x86_64.AppImage"
LINUXDEPLOY_PATH="https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous"
@ -16,28 +17,33 @@ UPDATETOOL_PATH="https://github.com/AppImage/AppImageUpdate/releases/download/co
UPDATETOOL_FILE="appimageupdatetool-x86_64.AppImage"
UPDATETOOL_URL="${UPDATETOOL_PATH}/${UPDATETOOL_FILE}"
DESKTOP_APP_URL="https://github.com/project-slippi/slippi-desktop-app"
DESKTOP_APP_SYS_PATH="./slippi-desktop-app/app/dolphin-dev/overwrite/Sys"
PLAYBACK_CODES_PATH="./Data/PlaybackGeckoCodes/"
APPDIR_BIN="./AppDir/usr/bin"
APPDIR_HOOKS="./AppDir/apprun-hooks"
# Grab various appimage binaries from GitHub if we don't have them
if [ ! -e ./Tools/linuxdeploy ]; then
wget ${LINUXDEPLOY_URL} -O ./Tools/linuxdeploy
chmod +x ./Tools/linuxdeploy
fi
if [ ! -e ./Tools/linuxdeploy-update-plugin ]; then
wget ${UPDATEPLUG_URL} -O ./Tools/linuxdeploy-update-plugin
chmod +x ./Tools/linuxdeploy-update-plugin
fi
if [ ! -e ./Tools/appimageupdatetool ]; then
wget ${UPDATEPLUG_URL} -O ./Tools/appimageupdatetool
chmod +x ./Tools/appimageupdatetool
wget ${UPDATETOOL_URL} -O ./Tools/appimageupdatetool
fi
chmod +x ./Tools/linuxdeploy
chmod +x ./Tools/linuxdeploy-update-plugin
chmod +x ./Tools/appimageupdatetool
# Delete the AppDir folder to prevent build issues
rm -rf ./AppDir/
# Add the linux-env script to the AppDir prior to running linuxdeploy
mkdir -p ${APPDIR_HOOKS}
cp Data/linux-env.sh ${APPDIR_HOOKS}
# Build the AppDir directory for this image
mkdir -p AppDir
./Tools/linuxdeploy \
@ -50,9 +56,24 @@ mkdir -p AppDir
cp -r Data/Sys ${APPDIR_BIN}
# Build type
if [ -z "$1" ] # Netplay
if [ "$1" == "playback" ] # Playback
then
echo "Using Netplay build config"
echo "Using Playback build config"
rm -f ${PLAYBACK_APPIMAGE_STRING}
# Update Sys dir with playback codes
echo "Copying Playback gecko codes"
rm -rf "${APPDIR_BIN}/Sys/GameSettings" # Delete netplay codes
cp -r "${PLAYBACK_CODES_PATH}/." "${APPDIR_BIN}/Sys/GameSettings/"
OUTPUT="${PLAYBACK_APPIMAGE_STRING}" \
./Tools/linuxdeploy-update-plugin --appdir=./AppDir/
else
echo "Using Netplay build config"
# remove existing appimage just in case
rm -f ${NETPLAY_APPIMAGE_STRING}
# Package up the update tool within the AppImage
cp ./Tools/appimageupdatetool ./AppDir/usr/bin/
@ -60,22 +81,4 @@ if [ -z "$1" ] # Netplay
# Bake an AppImage with the update metadata
UPDATE_INFORMATION="${ZSYNC_STRING}" \
./Tools/linuxdeploy-update-plugin --appdir=./AppDir/
elif [ "$1" == "playback" ] # Playback
then
echo "Using Playback build config"
if [ -d "slippi-desktop-app" ]
then
pushd slippi-desktop-app
git checkout master
git pull --ff-only
popd
else
git clone ${DESKTOP_APP_URL}
fi
# Update Sys dir with playback codes
rm -rf "${APPDIR_BIN}/GameSettings" # Delete netplay codes
cp -r ${DESKTOP_APP_SYS_PATH} ${APPDIR_BIN}
OUTPUT="${PLAYBACK_APPIMAGE_STRING}" \
./Tools/linuxdeploy-update-plugin --appdir=./AppDir/
fi

View file

@ -3,15 +3,19 @@
CMAKE_FLAGS='-DLINUX_LOCAL_DEV=true'
PLAYBACK_CODES_PATH="./Data/PlaybackGeckoCodes/"
DATA_SYS_PATH="./Data/Sys/"
BINARY_PATH="./build/Binaries/"
# Build type
if [ -z "$1" ]
if [ "$1" == "playback" ]
then
echo "Using Playback build config"
else
# TODO: move this around, playback should be the secondary build
CMAKE_FLAGS+=" -DSLIPPI_PLAYBACK=false"
echo "Using Netplay build config"
elif [ "$1" == "playback" ]
then
echo "Using Playback build config"
fi
# Move into the build directory, run CMake, and compile the project
@ -22,6 +26,15 @@ make -j$(nproc)
popd
# Copy the Sys folder in
cp -r -n Data/Sys/ build/Binaries/
cp -r -n ${DATA_SYS_PATH} ${BINARY_PATH}
touch ./build/Binaries/portable.txt
# Copy playback specific codes if needed
if [ "$1" == "playback" ]
then
# Update Sys dir with playback codes
echo "Copying Playback gecko codes"
rm -rf "${BINARY_PATH}/Sys/GameSettings" # Delete netplay codes
cp -r "${PLAYBACK_CODES_PATH}/." "${BINARY_PATH}/Sys/GameSettings/"
fi

49
build-mac.sh Normal file
View file

@ -0,0 +1,49 @@
#!/bin/bash -e
# build-mac.sh
QT_BREW_PATH=$(brew --prefix qt@5)
CMAKE_FLAGS="-DQt5_DIR=${QT_BREW_PATH}/lib/cmake/Qt5 -DENABLE_NOGUI=false"
PLAYBACK_CODES_PATH="./Data/PlaybackGeckoCodes/"
DATA_SYS_PATH="./Data/Sys/"
BINARY_PATH="./build/Binaries/Slippi_Dolphin.app/Contents/Resources/"
export LIBRARY_PATH=$LIBRARY_PATH:/usr/local/lib:/usr/lib/
# Build type
if [ "$1" == "playback" ]
then
echo "Using Playback build config"
else
echo "Using Netplay build config"
CMAKE_FLAGS+=" -DSLIPPI_PLAYBACK=false"
fi
if [[ -z "${CERTIFICATE_MACOS_APPLICATION}" ]]
then
echo "Building without code signing"
else
echo "Building with code signing"
CMAKE_FLAGS+=' -DMACOS_CODE_SIGNING="ON"'
fi
# Move into the build directory, run CMake, and compile the project
mkdir -p build
pushd build
cmake ${CMAKE_FLAGS} ..
make -j7
popd
# Copy the Sys folder in
echo "Copying Sys files into the bundle"
cp -Rfn "${DATA_SYS_PATH}" "${BINARY_PATH}"
# Copy playback specific codes if needed
if [ "$1" == "playback" ]
then
# Update Sys dir with playback codes
echo "Copying playback gecko codes into the bundle"
rm -rf "${BINARY_PATH}/Sys/GameSettings" # Delete netplay codes
cp -r "${PLAYBACK_CODES_PATH}/." "${BINARY_PATH}/Sys/GameSettings/"
fi