From 131c0133e19964955adf9fde323e5494411b245f Mon Sep 17 00:00:00 2001 From: Nikhil Narayana Date: Fri, 17 Jul 2020 19:47:18 -0400 Subject: [PATCH 1/9] just copy CI from Ishii 264777d only ubuntu and macOS for now. I gotta mess with windows later --- .github/workflows/main.yml | 455 +++++++++++++++++++++++++++++++++++++ 1 file changed, 455 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000000..d95131d1c6 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,455 @@ +name: PR Builds x64 + +on: + push: + branches: [ master ] + paths-ignore: + - "**.md" + - "**.ini" + pull_request: + branches: [ master ] + paths-ignore: + - "**.md" + - "**.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 + with: + submodules: recursive + - name: 'Fetch Git Tags' + if: success() + 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: "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 \ + libwxbase3.0-dev \ + libwxgtk3.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: | + ./build-linux.sh + - name: "Build Netplay AppImage" + if: success() + working-directory: ${{ github.workspace }} + run: | + ./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 + with: + submodules: recursive + - name: 'Fetch Git Tags' + if: success() + 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: "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 \ + libwxbase3.0-dev \ + libwxgtk3.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: | + ./build-linux.sh playback + - name: "Build Playback AppImage" + if: success() + working-directory: ${{ github.workspace }} + run: | + ./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 + steps: + - name: "Checkout" + uses: actions/checkout@v2 + with: + submodules: recursive + - name: 'Fetch Git Tags' + if: success() + 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: "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: | + wget https://github.com/wxWidgets/wxWidgets/releases/download/v3.1.3/wxWidgets-3.1.3.tar.bz2 + tar -xf wxWidgets-3.1.3.tar.bz2 + rm wxWidgets-3.1.3.tar.bz2 + brew update + brew upgrade cmake + brew install \ + ffmpeg \ + libpng \ + libav \ + pkgconfig \ + libao \ + sound-touch \ + hidapi + - name: "Cache wxWidgets 3.1.3" + uses: actions/cache@v1 + env: + cache-name: "wxWidgets-3.1.3-macOS" + with: + path: ./wxWidgets-3.1.3/build + key: "wxWidgets-3.1.3-macOS-Catalina" + - name: "Install wxWidgets 3.1.3" + if: success() + shell: bash + working-directory: ${{ github.workspace }} + run: | + cd wxWidgets-3.1.3 + cd build + ../configure + make -j7 + sudo make install + - name: "Build Netplay" + if: success() + shell: bash + working-directory: ${{ github.workspace }} + run: | + mkdir build + cd build + cmake .. + make -j7 + - name: "Package Netplay" + if: success() + shell: bash + working-directory: ${{ github.workspace }} + run: | + FILE_NAME=${{ env.CURR_DATE }}-${{ env.GIT_HASH }}-${{ env.GIT_TAG }}-macOS-netplay.tar.gz + echo "::set-env name=FILE_NAME::${FILE_NAME}" + cp -Rf Data/Sys build/Binaries/Dolphin.app/Contents/Resources/ + mkdir artifact + cd ./build/Binaries/ + zip -r "${FILE_NAME}" 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 + with: + submodules: recursive + - name: 'Fetch Git Tags' + if: success() + 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: "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: | + wget https://github.com/wxWidgets/wxWidgets/releases/download/v3.1.3/wxWidgets-3.1.3.tar.bz2 + tar -xf wxWidgets-3.1.3.tar.bz2 + rm wxWidgets-3.1.3.tar.bz2 + brew update + brew upgrade cmake + brew install \ + ffmpeg \ + libpng \ + libav \ + pkgconfig \ + libao \ + sound-touch \ + hidapi + - name: "Cache wxWidgets 3.1.3" + uses: actions/cache@v1 + env: + cache-name: "wxWidgets-3.1.3-macOS" + with: + path: ./wxWidgets-3.1.3/build + key: "wxWidgets-3.1.3-macOS-Catalina" + - name: "Install wxWidgets 3.1.3" + if: success() + shell: bash + working-directory: ${{ github.workspace }} + run: | + cd wxWidgets-3.1.3 + cd build + ../configure + make -j7 + sudo make install + - name: "Build Playback" + if: success() + shell: bash + working-directory: ${{ github.workspace }} + run: | + mkdir build + cd build + cmake -DIS_PLAYBACK=true .. + 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 + cp -Rf ../../slippi-desktop-app/app/dolphin-dev/overwrite/User ./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/" From 9cff3553a00bb5119ad3dd1c703bb7fc6eb4702f Mon Sep 17 00:00:00 2001 From: Nikhil Narayana Date: Fri, 17 Jul 2020 17:04:44 -0700 Subject: [PATCH 2/9] add build scripts from ea57b44 Ishii --- build-appimage.sh | 81 +++++++++++++++++++++++++++++++++++++++++++++++ build-linux.sh | 26 +++++++++++++++ 2 files changed, 107 insertions(+) create mode 100644 build-appimage.sh create mode 100644 build-linux.sh diff --git a/build-appimage.sh b/build-appimage.sh new file mode 100644 index 0000000000..fda23abc69 --- /dev/null +++ b/build-appimage.sh @@ -0,0 +1,81 @@ +#!/bin/bash -e +# build-online-appimage.sh + +ZSYNC_STRING="gh-releases-zsync|project-slippi|Ishiiruka|latest|Slippi_Online-x86_64.AppImage.zsync" +PLAYBACK_APPIMAGE_STRING="Slippi_Playback-x86_64.AppImage" + +LINUXDEPLOY_PATH="https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous" +LINUXDEPLOY_FILE="linuxdeploy-x86_64.AppImage" +LINUXDEPLOY_URL="${LINUXDEPLOY_PATH}/${LINUXDEPLOY_FILE}" + +UPDATEPLUG_PATH="https://github.com/linuxdeploy/linuxdeploy-plugin-appimage/releases/download/continuous" +UPDATEPLUG_FILE="linuxdeploy-plugin-appimage-x86_64.AppImage" +UPDATEPLUG_URL="${UPDATEPLUG_PATH}/${UPDATEPLUG_FILE}" + +UPDATETOOL_PATH="https://github.com/AppImage/AppImageUpdate/releases/download/continuous" +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" + +APPDIR_BIN="./AppDir/usr/bin" + +# 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 +fi + +# Delete the AppDir folder to prevent build issues +rm -rf ./AppDir/ + +# Build the AppDir directory for this image +mkdir -p AppDir +./Tools/linuxdeploy \ + --appdir=./AppDir \ + -e ./build/Binaries/dolphin-emu \ + -d ./Data/slippi-online.desktop \ + -i ./Data/dolphin-emu.png + +# Add the Sys dir to the AppDir for packaging +cp -r Data/Sys ${APPDIR_BIN} + +# Build type +if [ -z "$1" ] # Netplay + then + echo "Using Netplay build config" + + # Package up the update tool within the AppImage + cp ./Tools/appimageupdatetool ./AppDir/usr/bin/ + + # 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 diff --git a/build-linux.sh b/build-linux.sh new file mode 100644 index 0000000000..fe45ca7eaa --- /dev/null +++ b/build-linux.sh @@ -0,0 +1,26 @@ +#!/bin/bash -e +# build-linux.sh + +CMAKE_FLAGS='-DLINUX_LOCAL_DEV=true' + +# Build type +if [ -z "$1" ] + then + echo "Using Netplay build config" +elif [ "$1" == "playback" ] + then + CMAKE_FLAGS+=" -DIS_PLAYBACK=true" + echo "Using Playback build config" +fi + +# Move into the build directory, run CMake, and compile the project +mkdir -p build +pushd build +cmake ${CMAKE_FLAGS} ../ +make -j$(nproc) +popd + +# Copy the Sys folder in +cp -r -n Data/Sys/ build/Binaries/ + +touch ./build/Binaries/portable.txt From f95c04ff97570e374b633343fabff8fc62daf00a Mon Sep 17 00:00:00 2001 From: Nikhil Narayana Date: Fri, 17 Jul 2020 19:08:09 -0700 Subject: [PATCH 3/9] add desktop file --- Data/slippi-online.desktop | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 Data/slippi-online.desktop diff --git a/Data/slippi-online.desktop b/Data/slippi-online.desktop new file mode 100644 index 0000000000..f7bc70a905 --- /dev/null +++ b/Data/slippi-online.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Version=1.0 +Icon=dolphin-emu +Exec=dolphin-emu +Terminal=false +Type=Application +Categories=Game;Emulator; +Name=Slippi Online +GenericName=Wii/GameCube Emulator +Comment=A Wii/GameCube Emulator From 038b50dfad6ce03b6ed80bb2a4bd9491339fb473 Mon Sep 17 00:00:00 2001 From: Nikhil Narayana Date: Fri, 17 Jul 2020 21:40:44 -0400 Subject: [PATCH 4/9] update deps --- .github/workflows/main.yml | 60 +++++++------------------------------- 1 file changed, 10 insertions(+), 50 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index d95131d1c6..2d224d7e22 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -119,8 +119,6 @@ jobs: steps: - name: "Checkout" uses: actions/checkout@v2 - with: - submodules: recursive - name: 'Fetch Git Tags' if: success() run: | @@ -157,8 +155,6 @@ jobs: libsoundtouch-dev \ libswscale-dev \ libusb-1.0-0-dev \ - libwxbase3.0-dev \ - libwxgtk3.0-dev \ libxext-dev \ libxrandr-dev \ portaudio19-dev \ @@ -176,11 +172,13 @@ jobs: 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() @@ -202,8 +200,6 @@ jobs: steps: - name: "Checkout" uses: actions/checkout@v2 - with: - submodules: recursive - name: 'Fetch Git Tags' if: success() run: | @@ -240,8 +236,6 @@ jobs: libsoundtouch-dev \ libswscale-dev \ libusb-1.0-0-dev \ - libwxbase3.0-dev \ - libwxgtk3.0-dev \ libxext-dev \ libxrandr-dev \ portaudio19-dev \ @@ -259,11 +253,13 @@ jobs: 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() @@ -285,8 +281,6 @@ jobs: steps: - name: "Checkout" uses: actions/checkout@v2 - with: - submodules: recursive - name: 'Fetch Git Tags' if: success() run: | @@ -320,24 +314,8 @@ jobs: pkgconfig \ libao \ sound-touch \ - hidapi - - name: "Cache wxWidgets 3.1.3" - uses: actions/cache@v1 - env: - cache-name: "wxWidgets-3.1.3-macOS" - with: - path: ./wxWidgets-3.1.3/build - key: "wxWidgets-3.1.3-macOS-Catalina" - - name: "Install wxWidgets 3.1.3" - if: success() - shell: bash - working-directory: ${{ github.workspace }} - run: | - cd wxWidgets-3.1.3 - cd build - ../configure - make -j7 - sudo make install + hidapi \ + qt - name: "Build Netplay" if: success() shell: bash @@ -345,7 +323,7 @@ jobs: run: | mkdir build cd build - cmake .. + cmake -DQt5_DIR=$(brew --prefix qt)/lib/cmake/Qt5 .. make -j7 - name: "Package Netplay" if: success() @@ -371,8 +349,6 @@ jobs: steps: - name: "Checkout" uses: actions/checkout@v2 - with: - submodules: recursive - name: 'Fetch Git Tags' if: success() run: | @@ -406,24 +382,8 @@ jobs: pkgconfig \ libao \ sound-touch \ - hidapi - - name: "Cache wxWidgets 3.1.3" - uses: actions/cache@v1 - env: - cache-name: "wxWidgets-3.1.3-macOS" - with: - path: ./wxWidgets-3.1.3/build - key: "wxWidgets-3.1.3-macOS-Catalina" - - name: "Install wxWidgets 3.1.3" - if: success() - shell: bash - working-directory: ${{ github.workspace }} - run: | - cd wxWidgets-3.1.3 - cd build - ../configure - make -j7 - sudo make install + hidapi \ + qt - name: "Build Playback" if: success() shell: bash @@ -431,7 +391,7 @@ jobs: run: | mkdir build cd build - cmake -DIS_PLAYBACK=true .. + cmake -DIS_PLAYBACK=true -DQt5_DIR=$(brew --prefix qt)/lib/cmake/Qt5 .. make -j7 - name: "Package Playback" if: success() From 9ae05ea2dc03a1742af4eed6c93dbbec656eef91 Mon Sep 17 00:00:00 2001 From: Nikhil Narayana Date: Sat, 18 Jul 2020 02:44:45 -0400 Subject: [PATCH 5/9] no nogui for macOS --- .github/workflows/main.yml | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 2d224d7e22..46eccb7eb5 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -302,9 +302,6 @@ jobs: if: success() shell: bash run: | - wget https://github.com/wxWidgets/wxWidgets/releases/download/v3.1.3/wxWidgets-3.1.3.tar.bz2 - tar -xf wxWidgets-3.1.3.tar.bz2 - rm wxWidgets-3.1.3.tar.bz2 brew update brew upgrade cmake brew install \ @@ -323,7 +320,7 @@ jobs: run: | mkdir build cd build - cmake -DQt5_DIR=$(brew --prefix qt)/lib/cmake/Qt5 .. + cmake -DQt5_DIR=$(brew --prefix qt)/lib/cmake/Qt5 -DENABLE_NOGUI=false .. make -j7 - name: "Package Netplay" if: success() @@ -370,9 +367,6 @@ jobs: if: success() shell: bash run: | - wget https://github.com/wxWidgets/wxWidgets/releases/download/v3.1.3/wxWidgets-3.1.3.tar.bz2 - tar -xf wxWidgets-3.1.3.tar.bz2 - rm wxWidgets-3.1.3.tar.bz2 brew update brew upgrade cmake brew install \ @@ -391,7 +385,7 @@ jobs: run: | mkdir build cd build - cmake -DIS_PLAYBACK=true -DQt5_DIR=$(brew --prefix qt)/lib/cmake/Qt5 .. + cmake -DIS_PLAYBACK=true -DQt5_DIR=$(brew --prefix qt)/lib/cmake/Qt5 -DENABLE_NOGUI=false .. make -j7 - name: "Package Playback" if: success() From 74221c16c8ffdb9d7de8187ee63cb6105a27f385 Mon Sep 17 00:00:00 2001 From: Nikhil Narayana Date: Sat, 18 Jul 2020 03:10:42 -0400 Subject: [PATCH 6/9] fix zstd linking --- .github/workflows/main.yml | 2 ++ CMakeLists.txt | 2 +- Source/Core/VideoCommon/OnScreenDisplay.cpp | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 46eccb7eb5..9dada52c7c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -320,6 +320,7 @@ jobs: run: | mkdir build cd build + export LIBRARY_PATH=/usr/lib/ cmake -DQt5_DIR=$(brew --prefix qt)/lib/cmake/Qt5 -DENABLE_NOGUI=false .. make -j7 - name: "Package Netplay" @@ -384,6 +385,7 @@ jobs: working-directory: ${{ github.workspace }} run: | mkdir build + export LD_LIBRARY_PATH=/usr/lib/ cd build cmake -DIS_PLAYBACK=true -DQt5_DIR=$(brew --prefix qt)/lib/cmake/Qt5 -DENABLE_NOGUI=false .. make -j7 diff --git a/CMakeLists.txt b/CMakeLists.txt index 230670fdec..f2e2a7fa99 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -626,7 +626,7 @@ else() endif() pkg_search_module(ZSTD QUIET libzstd) -if(ZSTD_FOUND) +if(ZSTD_FOUND AND NOT APPLE) message(STATUS "Using shared zstd") else() check_vendoring_approved(zstd) diff --git a/Source/Core/VideoCommon/OnScreenDisplay.cpp b/Source/Core/VideoCommon/OnScreenDisplay.cpp index ff4b7ccd7e..e0fc41d3cb 100644 --- a/Source/Core/VideoCommon/OnScreenDisplay.cpp +++ b/Source/Core/VideoCommon/OnScreenDisplay.cpp @@ -32,6 +32,7 @@ #include "VideoCommon/IconsFontAwesome4.h" extern std::unique_ptr g_playbackStatus; +extern template IMGUI_API float ImGui::SliderCalcRatioFromValueT(ImGuiDataType data_type, int v, int v_min, int v_max, float power, float linear_zero_pos); #endif namespace OSD From b9a738842d2b34cf07d427489a84de3949f8c3f8 Mon Sep 17 00:00:00 2001 From: Nikhil Narayana Date: Sun, 19 Jul 2020 00:26:12 -0700 Subject: [PATCH 7/9] update linux script --- build-linux.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build-linux.sh b/build-linux.sh index fe45ca7eaa..f6d3b9cab2 100644 --- a/build-linux.sh +++ b/build-linux.sh @@ -9,7 +9,7 @@ if [ -z "$1" ] echo "Using Netplay build config" elif [ "$1" == "playback" ] then - CMAKE_FLAGS+=" -DIS_PLAYBACK=true" + CMAKE_FLAGS+=" -DSLIPPI_PLAYBACK=true" echo "Using Playback build config" fi From 87e15f684bda0f8193f0ad3a4107f6aae9b15b5b Mon Sep 17 00:00:00 2001 From: Nikhil Narayana Date: Sun, 19 Jul 2020 03:26:51 -0400 Subject: [PATCH 8/9] Update playback flag --- .github/workflows/main.yml | 4 ++-- build-linux.sh | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 9dada52c7c..2c5547c1d3 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -321,7 +321,7 @@ jobs: mkdir build cd build export LIBRARY_PATH=/usr/lib/ - cmake -DQt5_DIR=$(brew --prefix qt)/lib/cmake/Qt5 -DENABLE_NOGUI=false .. + cmake -DSLIPPI_PLAYBACK=false -DQt5_DIR=$(brew --prefix qt)/lib/cmake/Qt5 -DENABLE_NOGUI=false .. make -j7 - name: "Package Netplay" if: success() @@ -387,7 +387,7 @@ jobs: mkdir build export LD_LIBRARY_PATH=/usr/lib/ cd build - cmake -DIS_PLAYBACK=true -DQt5_DIR=$(brew --prefix qt)/lib/cmake/Qt5 -DENABLE_NOGUI=false .. + cmake -DQt5_DIR=$(brew --prefix qt)/lib/cmake/Qt5 -DENABLE_NOGUI=false .. make -j7 - name: "Package Playback" if: success() diff --git a/build-linux.sh b/build-linux.sh index f6d3b9cab2..e076f9cada 100644 --- a/build-linux.sh +++ b/build-linux.sh @@ -6,10 +6,11 @@ CMAKE_FLAGS='-DLINUX_LOCAL_DEV=true' # Build type if [ -z "$1" ] then + # TODO: move this around, playback should be the secondary build + CMAKE_FLAGS+=" -DSLIPPI_PLAYBACK=false" echo "Using Netplay build config" elif [ "$1" == "playback" ] then - CMAKE_FLAGS+=" -DSLIPPI_PLAYBACK=true" echo "Using Playback build config" fi From a3413bd0fba73e168479c71272763bb150583bdf Mon Sep 17 00:00:00 2001 From: Nikhil Narayana Date: Sun, 19 Jul 2020 12:28:11 -0700 Subject: [PATCH 9/9] add template specialization and remove extern --- Externals/imgui/imgui_widgets.cpp | 34 +++++++++++---------- Source/Core/VideoCommon/OnScreenDisplay.cpp | 1 - 2 files changed, 18 insertions(+), 17 deletions(-) diff --git a/Externals/imgui/imgui_widgets.cpp b/Externals/imgui/imgui_widgets.cpp index d1ecf3ba99..212eac8c24 100644 --- a/Externals/imgui/imgui_widgets.cpp +++ b/Externals/imgui/imgui_widgets.cpp @@ -402,43 +402,43 @@ void ImGui::BulletTextV(const char* fmt, va_list args) // See the series of events below and the corresponding state reported by dear imgui: //------------------------------------------------------------------------------------------------------------------------------------------------ // with PressedOnClickRelease: return-value IsItemHovered() IsItemActive() IsItemActivated() IsItemDeactivated() IsItemClicked() -// Frame N+0 (mouse is outside bb) - - - - - - -// Frame N+1 (mouse moves inside bb) - true - - - - +// Frame N+0 (mouse is outside bb) - - - - - - +// Frame N+1 (mouse moves inside bb) - true - - - - // Frame N+2 (mouse button is down) - true true true - true -// Frame N+3 (mouse button is down) - true true - - - +// Frame N+3 (mouse button is down) - true true - - - // Frame N+4 (mouse moves outside bb) - - true - - - // Frame N+5 (mouse moves inside bb) - true true - - - -// Frame N+6 (mouse button is released) true true - - true - -// Frame N+7 (mouse button is released) - true - - - - -// Frame N+8 (mouse moves outside bb) - - - - - - +// Frame N+6 (mouse button is released) true true - - true - +// Frame N+7 (mouse button is released) - true - - - - +// Frame N+8 (mouse moves outside bb) - - - - - - //------------------------------------------------------------------------------------------------------------------------------------------------ // with PressedOnClick: return-value IsItemHovered() IsItemActive() IsItemActivated() IsItemDeactivated() IsItemClicked() // Frame N+2 (mouse button is down) true true true true - true -// Frame N+3 (mouse button is down) - true true - - - -// Frame N+6 (mouse button is released) - true - - true - -// Frame N+7 (mouse button is released) - true - - - - +// Frame N+3 (mouse button is down) - true true - - - +// Frame N+6 (mouse button is released) - true - - true - +// Frame N+7 (mouse button is released) - true - - - - //------------------------------------------------------------------------------------------------------------------------------------------------ // with PressedOnRelease: return-value IsItemHovered() IsItemActive() IsItemActivated() IsItemDeactivated() IsItemClicked() // Frame N+2 (mouse button is down) - true - - - true -// Frame N+3 (mouse button is down) - true - - - - +// Frame N+3 (mouse button is down) - true - - - - // Frame N+6 (mouse button is released) true true - - - - -// Frame N+7 (mouse button is released) - true - - - - +// Frame N+7 (mouse button is released) - true - - - - //------------------------------------------------------------------------------------------------------------------------------------------------ // with PressedOnDoubleClick: return-value IsItemHovered() IsItemActive() IsItemActivated() IsItemDeactivated() IsItemClicked() // Frame N+0 (mouse button is down) - true - - - true -// Frame N+1 (mouse button is down) - true - - - - +// Frame N+1 (mouse button is down) - true - - - - // Frame N+2 (mouse button is released) - true - - - - -// Frame N+3 (mouse button is released) - true - - - - +// Frame N+3 (mouse button is released) - true - - - - // Frame N+4 (mouse button is down) true true true true - true -// Frame N+5 (mouse button is down) - true true - - - +// Frame N+5 (mouse button is down) - true true - - - // Frame N+6 (mouse button is released) - true - - true - -// Frame N+7 (mouse button is released) - true - - - - +// Frame N+7 (mouse button is released) - true - - - - //------------------------------------------------------------------------------------------------------------------------------------------------ // The behavior of the return-value changes when ImGuiButtonFlags_Repeat is set: // Repeat+ Repeat+ Repeat+ Repeat+ // PressedOnClickRelease PressedOnClick PressedOnRelease PressedOnDoubleClick //------------------------------------------------------------------------------------------------------------------------------------------------- -// Frame N+0 (mouse button is down) - true - true +// Frame N+0 (mouse button is down) - true - true // ... - - - - // Frame N + RepeatDelay true true - true // ... - - - - @@ -2208,6 +2208,8 @@ float ImGui::SliderCalcRatioFromValueT(ImGuiDataType data_type, TYPE v, TYPE v_m return (float)((FLOATTYPE)(v_clamped - v_min) / (FLOATTYPE)(v_max - v_min)); } +template float ImGui::SliderCalcRatioFromValueT(ImGuiDataType, int, int, int, float, float); + // FIXME: Move some of the code into SliderBehavior(). Current responsability is larger than what the equivalent DragBehaviorT<> does, we also do some rendering, etc. template bool ImGui::SliderBehaviorT(const ImRect& bb, ImGuiID id, ImGuiDataType data_type, TYPE* v, const TYPE v_min, const TYPE v_max, const char* format, float power, ImGuiSliderFlags flags, ImRect* out_grab_bb) diff --git a/Source/Core/VideoCommon/OnScreenDisplay.cpp b/Source/Core/VideoCommon/OnScreenDisplay.cpp index e0fc41d3cb..ff4b7ccd7e 100644 --- a/Source/Core/VideoCommon/OnScreenDisplay.cpp +++ b/Source/Core/VideoCommon/OnScreenDisplay.cpp @@ -32,7 +32,6 @@ #include "VideoCommon/IconsFontAwesome4.h" extern std::unique_ptr g_playbackStatus; -extern template IMGUI_API float ImGui::SliderCalcRatioFromValueT(ImGuiDataType data_type, int v, int v_min, int v_max, float power, float linear_zero_pos); #endif namespace OSD