diff --git a/.github/workflows/LANCommander.Launcher.AppImage.yml b/.github/workflows/LANCommander.Launcher.AppImage.yml deleted file mode 100644 index 214f2d5f..00000000 --- a/.github/workflows/LANCommander.Launcher.AppImage.yml +++ /dev/null @@ -1,232 +0,0 @@ -name: LANCommander Launcher AppImage Build - -on: - workflow_dispatch: - inputs: - version_semver: - description: "Semantic Version" - required: true - type: string - version_tag: - description: 'Version Tag' - required: true - type: string - build_dotnet_version: - description: 'Build .NET Version' - required: true - type: string - build_runtime: - description: 'Build Runtime' - required: false - type: string - default: 'linux-x64' - build_arch: - description: 'Build Architecture' - required: false - type: string - default: 'x64' - build_configuration: - description: 'Build Configuration (Debug/Release)' - required: false - type: string - default: 'Release' - workflow_call: - inputs: - version_semver: - description: "Semantic Version" - required: true - type: string - version_tag: - description: 'Version Tag' - required: true - type: string - build_dotnet_version: - description: 'Build .NET Version' - required: true - type: string - build_runtime: - description: 'Build Runtime' - required: false - type: string - default: 'linux-x64' - build_arch: - description: 'Build Architecture' - required: false - type: string - default: 'x64' - build_configuration: - description: 'Build Configuration (Debug/Release)' - required: false - type: string - default: 'Release' - -permissions: - contents: write - -env: - NUGET_PACKAGES: ${{ github.workspace }}/.nuget/package - -jobs: - build: - runs-on: ${{ inputs.build_arch == 'arm64' && 'ubuntu-24.04-arm' || 'ubuntu-latest' }} - - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - steps: - # Checkout code - - uses: actions/checkout@v4 - with: - submodules: true - - # .NET Setup - - name: Setup .NET - uses: actions/setup-dotnet@v4 - with: - dotnet-version: ${{ inputs.build_dotnet_version }} - - - name: Restore dependencies - run: dotnet restore --locked-mode - - - name: Publish Launcher - run: | - # Strip leading 'v' if present - RAW_VERSION="${{ inputs.version_tag }}" # e.g. v2.0.0-rc1 - SEMVER="${RAW_VERSION#v}" # 2.0.0-rc1 - - # Numeric part only for Assembly/FileVersion - NUMERIC="${SEMVER%%-*}" # 2.0.0 - ASSEMBLY_VERSION="${NUMERIC}.0" # 2.0.0.0 - - echo "SEMVER=$SEMVER" - echo "ASSEMBLY_VERSION=$ASSEMBLY_VERSION" - - dotnet publish "./LANCommander.Launcher/LANCommander.Launcher.csproj" \ - -c "${{ inputs.build_configuration }}" \ - --self-contained \ - --runtime "${{ inputs.build_runtime }}" \ - -p:Version="$SEMVER" \ - -p:AssemblyVersion="$ASSEMBLY_VERSION" \ - -p:FileVersion="$ASSEMBLY_VERSION" \ - -p:InformationalVersion="$SEMVER" \ - -p:PublishSingleFile=true \ - -p:IncludeNativeLibrariesForSelfExtract=true \ - -p:IncludeAllContentForSelfExtract=true \ - -p:EnableCompressionInSingleFile=true \ - -p:DebugType=embedded - - - name: Bundle libvlc - shell: bash - run: | - PUBLISH_DIR="LANCommander.Launcher/bin/${{ inputs.build_configuration }}/net10.0/${{ inputs.build_runtime }}/publish" - VLC_DIR="$PUBLISH_DIR/libvlc/${{ inputs.build_runtime }}" - mkdir -p "$VLC_DIR" - - if [ "${{ inputs.build_arch }}" = "arm64" ]; then - sudo apt-get install -y --no-install-recommends libvlc5 libvlccore9 vlc-plugin-base - LIB_DIR="/usr/lib/aarch64-linux-gnu" - PLUGINS_SRC="$LIB_DIR/vlc/plugins" - else - sudo apt-get install -y --no-install-recommends libvlc5 libvlccore9 vlc-plugin-base - LIB_DIR="/usr/lib/x86_64-linux-gnu" - PLUGINS_SRC="$LIB_DIR/vlc/plugins" - fi - - # Copy the two core shared libraries, dereferencing symlinks so their - # content is preserved correctly. - for lib in libvlc.so.5 libvlccore.so.9; do - src=$(find "$LIB_DIR" -maxdepth 1 -name "${lib}*" | sort | head -1) - if [ -n "$src" ]; then - cp -L "$src" "$VLC_DIR/$lib" - echo "Bundled: $lib" - else - echo "WARNING: $lib not found in $LIB_DIR" >&2 - fi - done - - # Copy VLC plugins (vlc-plugin-base covers common codecs and demuxers) - if [ -d "$PLUGINS_SRC" ]; then - mkdir -p "$VLC_DIR/plugins" - cp -rL "$PLUGINS_SRC/." "$VLC_DIR/plugins/" - echo "Bundled $(find "$VLC_DIR/plugins" -name "*.so" | wc -l) plugin(s)" - fi - - - name: Clean Build Output - shell: bash - run: | - BASE_PATH="LANCommander.Launcher/bin/${{ inputs.build_configuration }}/net10.0/${{ inputs.build_runtime }}/publish" - find "$BASE_PATH" -name '*.pdb' -delete || true - - - name: Build AppImage - shell: bash - run: | - set -euo pipefail - - PUBLISH_DIR="LANCommander.Launcher/bin/${{ inputs.build_configuration }}/net10.0/${{ inputs.build_runtime }}/publish" - APP_NAME="LANCommander.Launcher" - APPDIR="AppDir" - - # appimagetool / runtime architecture identifiers - if [ "${{ inputs.build_arch }}" = "arm64" ]; then - AI_ARCH="aarch64" - else - AI_ARCH="x86_64" - fi - export ARCH="$AI_ARCH" - - # --- Assemble the AppDir --------------------------------------------- - rm -rf "$APPDIR" - mkdir -p "$APPDIR/usr/bin" "$APPDIR/usr/share/applications" \ - "$APPDIR/usr/share/icons/hicolor/scalable/apps" - - cp -r "$PUBLISH_DIR/." "$APPDIR/usr/bin/" - chmod +x "$APPDIR/usr/bin/$APP_NAME" - - # Icon (use the prebuilt 256x256 project icon) - ICON_SRC="LANCommander.Launcher/Assets/icon.png" - ICON_DIR="$APPDIR/usr/share/icons/hicolor/256x256/apps" - mkdir -p "$ICON_DIR" - cp "$ICON_SRC" "$ICON_DIR/lancommander.png" - - cp "$ICON_DIR/lancommander.png" "$APPDIR/lancommander.png" - ln -sf lancommander.png "$APPDIR/.DirIcon" - - # Desktop entry - cat > "$APPDIR/usr/share/applications/lancommander.desktop" <<'EOF' - [Desktop Entry] - Type=Application - Name=LANCommander Launcher - Comment=LANCommander Launcher - Exec=LANCommander.Launcher - Icon=lancommander - Categories=Game; - Terminal=false - EOF - cp "$APPDIR/usr/share/applications/lancommander.desktop" "$APPDIR/lancommander.desktop" - - # AppRun entry point - cat > "$APPDIR/AppRun" <<'EOF' - #!/bin/bash - HERE="$(dirname "$(readlink -f "${0}")")" - export PATH="${HERE}/usr/bin:${PATH}" - export LD_LIBRARY_PATH="${HERE}/usr/bin:${LD_LIBRARY_PATH:-}" - exec "${HERE}/usr/bin/LANCommander.Launcher" "$@" - EOF - chmod +x "$APPDIR/AppRun" - - # --- Fetch appimagetool ---------------------------------------------- - TOOL_URL="https://github.com/AppImage/appimagetool/releases/download/continuous/appimagetool-${AI_ARCH}.AppImage" - curl -L -o appimagetool "$TOOL_URL" - chmod +x appimagetool - - # --- Build the AppImage ---------------------------------------------- - OUT="LANCommander.Launcher-Linux-${{ inputs.build_arch }}-v${{ inputs.version_tag }}.AppImage" - ./appimagetool --appimage-extract-and-run "$APPDIR" "$OUT" - - echo "Produced $OUT" - - - name: Upload Artifact - uses: actions/upload-artifact@v4 - with: - path: LANCommander.Launcher-Linux-${{ inputs.build_arch }}-v${{ inputs.version_tag }}.AppImage - name: LANCommander.Launcher-Linux-${{ inputs.build_arch }}-v${{ inputs.version_tag }}.AppImage diff --git a/.github/workflows/LANCommander.Launcher.yml b/.github/workflows/LANCommander.Launcher.yml index e66c5d4e..a5764641 100644 --- a/.github/workflows/LANCommander.Launcher.yml +++ b/.github/workflows/LANCommander.Launcher.yml @@ -220,6 +220,82 @@ jobs: chmod +x "$APP_DIR/Contents/MacOS/${EXECUTABLE}" zip -ry "LANCommander.Launcher-${{ inputs.build_platform }}-${{ inputs.build_arch }}-v${{ inputs.version_tag }}.zip" "$APP_DIR" + - name: Build AppImage (Linux) + if: inputs.build_platform == 'Linux' + shell: bash + run: | + set -euo pipefail + + PUBLISH_DIR="LANCommander.Launcher/bin/${{ inputs.build_configuration }}/net10.0/${{ inputs.build_runtime }}/publish" + APP_NAME="LANCommander.Launcher" + APPDIR="AppDir" + + # appimagetool / runtime architecture identifiers + if [ "${{ inputs.build_arch }}" = "arm64" ]; then + AI_ARCH="aarch64" + else + AI_ARCH="x86_64" + fi + export ARCH="$AI_ARCH" + + # --- Assemble the AppDir --------------------------------------------- + rm -rf "$APPDIR" + mkdir -p "$APPDIR/usr/bin" "$APPDIR/usr/share/applications" \ + "$APPDIR/usr/share/icons/hicolor/scalable/apps" + + cp -r "$PUBLISH_DIR/." "$APPDIR/usr/bin/" + chmod +x "$APPDIR/usr/bin/$APP_NAME" + + # Icon (use the prebuilt 256x256 project icon) + ICON_SRC="LANCommander.Launcher/Assets/icon.png" + ICON_DIR="$APPDIR/usr/share/icons/hicolor/256x256/apps" + mkdir -p "$ICON_DIR" + cp "$ICON_SRC" "$ICON_DIR/lancommander.png" + + cp "$ICON_DIR/lancommander.png" "$APPDIR/lancommander.png" + ln -sf lancommander.png "$APPDIR/.DirIcon" + + # Desktop entry + cat > "$APPDIR/usr/share/applications/lancommander.desktop" <<'EOF' + [Desktop Entry] + Type=Application + Name=LANCommander Launcher + Comment=LANCommander Launcher + Exec=LANCommander.Launcher + Icon=lancommander + Categories=Game; + Terminal=false + EOF + cp "$APPDIR/usr/share/applications/lancommander.desktop" "$APPDIR/lancommander.desktop" + + # AppRun entry point + cat > "$APPDIR/AppRun" <<'EOF' + #!/bin/bash + HERE="$(dirname "$(readlink -f "${0}")")" + export PATH="${HERE}/usr/bin:${PATH}" + export LD_LIBRARY_PATH="${HERE}/usr/bin:${LD_LIBRARY_PATH:-}" + exec "${HERE}/usr/bin/LANCommander.Launcher" "$@" + EOF + chmod +x "$APPDIR/AppRun" + + # --- Fetch appimagetool ---------------------------------------------- + TOOL_URL="https://github.com/AppImage/appimagetool/releases/download/continuous/appimagetool-${AI_ARCH}.AppImage" + curl -L -o appimagetool "$TOOL_URL" + chmod +x appimagetool + + # --- Build the AppImage ---------------------------------------------- + OUT="LANCommander.Launcher-Linux-${{ inputs.build_arch }}-v${{ inputs.version_tag }}.AppImage" + ./appimagetool --appimage-extract-and-run "$APPDIR" "$OUT" + + echo "Produced $OUT" + + - name: Upload AppImage Artifact (Linux) + if: inputs.build_platform == 'Linux' + uses: actions/upload-artifact@v4 + with: + path: LANCommander.Launcher-Linux-${{ inputs.build_arch }}-v${{ inputs.version_tag }}.AppImage + name: LANCommander.Launcher-Linux-${{ inputs.build_arch }}-v${{ inputs.version_tag }}.AppImage + - name: Compress Build Output if: inputs.build_platform != 'macOS' shell: pwsh diff --git a/.github/workflows/LANCommander.Nightly.yml b/.github/workflows/LANCommander.Nightly.yml index 4082d819..f3de67d9 100644 --- a/.github/workflows/LANCommander.Nightly.yml +++ b/.github/workflows/LANCommander.Nightly.yml @@ -444,6 +444,18 @@ jobs: name: LANCommander.Launcher-Windows-x64-v${{ needs.prep.outputs.version_tag }}.zip path: artifacts + - name: Download Launcher Linux ARM64 AppImage + uses: actions/download-artifact@v4 + with: + name: LANCommander.Launcher-Linux-arm64-v${{ needs.prep.outputs.version_tag }}.AppImage + path: artifacts + + - name: Download Launcher Linux x64 AppImage + uses: actions/download-artifact@v4 + with: + name: LANCommander.Launcher-Linux-x64-v${{ needs.prep.outputs.version_tag }}.AppImage + path: artifacts + - name: Create or update nightly release env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/LANCommander.Release.yml b/.github/workflows/LANCommander.Release.yml index 6ffca98e..8b8d3ba2 100644 --- a/.github/workflows/LANCommander.Release.yml +++ b/.github/workflows/LANCommander.Release.yml @@ -305,6 +305,18 @@ jobs: name: LANCommander.Launcher-Windows-x64-v${{ needs.prep.outputs.version_tag }}.zip path: artifacts + - name: Download Launcher Linux ARM64 AppImage + uses: actions/download-artifact@v4 + with: + name: LANCommander.Launcher-Linux-arm64-v${{ needs.prep.outputs.version_tag }}.AppImage + path: artifacts + + - name: Download Launcher Linux x64 AppImage + uses: actions/download-artifact@v4 + with: + name: LANCommander.Launcher-Linux-x64-v${{ needs.prep.outputs.version_tag }}.AppImage + path: artifacts + - name: Download Packager Windows x86 uses: actions/download-artifact@v4 with: @@ -336,6 +348,8 @@ jobs: artifacts/LANCommander.Launcher-macOS-x64-v${{ needs.prep.outputs.version_tag }}.zip artifacts/LANCommander.Launcher-Windows-arm64-v${{ needs.prep.outputs.version_tag }}.zip artifacts/LANCommander.Launcher-Windows-x64-v${{ needs.prep.outputs.version_tag }}.zip + artifacts/LANCommander.Launcher-Linux-arm64-v${{ needs.prep.outputs.version_tag }}.AppImage + artifacts/LANCommander.Launcher-Linux-x64-v${{ needs.prep.outputs.version_tag }}.AppImage artifacts/LANCommander.Packager-Windows-x86-v${{ needs.prep.outputs.version_tag }}.zip - name: Checkout Repo for Docker build diff --git a/LANCommander.Launcher/Assets/icon.icns b/LANCommander.Launcher/Assets/icon.icns new file mode 100644 index 00000000..d0069bfd Binary files /dev/null and b/LANCommander.Launcher/Assets/icon.icns differ diff --git a/LANCommander.Launcher/Assets/icon.png b/LANCommander.Launcher/Assets/icon.png new file mode 100644 index 00000000..e1e29f3e Binary files /dev/null and b/LANCommander.Launcher/Assets/icon.png differ diff --git a/LANCommander.Server/icon.icns b/LANCommander.Server/icon.icns new file mode 100644 index 00000000..a7c6ea49 Binary files /dev/null and b/LANCommander.Server/icon.icns differ diff --git a/LANCommander.Server/icon.png b/LANCommander.Server/icon.png new file mode 100644 index 00000000..7f3c55b1 Binary files /dev/null and b/LANCommander.Server/icon.png differ