Skip to content

Commit 24585c0

Browse files
authored
v45 - fix ios system frameworks ~ absolute paths (#518)
1 parent 1de3efe commit 24585c0

2 files changed

Lines changed: 13 additions & 8 deletions

File tree

commandLine/src/projects/baseProject.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#pragma once
22

3-
#define PG_VERSION "44"
3+
#define PG_VERSION "45"
44

55
#include "ofAddon.h"
66
#include "pugixml.hpp"

commandLine/src/projects/xcodeProject.cpp

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@ xcodeProject::xcodeProject(const string & target) : baseProject(target){
4747
folderUUID = {
4848
{ "src", "E4D8936A11527B74007E1F53" },
4949
{ "addons", "BB16F26B0F2B646B00518274" },
50-
{ "", "29B97314FDCFA39411CA2CEA" }
50+
{ "", "29B97314FDCFA39411CA2CEA" },
51+
{ "Frameworks", "901808C02053638E004A7774" }
5152
// { "localAddons", "6948EE371B920CB800B5AC1A" },
5253
};
5354

@@ -390,6 +391,8 @@ void xcodeProject::addFramework(const fs::path & path, const fs::path & folder){
390391
}
391392

392393
fileProperties fp;
394+
fp.absolute = isSystemFramework;
395+
393396
fp.codeSignOnCopy = !isSystemFramework;
394397
fp.copyFilesBuildPhase = !isSystemFramework;
395398
fp.frameworksBuildPhase = (target != "ios" && !folder.empty());
@@ -568,21 +571,23 @@ void xcodeProject::addAddon(ofAddon & addon){
568571
ofLogVerbose() << "adding addon frameworks: " << f;
569572

570573
size_t found=f.find('/');
571-
if (found==string::npos){
574+
if (found==string::npos) { // This path doesn't have slashes
572575
fs::path folder = fs::path{ "addons" } / addon.name / "frameworks";
573576
// fs::path folder = addon.filesToFolders[f];
574577

575578
if (target == "ios"){
576-
addFramework( "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/" +
577-
f + ".framework",
578-
folder);
579+
addFramework( "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/" + f + ".framework",
580+
// folder
581+
"Frameworks"
582+
);
579583
} else {
580584
if (addon.isLocalAddon) {
581585
folder = addon.addonPath / "frameworks";
582586
}
583587
addFramework( "/System/Library/Frameworks/" + f + ".framework", folder);
584588
}
585-
} else {
589+
}
590+
else {
586591
if (ofIsStringInString(f, "/System/Library")){
587592
addFramework(f, "addons/" + addon.name + "/frameworks");
588593

@@ -779,7 +784,7 @@ bool xcodeProject::saveProjectFile(){
779784
// debugCommands = true;
780785

781786
addCommand("# ---- PG VERSION " + getPGVersion());
782-
addCommand("Add :openFrameworksProjectGeneratorVersion string " + getPGVersion());
787+
addCommand("Add :_openFrameworksProjectGeneratorVersion string " + getPGVersion());
783788

784789
fileProperties fp;
785790
// fp.isGroupWithoutFolder = true;

0 commit comments

Comments
 (0)