changeset 400:7c31e5a780f1

fix: enforce gui-app on windows
author sam <sam@basx.dev>
date Wed, 27 Dec 2023 16:08:13 +0700
parents 73e96ca349fd
children 0f87e84d57fd
files semicongine/build.nim semicongine/core/buildconfig.nim
diffstat 2 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/semicongine/build.nim	Wed Dec 27 16:01:05 2023 +0700
+++ b/semicongine/build.nim	Wed Dec 27 16:08:13 2023 +0700
@@ -24,7 +24,9 @@
   switch("experimental", "strictFuncs")
   switch("define", "nimPreviewHashRef")
   if defined(linux): switch("define", "VK_USE_PLATFORM_XLIB_KHR")
-  if defined(windows): switch("define", "VK_USE_PLATFORM_WIN32_KHR")
+  if defined(windows):
+    switch("define", "VK_USE_PLATFORM_WIN32_KHR")
+    switch("app", "gui")
   switch("outdir", semicongine_builddir(buildname, builddir=builddir))
 
 proc semicongine_pack*(outdir: string, bundleType: string, resourceRoot: string) =
--- a/semicongine/core/buildconfig.nim	Wed Dec 27 16:01:05 2023 +0700
+++ b/semicongine/core/buildconfig.nim	Wed Dec 27 16:08:13 2023 +0700
@@ -9,8 +9,8 @@
   assert compileOption("threads"), ENGINENAME & " requires --threads=on"
   assert defined(nimPreviewHashRef), ENGINENAME & " requires -d:nimPreviewHashRef"
 
-  if defined(release):
-    assert compileOption("app", "gui"), ENGINENAME & " requires --app=gui for release builds"
+  if defined(release) or defined(windows):
+    assert compileOption("app", "gui"), ENGINENAME & " requires --app=gui for release builds and all windows builds"
 
 
   if defined(linux):