forked from 1b-agent/opencadstudio-upstream
flatpak
This commit is contained in:
1 parent
10c40f7ca0
commit
ff84a5e197
5 files changed
+156
No files matched your search
@@ -13,6 +13,12 @@ target
|
|||||||
# Contains mutation testing data
|
# Contains mutation testing data
|
||||||
**/mutants.out*/
|
**/mutants.out*/
|
||||||
|
|
||||||
|
# Flatpak
|
||||||
|
flatpak/cargo-sources.json
|
||||||
|
flatpak/io.github.HakanSeven12.H7CAD.local.yml
|
||||||
|
.flatpak-builder/
|
||||||
|
build-dir/
|
||||||
|
|
||||||
# RustRover
|
# RustRover
|
||||||
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
||||||
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
||||||
|
|||||||
@@ -0,0 +1,53 @@
|
|||||||
|
# Flatpak Packaging
|
||||||
|
|
||||||
|
## App ID
|
||||||
|
`io.github.HakanSeven12.H7CAD`
|
||||||
|
|
||||||
|
## Requirements
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# 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:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# 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
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# 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
|
||||||
|
|
||||||
|
1. Fork https://github.com/flathub/flathub
|
||||||
|
2. Create a new repository named `io.github.HakanSeven12.H7CAD` from the `new-pr` branch
|
||||||
|
3. Copy the files from this directory + `cargo-sources.json` into the new repo
|
||||||
|
4. Fill in the `commit:` field in the manifest with the actual commit hash
|
||||||
|
5. Follow the Flathub submission guide:
|
||||||
|
https://docs.flathub.org/docs/for-app-authors/submission
|
||||||
|
|
||||||
|
## Notes
|
||||||
|
|
||||||
|
- A GitHub release/tag `v0.1.0` must exist before submitting to Flathub
|
||||||
|
- Get the commit hash with `git rev-parse v0.1.0` and replace `FILL_IN_COMMIT_HASH` in the manifest
|
||||||
|
- Validate the manifest with `flatpak-builder-lint` before opening a Flathub PR
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
[Desktop Entry]
|
||||||
|
Name=H7CAD
|
||||||
|
Comment=A CAD application for 2D/3D drawing and design
|
||||||
|
Exec=H7CAD
|
||||||
|
Icon=io.github.HakanSeven12.H7CAD
|
||||||
|
Terminal=false
|
||||||
|
Type=Application
|
||||||
|
Categories=Graphics;Engineering;
|
||||||
|
MimeType=image/vnd.dxf;
|
||||||
|
Keywords=CAD;DXF;drawing;design;engineering;2D;3D;
|
||||||
|
StartupWMClass=H7CAD
|
||||||
@@ -0,0 +1,50 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<component type="desktop-application">
|
||||||
|
<id>io.github.HakanSeven12.H7CAD</id>
|
||||||
|
|
||||||
|
<name>H7CAD</name>
|
||||||
|
<summary>A CAD application for 2D/3D drawing and design</summary>
|
||||||
|
|
||||||
|
<metadata_license>MIT</metadata_license>
|
||||||
|
<project_license>GPL-3.0-only</project_license>
|
||||||
|
|
||||||
|
<description>
|
||||||
|
<p>
|
||||||
|
H7CAD is a computer-aided design (CAD) application built with Rust.
|
||||||
|
It supports 2D drafting and 3D modeling with GPU-accelerated rendering,
|
||||||
|
and can open and work with DXF files.
|
||||||
|
</p>
|
||||||
|
<ul>
|
||||||
|
<li>2D and 3D drawing tools</li>
|
||||||
|
<li>DXF file import/export</li>
|
||||||
|
<li>GPU-accelerated rendering via WebGPU</li>
|
||||||
|
<li>Snap and annotation tools</li>
|
||||||
|
</ul>
|
||||||
|
</description>
|
||||||
|
|
||||||
|
<launchable type="desktop-id">io.github.HakanSeven12.H7CAD.desktop</launchable>
|
||||||
|
|
||||||
|
<url type="homepage">https://github.com/HakanSeven12/H7CAD</url>
|
||||||
|
<url type="bugtracker">https://github.com/HakanSeven12/H7CAD/issues</url>
|
||||||
|
|
||||||
|
<screenshots>
|
||||||
|
<screenshot type="default">
|
||||||
|
<caption>Main application window</caption>
|
||||||
|
<image>https://github.com/user-attachments/assets/25bc2bb2-c35c-477d-a3e9-45c86690b5c9</image>
|
||||||
|
</screenshot>
|
||||||
|
</screenshots>
|
||||||
|
|
||||||
|
<releases>
|
||||||
|
<release version="0.1.0" date="2026-03-22">
|
||||||
|
<description>
|
||||||
|
<p>Initial release of H7CAD.</p>
|
||||||
|
</description>
|
||||||
|
</release>
|
||||||
|
</releases>
|
||||||
|
|
||||||
|
<content_rating type="oars-1.1" />
|
||||||
|
|
||||||
|
<developer id="io.github.HakanSeven12">
|
||||||
|
<name>Hakan Seven</name>
|
||||||
|
</developer>
|
||||||
|
</component>
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
app-id: io.github.HakanSeven12.H7CAD
|
||||||
|
runtime: org.freedesktop.Platform
|
||||||
|
runtime-version: '24.08'
|
||||||
|
sdk: org.freedesktop.Sdk
|
||||||
|
sdk-extensions:
|
||||||
|
- org.freedesktop.Sdk.Extension.rust-stable
|
||||||
|
command: H7CAD
|
||||||
|
|
||||||
|
finish-args:
|
||||||
|
- --device=dri
|
||||||
|
- --socket=wayland
|
||||||
|
- --socket=fallback-x11
|
||||||
|
- --share=ipc
|
||||||
|
- --filesystem=home
|
||||||
|
|
||||||
|
build-options:
|
||||||
|
append-path: /usr/lib/sdk/rust-stable/bin
|
||||||
|
env:
|
||||||
|
CARGO_HOME: /run/build/H7CAD/cargo
|
||||||
|
|
||||||
|
modules:
|
||||||
|
- name: H7CAD
|
||||||
|
buildsystem: simple
|
||||||
|
build-commands:
|
||||||
|
- cargo --offline fetch --manifest-path Cargo.toml --verbose
|
||||||
|
- cargo --offline build --release --verbose
|
||||||
|
- install -Dm755 target/release/H7CAD /app/bin/H7CAD
|
||||||
|
- install -Dm644 assets/logo.svg /app/share/icons/hicolor/scalable/apps/io.github.HakanSeven12.H7CAD.svg
|
||||||
|
- install -Dm644 flatpak/io.github.HakanSeven12.H7CAD.desktop /app/share/applications/io.github.HakanSeven12.H7CAD.desktop
|
||||||
|
- install -Dm644 flatpak/io.github.HakanSeven12.H7CAD.metainfo.xml /app/share/metainfo/io.github.HakanSeven12.H7CAD.metainfo.xml
|
||||||
|
sources:
|
||||||
|
- type: git
|
||||||
|
url: https://github.com/HakanSeven12/H7CAD.git
|
||||||
|
tag: v0.1.0
|
||||||
|
commit: FILL_IN_COMMIT_HASH
|
||||||
|
- cargo-sources.json
|
||||||
Reference in new issue
Block a user