Description
I am creating a .app image for macOS. Everything works fine, but when I run the application, and click on the Mac Menu, the About, and Quit menu items use the main class name, instead of the Application name (see screen shot):
So the actual menu name show correctly as PWMinder, but the About and Quit using 'MainProgram' instead of 'PWMinder'. Note: the Dock name is also correct.
Below is relevant part of my build script:
jpackage {
skipInstaller = true
imageOptions = listOf(
"--app-version", "${project.version}",
"--description", description,
"--copyright", "$copyrightYear $company",
"--vendor", company,
"--icon", "${imgDir.absolutePath}/logo.icns",
"--mac-package-identifier", "ca.ewert.pwMinder",
"--mac-package-name", project.name,
"--mac-app-category", macAppCategory,
"--mac-sign",
"--mac-package-signing-prefix", macPackageSigningPrefix,
"--mac-signing-key-user-name", macSigningKeyUserName,
"--mac-entitlements", macEntitlementsFile.absolutePath,
"--resource-dir", "${buildResourcesDir.absolutePath}/macBundle/resources",
"--file-associations", macAssociationsFile.absolutePath
)
}
and below is the generated info.plist:
<?xml version="1.0" ?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "https://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>LSEnvironment</key>
<dict>
<key>DYLD_FRAMEWORK_PATH</key>
<string>../Frameworks:/System/Library/Frameworks:/System/Library/Frameworks/JavaVM.framework/Frameworks</string>
</dict>
<key>LSMinimumSystemVersion</key>
<string>10.11</string>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleAllowMixedLocalizations</key>
<true/>
<key>CFBundleExecutable</key>
<string>PWMinder</string>
<key>CFBundleIconFile</key>
<string>PWMinder.icns</string>
<key>CFBundleIdentifier</key>
<string>ca.ewert.pwMinder</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>PWMinder</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>3.2.2</string>
<key>CFBundleSignature</key>
<string>????</string>
<!-- See https://developer.apple.com/app-store/categories/ for list of AppStore categories -->
<key>LSApplicationCategoryType</key>
<string>public.app-category.utilities</string>
<key>CFBundleVersion</key>
<string>3.2.2</string>
<key>NSHumanReadableCopyright</key>
<string>2022 Ewert Technologies</string>
<key>CFBundleDocumentTypes</key>
<array>
<dict>
<key>LSItemContentTypes</key>
<array>
<string>ca.ewert.pwMinder.pwm</string>
</array>
<key>CFBundleTypeName</key>
<string>PWMinder Vault File</string>
<key>LSHandlerRank</key>
<string>Owner</string>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>LSIsAppleDefaultForType</key>
<true/>
</dict>
</array>
<key>UTExportedTypeDeclarations</key>
<array>
<dict>
<key>UTTypeIdentifier</key>
<string>ca.ewert.pwMinder.pwm</string>
<key>UTTypeDescription</key>
<string>PWMinder Vault File</string>
<key>UTTypeConformsTo</key>
<array>
<string>public.data</string>
</array>
<key>UTTypeTagSpecification</key>
<dict>
<key>public.filename-extension</key>
<array>
<string>pwm</string>
</array>
<key>public.mime-type</key>
<array>
<string>application/x-vnd.PWMinderVaultFile</string>
</array>
</dict>
</dict>
</array>
<key>NSHighResolutionCapable</key>
<string>true</string>
<key>NSMicrophoneUsageDescription</key>
<string>The application PWMinder is requesting access to the microphone.</string>
</dict>
</plist>
I was previously using ant and appbundler, and using that setup I used to be able to the that About and Quit to show correctly, but I'm now trying to upgrade my build tools to using Gradle and JLink/JPackage.
I'm not sure if this is a problem with jpackage or with the plug-in, or if I've configured something incorrectly.
Any help or insight would be appreciated.