[nostalgia] Make Windows builds of player and studio WIN32 apps

This commit is contained in:
Gary Talent 2023-11-11 21:43:13 -06:00
parent ce20282be0
commit 59c11e5309
4 changed files with 10 additions and 2 deletions

View File

@ -1,5 +1,5 @@
add_executable( add_executable(
nostalgia nostalgia WIN32
app.cpp app.cpp
main.cpp main.cpp
) )

View File

@ -26,7 +26,11 @@ static ox::Error run(int argc, const char **argv) noexcept {
return run(std::move(fs)); return run(std::move(fs));
} }
#ifdef _WIN32
int WinMain(int argc, const char **argv) {
#else
int main(int argc, const char **argv) { int main(int argc, const char **argv) {
#endif
#if defined(DEBUG) && !defined(OX_BARE_METAL) #if defined(DEBUG) && !defined(OX_BARE_METAL)
ox::LoggerConn loggerConn; ox::LoggerConn loggerConn;
const auto loggerErr = loggerConn.initConn("Nostalgia Player"); const auto loggerErr = loggerConn.initConn("Nostalgia Player");

View File

@ -1,7 +1,7 @@
set(CMAKE_INCLUDE_CURRENT_DIR ON) set(CMAKE_INCLUDE_CURRENT_DIR ON)
add_executable( add_executable(
nostalgia-studio MACOSX_BUNDLE nostalgia-studio WIN32 MACOSX_BUNDLE
main.cpp main.cpp
) )

View File

@ -7,7 +7,11 @@
#include <studioapp/studioapp.hpp> #include <studioapp/studioapp.hpp>
#ifdef _WIN32
int WinMain(int argc, const char **argv) {
#else
int main(int argc, const char **argv) { int main(int argc, const char **argv) {
#endif
nostalgia::registerKeelModules(); nostalgia::registerKeelModules();
nostalgia::registerStudioModules(); nostalgia::registerStudioModules();
return studio::main("Nostalgia Studio", ".nostalgia", argc, argv); return studio::main("Nostalgia Studio", ".nostalgia", argc, argv);