MacOS specific properties

March 14, 2023 · View on GitHub

<macConfig>

    <!-- general properties -->
    <appId>app unique identifier</appId>
    <icnsFile>path/to/icon.icns</icnsFile>
    <generateDmg>true|false</generateDmg>
    <generatePkg>true|false</generatePkg>
    <relocateJar>true|false</relocateJar>
    <macStartup>SCRIPT|UNIVERSAL|X86_64|ARM64</macStartup>

    <!-- signing properties -->
    <developerId>singning identity</developerId>
    <entitlements>path/to/entitlements.plist</entitlements>
    <codesignApp>true|false</codesignApp>
    <hardenedCodesign>true|false</hardenedCodesign>
    <notarizeApp>true|false</notarizeApp>
    <keyChainProfile>xcrun_notarytool_profile_name</keyChainProfile>

    <!-- properties used for DMG disk image generation -->
    <backgroundImage>path/to/png</backgroundImage>
    <windowX>x</windowX>
    <windowY>y</windowY>
    <windowWidth>width</windowWidth>
    <windowHeight>height</windowHeight>
    <iconSize>size</iconSize>
    <textSize>size</textSize>
    <iconX>x</iconX>
    <iconY>y</iconY>
    <appsLinkIconX>x</appsLinkIconX>
    <appsLinkIconY>y</appsLinkIconY>
    <volumeIcon>path/to/icns</volumeIcon>
    <volumeName>${name}</volumeName>

    <!-- properties used for Info.plist file generation -->
    <infoPlist>
        <bundlePackageType>BNDL|APPL|FMWK</bundlePackageType>
        <additionalEntries>
            <![CDATA[
                <key>ThisIsABoolean</key>
                <true/>
                <key>ThisIsAString</key>
                <string>value</string>
                [...]
            ]]>
        </addtionalEntries>
    </infoPlist>

</macConfig>
PropertyMandatoryDefault valueDescription
icnsFile:x:ICNS format icon file.*
generateDmg:x:trueEnables DMG disk image file generation.
generatePkg:x:trueEnables installation package generation.
relocateJar:x:trueIf true, Jar files are located in Contents/Resources/Java folder, otherwise they are located in Contents/Resources folder.
appId:x:${mainClass}App unique identifier.

* You can use MacICNS to convert your PNG icon file to ICNS.

Signing properties

PropertyMandatoryDefault valueDescription
developerId:x:Signing identity.
entitlements:x:Path to entitlements file.
codesignApp:x:trueIf it is set to false, generated app will not be codesigned.
hardenedCodesign:x:trueIf it is set to true, enable hardened runtime if MacOS version >= 10.13.6.
notarizeApp:x:falseIf it is set to true, generated app will be submitted to apple for notarization and the ticket will be stapled.
keyChainProfile:x:Profile name originally provided to xcrun notarytool store-credentials. Must be set if notarizeApp is true.
macStartup:x:SCRIPTApp startup type, using a SCRIPT or a binary (compiled version of the script: UNIVERSAL, X86_64 or ARM64).

DMG generation properties

PropertyMandatoryDefault valueDescription
backgroundImage:x:classpath:/mac/background.pngDMG background image.
windowX:x:10X coordinate of DMG window.
windowY:x:50Y coordinate of DMG window.
windowWidth:x:540Width of DMG window.
windowHeight:x:360Height of DMG window.
iconSize:x:128DMG icons size.
textSize:x:16DMG text size.
iconX:x:52X coordinate of bundled app icon. Relative to DMG window.
iconY:x:116Y coordinate of bundled app icon. Relative to DMG window.
appsLinkIconX:x:360X coordinate of Applications link. Relative to DMG window.
appsLinkIconY:x:116Y coordinate of Applications link. Relative to DMG window.
volumeIcon:x:${icon}Bundled app icon in ICNS format.
volumeName:x:${displayName}Volume name (:warning: whitespaces are removed).

DMG properties explained

Info.plist generation properties

PropertyMandatoryDefault valueDescription
bundlePackageType:x:BNDLBundle package type: BNDL, APPL, FMWK.
additionalEntries:x:""String with Info.plistadditional entries.