Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 31 additions & 4 deletions .github/workflows/desktop-candidates.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,9 @@ jobs:
run: |
sudo apt-get update
sudo apt-get install -y clang cmake ninja-build pkg-config libssl-dev libfontconfig1-dev libfreetype6-dev libxkbcommon-dev libxkbcommon-x11-dev libwayland-dev libxcb1-dev libxcb-xkb-dev libx11-xcb-dev libxcb-cursor-dev libasound2-dev libvulkan-dev mesa-vulkan-drivers xvfb dbus-x11 protobuf-compiler zip
- name: Install Linux packaging tools
if: matrix.platform == 'linux'
run: sudo apt-get install -y appstream desktop-file-utils flatpak
- name: Install Windows cross-build tools
if: matrix.platform == 'windows'
run: sudo apt-get install -y gcc-mingw-w64-x86-64 g++-mingw-w64-x86-64 nsis
Expand All @@ -110,7 +113,7 @@ jobs:
run: |
node tools/package-gui.mjs --target "$TARGET" ../stage
cargo build --locked --offline --manifest-path rust/Cargo.toml --release --target "$TARGET" -p openvector-cli
- name: Package Linux archive and test extracted application
- name: Build and smoke-test Linux desktop packages
if: matrix.platform == 'linux'
working-directory: source
shell: bash
Expand All @@ -123,10 +126,34 @@ jobs:
tar -czf "../dist/$name.tar.gz" -C .. "$name"
mkdir ../extracted
tar -xzf "../dist/$name.tar.gz" -C ../extracted
export XDG_RUNTIME_DIR=$(mktemp -d)
trap 'rm -rf "$XDG_RUNTIME_DIR"' EXIT
dbus-run-session -- xvfb-run -a node tools/check-desktop-package.mjs "../extracted/$name/openvector-gui" "$CARGO_TARGET_DIR/$TARGET/release/openvector"
TMPDIR=$(mktemp -d "$HOME/openvector-package-check.XXXXXX")
trap 'rm -r "$TMPDIR"' EXIT
export TMPDIR
export XDG_RUNTIME_DIR="$TMPDIR/runtime"
mkdir -m 700 "$XDG_RUNTIME_DIR"
cli="$CARGO_TARGET_DIR/$TARGET/release/openvector"
xvfb-run -a dbus-run-session -- \
node tools/check-desktop-package.mjs "../extracted/$name/openvector-gui" "$cli"
objdump -T "../extracted/$name/openvector-gui" | sort > "../dist/$name-symbols.txt"

flatpak remote-add --user --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
flatpak install --user --noninteractive flathub org.freedesktop.Platform//25.08
bash tools/package-linux.sh "../$name" "../dist/$name"

APPIMAGE_EXTRACT_AND_RUN=1 xvfb-run -a dbus-run-session -- \
node tools/check-desktop-package.mjs "../dist/$name.AppImage" "$cli"

flatpak install --user --noninteractive "../dist/$name.flatpak"
# Grant only the disposable fixture directory to the smoke test. The
# installed app otherwise obtains user-selected paths via the portal.
cat > "$TMPDIR/flatpak-launcher" <<'EOF'
#!/usr/bin/env bash
exec flatpak run --user --filesystem="$TMPDIR" \
--env=OPENVECTOR_PREFERENCES="$OPENVECTOR_PREFERENCES" dev.micr.openvector "$@"
EOF
chmod +x "$TMPDIR/flatpak-launcher"
xvfb-run -a dbus-run-session -- \
node tools/check-desktop-package.mjs "$TMPDIR/flatpak-launcher" "$cli"
- name: Package Windows installer and portable ZIP
if: matrix.platform == 'windows'
working-directory: source
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
node_modules/
target/
/dist/
/appimage-runtime/
/gui/dist/
/native/
.jj/
Expand All @@ -25,6 +26,8 @@ __pycache__/
!/tools/build-native.mjs
!/tools/native-notices.mjs
!/tools/package-gui.mjs
!/tools/package-linux.sh
!/tools/prepare-appimage-source.sh
!/tools/package-windows.mjs
!/tools/windows-installer.nsi
!/tools/package-release-source.sh
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ Dates are the GitHub release publication dates in UTC.

## [Unreleased]

### Added

- Add AppImage and Flatpak desktop packages for Linux amd64 and arm64. Use the file chooser to open and save host files from the Flatpak sandbox.

## [0.1.5] - 2026-11-24

### Added
Expand Down
2 changes: 1 addition & 1 deletion docs/building.md
Original file line number Diff line number Diff line change
Expand Up @@ -211,4 +211,4 @@ Its `REBUILD.txt` identifies the editable LGPL component and the offline Cargo
rebuild command. The archive does not include the compiler or operating-system
SDK. Validate the rebuild and the distribution requirements before publishing.

Windows builds embed the app icon and version information in `openvector-gui.exe`; the window, taskbar and Explorer all read that resource. GNU targets need MinGW `windres` (for example `x86_64-w64-mingw32-windres`, override with `WINDRES`) and MSVC targets need `rc.exe` (override with `RC`). The build fails if neither is found. Linux packages add `share/applications/openvector.desktop` and `share/icons/hicolor/256x256/apps/openvector.png`; copy `share/` into `~/.local/share` and put `openvector-gui` on `PATH` so Wayland desktops match the window (app id `openvector`) to its icon. macOS packages contain `OpenVector.app` (bundle id `dev.micr.openvector`) with the compiled icon catalog `Contents/Resources/Assets.car` and an `OpenVector.icns` fallback. Packaging on a Mac seals it with an ad-hoc `codesign` signature for local use; it is not Developer ID signed or notarized, so other Macs show a Gatekeeper warning. The icon sources are `rust/crates/openvector-gui/assets/app-icon.svg` and the Icon Composer document `assets/OpenVector.icon`; `build.rs` documents how to regenerate `app-icon.ico`, `app-icon-256.png` and the compiled macOS files in `assets/macos/`.
Windows builds embed the app icon and version information in `openvector-gui.exe`; the window, taskbar and Explorer all read that resource. GNU targets need MinGW `windres` (for example `x86_64-w64-mingw32-windres`, override with `WINDRES`) and MSVC targets need `rc.exe` (override with `RC`). The build fails if neither is found. Linux packages add `share/applications/dev.micr.openvector.desktop` and `share/icons/hicolor/256x256/apps/dev.micr.openvector.png`; copy `share/` into `~/.local/share` and put `openvector-gui` on `PATH` so Wayland desktops match the window (app id `dev.micr.openvector`) to its icon. macOS packages contain `OpenVector.app` (bundle id `dev.micr.openvector`) with the compiled icon catalog `Contents/Resources/Assets.car` and an `OpenVector.icns` fallback. Packaging on a Mac seals it with an ad-hoc `codesign` signature for local use; it is not Developer ID signed or notarized, so other Macs show a Gatekeeper warning. The icon sources are `rust/crates/openvector-gui/assets/app-icon.svg` and the Icon Composer document `assets/OpenVector.icon`; `build.rs` documents how to regenerate `app-icon.ico`, `app-icon-256.png` and the compiled macOS files in `assets/macos/`.
34 changes: 30 additions & 4 deletions docs/release-runbook.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ suites, native execution, or manual desktop QA.

| Workflow | Trigger | Required artifacts and checks |
| --- | --- | --- |
| [Desktop candidates](../.github/workflows/desktop-candidates.yml) | A PR whose head branch starts with `release/`, excluding `release/npm-` | `corresponding-source`, all selected `desktop-*` jobs, and Windows installation checks |
| [Desktop candidates](../.github/workflows/desktop-candidates.yml) | A PR whose head branch starts with `release/`, excluding `release/npm-` | `corresponding-source`, all selected `desktop-*` jobs, including the Linux AppImage and Flatpak bundles, and Windows installation checks |
| [npm candidates](../.github/workflows/npm-candidates.yml) | A `release/npm-` PR, or manual dispatch at a selected ref | Five native builds, `npm-package`, and all ten installed-package checks |

For a combined release PR such as `release/X.Y.Z`, set `CANDIDATE_REF` to that frozen
Expand Down Expand Up @@ -122,8 +122,8 @@ Linux ARM64, Windows x64, macOS ARM64, and macOS x64 on Node 22.19 and 24.
| --- | --- |
| macOS Apple Silicon | Developer ID-signed, notarized, stapled `.dmg` |
| macOS Intel | Developer ID-signed, notarized, stapled `.dmg` |
| Linux amd64 | Complete `.tar.gz` |
| Linux ARM64 | Complete `.tar.gz` |
| Linux amd64 | `.tar.gz`, `.AppImage`, and `.flatpak` |
| Linux ARM64 | `.tar.gz`, `.AppImage`, and `.flatpak` |
| Windows x64 | `Setup.exe` and complete portable `.zip` |

Extract each artifact into a fresh directory. Exercise that packaged executable,
Expand All @@ -145,6 +145,32 @@ The CI conversion checker is
It compares actual GUI and CLI output in isolated state, but does not perform
manual palette editing or native-reader reopening.

Linux candidates package the same staged GUI and notices into all three formats.
The AppImage and Flatpak bundle use the filenames
`openvector-$VERSION-linux-$ARCH.AppImage` and
`openvector-$VERSION-linux-$ARCH.flatpak`, where `ARCH` is `amd64` or `arm64`.
Run the AppImage after making it executable. It uses the Ubuntu 24.04 build
baseline and the host's desktop and graphics libraries. Smoke-test the
extraction path in CI and test normal FUSE launch on a release test machine.

Install the Flatpak bundle with `flatpak install --user ./<file>.flatpak` and
launch with `flatpak run dev.micr.openvector`. The bundle uses the Freedesktop
25.08 runtime from Flathub. Test opening a bitmap and saving an SVG through the
desktop file chooser with the installed bundle. Use the file chooser for files
outside the sandbox. Dragging files in from host folders and dragging results
to other sandboxed apps can fail because those apps lack access to the paths.
Install in a disposable account to keep its Flatpak remotes, applications, and
sandbox settings isolated.

The AppImage embeds the [20251108 AppImage runtime](https://github.com/AppImage/type2-runtime/tree/dd6cebedcbddde9c82f89b011e8e1d40b6e43868).
The corresponding source archive must include `appimage-runtime/` with the
runtime source, libfuse source and patch, and instructions for rebuilding the
runtime and replacing it in the AppImage. The AppImage must include the
runtime's notices in `licenses/appimage-runtime/`. The source packager prepares
these inputs. To package from a checkout instead, run
`bash tools/prepare-appimage-source.sh appimage-runtime` first.
Record the embedded runtime and package hashes in the release provenance.

Windows installation tests need a disposable host with no existing OpenVector
uninstall registration. Verify custom-path installation, installed/portable byte
identity, real locked-file uninstall failure with installation and registration
Expand Down Expand Up @@ -239,7 +265,7 @@ and npm artifacts must correspond to the same reviewed application source.
Set `PAYLOAD_DIR` to a new directory containing only the selected public downloads,
corresponding source, and provenance. Keep diagnostic CLIs, candidate Mac tarballs,
notarization ZIPs, logs, screenshots, and npm tarballs outside it. For all desktop
targets, expect six binary downloads, one source archive, provenance, and checksums.
targets, expect ten binary downloads, one source archive, provenance, and checksums.

## 5. Merge and publish GitHub downloads

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ Type=Application
Name=OpenVector
Comment=Convert bitmap images to editable vectors
Exec=openvector-gui %f
Icon=openvector
Icon=dev.micr.openvector
Terminal=false
Categories=Graphics;2DGraphics;VectorGraphics;
MimeType=image/png;image/jpeg;image/bmp;image/gif;image/tiff;
StartupWMClass=openvector
StartupWMClass=dev.micr.openvector
18 changes: 18 additions & 0 deletions rust/crates/openvector-gui/assets/dev.micr.openvector.metainfo.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<component type="desktop-application">
<id>dev.micr.openvector</id>
<name>OpenVector</name>
<summary>Convert bitmap images to editable vectors</summary>
<metadata_license>CC0-1.0</metadata_license>
<project_license>MIT</project_license>
<developer id="dev.micr">
<name>Microck</name>
</developer>
<description>
<p>OpenVector converts raster images such as logos and illustrations into editable vector graphics. Preview the result and adjust the palette before exporting.</p>
</description>
<launchable type="desktop-id">dev.micr.openvector.desktop</launchable>
<url type="homepage">https://github.com/Microck/openvector</url>
<url type="bugtracker">https://github.com/Microck/openvector/issues</url>
<content_rating type="oars-1.1"/>
</component>
4 changes: 2 additions & 2 deletions rust/crates/openvector-gui/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ fn main() {
let window = cx.open_window(WindowOptions {
window_bounds: Some(WindowBounds::Windowed(bounds)),
window_min_size: Some(size(px(760.0), px(500.0))),
// Wayland compositors match this to openvector.desktop for the window
// Wayland compositors match this to dev.micr.openvector.desktop for the window
// and dock icon; Windows reads the exe's embedded icon instead (build.rs).
app_id: Some("openvector".into()),
app_id: Some("dev.micr.openvector".into()),
..Default::default()
}, |window, cx| {
window.set_window_title("OpenVector");
Expand Down
11 changes: 8 additions & 3 deletions tools/package-gui.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ import { basename, join } from 'node:path';
import { parseArgs } from 'node:util';
import { cargoBuild, copyBundledNotices, root, rustNotices, toolchainNotices, workspace } from './native-notices.mjs';

const appId = 'dev.micr.openvector';

try {
const { values, positionals } = parseArgs({
options: { target: { type: 'string' }, profile: { type: 'string', default: 'release' } },
Expand Down Expand Up @@ -48,10 +50,13 @@ try {
if (values.target.includes('-linux-')) {
const applications = join(destination, 'share', 'applications');
const icons = join(destination, 'share', 'icons', 'hicolor', '256x256', 'apps');
const metainfo = join(destination, 'share', 'metainfo');
mkdirSync(metainfo, { recursive: true });
mkdirSync(applications, { recursive: true });
mkdirSync(icons, { recursive: true });
copyFileSync(join(assets, 'openvector.desktop'), join(applications, 'openvector.desktop'));
copyFileSync(join(assets, 'app-icon-256.png'), join(icons, 'openvector.png'));
copyFileSync(join(assets, `${appId}.desktop`), join(applications, `${appId}.desktop`));
copyFileSync(join(assets, 'app-icon-256.png'), join(icons, `${appId}.png`));
copyFileSync(join(assets, `${appId}.metainfo.xml`), join(metainfo, `${appId}.metainfo.xml`));
}
if (darwin) {
const resources = join(bundle, 'Contents', 'Resources');
Expand Down Expand Up @@ -84,7 +89,7 @@ function infoPlist(executable, version) {
<dict>
<key>CFBundleName</key><string>OpenVector</string>
<key>CFBundleDisplayName</key><string>OpenVector</string>
<key>CFBundleIdentifier</key><string>dev.micr.openvector</string>
<key>CFBundleIdentifier</key><string>${appId}</string>
<key>CFBundleExecutable</key><string>${executable}</string>
<key>CFBundleIconFile</key><string>OpenVector</string>
<key>CFBundleIconName</key><string>OpenVector</string>
Expand Down
73 changes: 73 additions & 0 deletions tools/package-linux.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
#!/usr/bin/env bash
# Package both Linux formats from the same staged binary and notices as the tarball.
set -euo pipefail

if [ "$#" -ne 2 ]; then
echo 'Usage: bash tools/package-linux.sh <staged Linux GUI directory> <output filename prefix>' >&2
exit 1
fi

stage=$(realpath "$1")
output=$(realpath -m "$2")
runtime_notices=$(realpath -e "$(dirname "$0")/../appimage-runtime/licenses")
app_id=dev.micr.openvector
runtime=org.freedesktop.Platform
runtime_branch=25.08
appimagetool_version=1.9.1
appimage_runtime_version=20251108
arch=$(uname -m)
case "$arch" in
x86_64)
tool_sha=ed4ce84f0d9caff66f50bcca6ff6f35aae54ce8135408b3fa33abfc3cb384eb0
runtime_sha=2fca8b443c92510f1483a883f60061ad09b46b978b2631c807cd873a47ec260d
;;
aarch64)
tool_sha=f0837e7448a0c1e4e650a93bb3e85802546e60654ef287576f46c71c126a9158
runtime_sha=00cbdfcf917cc6c0ff6d3347d59e0ca1f7f45a6df1a428a0d6d8a78664d87444
;;
*)
echo "Unsupported Linux package architecture: $arch" >&2
exit 1
;;
esac

temp=$(mktemp -d)
trap 'rm -r "$temp"' EXIT
cd "$temp"

download() {
local url=$1 filename=$2 digest=$3
curl --fail --location --silent --show-error "$url" --output "$filename"
printf '%s %s\n' "$digest" "$filename" | sha256sum --check
}

desktop-file-validate "$stage/share/applications/$app_id.desktop"
appstreamcli validate --no-net "$stage/share/metainfo/$app_id.metainfo.xml"

download "https://github.com/AppImage/appimagetool/releases/download/$appimagetool_version/appimagetool-$arch.AppImage" appimagetool "$tool_sha"
download "https://github.com/AppImage/type2-runtime/releases/download/$appimage_runtime_version/runtime-$arch" appimage-runtime "$runtime_sha"
chmod +x appimagetool

cp -a "$stage" OpenVector.AppDir
mkdir OpenVector.AppDir/usr
mv OpenVector.AppDir/share OpenVector.AppDir/usr/
ln -s openvector-gui OpenVector.AppDir/AppRun
ln -s "usr/share/applications/$app_id.desktop" "OpenVector.AppDir/$app_id.desktop"
ln -s "usr/share/icons/hicolor/256x256/apps/$app_id.png" "OpenVector.AppDir/$app_id.png"
ln -s "$app_id.png" OpenVector.AppDir/.DirIcon
cp -a "$runtime_notices" OpenVector.AppDir/licenses/appimage-runtime
# AppStream was validated above. This tool only recognizes the older .appdata.xml name.
ARCH=$arch APPIMAGE_EXTRACT_AND_RUN=1 ./appimagetool --no-appstream --runtime-file appimage-runtime OpenVector.AppDir "$output.AppImage"

# The staged executable is already compiled, so build-init can use the platform
# as both the SDK and the runtime. No SDK packages are needed to bundle it.
flatpak build-init flatpak-app "$app_id" "$runtime" "$runtime" "$runtime_branch"
install -Dm755 "$stage/openvector-gui" flatpak-app/files/bin/openvector-gui
cp -a "$stage/share/." flatpak-app/files/share/
install -Dm644 "$stage/LICENSE" "flatpak-app/files/share/licenses/$app_id/LICENSE"
cp -a "$stage/licenses/." "flatpak-app/files/share/licenses/$app_id/"
flatpak build-finish --command=openvector-gui --share=ipc --socket=wayland \
--socket=fallback-x11 --device=dri flatpak-app
flatpak build-export flatpak-repo flatpak-app stable
flatpak build-bundle --runtime-repo=https://flathub.org/repo/flathub.flatpakrepo \
flatpak-repo "$output.flatpak" "$app_id" stable
4 changes: 4 additions & 0 deletions tools/package-release-source.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ git archive HEAD | tar -xf - -C "$temporary/$name"
mkdir -p .cargo
cargo vendor --locked --manifest-path rust/Cargo.toml cargo-vendor > .cargo/config.toml
cargo metadata --locked --offline --manifest-path rust/Cargo.toml --format-version 1 > /dev/null
bash tools/prepare-appimage-source.sh appimage-runtime
printf '%s\n' "$commit" > SOURCE-COMMIT
cat > REBUILD.txt <<'INSTRUCTIONS'
This archive contains the application source, local GPUI patches, and vendored
Expand All @@ -35,6 +36,9 @@ To modify the LGPL Qt-derived component, edit:
Its license and modification notices are under:
rust/crates/openvector/vendor/qt-bezier/

The AppImage runtime source, dependency archives and rebuild notes are in
appimage-runtime/. See appimage-runtime/licenses/SOURCE.txt for instructions.

From this archive's root, rebuild the desktop application with:
cargo build --manifest-path rust/Cargo.toml --locked --offline --release -p openvector-gui
The executable is in rust/target/release unless CARGO_TARGET_DIR overrides it.
Expand Down
Loading
Loading