diff --git a/cocoa-ide/app-delegate.lisp b/cocoa-ide/app-delegate.lisp index 81bd316c0..220ba9ffe 100644 --- a/cocoa-ide/app-delegate.lisp +++ b/cocoa-ide/app-delegate.lisp @@ -46,7 +46,7 @@ (#/registerDefaults: domain dict) (#/release dict) (update-cocoa-defaults) - #-mac-app-store + #-(or mac-app-store standalone-ide) (when *standalone-cocoa-ide* (init-ccl-directory-for-ide)))) diff --git a/cocoa-ide/cocoa-application.lisp b/cocoa-ide/cocoa-application.lisp index 6c811b948..3325fb0ea 100644 --- a/cocoa-ide/cocoa-application.lisp +++ b/cocoa-ide/cocoa-application.lisp @@ -21,9 +21,9 @@ (eval-when (:compile-toplevel :load-toplevel :execute) (pushnew :cocotron *features*)) -#+mac-app-store +#+(or mac-app-store standalone-ide) (defvar *cocoa-ide-path* "ccl:Clozure CL.app;") -#-mac-app-store +#-(or mac-app-store standalone-ide) (defvar *cocoa-ide-path* (let* ((bits (nth-value 1 (host-platform)))) (format nil "ccl:Clozure CL~a.app;" bits))) @@ -36,14 +36,16 @@ (declare (ignore os)) #+mac-app-store (format nil "store.ccl-~a~a" (string-downcase cpu) bits) - #-mac-app-store + #+standalone-ide + (format nil "ccl-~a~a" (string-downcase cpu) bits) + #-(or mac-app-store standalone-ide) (format nil "Clozure CL-~a~a" (string-downcase cpu) bits))) (defvar *cocoa-ide-frameworks* #+cocotron '("ccl:cocotron;Foundation.framework;" "ccl:cocotron;AppKit.framework;" "ccl:cocotron;CoreData.framework;") #-cocotron nil) (defvar *cocoa-ide-libraries* #+cocotron '("ccl:cocotron;Foundation>.1>.0.dll" "ccl:cocotron;AppKit>.1>.0.dll" "ccl:cocotron;CoreData>.1>.0.dll") #-cocotron nil) -(defvar *cocoa-ide-force-compile* #+mac-app-store t - #-mac-app-store nil) +(defvar *cocoa-ide-force-compile* #+(or mac-app-store standalone-ide) t + #-(or mac-app-store standalone-ide) nil) (load "ccl:cocoa-ide;defsystem.lisp") (load-ide *cocoa-ide-force-compile*) diff --git a/cocoa-ide/defsystem.lisp b/cocoa-ide/defsystem.lisp index 63ad4e718..41d5998a8 100644 --- a/cocoa-ide/defsystem.lisp +++ b/cocoa-ide/defsystem.lisp @@ -115,19 +115,19 @@ "preferences" "processes-window" "apropos-window" - #-mac-app-store + #-(or mac-app-store standalone-ide) "xapropos" "hemlock-commands" "file-dialogs" "menus" "app-delegate" - #-mac-app-store + #-(or mac-app-store standalone-ide) "ide-self-update" ,(if (use-pre-lion-search-files) "search-files-pre-lion" "search-files") "start" - #-mac-app-store + #-(or mac-app-store standalone-ide) "xinspector" )) diff --git a/cocoa-ide/ide-bundle.lisp b/cocoa-ide/ide-bundle.lisp index 6963dcfc3..5be5f33ba 100644 --- a/cocoa-ide/ide-bundle.lisp +++ b/cocoa-ide/ide-bundle.lisp @@ -135,10 +135,17 @@ (subseq name 0 (- len 4)) name))) (bundle-id (concatenate 'string bundle-prefix "." (or bundle-suffix bundle-name))) - (bundle-version (multiple-value-bind (os bits cpu) - (ccl::host-platform) - (declare (ignore os)) - (format nil "~d (~a~d)" *openmcl-svn-revision* cpu bits))) + #-mac-app-store + (bundle-version (format nil "~d.~d~@[.~a~]" *openmcl-major-version* + *openmcl-minor-version* *openmcl-revision*)) + ;; The Mac App Store requires that CFBundleVersion must be + ;; greater than the last one. When we used Subversion, it + ;; was convenient to use the revision number as the bundle + ;; version number. There's no such analog on git, so we're + ;; in a pickle, and about all we can do is make this a number + ;; that we must increment manually. + #+mac-app-store + (bundle-version "111800") ;1.11.8 (needles `(("OPENMCL-KERNEL" . ,kernel-name) ("OPENMCL-ICONS" . #+mac-app-store "store.icns" #-mac-app-store "openmcl-icon.icns") diff --git a/cocoa-ide/menus.lisp b/cocoa-ide/menus.lisp index 97cf6541b..a2175256f 100644 --- a/cocoa-ide/menus.lisp +++ b/cocoa-ide/menus.lisp @@ -116,7 +116,7 @@ (#/addItemWithTitle:action:keyEquivalent: menu #@"Definitions..." (objc:@selector #/showListDefinitions:) #@"") menu)) -#-mac-app-store +#-(or mac-app-store standalone-ide) (defun @experiments-menu () (let ((menu (#/initWithTitle: (#/alloc ns:ns-menu) #@"Experiments"))) (#/addItemWithTitle:action:keyEquivalent: menu #@"xapropos" (objc:@selector #/showXaproposWindow:) #@"") @@ -159,7 +159,7 @@ (add-menu #@"Edit" (#/autorelease (@edit-menu))) (add-menu #@"Lisp" (#/autorelease (@lisp-menu))) (add-menu #@"Tools" (#/autorelease (@tools-menu))) - #-mac-app-store + #-(or mac-app-store standalone-ide) (add-menu #@"Experiments" (#/autorelease (@experiments-menu))) (let ((window-menu (@window-menu))) (add-menu #@"Window" window-menu) diff --git a/scripts/make-standalone-app b/scripts/make-standalone-app new file mode 100755 index 000000000..940549d9f --- /dev/null +++ b/scripts/make-standalone-app @@ -0,0 +1,27 @@ +#!/bin/sh + +# Clozure CL.app has already been built with :standalone-app # on *features* + +ccl=~/ccl +app="$ccl/Clozure CL.app" +target="$app/Contents/Resources/ccl" + +mkdir "$target" +( cd "$ccl/lisp-kernel/darwinx8664" && make clean ) +( cd "$ccl/lisp-kernel/darwinx8632" && make clean ) +( cd "$ccl/cocoa-ide/altconsole" && make clean && rm -rf AltConsole.app ) + +for i in cocoa-ide compiler darwin-x86-headers64 doc examples level-0 level-1 lib library lisp-kernel objc-bridge scripts tools xdump; do + cp -Rp "$ccl/$i" "$target" + # we want the fasls for tools/, mainly because asdf.lisp is slow + # to load from source + if test "$i" != tools; then + find "$target/$i" -type f -name "*.*fsl" -exec rm -rf {} \; + fi +done + +find "$app" -type d -name .svn -exec rm -rf {} \; + +codesign -s "3rd Party Mac Developer Application: Clozure Associates, LLC" "$app/Contents/Resources/AltConsole.app" +codesign -s "3rd Party Mac Developer Application: Clozure Associates, LLC" "$app" +