From 56ebc6923ea97e87d2d34b584f05dcdcb96675a4 Mon Sep 17 00:00:00 2001 From: Dimitre Date: Mon, 20 Jan 2025 01:14:23 -0300 Subject: [PATCH] macos osx fixes --- commandLine/src/addons/ofAddon.cpp | 4 ++-- commandLine/src/addons/ofAddon.h | 4 ++-- commandLine/src/projects/xcodeProject.cpp | 6 +++--- commandLine/src/utils/Utils.cpp | 5 +++-- commandLine/src/utils/Utils.h | 4 ++-- 5 files changed, 12 insertions(+), 11 deletions(-) diff --git a/commandLine/src/addons/ofAddon.cpp b/commandLine/src/addons/ofAddon.cpp index d0abe328..5f900b2f 100644 --- a/commandLine/src/addons/ofAddon.cpp +++ b/commandLine/src/addons/ofAddon.cpp @@ -152,7 +152,7 @@ bool ofAddon::checkCorrectVariable(const string & variable, const string & state AddonMetaVariables.end(), variable) != AddonMetaVariables.end(); } - else if (state == "osx") {// Why only checking for osx? + else if ( state == "osx" || state == "macos" ) {// Why only checking for osx? return std::find(AddonProjectVariables.begin(), AddonProjectVariables.end(), variable) != AddonProjectVariables.end(); @@ -785,7 +785,7 @@ void ofAddon::parseLibsPath(const fs::path & libsPath, const fs::path & parentFo #define MERGE_MAC_LIBS_HACK #ifdef MERGE_MAC_LIBS_HACK - if (platform == "osx" || platform == "macos"){ + if ( platform == "osx" || platform == "macos" ){ // Horrible hack to make it work with the bad idea of renaming osx to macos getLibsRecursively(libsPath, libFiles, libs, "macos"); getLibsRecursively(libsPath, libFiles, libs, "osx"); diff --git a/commandLine/src/addons/ofAddon.h b/commandLine/src/addons/ofAddon.h index a4a9352e..8ba7ba83 100644 --- a/commandLine/src/addons/ofAddon.h +++ b/commandLine/src/addons/ofAddon.h @@ -37,10 +37,10 @@ const vector parseStates { "android/x86_64", "emscripten", "android", - "ios", + "macos", "osx", + "ios", "tvos", - "macos", "watchos", "visionos", }; diff --git a/commandLine/src/projects/xcodeProject.cpp b/commandLine/src/projects/xcodeProject.cpp index 3364d857..78fdbf51 100644 --- a/commandLine/src/projects/xcodeProject.cpp +++ b/commandLine/src/projects/xcodeProject.cpp @@ -17,7 +17,7 @@ string xcodeProject::LOG_NAME = "xcodeProjectFile"; xcodeProject::xcodeProject(const string & target) : baseProject(target){ // TODO: remove unused variables - if( target == "osx" ){ + if( target == "osx" || target == "macos" ){ folderUUID = { { "src", "E4B69E1C0A3A1BDC003C02F2" }, { "addons", "BB4B014C10F69532006C3DED" }, @@ -186,7 +186,7 @@ void xcodeProject::saveScheme(){ } fs::create_directories(schemeFolder); - if (target == "osx") { + if ( target == "osx" || target == "macos" ) { for (auto & f : { "Release", "Debug" }) { copyTemplateFiles.push_back({ templatePath / ("emptyExample.xcodeproj/xcshareddata/xcschemes/emptyExample " + string(f) + ".xcscheme"), @@ -236,7 +236,7 @@ void xcodeProject::renameProject(){ //base addCommand("Set :objects:"+buildConfigurationListUUID+":name " + projectName); // Just OSX here, debug app naming. - if( target == "osx" ){ + if( target == "osx" || target == "macos" ){ // TODO: Hardcode to variable // FIXME: Debug needed in name? addCommand("Set :objects:E4B69B5B0A3A1756003C02F2:path " + projectName + "Debug.app"); diff --git a/commandLine/src/utils/Utils.cpp b/commandLine/src/utils/Utils.cpp index 147980ed..4bf48157 100644 --- a/commandLine/src/utils/Utils.cpp +++ b/commandLine/src/utils/Utils.cpp @@ -89,7 +89,8 @@ std::string getPlatformString() { return "vs"; #endif #elif defined(__APPLE_CC__) - return "osx"; +// return "osx"; + return "macos"; #else return {}; #endif @@ -219,11 +220,11 @@ static std::vector platforms; bool isFolderNotCurrentPlatform(const string & folderName, const string & platform){ if( platforms.size() == 0 ){ platforms = { + "macos", "osx", "msys2", "vs", "ios", - "macos", "tvos", "linux", "linux64", diff --git a/commandLine/src/utils/Utils.h b/commandLine/src/utils/Utils.h index 32980979..56bbc3ed 100644 --- a/commandLine/src/utils/Utils.h +++ b/commandLine/src/utils/Utils.h @@ -43,6 +43,8 @@ static std::map platformsToString { }; static std::vector < std::string > platformsOptions { + "macos", + "osx", "android", "ios", "linux", @@ -51,8 +53,6 @@ static std::vector < std::string > platformsOptions { "linuxarmv7l", "linuxaarch64", "msys2", - "macos", - "osx", "vs", "vscode", "zed",