Skip to content

Commit 336fe3a

Browse files
Strip ".jpackage.xml" from copied app image when permitted
1 parent 9211b77 commit 336fe3a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/MacBaseInstallerBundler.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -173,11 +173,11 @@ protected Path prepareAppBundle(Map<String, ? super Object> params)
173173
FileUtils.copyRecursive(predefinedImage, appDir,
174174
LinkOption.NOFOLLOW_LINKS);
175175

176-
// Create PackageFile if predefined app image is not signed
177-
if (!StandardBundlerParam.isRuntimeInstaller(params) &&
178-
!AppImageFile.load(predefinedImage).isSigned()) {
176+
// Alter app image if predefined app image is not signed
177+
if (!AppImageFile.load(predefinedImage).isSigned()) {
179178
new PackageFile(APP_NAME.fetchFrom(params)).save(
180179
ApplicationLayout.macAppImage().resolveAt(appDir));
180+
Files.deleteIfExists(AppImageFile.getPathInAppImage(appDir));
181181
// We need to re-sign app image after adding ".package" to it.
182182
// We only do this if app image was not signed which means it is
183183
// signed with ad-hoc signature. App bundles with ad-hoc

0 commit comments

Comments
 (0)