projectGenerator icon indicating copy to clipboard operation
projectGenerator copied to clipboard

Structure question - Commandline

Open HalfdanJ opened this issue 9 years ago • 5 comments

I'm not able to really understand the structure, is it the thought that the commandline app is accessible on all platforms (osx/linux/win) in releases? I'm looking at how i could use the commandline for some automation, and wonder if I can use it on all the platforms, and what path is should use.

Would be great if I always could say something like of_path/projectGenerator/projectGeneratorCLI(.exe) on all platforms.

HalfdanJ avatar Apr 17 '16 11:04 HalfdanJ

The commandLinePG works on Mac & Linux, Windows too as far as I know and is used by the frontend PG. If you enable "advanced options" the success dialog shows the command that was used to trigger the commandLinePG: (command used: [...]). There's a dedicated readme.md on GitHub and the --help flag should be implemented too (but might be a little out of date).

Anyways, you should be able to write shell scripts for automation on Windows, Mac & Linux. Arturo has been using it for automation using some build-in recursive functions.

Daandelange avatar Apr 17 '16 13:04 Daandelange

thanks for the info @Daandelange. couple of other points:

  • on linux the command line tool comes uncompiled and as part of a script is compiled and installed globally so it's accessible anywhere but on windows and osx it comes compiled and lives somewhere in the gui app (on osx, you can "explore package contents" on the gui app to see what it has).
  • there are some advanced things the command line tool offers that the gui doesn't such as templates
  • another advanced thing to know if you are using the command line tool is the env variable for specifying the root OF path (otherwise you have to specify this every time you use the tool) -- if you alias the binary on osx and also add this env variable, you can make the command line tool very powerful

ofZach avatar Apr 17 '16 13:04 ofZach

Thanks for the clarification. Is it just me, or wouldn't it be great if the commandline app, was more presently a thing you could use in the project generator folder? It seems right now like a secret internal only tool, but i would say its actually useful for much more then advanced internals, just as a shortcut instead of the gui project generator. I know the electron app needs it embedded, but in the release it could be copied out.

HalfdanJ avatar Apr 17 '16 14:04 HalfdanJ

I am supportive of this -- I think this issue is similar to what you are suggesting?

https://github.com/openframeworks/projectGenerator/issues/67

the only thing is the specifics of linux which kind of necessitate it being installed in a different way.

ofZach avatar Apr 17 '16 14:04 ofZach

In linux is already installed and instructions given to the user when it's installed so we shouldn't need to do anything else there

arturoc avatar Apr 17 '16 19:04 arturoc