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,274 +14,211 @@ on:
- "**.ini" - "**.ini"
jobs: jobs:
# windows64-netplay: # windows:
# env: # strategy:
# DXSDK_DIR: "C:\\Program Files (x86)\\Microsoft DirectX SDK (June 2010)\\" # fail-fast: false
# name: "Windows Netplay" # matrix:
# runs-on: windows-2019 # build_type: [Netplay, Playback]
# steps: # include:
# - name: "Remove Redistributable" # - build_type: Netplay
# shell: cmd # artifact_name: windows64-netplay
# run: | # 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
# MsiExec.exe /passive /X{F0C3E5D1-1ADE-321E-8167-68EF0DE699A5} # - build_type: Playback
# - name: "Setup MSBuild" # artifact_name: windows64-playback
# uses: microsoft/setup-msbuild@v1 # 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"
# - name: "Install DirectX SDK" # env:
# shell: powershell # DXSDK_DIR: "C:\\Program Files (x86)\\Microsoft DirectX SDK (June 2010)\\"
# run: | # name: "Windows ${{ matrix.build_type }}"
# choco install directx-sdk # runs-on: windows-2019
# - name: "Checkout" # steps:
# uses: actions/checkout@v2.3.1 # - name: "Checkout"
# - name: 'Fetch Git Tags' # uses: actions/checkout@v2
# if: success() # with:
# shell: bash # submodules: recursive
# run: | # # - name: "Remove Redistributable"
# git fetch --prune --unshallow # # shell: cmd
# echo ::set-env name=GIT_BRANCH::$(git rev-parse --abbrev-ref HEAD) # # run: |
# echo ::set-env name=GIT_HASH::$(git rev-parse --short HEAD) # # MsiExec.exe /passive /X{F0C3E5D1-1ADE-321E-8167-68EF0DE699A5}
# echo ::set-env name=GIT_TAG::$(git describe --tags --abbrev=0) # # MsiExec.exe /passive /X{1D8E6291-B0D5-35EC-8441-6616F567A0F7}
# echo ::set-env name=CURR_DATE::$(date +%Y-%m-%d) # # mkdir .\Tools\DX
# - name: "Build Netplay Dolphin" # # - name: "Setup MSBuild"
# shell: cmd # # uses: microsoft/setup-msbuild@v1
# run: | # # - name: Cache DXSDK_Jun10.exe
# msbuild /p:Configuration=Release /p:Platform=x64 ${{ github.workspace }}\Source\Dolphin.sln # # uses: actions/cache@v2
# - name: "Package Netplay" # # with:
# working-directory: ${{ github.workspace }} # # path: ./Tools/DX/
# run: | # # key: ${{ runner.os }}
# $env:FILE_NAME="${{ env.CURR_DATE }}-${{ env.OBS_GIT_HASH }}-${{ env.OBS_GIT_TAG }}-win64-netplay.zip" # # - name: "Download DirectX SDK"
# mkdir artifact # # working-directory: ${{ github.workspace }}
# Xcopy /Y /E /I .\Data\Sys .\Binary\x64\Sys # # shell: powershell
# cd .\Binary\x64\ # # run: |
# fsutil file createnew portable.txt 0 # # 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" }
# fsutil file createnew FIX-VCRUNTIME140-ERROR.txt 0 # # - name: "Install DirectX SDK"
# echo "Download and install this: https://aka.ms/vs/16/release/vc_redist.x64.exe" > .\FIX-VCRUNTIME140-ERROR.txt # # working-directory: ${{ github.workspace }}
# 7z a ${env:FILE_NAME} .\* # # shell: cmd
# move ${env:FILE_NAME} ..\..\artifact\ # # run: |
# - name: "Publish" # # .\Tools\DX\DXSDK_Jun10.exe /U /F
# if: success() # - name: 'Fetch Git Tags'
# uses: actions/upload-artifact@v2-preview # shell: bash
# with: # if: success()
# name: "windows64-netplay" # run: |
# path: "./artifact/" # git fetch --prune --unshallow
# windows64-playback: # echo "GIT_BRANCH=$(git rev-parse --abbrev-ref HEAD)" >> $GITHUB_ENV
# env: # echo "GIT_HASH=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
# DXSDK_DIR: "C:\\Program Files (x86)\\Microsoft DirectX SDK (June 2010)\\" # echo "GIT_TAG=$(git describe --tags --abbrev=0)" >> $GITHUB_ENV
# name: "Windows Playback" # echo "CURR_DATE=$(date +%Y-%m-%d)" >> $GITHUB_ENV
# runs-on: windows-2019 # - uses: seanmiddleditch/gha-setup-ninja@master
# steps: # - uses: egor-tensin/vs-shell@v2
# - name: "Remove Redistributable" # - name: "Build ${{ matrix.build_type }} Dolphin"
# shell: cmd # shell: cmd
# run: | # working-directory: ${{ github.workspace }}
# MsiExec.exe /passive /X{F0C3E5D1-1ADE-321E-8167-68EF0DE699A5} # run: |
# - name: "Setup MSBuild" # mkdir build
# uses: microsoft/setup-msbuild@v1 # cd build
# - name: "Install DirectX SDK" # dir ..\Externals\Qt\Qt5.15.0\msvc2019_64\lib\cmake\Qt5
# shell: powershell # cmake ${{ matrix.build_config }} ..
# run: | # ninja
# choco install directx-sdk # - name: "Package ${{ matrix.build_type }}"
# - name: "Checkout" # working-directory: ${{ github.workspace }}
# uses: actions/checkout@v2.3.1 # run: |
# - name: 'Fetch Git Tags' # Xcopy /Y /E /I .\Data\Sys .\Binary\x64\Sys
# if: success() # cd .\Binary\x64\
# shell: bash # fsutil file createnew FIX-VCRUNTIME140-ERROR.txt 0
# run: | # echo "Download and install this: https://aka.ms/vs/16/release/vc_redist.x64.exe" > .\FIX-VCRUNTIME140-ERROR.txt
# git fetch --prune --unshallow # - name: "Add Playback codes"
# echo ::set-env name=GIT_BRANCH::$(git rev-parse --abbrev-ref HEAD) # working-directory: ${{ github.workspace }}
# echo ::set-env name=GIT_HASH::$(git rev-parse --short HEAD) # if: matrix.build_type == 'Playback'
# echo ::set-env name=GIT_TAG::$(git describe --tags --abbrev=0) # run: |
# echo ::set-env name=CURR_DATE::$(date +%Y-%m-%d) # Xcopy /Y /E /I .\Data\Sys .\Binary\x64\Sys
# - name: "Build Playback Dolphin" # Xcopy /Y /E /I .\Data\PlaybackGeckoCodes\* .\Binary\x64\Sys\GameSettings\
# shell: cmd # - name: Package Artifact
# run: | # working-directory: ${{ github.workspace }}
# msbuild /p:Configuration=ReleasePlayback /p:Platform=x64 ${{ github.workspace }}\Source\Dolphin.sln # run: |
# - name: "Package Playback" # $FILE_NAME="${{ env.CURR_DATE }}-${{ env.GIT_HASH }}-${{ env.GIT_TAG }}-${{ matrix.artifact_name }}.zip"
# if: success() # mkdir artifact
# working-directory: ${{ github.workspace }} # cd .\Binary\x64\
# run: | # fsutil file createnew portable.txt 0
# $env:FILE_NAME="${{ env.CURR_DATE }}-${{ env.OBS_GIT_HASH }}-${{ env.OBS_GIT_TAG }}-win64-playback.zip" # 7z a $FILE_NAME .\*
# mkdir artifact # move $FILE_NAME ..\..\artifact\
# git clone https://github.com/project-slippi/slippi-desktop-app # - name: "Publish"
# Xcopy /Y /E /I .\Data\Sys .\Binary\x64\Sys # if: success()
# Xcopy /Y /E /I .\slippi-desktop-app\app\dolphin-dev\overwrite\Sys .\Binary\x64\Sys # uses: actions/upload-artifact@v2-preview
# Xcopy /Y /E /I .\slippi-desktop-app\app\dolphin-dev\overwrite\User .\Binary\x64\User # with:
# cd .\Binary\x64\ # name: ${{ matrix.artifact_name }}
# fsutil file createnew portable.txt 0 # path: "./artifact/"
# 7z a ${env:FILE_NAME} .\* linux:
# move ${env:FILE_NAME} ..\..\artifact\ strategy:
# - name: "Publish" fail-fast: false
# if: success() matrix:
# uses: actions/upload-artifact@v2-preview build_type: [Netplay, Playback]
# with: include:
# name: "windows64-playback" - build_type: Netplay
# path: "./artifact/" artifact_name: linux-netplay
ubuntu64-netplay: build_config: netplay
name: "Ubuntu Netplay" - build_type: Playback
runs-on: ubuntu-18.04 artifact_name: linux-playback
steps: build_config: playback
- name: "Checkout" name: "Linux ${{ matrix.build_type }}"
uses: actions/checkout@v2 runs-on: ubuntu-18.04
- name: 'Fetch Git Tags' steps:
if: success() - name: "Checkout"
run: | uses: actions/checkout@v2
git fetch --prune --unshallow with:
echo "GIT_BRANCH=$(git rev-parse --abbrev-ref HEAD)" >> $GITHUB_ENV submodules: recursive
echo "GIT_HASH=$(git rev-parse --short HEAD)" >> $GITHUB_ENV - name: 'Fetch Git Tags'
echo "GIT_TAG=$(git describe --tags --abbrev=0)" >> $GITHUB_ENV if: success()
echo "CURR_DATE=$(date +%Y-%m-%d)" >> $GITHUB_ENV run: |
- name: "Install prerequisites" git fetch --prune --unshallow
if: success() echo "GIT_BRANCH=$(git rev-parse --abbrev-ref HEAD)" >> $GITHUB_ENV
shell: bash echo "GIT_HASH=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
run: | echo "GIT_TAG=$(git describe --tags --abbrev=0)" >> $GITHUB_ENV
sudo dpkg --add-architecture amd64 echo "CURR_DATE=$(date +%Y-%m-%d)" >> $GITHUB_ENV
sudo apt update - name: "Install prerequisites"
sudo apt install \ if: success()
cmake \ shell: bash
pkg-config \ run: |
git \ sudo dpkg --add-architecture amd64
wget \ sudo apt update
libao-dev \ sudo apt install \
libasound2-dev \ cmake \
libavcodec-dev \ pkg-config \
libavformat-dev \ git \
libbluetooth-dev \ wget \
libenet-dev \ libao-dev \
libgtk2.0-dev \ libasound2-dev \
liblzo2-dev \ libavcodec-dev \
libminiupnpc-dev \ libavformat-dev \
libopenal-dev \ libbluetooth-dev \
libpulse-dev \ libenet-dev \
libreadline-dev \ libgtk2.0-dev \
libsfml-dev \ liblzo2-dev \
libsoil-dev \ libminiupnpc-dev \
libsoundtouch-dev \ libopenal-dev \
libswscale-dev \ libpulse-dev \
libusb-1.0-0-dev \ libreadline-dev \
libxext-dev \ libsfml-dev \
libxrandr-dev \ libsoil-dev \
portaudio19-dev \ libsoundtouch-dev \
zlib1g-dev \ libswscale-dev \
libudev-dev \ libusb-1.0-0-dev \
libevdev-dev \ libwebkit2gtk-4.0-dev \
libmbedtls-dev \ libxext-dev \
libcurl4-openssl-dev \ libxrandr-dev \
libegl1-mesa-dev \ portaudio19-dev \
libpng-dev \ zlib1g-dev \
qtbase5-private-dev \ libudev-dev \
libxxf86vm-dev \ libevdev-dev \
x11proto-xinerama-dev libmbedtls-dev \
- name: "Build Netplay Dolphin" libcurl4-openssl-dev \
if: success() libegl1-mesa-dev \
working-directory: ${{ github.workspace }} libpng-dev \
run: | qtbase5-private-dev \
chmod +x ./build-linux.sh libxxf86vm-dev \
./build-linux.sh x11proto-xinerama-dev
- name: "Build Netplay AppImage" - name: "Build ${{ matrix.build_type }} Dolphin"
if: success() if: success()
working-directory: ${{ github.workspace }} working-directory: ${{ github.workspace }}
run: | run: |
chmod +x ./build-appimage.sh chmod +x ./build-linux.sh && ./build-linux.sh ${{ matrix.build_config }}
./build-appimage.sh - name: "Build ${{ matrix.build_type }} AppImage"
- name: "Package Netplay" if: success()
if: success() working-directory: ${{ github.workspace }}
working-directory: ${{ github.workspace }} run: |
run: | chmod +x ./build-appimage.sh && ./build-appimage.sh ${{ matrix.build_config }}
mkdir artifact - name: "Package"
FILE_NAME=${{ env.CURR_DATE }}-${{ env.GIT_HASH }}-${{ env.GIT_TAG }}-linux-appimage-netplay.zip if: success()
zip -r "${FILE_NAME}" ./*.AppImage* working-directory: ${{ github.workspace }}
mv "${FILE_NAME}" ./artifact/ run: |
- name: "Publish" mkdir artifact
if: success() FILE_NAME=${{ env.CURR_DATE }}-${{ env.GIT_HASH }}-${{ env.GIT_TAG }}-${{ matrix.artifact_name }}.zip
uses: actions/upload-artifact@v2-preview chmod +x ./*.AppImage
with: zip -r "${FILE_NAME}" ./*.AppImage*
name: "linux-netplay" mv "${FILE_NAME}" ./artifact/
path: "./artifact/" - name: "Publish"
ubuntu64-playback: if: success()
name: "Ubuntu Playback" uses: actions/upload-artifact@v2-preview
runs-on: ubuntu-18.04 with:
steps: name: ${{ matrix.artifact_name }}
- name: "Checkout" path: "./artifact/"
uses: actions/checkout@v2 macOS:
- name: 'Fetch Git Tags' strategy:
if: success() fail-fast: false
run: | matrix:
git fetch --prune --unshallow build_type: [Netplay, Playback]
echo "GIT_BRANCH=$(git rev-parse --abbrev-ref HEAD)" >> $GITHUB_ENV include:
echo "GIT_HASH=$(git rev-parse --short HEAD)" >> $GITHUB_ENV - build_type: Netplay
echo "GIT_TAG=$(git describe --tags --abbrev=0)" >> $GITHUB_ENV artifact_name: macOS-netplay
echo "CURR_DATE=$(date +%Y-%m-%d)" >> $GITHUB_ENV build_config: netplay
- name: "Install prerequisites" - build_type: Playback
if: success() artifact_name: macOS-playback
shell: bash build_config: playback
run: | name: "macOS ${{ matrix.build_type }}"
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 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 # 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