diff --git a/.github/manifests/in.suyogtandel.picoforge.json b/.github/manifests/in.suyogtandel.picoforge.json new file mode 100644 index 0000000..1b6a117 --- /dev/null +++ b/.github/manifests/in.suyogtandel.picoforge.json @@ -0,0 +1,68 @@ +{ + "id": "in.suyogtandel.picoforge", + "runtime": "org.freedesktop.Platform", + "runtime-version": "25.08", + "sdk": "org.freedesktop.Sdk", + "sdk-extensions": [ + "org.freedesktop.Sdk.Extension.rust-stable" + ], + "command": "picoforge", + "finish-args": [ + "--socket=wayland", + "--socket=fallback-x11", + "--device=dri", + "--share=ipc", + "--device=all", + "--socket=pcsc" + ], + "build-options": { + "append-path": "/usr/lib/sdk/rust-stable/bin", + "prepend-path": "/run/build/picoforge/cargo/bin", + "append-ld-library-path": "/usr/lib/sdk/rust-stable/lib", + "env": { + "CARGO_HOME": "/run/build/picoforge/cargo", + "RUST_BACKTRACE": "1" + }, + "build-args": [ + "--share=network" + ] + }, + "modules": [ + { + "name": "pcsc-lite", + "buildsystem": "meson", + "config-opts": [ + "--libdir=lib", + "-Dlibsystemd=false", + "-Dlibudev=false", + "-Dpolkit=false", + "-Dusb=false", + "-Dserial=false" + ], + "sources": [ + { + "type": "archive", + "url": "https://github.com/LudovicRousseau/PCSC/archive/refs/tags/2.4.1.tar.gz", + "sha256": "e7b6737f68c3b9a763fb0b0370d899cea091cced9d762ca8a6032c959576d5be" + } + ] + }, + { + "name": "picoforge", + "buildsystem": "simple", + "build-commands": [ + "cargo build --release --manifest-path Cargo.toml", + "install -Dm755 target/release/picoforge /app/bin/picoforge", + "install -Dm644 static/appIcons/in.suyogtandel.picoforge.svg /app/share/icons/hicolor/scalable/apps/in.suyogtandel.picoforge.svg", + "install -Dm644 data/in.suyogtandel.picoforge.desktop /app/share/applications/in.suyogtandel.picoforge.desktop", + "install -Dm644 data/in.suyogtandel.picoforge.metainfo.xml /app/share/metainfo/in.suyogtandel.picoforge.metainfo.xml" + ], + "sources": [ + { + "type": "dir", + "path": "../.." + } + ] + } + ] +} \ No newline at end of file diff --git a/.github/scripts/build_appimage.sh b/.github/scripts/build_appimage.sh index 79da058..57c9e61 100644 --- a/.github/scripts/build_appimage.sh +++ b/.github/scripts/build_appimage.sh @@ -1,11 +1,15 @@ #!/bin/bash set -e +VERSION=${version:-"0.0.0"} + ARCH=$(uname -m) if [ "$ARCH" == "x86_64" ]; then LINUXDEPLOY_ARCH="x86_64" + APPIMAGE_ARCH="x86-64" elif [ "$ARCH" == "aarch64" ]; then LINUXDEPLOY_ARCH="aarch64" + APPIMAGE_ARCH="arm64" else echo "Unsupported architecture: $ARCH" exit 1 @@ -50,7 +54,7 @@ echo "Running linuxdeploy..." rm "linuxdeploy-${LINUXDEPLOY_ARCH}.AppImage" mkdir -p target/release -mv *.AppImage target/release/ +mv *.AppImage "target/release/picoforge_${VERSION}_${APPIMAGE_ARCH}.AppImage" echo "AppImage build complete. Artifacts moved to target/release/" ls -l target/release/*.AppImage diff --git a/.github/scripts/build_flatpak.sh b/.github/scripts/build_flatpak.sh new file mode 100644 index 0000000..3a86d9b --- /dev/null +++ b/.github/scripts/build_flatpak.sh @@ -0,0 +1,26 @@ +#!/bin/bash +set -e + +PLATFORM=$1 +VERSION=${version:-"0.0.0"} + +if [[ "$PLATFORM" == "ubuntu-24.04-arm" ]]; then + ARCH="arm64" + FLATPAK_ARCH="aarch64" +else + ARCH="x86-64" + FLATPAK_ARCH="x86_64" +fi + +echo "Building Flatpak for architecture: $FLATPAK_ARCH (Release: $VERSION)" + +flatpak remote-add --user --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo + +flatpak install --user -y flathub \ + org.freedesktop.Platform//25.08 \ + org.freedesktop.Sdk//25.08 \ + org.freedesktop.Sdk.Extension.rust-stable//25.08 + +flatpak-builder --user --arch="${FLATPAK_ARCH}" --force-clean --repo=repo build-dir .github/manifests/in.suyogtandel.picoforge.json + +flatpak build-bundle repo "picoforge_${VERSION}_${ARCH}.flatpak" in.suyogtandel.picoforge diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ef1947a..e665845 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -15,20 +15,33 @@ jobs: fail-fast: false matrix: include: - - platform: "macos-latest" # for Arm based macs (M1 and above) + - platform: "macos-latest" args: "--target aarch64-apple-darwin" - - platform: "macos-latest" # for Intel based macs + build_type: "standard" + - platform: "macos-latest" args: "--target x86_64-apple-darwin" + build_type: "standard" - platform: "ubuntu-22.04" args: "" + build_type: "standard" + - platform: "ubuntu-latest" + args: "" + build_type: "flatpak" - platform: "ubuntu-24.04-arm" args: "" - - platform: "windows-latest" # Windows x64 + build_type: "standard" + - platform: "ubuntu-24.04-arm" + args: "" + build_type: "flatpak" + - platform: "windows-latest" args: "--target x86_64-pc-windows-msvc" - - platform: "windows-latest" # Windows x86 (32-bit) + build_type: "standard" + - platform: "windows-latest" args: "--target i686-pc-windows-msvc" - - platform: "windows-latest" # Windows ARM64 + build_type: "standard" + - platform: "windows-latest" args: "--target aarch64-pc-windows-msvc" + build_type: "standard" runs-on: ${{ matrix.platform }} steps: @@ -37,6 +50,7 @@ jobs: fetch-depth: 0 - name: install Rust stable + if: matrix.build_type == 'standard' uses: dtolnay/rust-toolchain@stable with: targets: > @@ -44,6 +58,7 @@ jobs: matrix.platform == 'windows-latest' && 'x86_64-pc-windows-msvc,i686-pc-windows-msvc,aarch64-pc-windows-msvc' || '' }} - name: Cache Cargo registry and target + if: matrix.build_type == 'standard' uses: Swatinem/rust-cache@v2 with: key: ${{ matrix.platform }}-${{ matrix.args }} @@ -89,26 +104,36 @@ jobs: echo "version=$version" >> $GITHUB_ENV - name: install cargo-packager + if: matrix.build_type == 'standard' uses: taiki-e/install-action@v2 with: tool: cargo-packager - name: Build Binary + if: matrix.build_type == 'standard' run: cargo build --release ${{ matrix.args }} + - name: Build and Package + if: matrix.platform != 'ubuntu-22.04' && matrix.platform != 'ubuntu-24.04-arm' && matrix.build_type == 'standard' + run: cargo packager --release ${{ matrix.args }} + - name: Build and Package (Linux) - if: matrix.platform == 'ubuntu-22.04' || matrix.platform == 'ubuntu-24.04-arm' + if: (matrix.platform == 'ubuntu-22.04' || matrix.platform == 'ubuntu-24.04-arm') && matrix.build_type == 'standard' run: cargo packager --release --formats deb,pacman - name: Build AppImage - if: matrix.platform == 'ubuntu-22.04' || matrix.platform == 'ubuntu-24.04-arm' + if: (matrix.platform == 'ubuntu-22.04' || matrix.platform == 'ubuntu-24.04-arm') && matrix.build_type == 'standard' run: | chmod +x .github/scripts/build_appimage.sh ./.github/scripts/build_appimage.sh - - name: Build and Package - if: matrix.platform != 'ubuntu-22.04' && matrix.platform != 'ubuntu-24.04-arm' - run: cargo packager --release ${{ matrix.args }} + - name: Build Flatpak + if: matrix.build_type == 'flatpak' + run: | + sudo apt-get update + sudo apt-get install -y flatpak flatpak-builder appstream + chmod +x .github/scripts/build_flatpak.sh + ./.github/scripts/build_flatpak.sh ${{ matrix.platform }} - name: Upload Release Assets uses: softprops/action-gh-release@v2 @@ -122,6 +147,7 @@ jobs: #### Check the Installation guide for the Application on the wiki: https://github.com/librekeys/picoforge/wiki/Installation prerelease: false files: | + *.flatpak target/release/*.deb target/release/*.appimage target/release/*.AppImage @@ -134,16 +160,16 @@ jobs: target/x86_64-apple-darwin/release/*.app target/aarch64-apple-darwin/release/*.app target/x86_64-pc-windows-msvc/release/*.msi - target/x86_64-pc-windows-msvc/release/*.exe + target/x86_64-pc-windows-msvc/release/*-setup.exe target/i686-pc-windows-msvc/release/*.msi - target/i686-pc-windows-msvc/release/*.exe + target/i686-pc-windows-msvc/release/*-setup.exe target/aarch64-pc-windows-msvc/release/*.msi - target/aarch64-pc-windows-msvc/release/*.exe + target/aarch64-pc-windows-msvc/release/*-setup.exe env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Sync Spec Version & Tag - if: matrix.platform == 'ubuntu-22.04' + if: matrix.platform == 'ubuntu-22.04' && matrix.build_type == 'standard' env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | diff --git a/.gitignore b/.gitignore index 05699cd..8e807e9 100644 --- a/.gitignore +++ b/.gitignore @@ -17,6 +17,12 @@ vite.config.ts.timestamp-* result .direnv +# Flatpak +.flatpak +.flatpak-builder +repo +picoforge.flatpak + # misc docs-gpui-components src-svelte diff --git a/data/in.suyogtandel.picoforge.desktop b/data/in.suyogtandel.picoforge.desktop index 1882a86..1e6d251 100644 --- a/data/in.suyogtandel.picoforge.desktop +++ b/data/in.suyogtandel.picoforge.desktop @@ -7,4 +7,4 @@ Terminal=false Categories=Utility;Clock; Keywords=Config; StartupNotify=true -DBusActivatable=true +DBusActivatable=false diff --git a/data/in.suyogtandel.picoforge.metainfo.xml b/data/in.suyogtandel.picoforge.metainfo.xml new file mode 100644 index 0000000..4c54727 --- /dev/null +++ b/data/in.suyogtandel.picoforge.metainfo.xml @@ -0,0 +1,66 @@ + + + in.suyogtandel.picoforge + CC0-1.0 + AGPL-3.0-only + + PicoForge + pico fido key commissioning tool + +

PicoForge is a modern desktop application for configuring and managing Pico FIDO security keys. Built with Rust and GPUI, it provides an intuitive interface for reading device information, configuring USB identifiers, adjusting LED settings, managing security features, and monitoring real-time system logs.

+
+ + + Suyog Tandel + + + https://github.com/librekeys/picoforge + https://github.com/librekeys/picoforge + https://github.com/librekeys/picoforge/issues + https://github.com/librekeys/picoforge/wiki + https://ko-fi.com/lockedmutex + https://matrix.to/#/%23librekeys:matrix.org + https://github.com/librekeys/picoforge/blob/main/.github/CONTRIBUTING.md + + in.suyogtandel.picoforge.desktop + + + + keyboard + pointing + + + + 360 + + + + #fafafa + #18181b + + + + + https://raw.githubusercontent.com/librekeys/picoforge/main/data/screenshots/screenshot-1.webp + Main Interface + + + https://raw.githubusercontent.com/librekeys/picoforge/main/data/screenshots/screenshot-2.webp + PassKeys Management + + + https://raw.githubusercontent.com/librekeys/picoforge/main/data/screenshots/screenshot-3.webp + Configuration Interface + + + + + + https://github.com/librekeys/picoforge/releases/tag/v0.4.1 + +

Release 0.4.1

+
+
+
+ +