Skip to content

properly fixing vscode project. plus some extra comments. #592

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 16, 2024
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
5 changes: 2 additions & 3 deletions commandLine/src/projects/VSCodeProject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,8 @@ bool VSCodeProject::loadProjectFile(){
cppProperties.load();
return true;
}


void VSCodeProject::addAddon(ofAddon & addon) {

void VSCodeProject::addAddonBegin(const ofAddon& addon) {
// alert("VSCodeProject::addAddon() " + addon.name, 35);

workspace.addPath(addon.addonPath);
Expand Down
2 changes: 1 addition & 1 deletion commandLine/src/projects/VSCodeProject.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class VSCodeProject: public baseProject {
void addDefine(const std::string& define, LibType libType = RELEASE_LIB) override {}


void addAddon(ofAddon & addon) override;
void addAddonBegin(const ofAddon& addon) override;

static std::string LOG_NAME;

Expand Down
2 changes: 1 addition & 1 deletion commandLine/src/projects/android2024.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class android2024Project : public baseProject {
void addDefine(const std::string& define, LibType libType = RELEASE_LIB) override {}



//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.
bool loadProjectFile() override { return false; };
bool saveProjectFile() override { return false; };
static std::string LOG_NAME;
Expand Down
2 changes: 1 addition & 1 deletion commandLine/src/projects/androidStudioProject.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class AndroidStudioProject : public baseProject {
void addAfterRule(const std::string& script) override {}
void addDefine(const std::string& define, LibType libType = RELEASE_LIB) override {}


//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.
bool loadProjectFile() override { return false; };
bool saveProjectFile() override { return false; };
static std::string LOG_NAME;
Expand Down
2 changes: 0 additions & 2 deletions commandLine/src/projects/baseProject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -517,8 +517,6 @@ void baseProject::addAddonDllsToCopy(ofAddon& addon){
}


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

Expand Down
2 changes: 1 addition & 1 deletion commandLine/src/projects/baseProject.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ class baseProject {


void addAddon(const std::string& addon);
virtual void addAddon(ofAddon & addon);
void addAddon(ofAddon & addon);
virtual void addSrcRecursively(const fs::path & srcPath);

virtual void restoreBackup(const fs::path & srcPath){};
Expand Down
14 changes: 7 additions & 7 deletions commandLine/src/projects/qtcreatorproject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -144,10 +144,10 @@ bool QtCreatorProject::saveProjectFile(){
}


void QtCreatorProject::addAddon(ofAddon & addon){
// FIXME: I think this is unneded since this function here is triggered by baseclass::addAddon(string) which already checked if exists.
// for (auto & a : addons) {
// if (a.name == addon.name) return;
// }
addons.emplace_back(addon);
}
//void QtCreatorProject::addAddon(ofAddon & addon){
// // FIXME: I think this is unneded since this function here is triggered by baseclass::addAddon(string) which already checked if exists.
//// for (auto & a : addons) {
//// if (a.name == addon.name) return;
//// }
// addons.emplace_back(addon);
//}
1 change: 0 additions & 1 deletion commandLine/src/projects/qtcreatorproject.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ class QtCreatorProject : public baseProject {
void addAfterRule(const std::string& script) override {}
void addDefine(const std::string& define, LibType libType = RELEASE_LIB) override {}

void addAddon(ofAddon & addon) override;

bool loadProjectFile() override;
bool saveProjectFile() override;
Expand Down
8 changes: 0 additions & 8 deletions commandLine/src/projects/xcodeProject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -602,15 +602,7 @@ void xcodeProject::addAfterRule(const string& rule){
addCommand("Add :objects:"+buildConfigurationListUUID+":buildPhases: string " + afterPhaseUUID);
}

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

// Files listed alphabetically on XCode navigator.

// std::sort(addon.srcFiles.begin(), addon.srcFiles.end(), [](const fs::path & a, const fs::path & b) {
// return a.string() < b.string();
// });
void xcodeProject::addAddonLibs(const ofAddon& addon){
for (auto & e : addon.libs) {
ofLogVerbose() << "adding addon libs: " << e.path;
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 @@ -55,7 +55,6 @@ class xcodeProject : public baseProject {
void addXCFramework(const fs::path & path, const fs::path & folder);
void addDylib(const fs::path & path, const fs::path & folder);

// void addAddon(ofAddon & addon);
void saveScheme();
void renameProject();

Expand Down