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

Open
opened 2023-07-02 03:31:04 +00:00 by emidoots · 3 comments
emidoots commented 2023-07-02 03:31:04 +00:00 (Migrated from github.com)

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();
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(); ```
xdBronch commented 2023-07-02 03:51:29 +00:00 (Migrated from github.com)

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

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
jmrico01 commented 2023-07-02 04:37:15 +00:00 (Migrated from github.com)

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.

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 commented 2023-07-02 15:11:36 +00:00 (Migrated from github.com)

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.

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.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
hexops/mach#840
No description provided.