Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions commandLine/src/defines.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#define OFPROJECTGENERATOR_MAJOR_VERSION "1"
#define OFPROJECTGENERATOR_MINOR_VERSION "0"
#define OFPROJECTGENERATOR_MAJOR_VERSION "0"
#define OFPROJECTGENERATOR_MINOR_VERSION "101"
#define OFPROJECTGENERATOR_PATCH_VERSION "0"

#define PG_VERSION (OFPROJECTGENERATOR_MAJOR_VERSION "." OFPROJECTGENERATOR_MINOR_VERSION "." OFPROJECTGENERATOR_PATCH_VERSION)
Expand Down
28 changes: 17 additions & 11 deletions commandLine/src/projects/xcodeProject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -210,22 +210,27 @@ bool xcodeProject::loadProjectFile() { //base
addCommand("# ---- PG VERSION " + getPGVersion());
addCommand("Add :_OFProjectGeneratorVersion string " + getPGVersion());

renameProject();
// MARK: just to return something.
return true;
}

// FIXME: mover pra dentro do loadProjectfile
void xcodeProject::renameProject() { //base
// FIXME: review BUILT_PRODUCTS_DIR
addCommand("Set :objects:" + buildConfigurationListUUID + ":name " + projectName);
// Rename Project
addCommand("Set :objects:" + buildConfigurationListUUID + ":name string " + projectName);

// Just OSX here, debug app naming.
if (target == "osx") {
// TODO: Hardcode to variable
// FIXME: Debug needed in name?
addCommand("Set :objects:E4B69B5B0A3A1756003C02F2:path " + projectName + "Debug.app");
addCommand("Set :objects:E4B69B5B0A3A1756003C02F2:path string " + projectName + "Debug.app");
}

// if ofRoot is not relative to the project path,
// set correct addons and openFrameworks folders
if (!ofIsPathInPath(fs::current_path(), getOFRoot())) {
addCommand("Set :objects:" + folderUUID["openFrameworks"] + ":path string " + getOFRoot().string() + "/libs/openFrameworks");
addCommand("Set :objects:" + folderUUID["openFrameworks"] + ":sourceTree string <absolute>");

addCommand("Set :objects:" + folderUUID["addons"] + ":path string " + getOFRoot().string() + "/addons");
addCommand("Set :objects:" + folderUUID["addons"] + ":sourceTree string <absolute>");
}

return true;
}

fs::path getPathTo(fs::path path, string limit) {
Expand Down Expand Up @@ -916,6 +921,7 @@ bool xcodeProject::saveProjectFile() {
//if (cols[0] == "Set") {
try {
json::json_pointer p { json::json_pointer(thispath) };
// alert (thispath, 95);

if (cols[2] == "string") {
// find position after find word
Expand Down Expand Up @@ -947,7 +953,7 @@ bool xcodeProject::saveProjectFile() {

} else {
thispath = thispath.substr(0, thispath.length() - 1);
// cout << thispath << endl;
// alert (thispath, 95);
json::json_pointer p = json::json_pointer(thispath);
try {
// Fixing XCode one item array issue
Expand Down
1 change: 0 additions & 1 deletion commandLine/src/projects/xcodeProject.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ class xcodeProject : public baseProject {
bool containsObjectiveCPlusPlus(const fs::path &filePath);

void saveScheme();
void renameProject();

string addFile(const fs::path & path, const fs::path & folder, const fileProperties & fp);
void addCommand(const string & command);
Expand Down