Mac AppStore entitlements are supported, but not Mac App Image entitlements.
In the MacAppImageBuilder.java:
args.addAll(Arrays.asList("codesign",
"-s", signingIdentity, // sign with this key
"--prefix", identifierPrefix, // use the identifier as a prefix
"-vvvv"));
if (entitlementsFile != null &&
(p.toString().endsWith(".jar")
|| p.toString().endsWith(".dylib"))) {
args.add("--entitlements");
args.add(entitlementsFile); // entitlements
} else if (inheritedEntitlements != null && Files.isExecutable(p)) {
args.add("--entitlements");
args.add(inheritedEntitlements); // inherited entitlements for executable processes
}
if (keyChain != null && !keyChain.isEmpty()) {
args.add("--keychain");
args.add(keyChain);
}
entitlementsFile is always null as it's passed in. Entitlements needs to be enabled for App Image, they are currently only enabled for Mac App Store Apps.
String signingIdentity = MAC_APP_STORE_APP_SIGNING_KEY.fetchFrom(p);
String identifierPrefix = BUNDLE_ID_SIGNING_PREFIX.fetchFrom(p);
String entitlementsFile = getConfig_Entitlements(p).toString();
String inheritEntitlements = getConfig_Inherit_Entitlements(p).toString();
MacAppImageBuilder.signAppBundle(p, appLocation.toPath(), signingIdentity, identifierPrefix, entitlementsFile, inheritEntitlements);
In the MacAppImageBuilder.java:
args.addAll(Arrays.asList("codesign",
"-s", signingIdentity, // sign with this key
"--prefix", identifierPrefix, // use the identifier as a prefix
"-vvvv"));
if (entitlementsFile != null &&
(p.toString().endsWith(".jar")
|| p.toString().endsWith(".dylib"))) {
args.add("--entitlements");
args.add(entitlementsFile); // entitlements
} else if (inheritedEntitlements != null && Files.isExecutable(p)) {
args.add("--entitlements");
args.add(inheritedEntitlements); // inherited entitlements for executable processes
}
if (keyChain != null && !keyChain.isEmpty()) {
args.add("--keychain");
args.add(keyChain);
}
entitlementsFile is always null as it's passed in. Entitlements needs to be enabled for App Image, they are currently only enabled for Mac App Store Apps.
String signingIdentity = MAC_APP_STORE_APP_SIGNING_KEY.fetchFrom(p);
String identifierPrefix = BUNDLE_ID_SIGNING_PREFIX.fetchFrom(p);
String entitlementsFile = getConfig_Entitlements(p).toString();
String inheritEntitlements = getConfig_Inherit_Entitlements(p).toString();
MacAppImageBuilder.signAppBundle(p, appLocation.toPath(), signingIdentity, identifierPrefix, entitlementsFile, inheritEntitlements);