Skip to content

Commit 42c7376

Browse files
authored
XCode - src fix for recursive folders (#507)
1 parent 71130da commit 42c7376

2 files changed

Lines changed: 7 additions & 17 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 "40"
3+
#define PG_VERSION "41"
44

55
#include "ofAddon.h"
66
#include "ofFileUtils.h"

commandLine/src/projects/xcodeProject.cpp

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ string xcodeProject::getFolderUUID(const fs::path & folder, bool isFolder, fs::p
265265

266266
if (!filePath.empty()) {
267267
addCommand("Add :objects:"+thisUUID+":path string " + ofPathToString(filePath));
268-
// alert(commands.back(), 33);
268+
alert(commands.back(), 33);
269269
} else {
270270
// cout << ">>>>> filePath empty " << endl;
271271
}
@@ -275,15 +275,10 @@ string xcodeProject::getFolderUUID(const fs::path & folder, bool isFolder, fs::p
275275

276276
addCommand("Add :objects:"+thisUUID+":isa string PBXGroup");
277277
addCommand("Add :objects:"+thisUUID+":children array");
278-
279-
if (folder.begin()->string() == "addons") {
280-
addCommand("Add :objects:"+thisUUID+":sourceTree string <group>");
281-
fs::path addonFolder { fs::path(fullPath).filename() };
282-
addCommand("Add :objects:"+thisUUID+":path string " + ofPathToString(addonFolder));
283-
// alert ("group " + folder.string() + " : " + base.string() + " : " + addonFolder.string(), 32);
284-
} else {
285-
addCommand("Add :objects:"+thisUUID+":sourceTree string SOURCE_ROOT");
286-
}
278+
279+
addCommand("Add :objects:"+thisUUID+":sourceTree string <group>");
280+
fs::path addonFolder { fs::path(fullPath).filename() };
281+
addCommand("Add :objects:"+thisUUID+":path string " + ofPathToString(addonFolder));
287282

288283
// And this new object is cointained in parent hierarchy, or even projRootUUID
289284
addCommand("Add :objects:"+lastFolderUUID+":children: string " + thisUUID);
@@ -673,7 +668,6 @@ bool xcodeProject::saveProjectFile(){
673668
}
674669

675670
// for (auto & c : commands) cout << c << endl;
676-
677671
return true;
678672
}
679673

@@ -686,11 +680,7 @@ void xcodeProject::addCommand(const string & command) {
686680
}
687681

688682
string xcodeProject::addFile(const fs::path & path, const fs::path & folder, const fileProperties & fp) {
689-
// alert("addFile " + ofPathToString(path) + " : " + ofPathToString(folder) , 31);
690-
// alert("reference " + ofToString(fp.reference));
691-
// alert("addToBuildPhase " + ofToString(fp.addToBuildPhase));
692-
// alert("codeSignOnCopy " + ofToString(fp.codeSignOnCopy));
693-
// alert("copyFilesBuildPhase " + ofToString(fp.copyFilesBuildPhase));
683+
alert("addFile " + ofPathToString(path) + " : " + ofPathToString(folder) , 31);
694684

695685
string UUID = "";
696686
std::map<fs::path, string> extensionToFileType {

0 commit comments

Comments
 (0)