diff --git a/s/usr/macos/bundle.lisp b/s/usr/macos/bundle.lisp index 10a84d9..9b42b03 100644 --- a/s/usr/macos/bundle.lisp +++ b/s/usr/macos/bundle.lisp @@ -5,7 +5,10 @@ (defun make-bundle (app-name bundle-id app-version dist-dir app-icon) (let* ((ori-plist (str:from-file (merge-pathnames "s/usr/macos/app-Info.plist" *calm-env-calm-home*))) - (app-dir (merge-pathnames (str:concat app-name ".app/") *calm-env-app-dir*)) + ;; use --app instead of .app to avoid damaged application bundle on newer version of macOS + (app-dir (merge-pathnames (str:concat app-name "--app/") *calm-env-app-dir*)) + ;; we rename the folder to .app in the end + (final-app-dir (merge-pathnames (str:concat app-name ".app/") *calm-env-app-dir*)) (app-content-dir (merge-pathnames "Contents/" app-dir)) (app-receipt-dir (merge-pathnames "_MASReceipt/" app-content-dir)) (app-resources-dir (merge-pathnames "Resources/" app-content-dir)) @@ -38,7 +41,10 @@ dist-dir-abs app-macos-dir) ;; copy icon - (u:copy-file app-icon-abs (merge-pathnames "icon.icns" app-resources-dir))) + (u:copy-file app-icon-abs (merge-pathnames "icon.icns" app-resources-dir)) + ;; rename app dir + (u:copy-dir app-dir finale-app-dir) + (uiop:delete-directory-tree app-dir)) (u:calm-log-fancy "~%Application Bundle created: ~A.app~%" app-name))