diff --git a/commandLine/src/main.cpp b/commandLine/src/main.cpp index 2776bb25..eda12abf 100644 --- a/commandLine/src/main.cpp +++ b/commandLine/src/main.cpp @@ -1,4 +1,4 @@ -#define PG_VERSION "PG v010" +#define PG_VERSION "PG v011" #define TARGET_NO_SOUND #define TARGET_NODISPLAY @@ -272,8 +272,8 @@ void recursiveUpdate(const fs::path & path, ofTargetPlatform target) { } setOFRoot(ofPath); fs::current_path(path); - alert ("ofRoot " + ofPath.string()); - alert ("cwd " + path.string()); +// alert ("ofRoot " + ofPath.string()); +// alert ("cwd " + path.string()); updateProject(path, target, false); } @@ -405,9 +405,10 @@ int main(int argc, char** argv){ string srcString(options[SRCEXTERNAL].arg); // TODO: TEST for (auto & s : ofSplitString(srcString, ",", true, true)) { + s = ofFilePath::removeTrailingSlash(s); srcPaths.emplace_back(s); + //alert ("additional src folder : " + s); } -// srcPaths = ofSplitString(srcString, ",", true, true); } } diff --git a/commandLine/src/projects/baseProject.cpp b/commandLine/src/projects/baseProject.cpp index a04240fe..82d304d2 100644 --- a/commandLine/src/projects/baseProject.cpp +++ b/commandLine/src/projects/baseProject.cpp @@ -273,8 +273,6 @@ void baseProject::addAddon(string addonName){ fixSlashOrder(addonName); #endif - - ofAddon addon; // MARK: Review this path here. EDIT: I think it is finally good @@ -357,6 +355,8 @@ void baseProject::addAddon(string addonName){ } void baseProject::addSrcRecursively(const fs::path & srcPath){ + ofLog() << "using additional source folder " << srcPath.string(); +// alert("--"); // alert("addSrcRecursively " + srcPath.string()); fs::path base = srcPath.parent_path(); // alert("base = " + base.string()); @@ -367,10 +367,12 @@ void baseProject::addSrcRecursively(const fs::path & srcPath){ // bool isRelative = ofIsPathInPath(fs::absolute(srcPath), getOFRoot()); std::unordered_set uniqueIncludeFolders; + for( auto & src : srcFilesToAdd){ fs::path parent = src.parent_path(); fs::path folder = parent.lexically_relative(base); -// alert ("addSrc " + src.string() + " : " + folder.string()); + + // alert ("addSrc file:" + src.string() + " -- folder:" + folder.string(), 35); addSrc(src.string(), folder.string()); if (parent.string() != "") { uniqueIncludeFolders.insert(parent.string()); diff --git a/commandLine/src/projects/xcodeProject.cpp b/commandLine/src/projects/xcodeProject.cpp index d5eb713f..b450c8fc 100644 --- a/commandLine/src/projects/xcodeProject.cpp +++ b/commandLine/src/projects/xcodeProject.cpp @@ -13,6 +13,7 @@ xcodeProject::xcodeProject(string target) folderUUID = { { "src", "E4B69E1C0A3A1BDC003C02F2" }, { "addons", "BB4B014C10F69532006C3DED" }, + { "openFrameworks", "191EF70929D778A400F35F26" }, // { "localAddons", "6948EE371B920CB800B5AC1A" }, { "", "E4B69B4A0A3A1720003C02F2" } }; @@ -127,10 +128,16 @@ bool xcodeProject::createProjectFile(){ } // Calculate OF Root in relation to each project (recursively); - auto relRoot = fs::relative((fs::current_path() / getOFRoot()), projectDir); + fs::path relRoot { getOFRoot() }; + if (ofIsPathInPath(fs::current_path(), getOFRoot())) { + auto relRoot = fs::relative((fs::current_path() / getOFRoot()), projectDir); + } + + if (!fs::equivalent(relRoot, "../../..")) { string root = relRoot.string(); + alert ("root = " + root); findandreplaceInTexfile(projectDir / (projectName + ".xcodeproj/project.pbxproj"), "../../..", root); findandreplaceInTexfile(projectDir / "Project.xcconfig", "../../..", root); if( target == "osx" ){ @@ -870,7 +877,7 @@ bool xcodeProject::saveProjectFile(){ } } -// for (auto & c : commands) cout << c << endl +// for (auto & c : commands) cout << c << endl; return true; } diff --git a/scripts/osx/buildPG.sh b/scripts/osx/buildPG.sh index 03e6407d..e8daa098 100755 --- a/scripts/osx/buildPG.sh +++ b/scripts/osx/buildPG.sh @@ -196,6 +196,7 @@ if [[ $errorcode -ne 0 ]]; then fi # install electron sign globally +# sudo npx create-react-app electron-osx-sign sudo npm install -g electron-osx-sign if [ -d "/Users/runner/" ]; then