How projectGenerator create a project for pure command line developing?

Hello, I’m a newbie.
I installed a copy of linuxaarch64 on my Android phone, via termux + proot linux(fedora).
I have built ‘of’ and ‘pg’ successfully, and can run the examples ok via TigerVNC.

And then, I want to create a new project of my own.
I did this on my Macbook by using projectGenerator’s GUI version, and it worked fine(in XCode 13.2.1).
But when I create the new project by using projectGenerator command line, I got failed.

Below is the input and output of projectGenerator on my phone(the project name is noiseApp):

[root@localhost ~]# projectGenerator ~/of_v20230614_linuxaarch64_release/apps/myApps/noiseApp
[notice ] PG v001

[notice ] -----------------------------------------------
[notice ] setting OF path to: “/root/of_v20230614_linuxaarch64_release”
[notice ] from PG_OF_PATH environment variable
[notice ] target platform is: linuxaarch64
[notice ] project path is: “/root/of_v20230614_linuxaarch64_release/apps/myApps/noiseApp”
[notice ] setting up new project “/root/of_v20230614_linuxaarch64_release/apps/myApps/noiseApp”
[ error ] ofDirectory: copyTo(): source directory does not exist
[ error ] ofDirectory: copyTo(): source directory does not exist
[ error ] ofFile: copyTo(): source file /root/of_v20230614_linuxaarch64_release/scripts/templates/linuxaarch64/qtcreator.qbs does not exist
[ error ] QtCreatorProject: error copying qbs template from /root/of_v20230614_linuxaarch64_release/scripts/templates/linuxaarch64/qtcreator.qbs to /root/of_v20230614_linuxaarch64_release/apps/myApps/noiseApp/noiseApp.qbs
[notice ] saving addons.make
[notice ] project created!
[notice ] -----------------------------------------------

1 project created [notice ] in 0.0428514 seconds

The above information shows the PG tried to create a project of QtCreator, and because I haven’t installed QtCreator, it couldn’t copy the necessary files.

I just want to create a simple project, and develop it under command line, in vim and make, and make run in VNC. I don’t use IDE on linux.

I guess the argument I transferred to PG is not enough, such as platforms, should be specified to something representing ‘command line’?

So far, I copied the ‘emptyExample’ project to ‘noiseApp’ in myApps, along with the linuxaarch64 gz file. and found it is the thing I need. Then I finished the project at last.

But would you please to give me some information about the projectGenerator’s usage, so that it can generate a project which is adapted for pure command line development?

Thanks!

Hi @zhang_411 , would not using the PG be an option? You can make a new OF project by a copy/paste of the emptyExample project (in /apps/myApps/) into a new folder. Addons can be added to addons.make.

Hi @TimChi, yes, I did exactly as you suggested. Thank you. :grinning:

1 Like

I think you only have to pass -o option to the openFrameworks path.
As it is confusing to me if the OF path is relative to the project or to the CWD, I usually invoke it from the directory I want to generate the project like this

cd $ofw/apps/WerkApps/EmptyUIScenes
../../../apps/pgd/commandLine/bin/projectGenerator -o"../../../" .

1 Like

@ dimitre , thanks for your suggestion. I’ve tried it and I found I’ve set the PG_OF_PATH env already, so I could leave out the ‘-o’ option, and then the command is same as yours.
And I got the same output as my first post. There are only 2 files generated in the generated project directory:
addons.make
noiseApp.qbs

BR.