Command line options

I know the Projucer can be run from the command line, I just can’t seem to find any info on how to do it. I’d like to know how I can load a project and generate the appropriate makefiles, all without having to launch the Projucer GUI. Is this possible?

2 Likes

On the Mac you can just cd to Projucer.app/Contents/MacOS and run the command:

./Projucer --help

You get this (which works even if the GUI version is running):

Projucer

Usage: 

 Projucer --resave project_file
    Resaves all files and resources in a project.

 Projucer --resave-resources project_file
    Resaves just the binary resources for a project.

 Projucer --get-version project_file
    Returns the version number of a project.

 Projucer --set-version version_number project_file
    Updates the version number in a project.

 Projucer --bump-version project_file
    Updates the minor version number in a project by 1.

 Projucer --git-tag-version project_file
    Invokes 'git tag' to attach the project's version number to the current git repository.

 Projucer --status project_file
    Displays information about a project.

 Projucer --buildmodule target_folder module_folder
    Zips a module into a downloadable file format.

 Projucer --buildallmodules target_folder module_folder
    Zips all modules in a given folder and creates an index for them.

 Projucer --trim-whitespace target_folder
    Scans the given folder for C/C++ source files (recursively), and trims any trailing whitespace from their lines, as well as normalising their line-endings to CR-LF.

 Projucer --remove-tabs target_folder
    Scans the given folder for C/C++ source files (recursively), and replaces any tab characters with 4 spaces.

 Projucer --tidy-divider-comments target_folder
    Scans the given folder for C/C++ source files (recursively), and normalises any juce-style comment division lines (i.e. any lines that look like //===== or //------- or /////////// will be replaced).

 Projucer --fix-broken-include-paths target_folder
    Scans the given folder for C/C++ source files (recursively). Where a file contains an #include of one of the other filenames, it changes it to use the optimum relative path. Helpful for auto-fixing includes when re-arranging files and folders in a project.

 Projucer --obfuscated-string-code string_to_obfuscate
    Generates a C++ function which returns the given string, but in an obfuscated way.

To do what you’re after you want the Projucer --resave command.

I don’t have access to my PC right now but I’m pretty sure it works the same there where you invoke Projucer.exe at the command prompt using the same argument format as above.

9 Likes

Thanks martin. That should do it!

Is there a way to boostrap juce projects with the cli? Like, if I am working from emacs or vim, can I achieve the same things as with the GUI?

I’d strongly recommend the cmake version, in case you are not aware:

1 Like

yes thanks, another guy just replied this to me. very helpful! I was unsure of how to get started at first but now things are starting to make sense. Thanks!