diff --git a/.github/workflows/build-appimage.yml b/.github/workflows/build-appimage.yml new file mode 100644 index 0000000..ff03ac9 --- /dev/null +++ b/.github/workflows/build-appimage.yml @@ -0,0 +1,64 @@ +name: Build and Package AppImage + +on: + push: + branches: + - main + pull_request: + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v3 + with: + submodules: recursive + fetch-depth: 0 + + - name: Set up CMake + uses: lukka/get-cmake@latest + with: + cmakeVersion: '3.22.0' + + - name: Install dependencies + run: | + sudo apt-get update + sudo apt-get install -y \ + build-essential \ + libssl-dev \ + libx11-dev \ + libxext-dev \ + libxrandr-dev \ + libxinerama-dev \ + libxcursor-dev \ + zlib1g-dev \ + libglu1-mesa-dev \ + libgtk-3-dev \ + libwayland-dev \ + fuse + sudo modprobe fuse + + - name: Configure with CMake + run: cmake -B build -S . -DCMAKE_BUILD_TYPE=Release + + - name: Build the project + run: cmake --build build --config Release + + - name: Download linuxdeploy + run: | + wget https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage + chmod +x linuxdeploy-x86_64.AppImage + sudo mv linuxdeploy-x86_64.AppImage /usr/local/bin/linuxdeploy + + - name: Create AppImage + run: | + cp -r build/PlayerLink linux/AppDir/usr/bin/ + linuxdeploy --appdir=linux/AppDir --output appimage + + - name: Upload AppImage artifact + uses: actions/upload-artifact@v3 + with: + name: PlayerLink-AppImage + path: ./*.AppImage diff --git a/.gitignore b/.gitignore index 69f8986..17388a9 100644 --- a/.gitignore +++ b/.gitignore @@ -3,4 +3,10 @@ build/* .cache/* src/rsrc.hpp PlayerLink.exe -.vscode/* \ No newline at end of file +.vscode/* +linux/AppDir/usr/share/doc/* +linux/AppDir/usr/lib/* +linux/AppDir/usr/bin/* +linux/AppDir/* +!linux/AppDir/usr +!.gitkeep \ No newline at end of file diff --git a/linux/AppDir/usr/bin/.gitkeep b/linux/AppDir/usr/bin/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/linux/AppDir/usr/lib/.gitkeep b/linux/AppDir/usr/lib/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/linux/AppDir/usr/share/applications/PlayerLink.desktop b/linux/AppDir/usr/share/applications/PlayerLink.desktop new file mode 100644 index 0000000..91ccd62 --- /dev/null +++ b/linux/AppDir/usr/share/applications/PlayerLink.desktop @@ -0,0 +1,6 @@ +[Desktop Entry] +Name=PlayerLink +Exec=PlayerLink +Icon=PlayerLink +Type=Application +Categories=Utility;GTK; diff --git a/linux/AppDir/usr/share/icons/hicolor/256x256/apps/PlayerLink.png b/linux/AppDir/usr/share/icons/hicolor/256x256/apps/PlayerLink.png new file mode 100644 index 0000000..3539f3f Binary files /dev/null and b/linux/AppDir/usr/share/icons/hicolor/256x256/apps/PlayerLink.png differ