Projucer

class juce.projucer.Projucer(path=None)

Represents a controller to the Projucer executable.

Parameters:path – Optional path to search for Projucer. Default is $PATH
Raises:OSError: On construction, if exe was not found.
EXE_NAME = 'Projucer'
build_all_modules(target_folder, module_folder)

Zips all modules in a given folder and creates an index for them.

Parameters:
  • target_folder – Target path.
  • module_folder – Module path.
build_module(target_folder, module_folder)

Zips a module into a downloadable file format.

Parameters:
  • target_folder – Target path.
  • module_folder – Module path.
bump_version(project)

Updates the minor version number in a project by 1.

Parameters:project – Path to .jucer file.
create_project_from_pip(path_to_pip, path_to_output, juce_modules=None, user_modules=None)

Generates a folder containing a JUCE project in the specified output path using the specified PIP file. Use the optional JUCE and user module paths to override the global module paths.

Parameters:
  • path_to_pip – Path to pip file.
  • path_to_output – Path to project output.
  • juce_modules – Path to JUCE modules.
  • user_modules – Path to user modules.
encode_binary(source_binary_file, target_cpp_file)

Converts a binary file to a C++ file containing its contents as a block of data. Provide a .h file as the target if you want a single output file, or a .cpp file if you want a pair of .h/.cpp files.

Parameters:
  • source_binary_file – Binary file to encode.
  • target_cpp_file – Encoded cpp file.
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.

Parameters:target_folder – Fix target path.
get_version(project)

Returns the version number of a project.

Parameters:project – Path to .jucer file.
git_tag_version(project)

Invokes ‘git tag’ to attach the project’s version number to the current git repository.

Parameters:project – Path to .jucer file.
obfuscated_string_code(string_to_obfuscate)

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

Parameters:string_to_obfuscate
remove_tabs(target_folder)

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

Parameters:target_folder – Trim target path.
resave(project)

Resaves all files and resources in a project, to generate build files.

Parameters:project – Path to .jucer file.
resave_resources(project)

Resaves just the binary resources for a project.

Parameters:project – Path to .jucer file.
set_global_search_path(os_system, identifier_to_set, new_path)

Sets the global path for a specified os and identifier. The os should be either osx, windows or linux and the identifiers can be any of the following: defaultJuceModulePath, defaultUserModulePath, vst3Path, vstLegacyPath, aaxPath (not valid on linux), rtasPath (not valid on linux), androidSDKPath or androidNDKPath.

Parameters:
  • os_system – osx, windows or linux.
  • identifier_to_set
  • new_path – New search path.
set_version(project, version)

Updates the version number in a project.

Parameters:
  • project – Path to .jucer file.
  • version – New version string.
status(project)

Displays status info about the Projucer project

Parameters:project – Path to .jucer file.
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).

Parameters:target_folder – Tidy target path.
trans(*target_folder)

Scans each of the given folders (recursively) for any NEEDS_TRANS macros, and generates a translation file that can be used with Projucer’s translation file builder.

Parameters:target_folder – Variatic number of folder paths.
trans_finish(pre_translated_file, post_translated_file, optional_existing_translation_file=None)

Creates a completed translations mapping file, that can be used to initialise a LocalisedStrings object. This allows you to localise the strings in your project.

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.

Parameters:target_folder – Trim target path.
which

Path to Projucer executable