HISE Logo Forum
    • Categories
    • Register
    • Login

    Is Extra Preprocessor Definitions in Projucer the Great Override?

    Scheduled Pinned Locked Moved General Questions
    4 Posts 2 Posters 339 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • A
      aaronventure
      last edited by

      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?

      Christoph HartC 1 Reply Last reply Reply Quote 0
      • Christoph HartC
        Christoph Hart @aaronventure
        last edited by

        @aaronventure Yes.

        A 1 Reply Last reply Reply Quote 1
        • A
          aaronventure @Christoph Hart
          last edited by

          @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
          
          A 1 Reply Last reply Reply Quote 0
          • A
            aaronventure @aaronventure
            last edited by aaronventure

            @aaronventure

            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.

            1 Reply Last reply Reply Quote 1
            • First post
              Last post

            24

            Online

            1.7k

            Users

            11.9k

            Topics

            103.7k

            Posts