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: on:
push: push:
branches: [ master ] branches:
- master
paths-ignore: paths-ignore:
- "**.md" - "**.md"
- "**.ini" - "**.ini"
@ -13,112 +14,117 @@ on:
- "**.ini" - "**.ini"
jobs: jobs:
# windows64-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: # env:
# DXSDK_DIR: "C:\\Program Files (x86)\\Microsoft DirectX SDK (June 2010)\\" # DXSDK_DIR: "C:\\Program Files (x86)\\Microsoft DirectX SDK (June 2010)\\"
# name: "Windows Netplay" # name: "Windows ${{ matrix.build_type }}"
# runs-on: windows-2019 # runs-on: windows-2019
# steps: # 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" # - name: "Checkout"
# uses: actions/checkout@v2.3.1 # 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' # - name: 'Fetch Git Tags'
# if: success()
# shell: bash # shell: bash
# if: success()
# run: | # run: |
# git fetch --prune --unshallow # git fetch --prune --unshallow
# echo ::set-env name=GIT_BRANCH::$(git rev-parse --abbrev-ref HEAD) # echo "GIT_BRANCH=$(git rev-parse --abbrev-ref HEAD)" >> $GITHUB_ENV
# echo ::set-env name=GIT_HASH::$(git rev-parse --short HEAD) # echo "GIT_HASH=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
# echo ::set-env name=GIT_TAG::$(git describe --tags --abbrev=0) # echo "GIT_TAG=$(git describe --tags --abbrev=0)" >> $GITHUB_ENV
# echo ::set-env name=CURR_DATE::$(date +%Y-%m-%d) # echo "CURR_DATE=$(date +%Y-%m-%d)" >> $GITHUB_ENV
# - name: "Build Netplay Dolphin" # - uses: seanmiddleditch/gha-setup-ninja@master
# - uses: egor-tensin/vs-shell@v2
# - name: "Build ${{ matrix.build_type }} Dolphin"
# shell: cmd # shell: cmd
# run: |
# msbuild /p:Configuration=Release /p:Platform=x64 ${{ github.workspace }}\Source\Dolphin.sln
# - name: "Package Netplay"
# working-directory: ${{ github.workspace }} # working-directory: ${{ github.workspace }}
# run: | # run: |
# $env:FILE_NAME="${{ env.CURR_DATE }}-${{ env.OBS_GIT_HASH }}-${{ env.OBS_GIT_TAG }}-win64-netplay.zip" # mkdir build
# mkdir artifact # 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 # Xcopy /Y /E /I .\Data\Sys .\Binary\x64\Sys
# cd .\Binary\x64\ # cd .\Binary\x64\
# fsutil file createnew portable.txt 0
# fsutil file createnew FIX-VCRUNTIME140-ERROR.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 # echo "Download and install this: https://aka.ms/vs/16/release/vc_redist.x64.exe" > .\FIX-VCRUNTIME140-ERROR.txt
# 7z a ${env:FILE_NAME} .\* # - name: "Add Playback codes"
# move ${env:FILE_NAME} ..\..\artifact\ # working-directory: ${{ github.workspace }}
# - name: "Publish" # if: matrix.build_type == 'Playback'
# 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: | # run: |
# MsiExec.exe /passive /X{F0C3E5D1-1ADE-321E-8167-68EF0DE699A5} # Xcopy /Y /E /I .\Data\Sys .\Binary\x64\Sys
# - name: "Setup MSBuild" # Xcopy /Y /E /I .\Data\PlaybackGeckoCodes\* .\Binary\x64\Sys\GameSettings\
# uses: microsoft/setup-msbuild@v1 # - name: Package Artifact
# - 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 }} # working-directory: ${{ github.workspace }}
# run: | # run: |
# $env:FILE_NAME="${{ env.CURR_DATE }}-${{ env.OBS_GIT_HASH }}-${{ env.OBS_GIT_TAG }}-win64-playback.zip" # $FILE_NAME="${{ env.CURR_DATE }}-${{ env.GIT_HASH }}-${{ env.GIT_TAG }}-${{ matrix.artifact_name }}.zip"
# mkdir artifact # 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\ # cd .\Binary\x64\
# fsutil file createnew portable.txt 0 # fsutil file createnew portable.txt 0
# 7z a ${env:FILE_NAME} .\* # 7z a $FILE_NAME .\*
# move ${env:FILE_NAME} ..\..\artifact\ # move $FILE_NAME ..\..\artifact\
# - name: "Publish" # - name: "Publish"
# if: success() # if: success()
# uses: actions/upload-artifact@v2-preview # uses: actions/upload-artifact@v2-preview
# with: # with:
# name: "windows64-playback" # name: ${{ matrix.artifact_name }}
# path: "./artifact/" # path: "./artifact/"
ubuntu64-netplay: linux:
name: "Ubuntu Netplay" 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 runs-on: ubuntu-18.04
steps: steps:
- name: "Checkout" - name: "Checkout"
uses: actions/checkout@v2 uses: actions/checkout@v2
with:
submodules: recursive
- name: 'Fetch Git Tags' - name: 'Fetch Git Tags'
if: success() if: success()
run: | run: |
@ -155,6 +161,7 @@ jobs:
libsoundtouch-dev \ libsoundtouch-dev \
libswscale-dev \ libswscale-dev \
libusb-1.0-0-dev \ libusb-1.0-0-dev \
libwebkit2gtk-4.0-dev \
libxext-dev \ libxext-dev \
libxrandr-dev \ libxrandr-dev \
portaudio19-dev \ portaudio19-dev \
@ -168,119 +175,50 @@ jobs:
qtbase5-private-dev \ qtbase5-private-dev \
libxxf86vm-dev \ libxxf86vm-dev \
x11proto-xinerama-dev x11proto-xinerama-dev
- name: "Build Netplay Dolphin" - name: "Build ${{ matrix.build_type }} Dolphin"
if: success() if: success()
working-directory: ${{ github.workspace }} working-directory: ${{ github.workspace }}
run: | run: |
chmod +x ./build-linux.sh chmod +x ./build-linux.sh && ./build-linux.sh ${{ matrix.build_config }}
./build-linux.sh - name: "Build ${{ matrix.build_type }} AppImage"
- name: "Build Netplay AppImage"
if: success() if: success()
working-directory: ${{ github.workspace }} working-directory: ${{ github.workspace }}
run: | run: |
chmod +x ./build-appimage.sh chmod +x ./build-appimage.sh && ./build-appimage.sh ${{ matrix.build_config }}
./build-appimage.sh - name: "Package"
- name: "Package Netplay"
if: success() if: success()
working-directory: ${{ github.workspace }} working-directory: ${{ github.workspace }}
run: | run: |
mkdir artifact mkdir artifact
FILE_NAME=${{ env.CURR_DATE }}-${{ env.GIT_HASH }}-${{ env.GIT_TAG }}-linux-appimage-netplay.zip FILE_NAME=${{ env.CURR_DATE }}-${{ env.GIT_HASH }}-${{ env.GIT_TAG }}-${{ matrix.artifact_name }}.zip
chmod +x ./*.AppImage
zip -r "${FILE_NAME}" ./*.AppImage* zip -r "${FILE_NAME}" ./*.AppImage*
mv "${FILE_NAME}" ./artifact/ mv "${FILE_NAME}" ./artifact/
- name: "Publish" - name: "Publish"
if: success() if: success()
uses: actions/upload-artifact@v2-preview uses: actions/upload-artifact@v2-preview
with: with:
name: "linux-netplay" name: ${{ matrix.artifact_name }}
path: "./artifact/" path: "./artifact/"
ubuntu64-playback: macOS:
name: "Ubuntu Playback" strategy:
runs-on: ubuntu-18.04 fail-fast: false
steps: matrix:
- name: "Checkout" build_type: [Netplay, Playback]
uses: actions/checkout@v2 include:
- name: 'Fetch Git Tags' - build_type: Netplay
if: success() artifact_name: macOS-netplay
run: | build_config: netplay
git fetch --prune --unshallow - build_type: Playback
echo "GIT_BRANCH=$(git rev-parse --abbrev-ref HEAD)" >> $GITHUB_ENV artifact_name: macOS-playback
echo "GIT_HASH=$(git rev-parse --short HEAD)" >> $GITHUB_ENV build_config: playback
echo "GIT_TAG=$(git describe --tags --abbrev=0)" >> $GITHUB_ENV name: "macOS ${{ matrix.build_type }}"
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"
runs-on: macos-10.15 runs-on: macos-10.15
steps: steps:
- name: "Checkout" - name: "Checkout"
uses: actions/checkout@v2 uses: actions/checkout@v2
with:
submodules: recursive
- name: 'Fetch Git Tags' - name: 'Fetch Git Tags'
if: success() if: success()
run: | run: |
@ -303,7 +241,7 @@ jobs:
shell: bash shell: bash
run: | run: |
rm '/usr/local/bin/2to3' || true rm '/usr/local/bin/2to3' || true
brew update echo "HOMEBREW_NO_AUTO_UPDATE=1" >> $GITHUB_ENV
brew upgrade cmake brew upgrade cmake
brew install \ brew install \
ffmpeg \ ffmpeg \
@ -313,99 +251,26 @@ jobs:
libao \ libao \
sound-touch \ sound-touch \
hidapi \ hidapi \
qt qt@5
- name: "Build Netplay" - name: "Build ${{ matrix.build_type }} Dolphin"
if: success() if: success()
shell: bash shell: bash
working-directory: ${{ github.workspace }} working-directory: ${{ github.workspace }}
run: | run: |
mkdir build chmod +x ./build-mac.sh && ./build-mac.sh ${{ matrix.build_config }}
cd build - name: Package ${{ matrix.build_type }}
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"
if: success() if: success()
shell: bash shell: bash
working-directory: ${{ github.workspace }} working-directory: ${{ github.workspace }}
run: | run: |
FILE_NAME=${{ env.CURR_DATE }}-${{ env.GIT_HASH }}-${{ env.GIT_TAG }}-macOS-netplay.tar.gz FILE_NAME=${{ env.CURR_DATE }}-${{ env.GIT_HASH }}-${{ env.GIT_TAG }}-${{ matrix.artifact_name }}.tar.gz
cp -Rf Data/Sys build/Binaries/Dolphin.app/Contents/Resources/
mkdir artifact mkdir artifact
cd ./build/Binaries/ cd ./build/Binaries/
zip -r "${FILE_NAME}" Dolphin.app zip -r "${FILE_NAME}" "Slippi_Dolphin.app"
mv "${FILE_NAME}" ../../artifact/ mv "${FILE_NAME}" ../../artifact/
- name: "Publish" - name: "Publish"
if: success() if: success()
uses: actions/upload-artifact@v2-preview uses: actions/upload-artifact@v2-preview
with: with:
name: "macOS-netplay" name: ${{ matrix.artifact_name }}
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"
path: "./artifact/" 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) if(APPLE)
include(BundleUtilities) 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. # Ask for an application bundle.
set_target_properties(dolphin-emu PROPERTIES set_target_properties(dolphin-emu PROPERTIES
MACOSX_BUNDLE true MACOSX_BUNDLE true
MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist.in MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist.in
OUTPUT_NAME Dolphin OUTPUT_NAME "Slippi_Dolphin"
) )
# Copy qt.conf into the bundle # Copy qt.conf into the bundle

View file

@ -29,11 +29,15 @@
</dict> </dict>
</array> </array>
<key>CFBundleExecutable</key> <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> <key>CFBundleIconFile</key>
<string>Dolphin.icns</string> <string>Dolphin.icns</string>
<key>CFBundleIdentifier</key> <key>CFBundleIdentifier</key>
<string>org.dolphin-emu.dolphin</string> <string>com.project-slippi.dolphin</string>
<key>CFBundleDevelopmentRegion</key> <key>CFBundleDevelopmentRegion</key>
<string>English</string> <string>English</string>
<key>CFBundlePackageType</key> <key>CFBundlePackageType</key>

View file

@ -1,7 +1,8 @@
#!/bin/bash -e #!/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" 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" PLAYBACK_APPIMAGE_STRING="Slippi_Playback-x86_64.AppImage"
LINUXDEPLOY_PATH="https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous" 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_FILE="appimageupdatetool-x86_64.AppImage"
UPDATETOOL_URL="${UPDATETOOL_PATH}/${UPDATETOOL_FILE}" UPDATETOOL_URL="${UPDATETOOL_PATH}/${UPDATETOOL_FILE}"
DESKTOP_APP_URL="https://github.com/project-slippi/slippi-desktop-app" PLAYBACK_CODES_PATH="./Data/PlaybackGeckoCodes/"
DESKTOP_APP_SYS_PATH="./slippi-desktop-app/app/dolphin-dev/overwrite/Sys"
APPDIR_BIN="./AppDir/usr/bin" APPDIR_BIN="./AppDir/usr/bin"
APPDIR_HOOKS="./AppDir/apprun-hooks"
# Grab various appimage binaries from GitHub if we don't have them # Grab various appimage binaries from GitHub if we don't have them
if [ ! -e ./Tools/linuxdeploy ]; then if [ ! -e ./Tools/linuxdeploy ]; then
wget ${LINUXDEPLOY_URL} -O ./Tools/linuxdeploy wget ${LINUXDEPLOY_URL} -O ./Tools/linuxdeploy
chmod +x ./Tools/linuxdeploy
fi fi
if [ ! -e ./Tools/linuxdeploy-update-plugin ]; then if [ ! -e ./Tools/linuxdeploy-update-plugin ]; then
wget ${UPDATEPLUG_URL} -O ./Tools/linuxdeploy-update-plugin wget ${UPDATEPLUG_URL} -O ./Tools/linuxdeploy-update-plugin
chmod +x ./Tools/linuxdeploy-update-plugin
fi fi
if [ ! -e ./Tools/appimageupdatetool ]; then if [ ! -e ./Tools/appimageupdatetool ]; then
wget ${UPDATEPLUG_URL} -O ./Tools/appimageupdatetool wget ${UPDATETOOL_URL} -O ./Tools/appimageupdatetool
chmod +x ./Tools/appimageupdatetool
fi fi
chmod +x ./Tools/linuxdeploy
chmod +x ./Tools/linuxdeploy-update-plugin
chmod +x ./Tools/appimageupdatetool
# Delete the AppDir folder to prevent build issues # Delete the AppDir folder to prevent build issues
rm -rf ./AppDir/ 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 # Build the AppDir directory for this image
mkdir -p AppDir mkdir -p AppDir
./Tools/linuxdeploy \ ./Tools/linuxdeploy \
@ -50,32 +56,29 @@ mkdir -p AppDir
cp -r Data/Sys ${APPDIR_BIN} cp -r Data/Sys ${APPDIR_BIN}
# Build type # Build type
if [ -z "$1" ] # Netplay if [ "$1" == "playback" ] # Playback
then then
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" echo "Using Netplay build config"
# remove existing appimage just in case
rm -f ${NETPLAY_APPIMAGE_STRING}
# Package up the update tool within the AppImage # Package up the update tool within the AppImage
cp ./Tools/appimageupdatetool ./AppDir/usr/bin/ cp ./Tools/appimageupdatetool ./AppDir/usr/bin/
# Bake an AppImage with the update metadata # Bake an AppImage with the update metadata
UPDATE_INFORMATION="${ZSYNC_STRING}" \ UPDATE_INFORMATION="${ZSYNC_STRING}" \
./Tools/linuxdeploy-update-plugin --appdir=./AppDir/ ./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 fi

View file

@ -3,15 +3,19 @@
CMAKE_FLAGS='-DLINUX_LOCAL_DEV=true' CMAKE_FLAGS='-DLINUX_LOCAL_DEV=true'
PLAYBACK_CODES_PATH="./Data/PlaybackGeckoCodes/"
DATA_SYS_PATH="./Data/Sys/"
BINARY_PATH="./build/Binaries/"
# Build type # Build type
if [ -z "$1" ] if [ "$1" == "playback" ]
then then
echo "Using Playback build config"
else
# TODO: move this around, playback should be the secondary build # TODO: move this around, playback should be the secondary build
CMAKE_FLAGS+=" -DSLIPPI_PLAYBACK=false" CMAKE_FLAGS+=" -DSLIPPI_PLAYBACK=false"
echo "Using Netplay build config" echo "Using Netplay build config"
elif [ "$1" == "playback" ]
then
echo "Using Playback build config"
fi fi
# Move into the build directory, run CMake, and compile the project # Move into the build directory, run CMake, and compile the project
@ -22,6 +26,15 @@ make -j$(nproc)
popd popd
# Copy the Sys folder in # 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 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