Skip to content

Commit

Permalink
fix: damaged application on macos-14 arm64
Browse files Browse the repository at this point in the history
  • Loading branch information
Vito Van committed Aug 7, 2024
1 parent d7c5039 commit 2314dbb
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions s/usr/macos/bundle.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down Expand Up @@ -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 final-app-dir)
(uiop:delete-directory-tree app-dir :validate t :if-does-not-exist :ignore))

(u:calm-log-fancy "~%Application Bundle created: ~A.app~%" app-name))

Expand Down

0 comments on commit 2314dbb

Please sign in to comment.