Skip to content

Commit

Permalink
macos osx fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
dimitre committed Jan 20, 2025
1 parent 3210834 commit 56ebc69
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 11 deletions.
4 changes: 2 additions & 2 deletions commandLine/src/addons/ofAddon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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");
Expand Down
4 changes: 2 additions & 2 deletions commandLine/src/addons/ofAddon.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ const vector<string> parseStates {
"android/x86_64",
"emscripten",
"android",
"ios",
"macos",
"osx",
"ios",
"tvos",
"macos",
"watchos",
"visionos",
};
Expand Down
6 changes: 3 additions & 3 deletions commandLine/src/projects/xcodeProject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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" },
Expand Down Expand Up @@ -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"),
Expand Down Expand Up @@ -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");
Expand Down
5 changes: 3 additions & 2 deletions commandLine/src/utils/Utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,8 @@ std::string getPlatformString() {
return "vs";
#endif
#elif defined(__APPLE_CC__)
return "osx";
// return "osx";
return "macos";
#else
return {};
#endif
Expand Down Expand Up @@ -219,11 +220,11 @@ static std::vector <string> platforms;
bool isFolderNotCurrentPlatform(const string & folderName, const string & platform){
if( platforms.size() == 0 ){
platforms = {
"macos",
"osx",
"msys2",
"vs",
"ios",
"macos",
"tvos",
"linux",
"linux64",
Expand Down
4 changes: 2 additions & 2 deletions commandLine/src/utils/Utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ static std::map <ofTargetPlatform, std::string> platformsToString {
};

static std::vector < std::string > platformsOptions {
"macos",
"osx",
"android",
"ios",
"linux",
Expand All @@ -51,8 +53,6 @@ static std::vector < std::string > platformsOptions {
"linuxarmv7l",
"linuxaarch64",
"msys2",
"macos",
"osx",
"vs",
"vscode",
"zed",
Expand Down

0 comments on commit 56ebc69

Please sign in to comment.