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
66 changes: 29 additions & 37 deletions commandLine/config.make
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,24 @@
################################################################################
# OF ROOT
# The location of your root openFrameworks installation
# (default) OF_ROOT = ../../..
# (default) OF_ROOT = ../../..
################################################################################
OF_ROOT = ../../..

################################################################################
# PROJECT ROOT
# The location of the project - a starting place for searching for files
# (default) PROJECT_ROOT = . (this directory)
#
#
################################################################################
# PROJECT_ROOT = .

################################################################################
# PROJECT SPECIFIC CHECKS
# This is a project defined section to create internal makefile flags to
# conditionally enable or disable the addition of various features within
# This is a project defined section to create internal makefile flags to
# conditionally enable or disable the addition of various features within
# this makefile. For instance, if you want to make changes based on whether
# GTK is installed, one might test that here and create a variable to check.
# GTK is installed, one might test that here and create a variable to check.
################################################################################
# None
APPNAME = projectGenerator
Expand All @@ -33,23 +33,23 @@ PROJECT_AFTER_OSX="if test -f \"$TARGET_BUILD_DIR/projectGenerator\"; then rm \"
################################################################################
# PROJECT EXTERNAL SOURCE PATHS
# These are fully qualified paths that are not within the PROJECT_ROOT folder.
# Like source folders in the PROJECT_ROOT, these paths are subject to
# Like source folders in the PROJECT_ROOT, these paths are subject to
# exlclusion via the PROJECT_EXLCUSIONS list.
#
# (default) PROJECT_EXTERNAL_SOURCE_PATHS = (blank)
# (default) PROJECT_EXTERNAL_SOURCE_PATHS = (blank)
#
# Note: Leave a leading space when adding list items with the += operator
################################################################################
# PROJECT_EXTERNAL_SOURCE_PATHS =
# PROJECT_EXTERNAL_SOURCE_PATHS =

################################################################################
# PROJECT EXCLUSIONS
# These makefiles assume that all folders in your current project directory
# These makefiles assume that all folders in your current project directory
# and any listed in the PROJECT_EXTERNAL_SOURCH_PATHS are are valid locations
# to look for source code. The any folders or files that match any of the
# to look for source code. The any folders or files that match any of the
# items in the PROJECT_EXCLUSIONS list below will be ignored.
#
# Each item in the PROJECT_EXCLUSIONS list will be treated as a complete
# Each item in the PROJECT_EXCLUSIONS list will be treated as a complete
# string unless teh user adds a wildcard (%) operator to match subdirectories.
# GNU make only allows one wildcard for matching. The second wildcard (%) is
# treated literally.
Expand All @@ -75,45 +75,45 @@ PROJECT_AFTER_OSX="if test -f \"$TARGET_BUILD_DIR/projectGenerator\"; then rm \"
# Note: Leave a leading space when adding list items with the += operator
################################################################################

# Currently, shared libraries that are needed are copied to the
# Currently, shared libraries that are needed are copied to the
# $(PROJECT_ROOT)/bin/libs directory. The following LDFLAGS tell the linker to
# add a runtime path to search for those shared libraries, since they aren't
# add a runtime path to search for those shared libraries, since they aren't
# incorporated directly into the final executable application binary.
# TODO: should this be a default setting?
# PROJECT_LDFLAGS=-Wl,-rpath=./libs

################################################################################
# PROJECT DEFINES
# Create a space-delimited list of DEFINES. The list will be converted into
# Create a space-delimited list of DEFINES. The list will be converted into
# CFLAGS with the "-D" flag later in the makefile.
#
# (default) PROJECT_DEFINES = (blank)
#
# Note: Leave a leading space when adding list items with the += operator
################################################################################
# PROJECT_DEFINES =
# PROJECT_DEFINES =

################################################################################
# PROJECT CFLAGS
# This is a list of fully qualified CFLAGS required when compiling for this
# project. These CFLAGS will be used IN ADDITION TO the PLATFORM_CFLAGS
# This is a list of fully qualified CFLAGS required when compiling for this
# project. These CFLAGS will be used IN ADDITION TO the PLATFORM_CFLAGS
# defined in your platform specific core configuration files. These flags are
# presented to the compiler BEFORE the PROJECT_OPTIMIZATION_CFLAGS below.
# presented to the compiler BEFORE the PROJECT_OPTIMIZATION_CFLAGS below.
#
# (default) PROJECT_CFLAGS = (blank)
#
# Note: Before adding PROJECT_CFLAGS, note that the PLATFORM_CFLAGS defined in
# your platform specific configuration file will be applied by default and
# Note: Before adding PROJECT_CFLAGS, note that the PLATFORM_CFLAGS defined in
# your platform specific configuration file will be applied by default and
# further flags here may not be needed.
#
# Note: Leave a leading space when adding list items with the += operator
################################################################################
# PROJECT_CFLAGS =
# PROJECT_CFLAGS =

################################################################################
# PROJECT OPTIMIZATION CFLAGS
# These are lists of CFLAGS that are target-specific. While any flags could
# be conditionally added, they are usually limited to optimization flags.
# These are lists of CFLAGS that are target-specific. While any flags could
# be conditionally added, they are usually limited to optimization flags.
# These flags are added BEFORE the PROJECT_CFLAGS.
#
# PROJECT_OPTIMIZATION_CFLAGS_RELEASE flags are only applied to RELEASE targets.
Expand All @@ -124,15 +124,15 @@ PROJECT_AFTER_OSX="if test -f \"$TARGET_BUILD_DIR/projectGenerator\"; then rm \"
#
# (default) PROJECT_OPTIMIZATION_CFLAGS_DEBUG = (blank)
#
# Note: Before adding PROJECT_OPTIMIZATION_CFLAGS, please note that the
# PLATFORM_OPTIMIZATION_CFLAGS defined in your platform specific configuration
# file will be applied by default and further optimization flags here may not
# Note: Before adding PROJECT_OPTIMIZATION_CFLAGS, please note that the
# PLATFORM_OPTIMIZATION_CFLAGS defined in your platform specific configuration
# file will be applied by default and further optimization flags here may not
# be needed.
#
# Note: Leave a leading space when adding list items with the += operator
################################################################################
PROJECT_OPTIMIZATION_CFLAGS_RELEASE = -O3
# PROJECT_OPTIMIZATION_CFLAGS_DEBUG =
# PROJECT_OPTIMIZATION_CFLAGS_DEBUG =

################################################################################
# PROJECT COMPILERS
Expand All @@ -141,8 +141,8 @@ PROJECT_OPTIMIZATION_CFLAGS_RELEASE = -O3
# (default) PROJECT_CC = (blank)
# Note: Leave a leading space when adding list items with the += operator
################################################################################
# PROJECT_CXX =
# PROJECT_CC =
# PROJECT_CXX =
# PROJECT_CC =


#PLATFORM_CORE_EXCLUSIONS += ../../../libs/openFrameworks/utils
Expand Down Expand Up @@ -179,11 +179,3 @@ PLATFORM_CORE_EXCLUSIONS += ../../../libs/fmod%

# inside ofImage inside ofUtils
#PLATFORM_CORE_EXCLUSIONS += ../../../libs/uriparser%

export OF_NO_FMOD=1
export USER_PREPROCESSOR_DEFINITIONS="OF_NO_FMOD=1"
export LIB_FMOD=""

# Uncomment/comment below to switch between C++11 and C++17 ( or newer ). On macOS C++17 needs 10.15 or above.
export MAC_OS_MIN_VERSION = 10.15
export MAC_OS_CPP_VER = -std=c++17
9 changes: 7 additions & 2 deletions commandLine/src/addons/ofAddon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -886,7 +886,7 @@ bool ofAddon::load(string addonName, const fs::path& projectDir, const string& t
// we want to set addonMakeName before cleaning the addon name, so it is preserved in the exact same way as it was passed, and the addons.make file can be (re)constructed properly
this->addonMakeName = addonName;

addonName = cleanName(addonName);
// addonName = cleanName(addonName);

if(addonName.empty()){
ofLogError("baseProject::addAddon") << "cant add addon with empty name";
Expand All @@ -899,7 +899,12 @@ bool ofAddon::load(string addonName, const fs::path& projectDir, const string& t
//A local addon is not restricted to one that lives in folder with the name local_addons, should be any valid addon on the filesystem.
//Parsing will generate the correct path to both OF and the project.
//Everything else should be treated exactly in the same way, regardless of it being local or not.
if(addonName[0] == '.' && fs::exists( ofFilePath::join(projectDir, addonName))){

fs::path localAddon { addonName };

if (localAddon.has_parent_path() && fs::exists(projectDir / addonName)) {

// if(addonName[0] == '.' && fs::exists( ofFilePath::join(projectDir, addonName))){

this->addonPath = normalizePath(ofFilePath::join(projectDir, addonName));
this->isLocalAddon = true;
Expand Down
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 "86"
#define OFPROJECTGENERATOR_MINOR_VERSION "88"
#define OFPROJECTGENERATOR_PATCH_VERSION "0"

#define PG_VERSION (OFPROJECTGENERATOR_MAJOR_VERSION "." OFPROJECTGENERATOR_MINOR_VERSION "." OFPROJECTGENERATOR_PATCH_VERSION)
Expand Down
1 change: 0 additions & 1 deletion commandLine/src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,6 @@ void recursiveUpdate(const fs::path & path, const string & target) {
}
}

fs::current_path(path);
updateProject(path, target, false);
}
}
Expand Down
13 changes: 9 additions & 4 deletions commandLine/src/projects/baseProject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -220,10 +220,14 @@ bool baseProject::create(const fs::path & _path, string templateName){

// CWD is already on projectDir. so with this we get relative paths
getFilesRecursively("src", fileNames);

std::sort(fileNames.begin(), fileNames.end(), [](const fs::path & a, const fs::path & b) {
return a.string() < b.string();
});

// FIXME: I think we should remove this logic and remove the files from default project.
// only the files present are added to the project

for (const auto & f : fileNames) {
if (f != "src/ofApp.cpp" &&
f != "src/ofApp.h" &&
Expand Down Expand Up @@ -302,12 +306,13 @@ bool baseProject::isAddonInCache(const string & addonPath, const string platform
return addonsCache[platform].find(addonPath) != addonsCache[platform].end();
}

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

auto addonName = ofAddon::cleanName(_addonName);

// auto addonName = ofAddon::cleanName(_addonName);
auto addonName = _addonName;


// FIXME : not target, yes platform.
//#ifdef TARGET_WIN32
Expand Down
4 changes: 2 additions & 2 deletions commandLine/src/projects/visualStudioProject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -214,8 +214,7 @@ void visualStudioProject::appendFilter(string folderName){


void visualStudioProject::addSrc(const fs::path & srcFile, const fs::path & folder, SrcType type){
// alert("addSrc file: " + srcFile.string(), 35);
// alert("addSrc folder: " + folder.string(), 35);
// alert("addSrc file: " + srcFile.string() + " folder: " + folder.string(), 35);

// I had an empty ClCompile field causing errors
if (srcFile.empty()) {
Expand All @@ -239,6 +238,7 @@ void visualStudioProject::addSrc(const fs::path & srcFile, const fs::path & fold
for (std::size_t i = 0; i < folderSubNames.size(); i++){
if (i != 0) folderName += "\\";
folderName += folderSubNames[i];
// alert("appendFilter: " + folderName, 34);
appendFilter(folderName);
}

Expand Down
Loading
Loading