ConsoleApplication argument parsing for GUI Application?

Is there a way to get all the new command argument parsing stuff of the ConsoleApplication to a normal GUI Application ? I know i could use JUCEApplication::getCommandLineParameterArray() but the console application have a lot of goodies that i would like to profit (like type checks and the like).

Any way to workaround that ? Is it possible to instantiate a ConsoleApplication and collect the arguments and then launch a normal JUCE Gui Application ?

Nice, I wasn’t aware of that class! I wrote something similar just a year before that was added, that I can get rid of now.

Seems to me, it is not related with the JUCEApplication, so it should be easy to mix.

I would remove the START_JUCE_APPLICATION macro from the boilerplate and write my own main().
It could then, when no command to execute was found, start the GUI app as normal.

yeah, it’s not related, but i was expecting it could be prettier from an API standpoint (juce is awesome, right?) to receive console arguments directly inside the normal JUCE Application initialisation function, to not need to write a compatible main (WinMain anyone?) ourselves.

Yes, +1 for not writing from scratch.
Maybe creating a way to supply a ConsoleApplication to the macro? Would be a good feature request IMHO.

for what i needed ArgumentList worked ok, but there the API could be improved imho (suppliying ArgumentList to Application::initialise, or something on the line)