diff --git a/.github/workflows/linux-appimage.yml b/.github/workflows/linux-appimage.yml new file mode 100644 index 0000000000..d13585bf23 --- /dev/null +++ b/.github/workflows/linux-appimage.yml @@ -0,0 +1,37 @@ +name: Linux-AppImage CI + +# Controls when the action will run. Triggers the workflow on push or pull request +# events but only for the master branch +on: + push: + pull_request: + +# A workflow run is made up of one or more jobs that can run sequentially or in parallel +jobs: + # This workflow contains a single job called "build" + build: + # The type of runner that the job will run on + runs-on: ubuntu-latest + + # Steps represent a sequence of tasks that will be executed as part of the job + steps: + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - uses: actions/checkout@v2 + # Submoudle + - name: Checkout Submodules + run: git submodule update --init --recursive + # Setup Packages + - name: Setup Packages + run: sudo apt install desktop-file-utils git cmake ffmpeg libavcodec-dev libavformat-dev libavutil-dev libswscale-dev libevdev-dev libusb-1.0-0-dev libxrandr-dev libxi-dev libpangocairo-1.0-0 qt6-base-private-dev libqt6svg6-dev libbluetooth-dev libasound2-dev libpulse-dev libgl1-mesa-dev libcurl4-openssl-dev + # Run MSBuild + - name: Build Solution + run: mkdir -p build && cd build && cmake .. -G Ninja -DLINUX_LOCAL_DEV=true -DCMAKE_INSTALL_PREFIX=/usr -DDISTRIBUTOR="Mario Party Netplay" + # Build Project + - name: Run Ninja + run: cd build && ninja -j8 + # Upload Artifact + - name: Upload Build Artifact + uses: actions/upload-artifact@v4 + with: + name: DolphinMPN-macOS + path: /Users/runner/work/Dolphin-MPN/Dolphin-MPN/root/ diff --git a/.github/workflows/flatpak.yml b/.github/workflows/linux-flatpak.yml similarity index 83% rename from .github/workflows/flatpak.yml rename to .github/workflows/linux-flatpak.yml index b604b9f634..ee424fcfc5 100644 --- a/.github/workflows/flatpak.yml +++ b/.github/workflows/linux-flatpak.yml @@ -23,28 +23,27 @@ jobs: - uses: actions/checkout@v2 # Purge .git for space reasons - name: Purge .git for space reasons - run: rm -rf /home/runner/work/Dolphin-MPN-src/Dolphin-MPN-src/.git + run: rm -rf /home/runner/work/Dolphin-MPN/Dolphin-MPN/.git # Setup Packages - name: Setup Packages run: sudo flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo && sudo flatpak install org.kde.Sdk//5.15 org.kde.Platform//5.15 -y && sudo dnf install libusb1-devel cmake git gcc-c++ libXext-devel libgudev qt6-qtbase-devel systemd-devel openal-soft-devel libevdev-devel libao-devel SOIL-devel libXrandr-devel pulseaudio-libs-devel bluez-libs-devel p7zip SDL2-devel -y - # Purge Un # Run Flatpak Builder - name: Run Flatpak Builder uses: flatpak/flatpak-github-actions@v2 with: # The relative path of the manifest file. - manifest-path: .flatpak/flatpak.yml + manifest-path: Distribution/flatpak.yml # The bundle name, by default it's app.flatpak bundle: DolphinMPN-linux.flatpak # Upload Artifact - name: Upload Build Artifact - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: name: DolphinMPN-Linux-flatpak - path: /home/runner/work/Dolphin-MPN-src/Dolphin-MPN-src/.flatpak/OUT + path: /home/runner/work/Dolphin-MPN/Dolphin-MPN/.flatpak/OUT # New Release - name: New Release if: ${{ startsWith(github.ref, 'refs/tags/') }} uses: ncipollo/release-action@v1.12.0 with: - artifacts: /home/runner/work/Dolphin-MPN-src/Dolphin-MPN-src/.flatpak/OUT/DolphinMPN-linux.flatpak + artifacts: /home/runner/work/Dolphin-MPN/Dolphin-MPN/.flatpak/OUT/DolphinMPN-linux.flatpak diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index aeb4690800..00318f37ec 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -23,15 +23,18 @@ jobs: # Setup Packages - name: Setup Packages run: brew install qt6 molten-vk p7zip pkgconfig cmake ninja - # Run MSBuild - - name: Build Solution + # Run CMake + - name: Run CMake run: mkdir -p build && cd build && cmake .. -G Ninja -DCMAKE_CXX_FLAGS="-Xclang -fcolor-diagnostics" -DCMAKE_PREFIX_PATH=$(brew --prefix qt6) -DDISTRIBUTOR="Mario Party Netplay" - # Build Project + # Run Ninja - name: Run Ninja run: cd build && ninja -j8 + # Run AppImage Packagers + - name: AppImage Packager + run: ./Distribution/appimage.sh # Upload Artifact - name: Upload Build Artifact - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: name: DolphinMPN-macOS path: /Users/runner/work/Dolphin-MPN/Dolphin-MPN/build/Binaries/ diff --git a/.github/workflows/win32.yml b/.github/workflows/win32.yml index e562ae4229..08484318e6 100644 --- a/.github/workflows/win32.yml +++ b/.github/workflows/win32.yml @@ -30,7 +30,7 @@ jobs: run: msbuild "D:\a\Dolphin-MPN\Dolphin-MPN\Source\dolphin-emu.sln" /verbosity:minimal /property:Configuration=Release /property:Platform=x64 # Upload Artifact - name: Upload Build Artifact - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: name: DolphinMPN-win32 path: D:\a\Dolphin-MPN\Dolphin-MPN\Binary\x64 \ No newline at end of file diff --git a/Distribution/appimage.sh b/Distribution/appimage.sh new file mode 100755 index 0000000000..2fee1a16e3 --- /dev/null +++ b/Distribution/appimage.sh @@ -0,0 +1,41 @@ +!/bin/bash + +# Environment variables +export ARCH=x86_64 +export APPIMAGE_EXTRACT_AND_RUN=1 +export QMAKE=/usr/lib/qt6/bin/qmake + +# Prepare the AppDir +DESTDIR=./AppDir ninja install +mkdir -p ./AppDir/usr/Source/Core +cp -r ./Source/Core/DolphinQt ./AppDir/usr/Source/Core +rm -rf ./AppDir/usr/Source/Core/DolphinQt/CMakeFiles +rm -rf ./AppDir/usr/Source/Core/DolphinQt/dolphin-emu_autogen +rm ./AppDir/usr/Source/Core/DolphinQt/cmake_install.cmake +rm ./AppDir/usr/bin/dolphin-emu-nogui +rm ./AppDir/usr/bin/dolphin-tool +mv ./AppDir/usr/share/dolphin-emu/sys ./AppDir/usr/bin/Sys +rm -rf ./AppDir/usr/share/dolphin-emu +sed -i 's/env QT_QPA_PLATFORM=xcb dolphin-emu/dolphin-emu/g' ./AppDir/usr/share/applications/dolphin-emu.desktop + +# Prepare Tools for building the AppImage +wget -N https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage +wget -N https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/continuous/linuxdeploy-plugin-qt-x86_64.AppImage +wget -N https://github.com/linuxdeploy/linuxdeploy-plugin-checkrt/releases/download/continuous/linuxdeploy-plugin-checkrt-x86_64.sh +wget -N https://github.com/AppImage/appimagetool/releases/download/continuous/appimagetool-x86_64.AppImage + + +chmod a+x linuxdeploy-x86_64.AppImage +chmod a+x linuxdeploy-plugin-qt-x86_64.AppImage +chmod a+x linuxdeploy-plugin-checkrt-x86_64.sh +chmod a+x appimagetool-x86_64.AppImage + +# Build the AppImage +./linuxdeploy-x86_64.AppImage \ + --appdir AppDir \ + --plugin qt \ + --plugin checkrt + +echo 'export QT_QPA_PLATFORM=xcb' >> ./AppDir/apprun-hooks/linuxdeploy-plugin-qt-hook.sh + +./appimagetool-x86_64.AppImage ./AppDir root/ \ No newline at end of file diff --git a/.flatpak/flatpak.yml b/Distribution/flatpak.yml similarity index 100% rename from .flatpak/flatpak.yml rename to Distribution/flatpak.yml