2026-05-14 11:12:08 +03:00
|
|
|
#![allow(non_snake_case)]
|
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
|
|
|
// 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")]
|
2026-05-14 11:12:08 +03:00
|
|
|
|
2026-03-22 22:44:32 +03:00
|
|
|
mod app;
|
2026-03-22 14:56:27 +03:00
|
|
|
mod command;
|
|
|
|
|
mod entities;
|
|
|
|
|
mod io;
|
|
|
|
|
mod linetypes;
|
|
|
|
|
mod modules;
|
2026-06-09 13:41:21 -04:00
|
|
|
mod plugin;
|
2026-03-22 14:56:27 +03:00
|
|
|
mod patterns;
|
|
|
|
|
mod scene;
|
|
|
|
|
mod snap;
|
|
|
|
|
mod ui;
|
2026-06-16 17:11:20 +03:00
|
|
|
mod par;
|
2026-06-16 13:01:19 +03:00
|
|
|
mod sys;
|
2026-05-16 19:55:57 +03:00
|
|
|
mod update_check;
|
2026-03-22 14:56:27 +03:00
|
|
|
|
|
|
|
|
fn main() -> iced::Result {
|
2026-06-04 10:02:09 +03:00
|
|
|
// On some Windows hybrid-GPU laptops the AMD OpenGL driver (atio6axx.dll)
|
|
|
|
|
// access-violates the moment wgpu enumerates its GL backend at startup,
|
|
|
|
|
// killing the app before any window appears — even though DX12 would work
|
|
|
|
|
// fine (#55). Restrict wgpu to DX12/Vulkan so the GL ICD is never touched.
|
|
|
|
|
// An explicit user-set WGPU_BACKEND still wins.
|
|
|
|
|
#[cfg(target_os = "windows")]
|
|
|
|
|
if std::env::var_os("WGPU_BACKEND").is_none() {
|
|
|
|
|
std::env::set_var("WGPU_BACKEND", "dx12,vulkan");
|
|
|
|
|
}
|
2026-06-16 13:16:35 +03:00
|
|
|
|
|
|
|
|
// Web (wasm) uses the single-window entry; native uses the multi-window
|
|
|
|
|
// daemon. Trunk calls `main` from its generated JS bootstrap.
|
|
|
|
|
#[cfg(target_arch = "wasm32")]
|
|
|
|
|
{
|
|
|
|
|
console_error_panic_hook::set_once();
|
|
|
|
|
app::run_web()
|
|
|
|
|
}
|
|
|
|
|
#[cfg(not(target_arch = "wasm32"))]
|
|
|
|
|
{
|
|
|
|
|
app::run()
|
|
|
|
|
}
|
2026-03-22 14:56:27 +03:00
|
|
|
}
|