From aecbf876cd0a7894396a2e5034af9d93bf028aa0 Mon Sep 17 00:00:00 2001 From: Thorbjørn Lindeijer Date: Wed, 13 Mar 2024 15:45:37 +0100 Subject: macOS: Create an app bundle Also enable using `cpack -G DragNDrop` to create a DMG to easily drag Mana into the Applications folder. The DMG is also available as a CI artifact. The minimum deployment target has been set to 10.15, as required due to usage of std::filesystem::create_directories. --- src/main.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/main.cpp') diff --git a/src/main.cpp b/src/main.cpp index 68a6b0c3..935f2d89 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -37,6 +37,10 @@ #include #endif +#ifdef __APPLE__ +#include "utils/specialfolder.h" +#endif + static void printHelp() { using std::endl; @@ -213,7 +217,14 @@ static void initInternationalization() #endif // _WIN32 setlocale(LC_MESSAGES, ""); + +#ifdef __APPLE__ + const auto translationsDir = getResourcesLocation() + "/Translations"; + bindtextdomain("mana", translationsDir.c_str()); +#else bindtextdomain("mana", LOCALEDIR); +#endif + bind_textdomain_codeset("mana", "UTF-8"); textdomain("mana"); #endif // ENABLE_NLS -- cgit v1.2.3-70-g09d2