openframeworks / openFrameworks

openFrameworks is a community-developed cross platform toolkit for creative coding in C++.
http://openframeworks.cc
Other
9.97k stars 2.55k forks source link

unwanted command line args passed to the app from xcode #6687

Closed thomasgeissl closed 3 years ago

thomasgeissl commented 3 years ago

Heyho, xcode passes some commandline args to the app.

int main(int argc, char *argv[])
{
    ofLogNotice() << "argc: " << argc;
    for(int i = 0; i < argc; ++i)
        cout << argv[i] << '\n';
}
[notice ] argc: 3
/Users/thomas.geissl/libs/of_v0.11.0_osx_release/apps/ixds/approccio/bin/approccioDebug.app/Contents/MacOS/approccioDebug
-NSDocumentRevisionsDebugMode
YES

how are the project files generated, is it based on a template that can easily be replaced?

It can be fixed by unchecking xcode/product/scheme/edit scheme/Run/Options/Allow debugging when browsing versions

https://forum.openframeworks.cc/t/automatically-added-command-line-args-in-xcode/35479

I am using: Version 12.2 (12B45b)

Thomas

ofTheo commented 3 years ago

Actually is pretty easy I think. Just change all instances of this to NO: https://github.com/openframeworks/openFrameworks/blob/patch-release/scripts/templates/osx/emptyExample.xcodeproj/xcshareddata/xcschemes/emptyExample%20Release.xcscheme#L49

In these three files: https://github.com/openframeworks/openFrameworks/tree/patch-release/scripts/templates/osx/emptyExample.xcodeproj/xcshareddata/xcschemes

thomasgeissl commented 3 years ago

thanks theo. do you want me to send a pr against master or patch-release?

ofTheo commented 3 years ago

I think Patch Release. That will be 0.11.1 Thanks @thomasgeissl !