@@ -374,7 +374,7 @@ public Path outputBundle() {
374374 String dirName ;
375375 if (!TKit .isOSX ()) {
376376 dirName = name ();
377- } else if (macSignPredefinedAppImage ( )) {
377+ } else if (MacHelper . signPredefinedAppImage ( this )) {
378378 // Request to sign external app image, not to build a new one
379379 dirName = getArgumentValue ("--app-image" );
380380 } else {
@@ -942,7 +942,7 @@ private boolean expectAppImageFile() {
942942 }
943943
944944 if (TKit .isOSX ()) {
945- if (macSignPredefinedAppImage ( )) {
945+ if (MacHelper . signPredefinedAppImage ( this )) {
946946 // Request to sign external app image, ".jpackage.xml" file should exist.
947947 return true ;
948948 }
@@ -957,30 +957,6 @@ private boolean expectAppImageFile() {
957957 return isImagePackageType ();
958958 }
959959
960- boolean macSignPredefinedAppImage () {
961- if (!TKit .isOSX ()) {
962- throw new UnsupportedOperationException ();
963- }
964- return hasArgument ("--mac-sign" ) && hasArgument ("--app-image" );
965- }
966-
967- boolean macAppImageSigned () {
968- if (!TKit .isOSX ()) {
969- throw new UnsupportedOperationException ();
970- }
971-
972- if (!hasArgument ("--mac-sign" )) {
973- return false ;
974- }
975-
976- if (Optional .ofNullable (getArgumentValue ("--app-image" )).map (Path ::of ).map (AppImageFile ::load ).map (AppImageFile ::macSigned ).orElse (false )) {
977- // The external app image is signed, so the app image is signed too.
978- return true ;
979- }
980-
981- return (hasArgument ("--mac-signing-key-user-name" ) || hasArgument ("--mac-app-image-sign-identity" ));
982- }
983-
984960 private void assertAppImageFile () {
985961 Path appImageDir = Path .of ("" );
986962 if (isImagePackageType () && hasArgument ("--app-image" )) {
@@ -999,7 +975,7 @@ private void assertAppImageFile() {
999975
1000976 AppImageFile aif = AppImageFile .load (rootDir );
1001977
1002- boolean expectedValue = macAppImageSigned ( );
978+ boolean expectedValue = MacHelper . appImageSigned ( this );
1003979 boolean actualValue = aif .macSigned ();
1004980 TKit .assertEquals (expectedValue , actualValue ,
1005981 "Check for unexpected value of <signed> property in app image file" );
0 commit comments