forked from 1b-agent/opencadstudio-upstream
1.6 KiB
1.6 KiB
Flatpak Packaging
App ID
io.github.HakanSeven12.H7CAD
Requirements
# flatpak-builder
sudo apt install flatpak-builder
# Required runtime and SDK
flatpak install flathub org.freedesktop.Platform//24.08
flatpak install flathub org.freedesktop.Sdk//24.08
flatpak install flathub org.freedesktop.Sdk.Extension.rust-stable//24.08
Generating cargo-sources.json
Flathub builds run without internet access, so all Cargo dependencies must be pre-downloaded:
# Download flatpak-cargo-generator.py
git clone https://github.com/flatpak/flatpak-builder-tools.git
cd flatpak-builder-tools/cargo
# Generate cargo-sources.json (run from the H7CAD repo root)
python3 flatpak-cargo-generator.py /path/to/H7CAD/Cargo.lock -o /path/to/H7CAD/flatpak/cargo-sources.json
Local Testing
# Run from the flatpak/ directory
flatpak-builder --force-clean --user --install ../build-dir io.github.HakanSeven12.H7CAD.local.yml
flatpak run io.github.HakanSeven12.H7CAD
Submitting to Flathub
- Fork https://github.com/flathub/flathub
- Create a new repository named
io.github.HakanSeven12.H7CADfrom thenew-prbranch - Copy the files from this directory +
cargo-sources.jsoninto the new repo - Fill in the
commit:field in the manifest with the actual commit hash - Follow the Flathub submission guide: https://docs.flathub.org/docs/for-app-authors/submission
Notes
- A GitHub release/tag
v0.1.0must exist before submitting to Flathub - Get the commit hash with
git rev-parse v0.1.0and replaceFILL_IN_COMMIT_HASHin the manifest - Validate the manifest with
flatpak-builder-lintbefore opening a Flathub PR