Skip to content

Commit 4d5b2a7

Browse files
authored
Merge pull request #592 from roymacdonald/vscodefix
properly fixing vscode project. plus some extra comments.
2 parents 2e354a7 + 9092742 commit 4d5b2a7

File tree

10 files changed

+13
-26
lines changed

10 files changed

+13
-26
lines changed

commandLine/src/projects/VSCodeProject.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -131,9 +131,8 @@ bool VSCodeProject::loadProjectFile(){
131131
cppProperties.load();
132132
return true;
133133
}
134-
135-
136-
void VSCodeProject::addAddon(ofAddon & addon) {
134+
135+
void VSCodeProject::addAddonBegin(const ofAddon& addon) {
137136
// alert("VSCodeProject::addAddon() " + addon.name, 35);
138137

139138
workspace.addPath(addon.addonPath);

commandLine/src/projects/VSCodeProject.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class VSCodeProject: public baseProject {
2828
void addDefine(const std::string& define, LibType libType = RELEASE_LIB) override {}
2929

3030

31-
void addAddon(ofAddon & addon) override;
31+
void addAddonBegin(const ofAddon& addon) override;
3232

3333
static std::string LOG_NAME;
3434

commandLine/src/projects/android2024.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class android2024Project : public baseProject {
1717
void addDefine(const std::string& define, LibType libType = RELEASE_LIB) override {}
1818

1919

20-
20+
//TODO: not sure if the following function should return false. as it will stop the further execution in baseProject::create and make it to return as it had failed.
2121
bool loadProjectFile() override { return false; };
2222
bool saveProjectFile() override { return false; };
2323
static std::string LOG_NAME;

commandLine/src/projects/androidStudioProject.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class AndroidStudioProject : public baseProject {
1616
void addAfterRule(const std::string& script) override {}
1717
void addDefine(const std::string& define, LibType libType = RELEASE_LIB) override {}
1818

19-
19+
//TODO: not sure if the following function should return false. as it will stop the further execution in baseProject::create and make it to return as it had failed.
2020
bool loadProjectFile() override { return false; };
2121
bool saveProjectFile() override { return false; };
2222
static std::string LOG_NAME;

commandLine/src/projects/baseProject.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -517,8 +517,6 @@ void baseProject::addAddonDllsToCopy(ofAddon& addon){
517517
}
518518

519519

520-
// MARK: - This function is only called by addon dependencies, when one addon is asking for another one to be included.
521-
// this is only invoked by XCode and visualStudioProject, and I don't understand why as they are similar
522520
void baseProject::addAddon(ofAddon & addon){
523521
// alert("baseProject::addAddon ofAddon & addon :: " + addon.name);
524522

commandLine/src/projects/baseProject.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ class baseProject {
7070

7171

7272
void addAddon(const std::string& addon);
73-
virtual void addAddon(ofAddon & addon);
73+
void addAddon(ofAddon & addon);
7474
virtual void addSrcRecursively(const fs::path & srcPath);
7575

7676
virtual void restoreBackup(const fs::path & srcPath){};

commandLine/src/projects/qtcreatorproject.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -144,10 +144,10 @@ bool QtCreatorProject::saveProjectFile(){
144144
}
145145

146146

147-
void QtCreatorProject::addAddon(ofAddon & addon){
148-
// FIXME: I think this is unneded since this function here is triggered by baseclass::addAddon(string) which already checked if exists.
149-
// for (auto & a : addons) {
150-
// if (a.name == addon.name) return;
151-
// }
152-
addons.emplace_back(addon);
153-
}
147+
//void QtCreatorProject::addAddon(ofAddon & addon){
148+
// // FIXME: I think this is unneded since this function here is triggered by baseclass::addAddon(string) which already checked if exists.
149+
//// for (auto & a : addons) {
150+
//// if (a.name == addon.name) return;
151+
//// }
152+
// addons.emplace_back(addon);
153+
//}

commandLine/src/projects/qtcreatorproject.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ class QtCreatorProject : public baseProject {
1919
void addAfterRule(const std::string& script) override {}
2020
void addDefine(const std::string& define, LibType libType = RELEASE_LIB) override {}
2121

22-
void addAddon(ofAddon & addon) override;
2322

2423
bool loadProjectFile() override;
2524
bool saveProjectFile() override;

commandLine/src/projects/xcodeProject.cpp

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -602,15 +602,7 @@ void xcodeProject::addAfterRule(const string& rule){
602602
addCommand("Add :objects:"+buildConfigurationListUUID+":buildPhases: string " + afterPhaseUUID);
603603
}
604604

605-
// void xcodeProject::addAddon(ofAddon & addon){
606-
//
607-
// alert("xcodeProject addAddon string :: " + addon.name, 31);
608605

609-
// Files listed alphabetically on XCode navigator.
610-
611-
// std::sort(addon.srcFiles.begin(), addon.srcFiles.end(), [](const fs::path & a, const fs::path & b) {
612-
// return a.string() < b.string();
613-
// });
614606
void xcodeProject::addAddonLibs(const ofAddon& addon){
615607
for (auto & e : addon.libs) {
616608
ofLogVerbose() << "adding addon libs: " << e.path;

commandLine/src/projects/xcodeProject.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ class xcodeProject : public baseProject {
5555
void addXCFramework(const fs::path & path, const fs::path & folder);
5656
void addDylib(const fs::path & path, const fs::path & folder);
5757

58-
// void addAddon(ofAddon & addon);
5958
void saveScheme();
6059
void renameProject();
6160

0 commit comments

Comments
 (0)