@@ -41,6 +41,11 @@ convert img to be read only
41
41
zip
42
42
*/
43
43
44
+ If (Is Windows:C1573)
45
+ ALERT:C41 ("It is only possible on Mac to create a signed/notarized .img file, so we stop here" )
46
+ return
47
+ End if
48
+
44
49
var $builder : cs:C1710 ._Build
45
50
46
51
$builder := cs:C1710 ._Build .new ()
@@ -71,38 +76,31 @@ If ($error.success=True:C214)
71
76
$error := $builder .Zip ($sourcepath ; $targetpath )
72
77
End if
73
78
74
- // for Mac
75
- If (Is Windows:C1573)
76
- ALERT:C41 ("It is only possible on Mac to create a signed/notarized .img file, so we stop here" )
77
- Else
78
-
79
- // run only on Mac
80
- If ($error .success = True:C214)
81
- Progress SET MESSAGE ($progress ; "Build IMG..." )
82
- var $tempimgpath : Text:= $sourcefile .parent .parent .platformPath + "tmp.dmg"
83
- $error := $builder .CreateImage ($sourcepath ; $tempimgpath ; $sourcefile .name)
84
- End if
85
-
86
- If ($error .success = True:C214)
87
- Progress SET MESSAGE ($progress ; "Notarize and wait for Apple's approval..." )
88
- $error := $builder .Notarize ($tempimgpath )
89
- End if
90
-
91
- If ($error .success = True:C214)
92
- $error := $builder .Staple ($tempimgpath )
93
- End if
94
-
79
+ // run only on Mac
80
+ If ($error .success = True:C214)
81
+ Progress SET MESSAGE ($progress ; "Build IMG..." )
82
+ var $tempimgpath : Text:= $sourcefile .parent .parent .platformPath + "tmp.dmg"
83
+ $error := $builder .CreateImage ($sourcepath ; $tempimgpath ; $sourcefile .name)
84
+ End if
85
+
86
+ If ($error .success = True:C214)
87
+ Progress SET MESSAGE ($progress ; "Notarize and wait for Apple's approval..." )
88
+ $error := $builder .Notarize ($tempimgpath )
89
+ End if
90
+
91
+ If ($error .success = True:C214)
92
+ $error := $builder .Staple ($tempimgpath )
93
+ End if
94
+
95
+ If ($error .success = True:C214)
96
+ var $finalimgpath : Text:= $sourcefile .parent .parent .platformPath + $sourcefile .name + ".dmg"
97
+ $error := $builder .ConvertImage ($tempimgpath ; $finalimgpath )
95
98
If ($error .success = True:C214)
96
- var $finalimgpath : Text:= $sourcefile .parent .parent .platformPath + $sourcefile .name + ".dmg"
97
- $error := $builder .ConvertImage ($tempimgpath ; $finalimgpath )
98
- If ($error .success = True:C214)
99
- DELETE DOCUMENT:C159 ($tempimgpath )
100
- End if
99
+ DELETE DOCUMENT:C159 ($tempimgpath )
101
100
End if
102
101
End if
103
102
104
103
105
-
106
104
Progress QUIT ($progress )
107
105
108
106
0 commit comments