mach icon indicating copy to clipboard operation
mach copied to clipboard

docs: explain how to hide the windows command prompt in apps

Open emidoots opened this issue 2 years ago • 3 comments

should explain to users how to do this (and maybe provide a helper)

const app = try mach.App.init(...);
// ...
app.step.subsystem = .Windows;
app.install();

emidoots avatar Jul 02 '23 03:07 emidoots

from discord convo

maybe by default make it .Console on debug builds and .Windows on release builds? id imagine this is the behaviour most people would want but still let them override it manually

xdBronch avatar Jul 02 '23 03:07 xdBronch

Was trying to test this on macOS but then realized that a proper GUI app would require the whole .app folder wrapper thingy and maybe a few metadata files at minimum (and there's the codesign rabbit hole). Mach users would probably want this for release/ship-mode, but it seems a bit more involved.

This seems like the kind of thing that could be provided by some small Zig library. Given some executable, package it as a macOS (maybe iOS too?) app ready for the App Store and stuff, instead of a raw executable.

jmrico01 avatar Jul 02 '23 04:07 jmrico01

As for linux, I also quickly tested on Ubuntu Desktop and found that the plain executable without any overrides to .subsystem already runs as expected, without any extra terminal windows. Not super familiar with the standard way to ship apps for Linux or differences between distros, but seems so far like the plain executable just works.

jmrico01 avatar Jul 02 '23 15:07 jmrico01