chore(release): drop flatpak, add macOS .dmg, hide Windows console

- .github/workflows/release.yml: remove the build-flatpak job; matrix-
  add macOS (arm64 + x86_64) that builds H7CAD.app by hand, renders
  .icns from assets/logo.svg via librsvg + iconutil, and packages a
  UDZO .dmg. AppImage path updated to packaging/H7CAD.desktop.
- packaging/H7CAD.desktop: moved out of flatpak/ so the AppImage job
  doesn't depend on a Flatpak layout.
- packaging/Info.plist: macOS bundle template; __VERSION__ swapped
  for the release tag at build time.
- flatpak/: deleted (manifests, metainfo, desktop, builder cache).
- src/main.rs: `#![cfg_attr(all(windows, not(debug_assertions)),
  windows_subsystem = "windows")]` so the Windows GUI binary no
  longer spawns a console window alongside it (debug builds keep
  the console for log output).
- README: add macOS install section, document Gatekeeper / SmartScreen
  on first launch since the binaries are unsigned.

Bump to 0.3.5.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
Hakan Seven 2026-05-20 21:13:02 +03:00
commit 9527509ea2
10 changed files with 153 additions and 210 deletions

View file

@ -6,55 +6,6 @@ on:
workflow_dispatch: workflow_dispatch:
jobs: jobs:
build-flatpak:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install flatpak and flatpak-builder
run: |
sudo apt-get update -q
sudo apt-get install -y flatpak flatpak-builder
- name: Add Flathub remote
run: |
flatpak remote-add --user --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
- name: Install runtimes
run: |
flatpak install -y --user \
org.freedesktop.Platform//24.08 \
org.freedesktop.Sdk//24.08 \
org.freedesktop.Sdk.Extension.rust-stable//24.08
- name: Generate cargo-sources.json
run: |
pip3 install tomlkit aiohttp
git clone --depth=1 https://github.com/flatpak/flatpak-builder-tools.git /tmp/flatpak-builder-tools
python3 /tmp/flatpak-builder-tools/cargo/flatpak-cargo-generator.py \
Cargo.lock -o flatpak/cargo-sources.json
- name: Build Flatpak
run: |
flatpak-builder --force-clean --user --repo=repo build-dir \
flatpak/io.github.HakanSeven12.H7CAD.ci.yml
- name: Create bundle
run: |
flatpak build-bundle repo H7CAD.flatpak io.github.HakanSeven12.H7CAD
- name: Upload bundle to release
if: github.event_name == 'release'
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
mv H7CAD.flatpak H7CAD-${{ github.ref_name }}-linux-x86_64.flatpak
gh release upload ${{ github.ref_name }} H7CAD-${{ github.ref_name }}-linux-x86_64.flatpak --clobber --repo ${{ github.repository }}
build-appimage: build-appimage:
runs-on: ubuntu-22.04 runs-on: ubuntu-22.04
permissions: permissions:
@ -84,7 +35,7 @@ jobs:
mkdir -p AppDir/usr/share/applications mkdir -p AppDir/usr/share/applications
mkdir -p AppDir/usr/share/icons/hicolor/256x256/apps mkdir -p AppDir/usr/share/icons/hicolor/256x256/apps
cp target/release/H7CAD AppDir/usr/bin/H7CAD cp target/release/H7CAD AppDir/usr/bin/H7CAD
cp flatpak/io.github.HakanSeven12.H7CAD.desktop AppDir/usr/share/applications/ cp packaging/H7CAD.desktop AppDir/usr/share/applications/io.github.HakanSeven12.H7CAD.desktop
rsvg-convert -w 256 -h 256 assets/logo.svg \ rsvg-convert -w 256 -h 256 assets/logo.svg \
-o AppDir/usr/share/icons/hicolor/256x256/apps/io.github.HakanSeven12.H7CAD.png -o AppDir/usr/share/icons/hicolor/256x256/apps/io.github.HakanSeven12.H7CAD.png
@ -99,7 +50,7 @@ jobs:
run: | run: |
./linuxdeploy-x86_64.AppImage \ ./linuxdeploy-x86_64.AppImage \
--appdir AppDir \ --appdir AppDir \
--desktop-file flatpak/io.github.HakanSeven12.H7CAD.desktop \ --desktop-file AppDir/usr/share/applications/io.github.HakanSeven12.H7CAD.desktop \
--icon-file AppDir/usr/share/icons/hicolor/256x256/apps/io.github.HakanSeven12.H7CAD.png \ --icon-file AppDir/usr/share/icons/hicolor/256x256/apps/io.github.HakanSeven12.H7CAD.png \
--output appimage --output appimage
mv H7CAD*.AppImage H7CAD.AppImage mv H7CAD*.AppImage H7CAD.AppImage
@ -134,3 +85,79 @@ jobs:
run: | run: |
mv target/release/H7CAD.exe H7CAD-${{ github.ref_name }}-windows-x86_64.exe mv target/release/H7CAD.exe H7CAD-${{ github.ref_name }}-windows-x86_64.exe
gh release upload ${{ github.ref_name }} H7CAD-${{ github.ref_name }}-windows-x86_64.exe --clobber --repo ${{ github.repository }} gh release upload ${{ github.ref_name }} H7CAD-${{ github.ref_name }}-windows-x86_64.exe --clobber --repo ${{ github.repository }}
build-macos:
strategy:
fail-fast: false
matrix:
include:
- runner: macos-14 # Apple Silicon (arm64)
target: aarch64-apple-darwin
arch: arm64
- runner: macos-13 # Intel (x86_64)
target: x86_64-apple-darwin
arch: x86_64
runs-on: ${{ matrix.runner }}
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}
- name: Install librsvg (for rsvg-convert)
env:
HOMEBREW_NO_AUTO_UPDATE: "1"
run: brew install librsvg
- name: Build
run: cargo build --release --target ${{ matrix.target }}
- name: Build .icns from SVG
run: |
mkdir -p H7CAD.iconset
# Render all the sizes Apple expects in an .icns.
for SIZE in 16 32 64 128 256 512 1024; do
rsvg-convert -w $SIZE -h $SIZE assets/logo.svg -o H7CAD.iconset/icon_${SIZE}x${SIZE}.png
done
# @2x retina variants (half-size base name)
for BASE in 16 32 128 256 512; do
DOUBLE=$((BASE * 2))
cp H7CAD.iconset/icon_${DOUBLE}x${DOUBLE}.png H7CAD.iconset/icon_${BASE}x${BASE}@2x.png
done
iconutil -c icns H7CAD.iconset -o AppIcon.icns
- name: Assemble .app bundle
run: |
APP=H7CAD.app
rm -rf "$APP"
mkdir -p "$APP/Contents/MacOS" "$APP/Contents/Resources"
cp target/${{ matrix.target }}/release/H7CAD "$APP/Contents/MacOS/H7CAD"
chmod +x "$APP/Contents/MacOS/H7CAD"
cp AppIcon.icns "$APP/Contents/Resources/AppIcon.icns"
# Substitute version into Info.plist.
VERSION="${{ github.ref_name }}"
VERSION="${VERSION#v}"
[ -z "$VERSION" ] && VERSION="0.0.0"
sed "s/__VERSION__/$VERSION/g" packaging/Info.plist > "$APP/Contents/Info.plist"
- name: Create .dmg
run: |
hdiutil create \
-volname "H7CAD" \
-srcfolder H7CAD.app \
-ov -format UDZO \
H7CAD.dmg
- name: Upload .dmg to release
if: github.event_name == 'release'
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
mv H7CAD.dmg H7CAD-${{ github.ref_name }}-macos-${{ matrix.arch }}.dmg
gh release upload ${{ github.ref_name }} H7CAD-${{ github.ref_name }}-macos-${{ matrix.arch }}.dmg --clobber --repo ${{ github.repository }}

2
Cargo.lock generated
View file

@ -4,7 +4,7 @@ version = 4
[[package]] [[package]]
name = "H7CAD" name = "H7CAD"
version = "0.3.4" version = "0.3.5"
dependencies = [ dependencies = [
"acadrust", "acadrust",
"bytemuck", "bytemuck",

View file

@ -1,6 +1,6 @@
[package] [package]
name = "H7CAD" name = "H7CAD"
version = "0.3.4" version = "0.3.5"
edition = "2021" edition = "2021"
build = "build.rs" build = "build.rs"

View file

@ -114,7 +114,16 @@ No installation required — runs directly on any modern Linux distribution.
### Windows ### Windows
Download `H7CAD.exe` from the [latest release](https://github.com/HakanSeven12/H7CAD/releases/latest) and run it directly. Download `H7CAD-*-windows-x86_64.exe` from the [latest release](https://github.com/HakanSeven12/H7CAD/releases/latest) and run it directly. Windows SmartScreen may show "Windows protected your PC" because the binary is not yet code-signed — click **More info → Run anyway**.
### macOS
Download the matching `.dmg` from the [latest release](https://github.com/HakanSeven12/H7CAD/releases/latest):
- Apple Silicon: `H7CAD-*-macos-arm64.dmg`
- Intel: `H7CAD-*-macos-x86_64.dmg`
Open the .dmg and drag `H7CAD.app` to `/Applications`. The first launch may be blocked by Gatekeeper because the app is not notarised — right-click `H7CAD.app → Open` and confirm, or run once via `xattr -dr com.apple.quarantine /Applications/H7CAD.app`.
### Build from Source ### Build from Source

View file

@ -1,33 +0,0 @@
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
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: dir
path: ..
- cargo-sources.json

View file

@ -1,88 +0,0 @@
<?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>
<url type="vcs-browser">https://github.com/HakanSeven12/H7CAD</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.2.9" date="2026-05-16">
<description>
<ul>
<li>Fixed hatch boundaries with spline edges rendering hollow — DXF rational/NURBS spline weights are now honored and the curve is sampled adaptively instead of at a fixed 16 segments.</li>
<li>Fixed hatch boundary precision: polyline-bulge arc tessellation now runs in f64, so hatch edges on large (UTM-scale) drawings no longer appear wavy / jagged.</li>
<li>Fixed hatch pattern stripes mis-aligning between adjacent hatches by snapping each hatch's anchor to the family's perp/along grid in f64.</li>
<li>Fixed wrong hatch being selected on click: the point-in-polygon test now correctly handles NaN path separators in multi-path (island / hole) boundaries.</li>
<li>Clicking a hatch inside a block now selects the parent Insert, matching AutoCAD's block sub-entity behaviour.</li>
<li>Hatch boundary outlines also tessellate polyline bulges as arcs in the wire pass (was drawing straight chords), and arc segments adapt to the current zoom level.</li>
<li>Cleanup: dropped the INSERT_SUB_LIMIT fallback guard, removed several dead UI helpers / scene utilities / orphan toolbar stubs, and shortened stale legacy comments.</li>
</ul>
</description>
</release>
<release version="0.2.8" date="2026-05-15">
<description>
<ul>
<li>Fixed major precision loss on UTM-authored drawings: world_offset now derives from the median of MSPACE entity centroids instead of the DXF $EXTMIN/$EXTMAX midpoint, so a single stray entity can no longer drag the offset hundreds of kilometres away from the real geometry (about 120× better precision on the affected files).</li>
<li>Fixed Zoom Extents collapsing the drawing to sub-pixel size on files with orphan or block-defn entities leaking into model space.</li>
<li>Fixed phantom selectable segments from BLOCK / ENDBLK sentinels showing up far from the visible drawing.</li>
<li>Fixed two text rendering bugs: greek (sub-pixel) rectangle now fills at the text's own color, and the rectangle honours word-wrapped sub-line count.</li>
<li>Performance: multi-resolution mesh LOD for 3D solids — the render pipeline now picks one of three pre-built tessellation densities per frame based on projected pixel size.</li>
<li>Performance: hatch LOD substitutes solid fill when pattern spacing falls below ~2 px, and skips draw calls entirely when the whole hatch projects to sub-pixel size.</li>
<li>Performance: zoom-adaptive curve tolerance for top-level wires — distant arcs no longer emit hundreds of segments that all collapse onto one pixel.</li>
<li>Performance: text LOD ladder (baseline-line / greek / full) now also applies to MultiLeader text content.</li>
<li>Performance: paper-space viewport scissor extended to hatch / image / wipeout passes (in addition to the existing wire scissor).</li>
</ul>
</description>
</release>
<release version="0.2.2" date="2026-05-03">
<description>
<ul>
<li>Fixed creating a new drawing so existing open files remain in their tabs.</li>
<li>Fixed arc creation to preserve clicked positions and keep internal arc angles in radians.</li>
<li>Improved OCS/WCS handling, snap points, hatch boundary rendering, and thickness extrusion support.</li>
</ul>
</description>
</release>
<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>

View file

@ -1,35 +0,0 @@
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
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: ff84a5e197ecf264f5e4e159173b157f97bcb7ce
- cargo-sources.json

59
packaging/Info.plist Normal file
View file

@ -0,0 +1,59 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleDisplayName</key>
<string>H7CAD</string>
<key>CFBundleExecutable</key>
<string>H7CAD</string>
<key>CFBundleIconFile</key>
<string>AppIcon</string>
<key>CFBundleIdentifier</key>
<string>io.github.HakanSeven12.H7CAD</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>H7CAD</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>__VERSION__</string>
<key>CFBundleVersion</key>
<string>__VERSION__</string>
<key>LSMinimumSystemVersion</key>
<string>11.0</string>
<key>NSHighResolutionCapable</key>
<true/>
<key>NSHumanReadableCopyright</key>
<string>© Hakan Seven</string>
<key>CFBundleDocumentTypes</key>
<array>
<dict>
<key>CFBundleTypeName</key>
<string>AutoCAD Drawing</string>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>LSItemContentTypes</key>
<array>
<string>com.autodesk.dwg</string>
</array>
<key>LSHandlerRank</key>
<string>Alternate</string>
</dict>
<dict>
<key>CFBundleTypeName</key>
<string>AutoCAD DXF</string>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>LSItemContentTypes</key>
<array>
<string>com.autodesk.dxf</string>
</array>
<key>LSHandlerRank</key>
<string>Alternate</string>
</dict>
</array>
</dict>
</plist>

View file

@ -1,4 +1,8 @@
#![allow(non_snake_case)] #![allow(non_snake_case)]
// On Windows release builds, hide the console window the OS would
// otherwise spawn alongside the GUI. Debug builds keep stdout/stderr
// attached so eprintln! / panics stay visible while developing.
#![cfg_attr(all(windows, not(debug_assertions)), windows_subsystem = "windows")]
mod app; mod app;
mod command; mod command;