Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
vdelachaux committed Jul 10, 2023
1 parent 12c5e6a commit c32ab59
Show file tree
Hide file tree
Showing 10 changed files with 107 additions and 12 deletions.
Binary file modified Build/4DPop AppMaker.4dbase.zip
Binary file not shown.
Binary file modified Build/Components/4DPop AppMaker.4dbase/4DPop AppMaker.4DZ
Binary file not shown.
4 changes: 2 additions & 2 deletions Build/Components/4DPop AppMaker.4dbase/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@
<key>NSHumanReadableCopyright</key>
<string>©vdl 2009-2023</string>
<key>CFBundleVersion</key>
<string>547</string>
<string>549</string>
<key>CFBundleDisplayName</key>
<string>4DPop AppMaker</string>
<key>CFBundleShortVersionString</key>
<string>20</string>
<key>CFBundleGetInfoString</key>
<string>20</string>
<key>CFBundleLongVersionString</key>
<string>20 (546)</string>
<string>20 (548)</string>
<key>CFBundleName</key>
<string>4DPop AppMaker</string>
</dict>
Expand Down
Binary file not shown.
Binary file not shown.
4 changes: 2 additions & 2 deletions Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@
<key>NSHumanReadableCopyright</key>
<string>©vdl 2009-2023</string>
<key>CFBundleVersion</key>
<string>547</string>
<string>549</string>
<key>CFBundleDisplayName</key>
<string>4DPop AppMaker</string>
<key>CFBundleShortVersionString</key>
<string>20</string>
<key>CFBundleGetInfoString</key>
<string>20</string>
<key>CFBundleLongVersionString</key>
<string>20 (546)</string>
<string>20 (548)</string>
<key>CFBundleName</key>
<string>4DPop AppMaker</string>
</dict>
Expand Down
99 changes: 94 additions & 5 deletions Project/Sources/Classes/AppMaker.4dm
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ Function run($withUI : Boolean) : Boolean

FLUSH CACHE:C297

This:C1470.build:=cs:C1710.build.new(This:C1470.buildAppFile; This:C1470.credentials)
This:C1470.build:=cs:C1710.build.new(This:C1470.buildAppFile) //; This.credentials)
This:C1470.applicationName:=This:C1470.build.settings.BuildApplicationName

// Load preferences
Expand Down Expand Up @@ -219,9 +219,22 @@ Function run($withUI : Boolean) : Boolean

If ($success)

// Notarize & staple
$success:=This:C1470.notarize()

Case of

//______________________________________________________

: (This:C1470.build.buildTarget.parent.name="Components")

$success:=This:C1470.notarizelib4D()

//______________________________________________________
Else

// Notarize & staple
$success:=This:C1470.notarize()

//______________________________________________________
End case
End if
End if

Expand Down Expand Up @@ -332,7 +345,83 @@ Function sign($target : 4D:C1709.File) : Boolean
End if

// === === === === === === === === === === === === === === === === === === === === === === === ===
// Notarize & staple the lib4d-arm64.dylib
// Notarize & staple the lib
Function notarizelib4D() : Boolean

var $dmg; $zip : 4D:C1709.File
var $root; $stapled; $target : 4D:C1709.Folder
var $ditto : cs:C1710.ditto
var $hdutil : cs:C1710.hdutil
var $notarytool : cs:C1710.notarytool

If (This:C1470.build.lib4d.exists)

$target:=This:C1470.build.buildTarget
$root:=$target.parent.parent

This:C1470._callBarber("🍏 Notarization process"; Barber shop:K42:35)

// Create a dmg
$dmg:=$root.file($target.name+".dmg")
$hdutil:=cs:C1710.hdutil.new($dmg)

If ($hdutil.create(This:C1470.build.lib4d))

// Send the dmg for notarization
$notarytool:=cs:C1710.notarytool.new($hdutil.target; This:C1470.credentials.keychainProfile)

If ($notarytool.submit())

If ($notarytool.staple($hdutil.target))

// Mount the virtual disk
If ($hdutil.attach())

// Get the stapled lib
$stapled:=$hdutil.disk.file(This:C1470.build.lib4d.fullName)

// Replace the original into the component
$stapled.copyTo($target.folder("Libraries"); fk overwrite:K87:5)

// Create an archive to preserve the stapple ticket
$zip:=$root.file($target.name+".4dbase.zip")
$zip.delete()

$ditto:=cs:C1710.ditto.new($target; $zip; {keepParent: False:C215})

If ($ditto.archive())

// Delete dmg file
$dmg.delete()

return True:C214

Else

This:C1470._error($ditto.lastError)

End if

Folder:C1567(fk logs folder:K87:17).file("ditto.log").setText($ditto.history.join("\n"))

// Unmount the virtual disk
$hdutil.detach()

End if
End if
End if

Folder:C1567(fk logs folder:K87:17).file("notarytool.log").setText($notarytool.history.join("\n"))

End if

Folder:C1567(fk logs folder:K87:17).file("hdutil.log").setText($hdutil.history.join("\n"))

End if


// === === === === === === === === === === === === === === === === === === === === === === === ===
// Notarize & staple the target
Function notarize() : Boolean

var $success : Boolean
Expand Down
11 changes: 8 additions & 3 deletions Project/Sources/Classes/build.4dm
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
property settings : Object
property buildStatus : Collection
property buildAppSettingsFile; lib4d : 4D:C1709.File
property buildTarget : 4D:C1709.Folder

Class extends lep

//=== === === === === === === === === === === === === === === === === === === === === === ===
Class constructor($settings; $credentials : Object)
Class constructor($settings) //; $credentials : Object)

Super:C1705()

Expand Down Expand Up @@ -38,11 +43,11 @@ Class constructor($settings; $credentials : Object)

// Notarization settings
//FIXME: Usefull ?
This:C1470.credentials:=$credentials
//This.credentials:=$credentials

This:C1470.lib4d:=File:C1566("⛔️")
This:C1470.buildStatus:=Null:C1517
This:C1470.requestUID:=Null:C1517
//This.requestUID:=Null

// <==> <==> <==> <==> <==> <==> <==> <==> <==> <==> <==> <==> <==> <==> <==> <==> <==> <==>
Function get destinationFolder() : 4D:C1709.Folder
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
[![license](https://img.shields.io/github/license/vdelachaux/4DPop-AppMaker)](LICENSE)
[![release](https://img.shields.io/github/v/release/vdelachaux/4DPop-AppMaker?include_prereleases)](https://github.com/vdelachaux/4DPop-AppMaker/releases/latest)
![](https://img.shields.io/badge/macOS-notarized-green)
[![Build](https://github.com/vdelachaux/4DPop-AppMaker/actions/workflows/build.yml/badge.svg)](https://github.com/vdelachaux/4DPop-AppMaker/actions/workflows/build.yml)



Expand Down
Binary file modified Resources/InfoPlist.strings
Binary file not shown.

0 comments on commit c32ab59

Please sign in to comment.