Commit Graph
47 Commits
Author SHA1 Message Date
Karim Jerbi 44ffb1ca5a fix(macos): forward launcher CLI arguments and preserve MCP stdio 2026-10-09 14:53:12 +01:00
Hakan SevenandClaude Opus 5.5 47eef134cb fix(release): rebuild a tag from the commit the tag points at
The v2026.40 rebuild was dispatched with a separate `commit` input copied
from a stale local tag, so Windows/macOS assets were built from 20803948
instead of 8e122a4e. Dispatch now takes only `tag` and checks the tag out.
Reverts 4700e263: the skipped Python plugin was a symptom of that commit.

Fixes #1612

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 15:54:32 +03:00
Hakan SevenandClaude Opus 5.5 4700e263e3 fix(release): rebuild old tags that predate the bundled Python plugin
A dispatched rebuild checks out the tag's commit but runs main's
workflow; v2026.40 has no stage-bundled.sh, so the macOS bundle step
failed. Skip the plugin with a warning in that case only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 20:59:42 +03:00
Hakan SevenandClaude Opus 5.5 03b01e818b fix(release): give rustc 1.99 enough stack; Windows build fails fast
rustc 1.99 overflows its default 8 MB stack compiling the crate in
release on Windows and macOS. Raise RUST_MIN_STACK to 64 MB in the cargo
config and the release workflow (the latter also covers rebuilding older
commits). The Windows Build step now runs in bash so a failed cargo build
stops the job instead of surfacing later as a missing exe at signing.
workflow_dispatch gains tag/commit inputs to rebuild a published release.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 20:42:55 +03:00
Felix Riestra 8648225ac5 Merge remote-tracking branch 'origin/main' into plugin/host-model-api
# Conflicts:
#	crates/ocs_plugin_api/src/process/v4.rs
#	src/app/update/mod.rs
2026-09-19 23:58:01 +02:00
Felix Riestra de51c1a17f Bundle the first-party Python scripting plugin 2026-09-19 23:16:27 +02:00
huanld cc1b1e2051 ci(release): parse codesign entitlements as xml on newer runners
codesign -d --entitlements - on current macOS runner images prefixes the
plist with text headers, so the sandbox entitlement assertion died with
plistlib InvalidFileException and took the .dmg build down with it.
--xml prints the bare plist on both old and new codesign builds.
2026-09-19 16:53:06 +07:00
Hakan Seven 03f4e7cb86 Merge pull request #1309 from ghost/embed-print-fonts 2026-09-17 06:57:42 +03:00
huanld a45207f7c9 ci(release): gate signing steps on env mirrors of secrets
Step-level if: conditions cannot read the secrets context, which made
GitHub reject the workflow file outright (startup failure, zero jobs).
The signing waterfall now keys off job-level env booleans mirrored from
the credential secrets - a pattern actionlint accepts.
2026-09-16 17:52:01 +07:00
huanld 53cd8e0109 ci(release): signing waterfall so forks build without upstream secrets
Forks do not inherit repository secrets, and the previous hardwired
Azure Trusted Signing steps failed the Windows job outright on a fork.
Each signing step is now gated on its credentials being present and the
pipeline falls through: Azure Trusted Signing (upstream setup, unchanged
when the secrets exist) -> PFX certificate from WINDOWS_PFX_BASE64 /
WINDOWS_PFX_PASSWORD via signtool with RFC-3161 timestamping -> unsigned
with a note in the job summary. The build and installer assembly always
complete.
2026-09-16 17:34:27 +07:00
Hakan Seven 318dee2db8 Merge pull request #1294: Fix thumbnail scaling and nested signing 2026-09-16 09:29:50 +03:00
PanosandClaude Opus 5 5f161bb037 Show the exact build in About, Copy Info, REPORT and --version
Builds from main reported only the release version (2026.36) even when
HEAD was hundreds of commits past the tag. build.rs now also emits
OCS_TAG_DISTANCE, OCS_COMMIT_DATE, OCS_BUILD_METADATA and
OCS_FULL_VERSION: a clean checkout of the release tag stays "2026.36",
anything else becomes "2026.36+194.gef189d77", with ".dirty" appended
for uncommitted changes and only the hash when no tag can be counted
from (shallow clone, tarball). OCS_APP_VERSION is unchanged so the
update check, donation gate, User-Agents and window title keep working.

The About dialog gains Build / Commit date / Profile cards, Copy Info,
the REPORT issue template and recovery reports carry the full version,
and `-V`/`--version` print it instead of Cargo's 2026.36.0. Release
workflows check out full history so release binaries see the tag.

Also fixes the build being marked dirty when there is no repository:
diff-index exits 128 there, not 1.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-12 16:19:40 +03:00
Hakan Seven ceaf9ebe5b Merge PR #1055: handle macOS Finder document opens 2026-09-07 18:53:29 +03:00
Felix RiestraandClaude Sonnet 5 e767507850 macOS: add a launcher shim so a cold Finder open also works (#1039)
The previous commit's Apple Event handler only ever catches an open
sent to an already-running process. A cold double-click (app not
running yet) still failed: every registration point tried inside the
real binary — before app::run(), on the Subscription's first poll,
even the literal first statement of main() — reliably caught a warm
open but never the original cold-launch event. A raw
AEInstallEventHandler in a separate, minimal, non-AppKit process (no
winit/iced, just a manual CFRunLoopRunInMode pump) still missed it
too, ruling out "the real binary's heavy dependency graph loading
before main() wins the race" as the explanation.

What does reliably catch a cold launch, verified against real
Finder-equivalent opens: a from-scratch NSApplication with its own
delegate implementing application:openURLs: — in a process where we
own setDelegate: from the start, with no contention over the single
delegate slot winit already claims. That has to be a separate process
from the real GUI binary (only one -[NSApplication run] call can own a
process), so src/bin/ocs_launcher.rs is now the .app's actual
CFBundleExecutable: a small, dependency-light binary (no iced, wgpu,
or cadkernel) whose only job is to catch the open and relay it.

Relaying by replacing this process's image (exec, same PID) or by
spawning a child and exiting turned out to both be dead ends: Launch
Services tracks "the running instance of this bundle" by the
Application Serial Number it handed out to whichever process it
actually launched — this launcher, not whatever it execs into or
spawns. Once the launcher's own ASN stopped pointing at a live,
listening process, every later open Finder tried to deliver silently
went nowhere (measured with lsappinfo against a real second "Open
With", not assumed). So the launcher now stays running for the app's
session — invisible, via NSApplicationActivationPolicyAccessory, since
it owns no window — and relays every open (cold or warm) over the same
channel a second CLI invocation already uses: io::single_instance.

That relay only worked once single_instance's rendezvous key stopped
being computed from the running executable's own path. That was fine
when one binary always did the job, but the launcher and the real
binary are different executables and independently computed different
ports, so they could never find each other. Anchor the key on the
enclosing .app bundle instead, shared by both.

packaging/build_macos_signed.sh and .github/workflows/release.yml now
build ocs_launcher and place it at Contents/MacOS/OpenCADStudio (the
CFBundleExecutable Info.plist already names), with the real GUI binary
renamed to Contents/MacOS/OpenCADStudio-App alongside it.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-07 16:45:02 +02:00
Hakan Seven d66e89ca19 Complete application localization across all supported languages 2026-09-07 01:05:02 +03:00
Hakan Seven 13afc1479f Automate weekly releases and synchronize application versions 2026-09-05 02:13:20 +03:00
Hakan Seven cbb4015760 Remove MCP bundle distribution 2026-09-05 01:10:13 +03:00
Hakan Seven afbf826b0c Ship client-neutral MCP bundles 2026-09-04 23:58:39 +03:00
Hakan Seven d9fddbe633 fix(release): align snap asset name 2026-08-29 02:35:36 +03:00
Hakan Seven ca959a31e0 fix(snap): preserve payload layout
Snapcraft strips the sole usr directory from tar sources, so extract the artifact directly and retain its desktop-file path.\n\nAdd a snap-only manual target to avoid rebuilding other platforms while validating packaging fixes.
2026-08-16 08:38:51 +03:00
Hakan Seven 2d9b828b87 ci(snap): build from shared Linux payload 2026-08-16 08:16:09 +03:00
Hakan Seven 0c5d6af1d0 ci(release): drop checksum sidecars 2026-07-31 14:48:42 +03:00
Hakan SevenandClaude Opus 4.8 a5c6c3f116 ci(release): build the thumbnail helper crates as explicit targets
A plain `cargo build --release` at the workspace root builds only the app
package and its dependencies, so it never emitted the artifacts the
packaging steps consume:

* libdwg_thumbnailer.a — the staticlib crate-type is produced only when
  dwg-thumbnailer is built as a target (as a dependency cargo makes just
  the rlib); the macOS QuickLook .appex links this static lib.
* dwg_thumbnailer_win.dll — dwg-thumbnailer-win is a workspace member,
  not an app dependency, so the DLL the WiX MSI references was missing.

Build each helper crate explicitly on its platform, and link the extra
system libraries (Security/SystemConfiguration/iconv) the Rust staticlib
pulls in against the QuickLook extension.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-11 01:48:14 +03:00
Hakan SevenandClaude Opus 4.8 ba3b3202e8 feat(thumbnails): embed DWG previews and wire cross-platform file thumbnails
Round-trip a raster preview through the DWG's embedded preview slot and
surface it to the OS file managers, so drawings show their contents in
Explorer / Finder / Nautilus instead of a generic document icon.

OCS:
* io::thumbnail — rasterize the scene to a BMP DIB on save (embedded via
  acadrust's new Preview type) and read it back on open for the Start
  page recent list; `--dwg-thumbnail IN OUT SIZE` CLI extracts a badged
  PNG for external thumbnailers.
* io::file_association::install_thumbnailer — self-install the OS
  integration on startup: Linux writes a .thumbnailer + hicolor mimetype
  icons; Windows registers the IThumbnailProvider DLL under HKCU.

Shared core:
* crates/dwg-thumbnailer — lean (image-only) preview extractor + the
  `badge_dwg` full-width "DWG" band, used by every platform so the
  ribbon is single-sourced. Ships an rlib+staticlib.
* crates/dwg-thumbnailer-win — IThumbnailProvider COM in-proc server
  (cfg(windows), CI-built as a workspace member).
* macos/ — QuickLook thumbnail extension (Swift + C-ABI bridge to the
  core staticlib), assembled into a .appex.

Icons & packaging (single SVG source -> per-platform assets in CI):
* assets/mimetypes/image-vnd.{dwg,dxf}.svg — themed file icons.
* packaging: WiX ships dwg/dxf.ico + the thumbnail DLL and points the
  ProgIds at them; Info.plist gets CFBundleTypeIconFile + the QuickLook
  extension in Contents/PlugIns.
* release.yml — generate .ico (Windows) and .icns (macOS) from the SVGs,
  build the QuickLook .appex, and bundle everything.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-11 01:27:17 +03:00
Hakan SevenandClaude Opus 4.8 608fe5ec3e feat(start): show paying Patreon supporters on the Start page
Add a right-hand rail on the Start page listing active paying patrons
(name + pledge amount, highest first) with a "Support on Patreon" button.
The list is fetched once at boot from the Patreon API in the background;
free followers, $0 tiers, declined and former patrons are excluded.

The creator access token is read at build time from OCS_PATREON_TOKEN
(option_env!), so it never lives in source or git — the release workflow
passes it from a repo secret, and build.rs re-bakes when it changes.
Without a token the rail just shows the support button.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-02 01:00:22 +03:00
Hakan SevenandClaude Opus 4.8 e7afe35d62 feat(packaging): desktop shortcut, icon-cache refresh, checksums, AppStream
Windows installer:
- Optional Desktop shortcut feature (default on, deselectable) via a switch to
  the WixUI_FeatureTree UI.
- Refresh the shell after install (ie4uinit -show) so .dwg/.dxf icons and
  associations appear without a reboot.
- Tidy the Add/Remove Programs entry: ARPNOREPAIR plus contact/update/comments
  metadata (Modify stays enabled for the feature tree).

Release workflow:
- Publish SHA256 sidecars for the AppImage, portable .exe, MSI and .dmg.

Linux:
- Ship an AppStream metainfo.xml for software-centre integration.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-16 04:27:46 +03:00
Hakan SevenandClaude Opus 4.8 084dfb1bdb fix(windows): embed the app icon into the .exe
The Windows executable carried no icon, so Explorer, the taskbar, the
Start-menu tile and file-association entries showed a generic icon. Embed
AppIcon.ico via winresource in build.rs, and generate the .ico from the logo
before the build (it was produced after the build, too late to embed). Local
and non-Windows builds skip the step when the .ico is absent.

Fixes #107.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-16 04:10:01 +03:00
Hakan SevenandClaude Opus 4.8 3bafe45ab3 fix(wix): show GPL-3 license on installer EULA page
WixUI_Minimal fell back to WiX's built-in placeholder (Lorem ipsum)
RTF because no WixUILicenseRtf was set. Ship License.rtf generated
from the repo GPL-3 LICENSE and point the variable at it via a new
-dLicense candle arg.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-12 16:55:09 +03:00
Claude e87f331a1f Revert "ci: allow workflow_dispatch to upload to an existing release tag"
This reverts commit 0bceb1e2a0.
2026-06-12 11:55:16 +00:00
Claude 0bceb1e2a0 ci: allow workflow_dispatch to upload to an existing release tag
Adds a release_tag input so the workflow can be manually triggered
to rebuild and upload artifacts to an already-published release
(e.g. after a hotfix on main without re-tagging).

https://claude.ai/code/session_01F7yMUY48VuGNUF1Q3ma2cZ
2026-06-12 11:54:17 +00:00
Claude fd949b74c7 refactor(installer): split installer UI into its own ui.wxs
Moves the WixUI_Minimal UI and finish-screen launch checkbox out of
main.wxs into a dedicated ui.wxs fragment, referenced from main.wxs via
<UIRef Id='OpenCADStudioUI'>. Keeps the package/feature definition and
the UI concerns in separate files.

Updates the release workflow to compile both .wxs files (candle now
writes per-source .wixobj into a directory) and link both objects.

https://claude.ai/code/session_01DFVSKgViFaxEjZD2KsTdtt
2026-06-12 07:28:04 +00:00
Claude 556989dbdb feat(installer): add finish screen with launch-app checkbox to Windows MSI
Adds WixUI_Minimal UI to the WiX installer so users see a proper
Welcome → Progress → Finish wizard. The finish screen includes a
pre-ticked "Launch Open CAD Studio" checkbox; clicking Finish with
it checked starts the application immediately after the installer closes.

Also updates the light.exe invocation in release.yml to include
-ext WixUIExtension, which is required to link the WixUI dialogs.

https://claude.ai/code/session_01DFVSKgViFaxEjZD2KsTdtt
2026-06-12 07:24:36 +00:00
Hakan SevenandClaude Opus 4.8 9c7dd2fa6b ci(release): retry .dmg creation on transient hdiutil failure
hdiutil create intermittently fails with "Resource busy" on the hosted
macOS runner (stale mount / background indexer), failing an otherwise
successful build. Detach any leftover volume and retry up to five times
before giving up, then assert the image exists.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-12 02:14:05 +03:00
Mojtaba KarimiandClaude Opus 4.8 3163a5ee75 ci(windows): sign exe and installer with Azure Trusted Signing
Sign the bare .exe before the MSI is built (so the packed copy carries
the signature) and the linked .msi afterwards, via
azure/artifact-signing-action with SHA256 digests and Microsoft's
RFC3161 timestamp server. Credentials come from the AZURE_* repository
secrets.

Also fix the MSI version fallback: workflow_dispatch runs use the
branch name as ref_name, which is not a valid numeric ProductVersion,
so candle failed on any non-tag run.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-04 12:54:40 +02:00
Hakan SevenandClaude Opus 4.8 695c6536c4 docs+ci(macos): ad-hoc sign bundle, add Homebrew cask, clarify install
- release.yml: ad-hoc codesign the .app before packaging so a quarantined
  download avoids the "app is damaged" Gatekeeper verdict; emit the cask
  version + sha256 to the job summary each release for easy tap bumps.
- packaging/homebrew: Homebrew cask + tap/usage notes; install via
  --no-quarantine (the actual Gatekeeper bypass for an unsigned app).
- README: split macOS install into Homebrew and manual .dmg paths with
  the xattr / Settings "Open Anyway" fallbacks.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-04 12:45:58 +03:00
Hakan SevenandClaude Opus 4.7 7ad59bf603 fix(ci): quote candle -d args so PowerShell preserves the path
PowerShell 7's native-command argument passing breaks
`-dSource=target\release\OpenCADStudio.exe` on the `=` sign, so candle
received Source=`.exe` plus the actual path as a stray input filename
and bailed with CNDL0103. Resolve each path to an absolute string up
front and wrap every `-d<name>=<value>` in double quotes so the whole
token reaches candle intact.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-30 00:01:11 +03:00
Hakan SevenandClaude Opus 4.7 dd26dfeef7 chore(release): label Windows artifacts portable / installer
Rename release uploads:
  OpenCADStudio-<tag>-windows-x86_64.exe → -portable.exe
  OpenCADStudio-<tag>-windows-x86_64.msi → -installer.msi

Makes the distinction obvious on the release page so users don't have
to guess which file is the standalone exe and which one runs setup.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-29 23:40:53 +03:00
Hakan SevenandClaude Opus 4.7 a0800d95c9 feat(packaging): open files from argv, ship Windows MSI installer (#36)
Cross-platform prerequisite for OS-level file associations: the boot
task now consumes `std::env::args_os().nth(1)` as a path and dispatches
`Message::OpenRecent` for it. Flag-style args (starting with `-`) are
ignored, and `OpenRecent` already does the file-existence check, so a
bogus path lands as a clean command-line error instead of a panic.

Linux: the AppImage's desktop entry adds `image/vnd.dwg` alongside the
existing `image/vnd.dxf` MIME type and grows a `%f` placeholder in
`Exec=` so the launcher forwards the picked file path. Once the
AppImage is integrated with the system (xdg-mime / AppImageLauncher),
double-clicking a .dwg / .dxf opens it in Open CAD Studio.

Windows: new `packaging/windows/main.wxs` defines an MSI installer —
per-machine install to `Program Files\Open CAD Studio`, Start Menu
shortcut, `MajorUpgrade` so newer MSIs replace older ones, and a
single ProgID `OpenCADStudio.Drawing` that owns both `.dwg` and
`.dxf` and launches the exe with the file as `argv[1]`. The icon is
pulled from the SVG logo, converted to multi-resolution ICO at build
time with the runner's pre-installed ImageMagick. CI now also runs
`candle` / `light` (WiX Toolset 3, pre-installed on `windows-latest`)
and uploads both the bare `.exe` (portable) and `.msi` (installer)
to the release.

macOS Info.plist already declares the DWG / DXF UTIs; combined with
the argv-handling change above, double-clicking a drawing in Finder
will open it in Open CAD Studio without further packaging changes.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-29 23:34:14 +03:00
Hakan SevenandClaude Opus 4.7 ef1f9a08d6 chore: rename H7CAD to Open CAD Studio
Joining the OpenAEC Foundation (open-aec.com). Crate/struct become
OpenCADStudio, user-facing strings use the spaced "Open CAD Studio"
form, repo URLs point to HakanSeven12/open-cad-studio. Logo (window
icon + assets/logo.svg) redrawn with OCS initials. Drop examples/
binaries — unused.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-23 17:16:15 +03:00
Hakan SevenandClaude Opus 4.7 aea113e687 chore(release): drop Intel macOS build; arm64 only
The macos-13 / x86_64-apple-darwin matrix entry was failing in the
v0.3.5 run and we don't plan to ship Intel macOS binaries. Collapse
the macOS job to a single arm64 build on macos-14 (Apple Silicon),
removing the matrix and threading the target literally through the
build / .app / .dmg steps. README updates to match.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-20 21:31:19 +03:00
Hakan SevenandClaude Opus 4.7 9527509ea2 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>
2026-05-20 21:13:02 +03:00
Hakan SevenandClaude Sonnet 4.6 465dcc1600 ci: include version, OS and arch in release asset filenames
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-24 10:13:11 +03:00
Hakan SevenandClaude Sonnet 4.6 4506cff931 ci: remove one-time upload_tag workaround from release workflow
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-24 10:11:28 +03:00
Hakan SevenandClaude Sonnet 4.6 135fef54c5 ci: support upload_tag input on workflow_dispatch
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-24 02:12:22 +03:00
Hakan SevenandClaude Sonnet 4.6 0a88d063f9 ci: add AppImage build job to release workflow
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-24 01:57:40 +03:00
Hakan SevenandClaude Sonnet 4.6 527cce8ff0 Rename workflow and job identifiers for clarity
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-31 01:18:29 +03:00
Hakan Seven a8089f7c74 Rename flatpak-release.yml to release.yml 2026-03-22 18:36:48 +03:00