Skip to content

Commit

Permalink
v84 fix project::addAddon issue (#591)
Browse files Browse the repository at this point in the history
  • Loading branch information
dimitre authored Nov 11, 2024
1 parent 30f1230 commit 2e354a7
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 10 deletions.
2 changes: 1 addition & 1 deletion commandLine/src/defines.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#define OFPROJECTGENERATOR_MAJOR_VERSION "0"
#define OFPROJECTGENERATOR_MINOR_VERSION "83"
#define OFPROJECTGENERATOR_MINOR_VERSION "84"
#define OFPROJECTGENERATOR_PATCH_VERSION "0"

#define PG_VERSION (OFPROJECTGENERATOR_MAJOR_VERSION "." OFPROJECTGENERATOR_MINOR_VERSION "." OFPROJECTGENERATOR_PATCH_VERSION)
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) ;
void addAddon(ofAddon & addon) override;

static std::string LOG_NAME;

Expand Down
8 changes: 3 additions & 5 deletions commandLine/src/projects/baseProject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -304,10 +304,11 @@ bool baseProject::isAddonInCache(const string & addonPath, const string platform

void baseProject::addAddon(const std::string& _addonName){
ofLogVerbose("baseProject::addAddon") << _addonName;
// alert( "baseProject::addAddon " + addonName );
// alert( "baseProject::addAddon " + _addonName );

auto addonName = ofAddon::cleanName(_addonName);


// FIXME : not target, yes platform.
//#ifdef TARGET_WIN32
// // std::replace( addonName.begin(), addonName.end(), '/', '\\' );
Expand Down Expand Up @@ -423,10 +424,7 @@ void baseProject::addAddon(const std::string& _addonName){

ofLogNotice() << "adding addon: " << addon.name;






// MARK: - SPECIFIC for each project.
// XCode and VS override the base addAddon. other templates will use baseproject::addAddon(ofAddon...
addAddon(addon);
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);
void addAddon(ofAddon & addon);
virtual void addAddon(ofAddon & addon);
virtual void addSrcRecursively(const fs::path & srcPath);

virtual void restoreBackup(const fs::path & srcPath){};
Expand Down
3 changes: 2 additions & 1 deletion commandLine/src/projects/qtcreatorproject.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,13 @@ 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;
static std::string LOG_NAME;

private:
void addAddon(ofAddon & addon);
using baseProject::addAddon;
std::set<std::string> qbsProjectFiles;
ofBuffer qbs;
Expand Down
2 changes: 1 addition & 1 deletion commandLine/src/projects/xcodeProject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -611,7 +611,7 @@ void xcodeProject::addAfterRule(const string& rule){
// 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){
void xcodeProject::addAddonLibs(const ofAddon& addon){
for (auto & e : addon.libs) {
ofLogVerbose() << "adding addon libs: " << e.path;
addLibrary(e);
Expand Down

0 comments on commit 2e354a7

Please sign in to comment.