Skip to content

Fix cmdLine placing projects into oF root with certain params - #693

Merged
danoli3 merged 2 commits into
openframeworks:masterfrom
danoli3:cli-separate-option-values
Oct 31, 2026
Merged

danoli3 merged 2 commits into
openframeworks:masterfrom
danoli3:cli-separate-option-values

Conversation

@danoli3

@danoli3 danoli3 commented Oct 31, 2026 •

Copy link
Copy Markdown
Member

Updated cmdLine from 0.119.0 to 0.120.0 and PG GUI from 0.113.0 to 0.114.0

Every option uses option::Arg::Optional, which only takes an attached value (-posx, --platforms=osx). With a space the value was left as a non-option and the first non-option became the project path, so PG silently made a project in the wrong place (EXIT_OK) and didn't touch the named one:

./projectGenerator -o .. -p osx -f sqlite3 ../apps/myApps/myApp           # project at the OF root
./projectGenerator --frameworks sqlite3 --platforms osx /path/to/myApp    # apps/myApps/sqlite3
./projectGenerator --platforms osx --frameworks sqlite3 /path/to/myApp    # apps/myApps/osx
  • -p osx / --platforms osx (and the other value options) are joined before parsing, except the last argument, which stays the project path (-f <path> is still an empty -f); attached forms are unchanged
  • more than one project path, or the openFrameworks folder itself as the project, now fail with EXIT_USAGE instead of generating
  • --help showed --cleanname, -f, its flag is -n

Before / after, against an existing apps/myApps/myApp:

before this PR
-o .. -p osx -f libsqlite3 path project at OF root, myApp not updated myApp updated, PROJECT_SYSTEM_LIBS = sqlite3
--frameworks Security --platforms osx path not updated updated, PROJECT_FRAMEWORKS = Security
--platforms osx --frameworks Security path not updated updated
-o /abs -p osx -f Security /abs/path project at OF root updated
-D A=1 -p osx --system-libs sqlite3 path not updated updated, PROJECT_DEFINES = A=1
-posx -fSecurity path, --platforms=osx --system-libs=sqlite3, -posx -f path, path only ok ok
OF folder as the path project at OF root, exit 0 exit 64
two paths first one used, exit 0 exit 64

(sqlite3 isn't a framework: --system-libs sqlite3 or -f libsqlite3, from #690.)

@danoli3 danoli3 changed the title CLI: take option values given as -p osx / --platforms osx, fail on two project paths or the OF folder as the project Fix cmdLine placing projects into oF root with certain params Oct 31, 2026
@danoli3
danoli3 force-pushed the cli-separate-option-values branch from 2b99e8a to e7bee02 Compare October 31, 2026 03:49
@danoli3
danoli3 merged commit 1133086 into openframeworks:master Oct 31, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant