Is Extra Preprocessor Definitions in Projucer the Great Override?
-
Does it override the modules as well? For example, if I set JUCE_ENABLE_AUDIO_GUARD=1 in the preprocessor definitions, does it override the setting in the juce_core module?
-
@aaronventure Yes.
-
@Christoph-Hart Can I override other stuff from the source, e.g. NUM_MAX_CHANNELS, NUM_POLYPHONIC_VOICES ?
I build HISE from CLI using a script, can I somehow pass these there so I don't have to edit it every time the jucer file gets updated?
I know I can do it for compiling a plugin, what about HISE itself?
#!/bin/bash script_dir="$(dirname "${BASH_SOURCE[0]}")" hise_source="$script_dir/../HISE Source" projucer_path=$hise_source/tools/projucer/Projucer.app/Contents/MacOS/Projucer # Build HISE "$projucer_path" --resave "$hise_source"/projects/standalone/HISE\ Standalone.jucer cd "$hise_source"/projects/standalone/Builds/MacOSX xcodebuild -project "HISE Standalone.xcodeproj" -configuration Release -jobs 16 | xcpretty
-
Fuck yeah I got it.
Goodbye, Projucer.
#!/bin/bash script_dir="$(dirname "${BASH_SOURCE[0]}")" hise_source="$script_dir/../HISE Source" projucer_path="$hise_source/tools/projucer/Projucer.app/Contents/MacOS/Projucer" # Define your preprocessor macros PREPROCESSOR_DEFINITIONS=( "JUCE_DISPLAY_SPLASH_SCREEN=0" "JUCE_ENABLE_AUDIO_GUARD=1" "JUCE_USE_BETTER_MACHINE_IDS=1" ) # Join the preprocessor definitions with spaces PREPROCESSOR_DEFINITIONS_STRING=$(IFS=' '; echo "${PREPROCESSOR_DEFINITIONS[*]}") # Build HISE "$projucer_path" --resave "$hise_source/projects/standalone/HISE Standalone.jucer" cd "$hise_source/projects/standalone/Builds/MacOSX" xcodebuild -project "HISE Standalone.xcodeproj" -configuration Release -jobs 16 GCC_PREPROCESSOR_DEFINITIONS="$PREPROCESSOR_DEFINITIONS_STRING" | xcpretty
EDIT:
I found this to not be so stable and HISE would sometimes act weird, so in the end I wrote a batch script that edited the default .jucer file to put the preprocessor definitions in the correct place in the xml.