File tree 1 file changed +8
-1
lines changed
src/jdk.incubator.jpackage/windows/classes/jdk/incubator/jpackage/internal
1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -306,15 +306,22 @@ private void prepareProto(Map<String, ? super Object> params)
306
306
throws PackagerException , IOException {
307
307
Path appImage = StandardBundlerParam .getPredefinedAppImage (params );
308
308
Path appDir ;
309
+ String appName ;
309
310
310
311
// we either have an application image or need to build one
311
312
if (appImage != null ) {
312
313
appDir = MSI_IMAGE_DIR .fetchFrom (params ).resolve (APP_NAME .fetchFrom (params ));
313
314
// copy everything from appImage dir into appDir/name
314
315
IOUtils .copyRecursive (appImage , appDir );
316
+ try {
317
+ appName = AppImageFile .load (appDir ).getLauncherName ();
318
+ } catch (Exception e ) {
319
+ appName = APP_NAME .fetchFrom (params );
320
+ }
315
321
} else {
316
322
appDir = appImageBundler .execute (params , MSI_IMAGE_DIR .fetchFrom (
317
323
params ));
324
+ appName = APP_NAME .fetchFrom (params );
318
325
}
319
326
320
327
// Configure installer icon
@@ -331,7 +338,7 @@ private void prepareProto(Map<String, ? super Object> params)
331
338
installerIcon = ApplicationLayout .windowsAppImage ()
332
339
.resolveAt (appDir )
333
340
.launchersDirectory ()
334
- .resolve (APP_NAME . fetchFrom ( params ) + ".exe" );
341
+ .resolve (appName + ".exe" );
335
342
}
336
343
installerIcon = installerIcon .toAbsolutePath ();
337
344
You can’t perform that action at this time.
0 commit comments