Forum
    • Categories
    • Register
    • Login

    AU component version is always 0 in exported plugins (Xcode exporter misses versionAsHex)

    Scheduled Pinned Locked Moved Bug Reports
    1 Posts 1 Posters 5 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.
    • dannytaurusD
      dannytaurus
      last edited by dannytaurus

      Every AU exported from HISE on macOS registers with a component version of 0.0.0, regardless of the project version. The bundle version fields are correct, so this only shows up when a host or validator reads the AudioComponents registration.

      Repro

      Export any project as AU on macOS, then look at Binaries/Builds/MacOSX/Info-AU.plist:

      <key>AudioComponents</key>
      <array>
        <dict>
          ...
          <key>subtype</key>
          <string>Mbsf</string>
          <key>version</key>
          <integer>0</integer>   <!-- always 0 -->
        </dict>
      </array>
      ...
      <key>CFBundleShortVersionString</key>
      <string>0.0.30</string>    <!-- correct -->
      <key>CFBundleVersion</key>
      <string>0.0.30</string>    <!-- correct -->
      

      I see this on a 0.0.30 project and on two untouched 1.0.0 test projects, so it is not version-string specific.

      pluginval reports the plugin as version 0.0.0 as a result. That is JUCE's own AU format reading it back: juce_AudioUnitPluginFormat.mm calls AudioComponentGetVersion, which returns the value from that plist entry.

      Cause

      In JUCE/extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_Xcode.h, writeInfoPlistFile() sets options.version (around line 1839) but never sets options.versionAsHex. That member defaults to 0 in juce_PlistOptions.h, and juce_PlistOptions.cpp writes it straight into the AudioComponents dict:

      addPlistDictionaryKey (*dict, "version", versionAsHex);
      

      The Mac Makefile exporter does set it (jucer_ProjectExport_MacMake.h: options.versionAsHex = project.getVersionAsHexInteger();), so the Xcode path is the only one affected, and that is the path HISE uses for macOS export.

      Fix

      One line next to the existing options.version assignment in the Xcode exporter:

      options.versionAsHex = owner.project.getVersionAsHexInteger();
      

      Since HISE 5 ships a prebuilt Projucer in the JUCE submodule, this needs a Projucer rebuild to reach users, not just the source change.

      Impact

      Fairly mild but worth fixing. The compiled binary is fine: JucePlugin_VersionCode is set correctly from getVersionAsHex(), so the AU wrapper's Version() returns the right value at runtime and the plugin loads and works normally. What breaks is the registration metadata:

      • Hosts display the plugin as version 0.0.0.
      • AU caches keyed on component version never invalidate across releases, so users updating a plugin may need to clear their AU cache manually before macOS notices anything changed.

      Workaround

      Until the exporter is fixed you can patch the value per build, but note where: Info-AU.plist is written by the Projucer --resave step inside batchCompileOSX, not by the HISE export, so editing it straight after exporting gets overwritten.

      The AU component version is the project version packed as major * 65536 + minor * 256 + patch written as a decimal integer, so 0.0.30 becomes 30 and 1.2.3 becomes 66051.

      Set it with /usr/libexec/PlistBuddy -c "Set :AudioComponents:0:version 30" "Binaries/Builds/MacOSX/Info-AU.plist" after the resave, then build the .xcodeproj in Xcode.

      If you drive the build from a script, insert that command into your copy of batchCompileOSX between the --resave line and the xcodebuild line.

      Tested against the JUCE 6.1.3 submodule on macOS.

      HISE dev latest / super.engineering + Claude Fable / Figma + Affinity
      Meat Beats: https://meatbeats.com
      Klippr Video: https://klippr.video

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

      13

      Online

      2.5k

      Users

      13.9k

      Topics

      121.4k

      Posts