Skip to content

Commit 094c01b

Browse files
committed
cleanname resolutions
1 parent 6747851 commit 094c01b

File tree

4 files changed

+20
-5
lines changed

4 files changed

+20
-5
lines changed

commandLine/src/addons/ofAddon.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -885,7 +885,9 @@ bool ofAddon::load(string addonName, const fs::path& projectDir, const string& t
885885
// 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
886886
this->addonMakeName = addonName;
887887

888-
// addonName = cleanName(addonName);
888+
if(parseCleanName){
889+
addonName = cleanName(addonName);
890+
}
889891

890892
if(addonName.empty()){
891893
ofLogError("baseProject::addAddon") << "cant add addon with empty name";

commandLine/src/main.cpp

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ enum optionIndex { UNKNOWN,
2828
GET_HOST_PLATFORM,
2929
COMMAND,
3030
BACKUP_PROJECT_FILES,
31-
FRAMEWORKS
31+
FRAMEWORKS,
32+
CLEANNAME_DISABLE
3233
};
3334

3435
constexpr option::Descriptor usage[] = {
@@ -50,6 +51,8 @@ constexpr option::Descriptor usage[] = {
5051
{ BACKUP_PROJECT_FILES, 0, "b", "backup", option::Arg::None, " --backup, -b \tbackup project files when replacing with template" },
5152

5253
{ FRAMEWORKS, 0, "f", "frameworks", option::Arg::Optional, " --frameworks, -f \tframeworks list (such as Vision,ARKit)" },
54+
55+
{ CLEANNAME_DISABLE, 0, "n", "cleanname", option::Arg::Optional, " --cleanname, -f \tcleanname" },
5356

5457
{ 0, 0, 0, 0, 0, 0 }
5558
};
@@ -90,6 +93,7 @@ bool bHelpRequested; // did we request help?
9093
bool bListTemplates; // did we request help?
9194
bool bDryRun; // do dry run (useful for debugging recursive update)
9295
bool bBackup;
96+
bool bCleanName = true;
9397

9498
void consoleSpace() {
9599
std::cout << std::endl;
@@ -462,6 +466,11 @@ int main(int argc, char ** argv) {
462466
if (options[DRYRUN].count() > 0) {
463467
bDryRun = true;
464468
}
469+
470+
if (options[CLEANNAME_DISABLE].count() > 0) {
471+
bCleanName = false;
472+
}
473+
parseCleanName = bCleanName;
465474

466475
if (options[VERSION].count() > 0) {
467476
printVersion();

commandLine/src/projects/baseProject.cpp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -310,9 +310,12 @@ void baseProject::addAddon(const std::string & _addonName){
310310
ofLogVerbose("baseProject::addAddon") << _addonName;
311311
// alert( "baseProject::addAddon " + _addonName );
312312

313-
// auto addonName = ofAddon::cleanName(_addonName);
314-
auto addonName = _addonName;
315-
313+
std::string addonName;
314+
if(parseCleanName){
315+
addonName = ofAddon::cleanName(_addonName);
316+
} else {
317+
addonName = _addonName;
318+
}
316319

317320
// FIXME : not target, yes platform.
318321
//#ifdef TARGET_WIN32

commandLine/src/utils/Utils.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ using std::cout;
2626
using std::endl;
2727

2828
static bool backupProjectFiles = false;
29+
static bool parseCleanName = true;
2930

3031
static std::map <ofTargetPlatform, std::string> platformsToString {
3132
{ OF_TARGET_ANDROID, "android" },

0 commit comments

Comments
 (0)