@@ -374,7 +374,7 @@ public Path outputBundle() {
374
374
String dirName ;
375
375
if (!TKit .isOSX ()) {
376
376
dirName = name ();
377
- } else if (macSignPredefinedAppImage ( )) {
377
+ } else if (MacHelper . signPredefinedAppImage ( this )) {
378
378
// Request to sign external app image, not to build a new one
379
379
dirName = getArgumentValue ("--app-image" );
380
380
} else {
@@ -942,7 +942,7 @@ private boolean expectAppImageFile() {
942
942
}
943
943
944
944
if (TKit .isOSX ()) {
945
- if (macSignPredefinedAppImage ( )) {
945
+ if (MacHelper . signPredefinedAppImage ( this )) {
946
946
// Request to sign external app image, ".jpackage.xml" file should exist.
947
947
return true ;
948
948
}
@@ -957,30 +957,6 @@ private boolean expectAppImageFile() {
957
957
return isImagePackageType ();
958
958
}
959
959
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
-
984
960
private void assertAppImageFile () {
985
961
Path appImageDir = Path .of ("" );
986
962
if (isImagePackageType () && hasArgument ("--app-image" )) {
@@ -999,7 +975,7 @@ private void assertAppImageFile() {
999
975
1000
976
AppImageFile aif = AppImageFile .load (rootDir );
1001
977
1002
- boolean expectedValue = macAppImageSigned ( );
978
+ boolean expectedValue = MacHelper . appImageSigned ( this );
1003
979
boolean actualValue = aif .macSigned ();
1004
980
TKit .assertEquals (expectedValue , actualValue ,
1005
981
"Check for unexpected value of <signed> property in app image file" );
0 commit comments