From bd91137d2797a03cb880fdd749a83fbef9c909c4 Mon Sep 17 00:00:00 2001 From: Gary Talent Date: Mon, 2 Dec 2024 21:10:52 -0600 Subject: [PATCH] [nostalgia,olympic] Fix pack tool build for Windows --- src/nostalgia/modules/core/src/keel/keelmodule.cpp | 2 +- src/nostalgia/modules/core/src/studio/studiomodule.cpp | 2 +- src/olympic/applib/applib.cpp | 2 +- src/olympic/studio/applib/src/CMakeLists.txt | 1 + 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/nostalgia/modules/core/src/keel/keelmodule.cpp b/src/nostalgia/modules/core/src/keel/keelmodule.cpp index 29f829e3..0f9cfba1 100644 --- a/src/nostalgia/modules/core/src/keel/keelmodule.cpp +++ b/src/nostalgia/modules/core/src/keel/keelmodule.cpp @@ -92,7 +92,7 @@ static class: public keel::Module { }, }; } -} mod; +} const mod; keel::Module const*keelModule() noexcept { return &mod; diff --git a/src/nostalgia/modules/core/src/studio/studiomodule.cpp b/src/nostalgia/modules/core/src/studio/studiomodule.cpp index bba778bd..a880ee2f 100644 --- a/src/nostalgia/modules/core/src/studio/studiomodule.cpp +++ b/src/nostalgia/modules/core/src/studio/studiomodule.cpp @@ -25,7 +25,7 @@ static class: public studio::Module { out.emplace_back(ox::make>("Palette", "Palettes", FileExt_npal)); return out; } -} mod; +} const mod; const studio::Module *studioModule() noexcept { return &mod; diff --git a/src/olympic/applib/applib.cpp b/src/olympic/applib/applib.cpp index 28211d82..0c4693b4 100644 --- a/src/olympic/applib/applib.cpp +++ b/src/olympic/applib/applib.cpp @@ -50,7 +50,7 @@ void registerKeelModules() noexcept; void registerStudioModules() noexcept; } -#ifdef _WIN32 +#if defined(_WIN32) && OLYMPIC_GUI_APP int WinMain() { auto const argc = __argc; auto const argv = const_cast(__argv); diff --git a/src/olympic/studio/applib/src/CMakeLists.txt b/src/olympic/studio/applib/src/CMakeLists.txt index 2dfce8d5..52788ec9 100644 --- a/src/olympic/studio/applib/src/CMakeLists.txt +++ b/src/olympic/studio/applib/src/CMakeLists.txt @@ -12,6 +12,7 @@ add_library( ) target_compile_definitions( StudioAppLib PUBLIC + OLYMPIC_GUI_APP=1 OLYMPIC_LOAD_STUDIO_MODULES=1 OLYMPIC_APP_NAME="Studio" )