Skip to content

Commit 6cee19d

Browse files
committed
refactor: ln -s the Contents dir
Idea by @christian-burger. Fixes #27 Fixes #17
1 parent 341ede9 commit 6cee19d

File tree

1 file changed

+2
-12
lines changed

1 file changed

+2
-12
lines changed

main.lisp

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -156,18 +156,8 @@
156156
,from-cnts ,to-cnts))))))
157157

158158
(defun mktrampoline-app (app trampoline)
159-
(let ((cmd (format NIL "do shell script \"open '~A'\"" app)))
160-
(sh `("/usr/bin/osacompile" #\o ,trampoline #\e ,cmd))
161-
(sync-icons app trampoline)
162-
(copy-paths (infoplist app) (infoplist trampoline) *copyable-app-props*)
163-
;; Sometimes the OS displays blank or stock applescript icons for these
164-
;; generated apps in launchpad, finder, etc. It’s not 100% clear why and
165-
;; it’s hard to reproduce but this seems to help. Probably a race condition
166-
;; between generating the original wrapper and updating the icons. A
167-
;; cleaner solution would be building the app bundle in a temporary
168-
;; directory and only copying it in when fully ready, but this works for
169-
;; now.
170-
(sh `(touch ,trampoline))))
159+
(ensure-directories-exist (uiop:ensure-pathname trampoline :ensure-directory t))
160+
(sh `(ln #\s #\f ,(format NIL "~A/Contents" app) ,(format NIL "~A/Contents" trampoline))))
171161

172162
(defun mktrampoline-bin (bin trampoline)
173163
;; In order for applescript not to wait on the binary you must direct both

0 commit comments

Comments
 (0)