File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed
src/com/inet/gradle/setup/dmg Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -407,12 +407,14 @@ public void setBackgroundColor( Color backgroundColor ) {
407407 */
408408 public String getApplicationIdentifier ( SetupBuilder setup ) {
409409 if ( applicationIdentifier == null || applicationIdentifier .isEmpty () ) {
410- return setup .getAppIdentifier ();
410+ if ( setup .getMainClass () == null || setup .getMainClass ().isEmpty () ) {
411+ return setup .getAppIdentifier ();
412+ }
413+ return setup .getMainClass ();
411414 }
412415 return applicationIdentifier ;
413416 }
414417
415-
416418 /**
417419 * Sets an application identifier for the DMG builder.
418420 * It is being used as ID in the Info.plist
Original file line number Diff line number Diff line change @@ -88,7 +88,7 @@ void create( Service service ) throws Exception {
8888
8989 // Patch Info.plist
9090 File prefPanePLIST = new File ( prefPaneLocation , "Contents/Info.plist" );
91- String prefPaneIdentifier = getSetupBuilder (). getMainClass () != null ? getSetupBuilder (). getMainClass () : getSetupBuilder (). getAppIdentifier ( );
91+ String prefPaneIdentifier = task . getApplicationIdentifier ( getSetupBuilder () );
9292 setPlistProperty ( prefPanePLIST , ":CFBundleIdentifier" , prefPaneIdentifier + ".prefPane" );
9393 setPlistProperty ( prefPanePLIST , ":CFBundleName" , displayName + " Preference Pane" );
9494 setPlistProperty ( prefPanePLIST , ":CFBundleExecutable" , internalName );
@@ -104,7 +104,7 @@ void create( Service service ) throws Exception {
104104
105105 File servicePLIST = new File ( prefPaneLocation , "Contents/Resources/service.plist" );
106106 setPlistProperty ( servicePLIST , ":Name" , displayName );
107- setPlistProperty ( servicePLIST , ":Label" , service .getMainClass () != null ? service . getMainClass () : getSetupBuilder (). getAppIdentifier () );
107+ setPlistProperty ( servicePLIST , ":Label" , service .getId () );
108108
109109 // Program will be set during installation.
110110 setPlistProperty ( servicePLIST , ":Description" , service .getDescription () );
You can’t perform that action at this time.
0 commit comments