macos bundle

This commit is contained in:
2025-06-28 17:45:52 +02:00
parent fee594b56e
commit ef4de7fa43
2 changed files with 11 additions and 2 deletions

View File

@@ -13,4 +13,10 @@ add_executable(launcher
)
target_link_libraries(launcher ${wxWidgets_LIBRARIES})
target_link_libraries(launcher backend utils)
target_link_libraries(launcher backend utils)
set_target_properties(launcher PROPERTIES
MACOSX_BUNDLE TRUE
MACOSX_BUNDLE_GUI_IDENTIFIER "com.usatiuk.dhfs.launcher"
MACOSX_BUNDLE_BUNDLE_NAME "DHFS Launcher"
)

View File

@@ -13,7 +13,10 @@ wxDEFINE_EVENT(DHFS_STATE_CHANGE_EVENT, wxCommandEvent);
std::string getBundlePath() {
if (wxGetenv("DHFS_BUNDLE_PATH") == NULL)
return std::filesystem::path(wxStandardPaths::Get().GetExecutablePath().ToStdString())
.parent_path().parent_path().string();
#ifndef __APPLE__
.parent_path()
#endif
.parent_path().string();
return wxGetenv("DHFS_BUNDLE_PATH");
}