Changeset 15073


Ignore:
Timestamp:
Nov 16, 2011, 9:10:35 PM (8 years ago)
Author:
rme
Message:

Make #p"ccl:" refer to .../Contents/Resources?/ccl. Copy interfaces
into that directory. Put heap image there also.

Compile IDE with *save-source-locations* bound to :no-text.

In Info.plist:

  • use CFBundleIdentifier of com.clozure.store.ccl-x8664 so that we keep any App Store and normal versions separate.
  • add key LSApplicationCategoryType
  • remove deprecated CFBundleGetInfoString
  • change CFBundleShortVersionString to form 1.7.123 form, where 123 is svn revision. (This is a Mac App Store requirement.)

Always force compile when doing (require 'cocoa) or
(require 'cocoa-application).

Just name the product "Clozure CL.app".

Remove some swank listener bits.

Location:
branches/1.7-appstore/source
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • branches/1.7-appstore/source/cocoa-ide/Info.plist-proto

    r14913 r15073  
    33<plist version="1.0">
    44<dict>
     5  <key>LSApplicationCategoryType></key>
     6  <string>public.app-category.developer-tools</string>
     7
    58        <key>CFBundleDevelopmentRegion</key>
    69        <string>English</string>
     
    8184        <string>OPENMCL-VERSION</string>
    8285        <key>CFBundleShortVersionString</key>
    83         <string>OPENMCL-MAJOR-VERSION.OPENMCL-MINOR-VERSIONOPENMCL-REVISION</string>
    84         <key>CFBundleGetInfoString</key>
    85         <string>Clozure Common Lisp version OPENMCL-MAJOR-VERSION.OPENMCL-MINOR-VERSION, Copyright 2002-CURRENT-YEAR Clozure Associates and contributors."</string>
     86        <string>OPENMCL-MAJOR-VERSION.OPENMCL-MINOR-VERSION.OPENMCL-SVN-REVISION</string>
    8687        <key>NSHumanReadableCopyright</key>
    87         <string>Copyright 2002-CURRENT-YEAR Clozure Associates and contributors.</string>
     88        <string>Copyright 2002-CURRENT-YEAR Clozure Associates and contributors</string>
    8889        <key>NSMainNibFile</key>
    8990        <string>MainMenu</string>
  • branches/1.7-appstore/source/cocoa-ide/app-delegate.lisp

    r14917 r15073  
    3434    (#/registerDefaults: domain dict)
    3535    (#/release dict)
    36     (update-cocoa-defaults)
    37     (when *standalone-cocoa-ide*
    38       (init-ccl-directory-for-ide))))
    39 
    40 (defun init-ccl-directory-for-ide ()
    41   (let* ((bundle-path (#/bundlePath (#/mainBundle ns:ns-bundle)))
    42          (parent (#/stringByDeletingLastPathComponent bundle-path))
    43          (path (ccl::ensure-directory-pathname
    44                 (lisp-string-from-nsstring parent))))
    45     (ccl::replace-base-translation "ccl:" path)))
    46 
     36    (update-cocoa-defaults)))
    4737
    4838(defvar *ccl-ide-init-file* "home:ccl-ide-init")
  • branches/1.7-appstore/source/cocoa-ide/cocoa-application.lisp

    r14616 r15073  
    2323
    2424
    25 (defvar *cocoa-application-path*
    26   (let* ((bits (nth-value 1 (host-platform))))
    27     (format nil "ccl:Clozure CL~a.app;" bits)))
    28 (defvar *cocoa-application-copy-headers-p* nil)
     25(defvar *cocoa-application-path* "ccl:Clozure CL.app;")
     26(defvar *cocoa-application-copy-headers-p* t)
    2927(defvar *cocoa-application-install-altconsole* t)
    3028(defvar *cocoa-application-bundle-suffix*
    3129  (multiple-value-bind (os bits cpu) (host-platform)
    3230    (declare (ignore os))
    33     (format nil "Clozure CL-~a~a" (string-downcase cpu) bits)))
     31    (format nil "ccl-~a~a" (string-downcase cpu) bits)))
    3432(defvar *cocoa-application-frameworks* #+cocotron '("ccl:cocotron;Foundation.framework;" "ccl:cocotron;AppKit.framework;" "ccl:cocotron;CoreData.framework;") #-cocotron nil)
    3533(defvar *cocoa-application-libraries* #+cocotron '("ccl:cocotron;Foundation>.1>.0.dll" "ccl:cocotron;AppKit>.1>.0.dll" "ccl:cocotron;CoreData>.1>.0.dll") #-cocotron nil)
    3634       
    37 (defvar *cocoa-ide-force-compile* nil)
     35(defvar *cocoa-ide-force-compile* t)
    3836(load "ccl:cocoa-ide;defsystem.lisp")
    3937(load-ide *cocoa-ide-force-compile*)
  • branches/1.7-appstore/source/cocoa-ide/cocoa.lisp

    r14616 r15073  
    1515    (declare (ignore os))
    1616    (format nil "temp bundle-~a~a" (string-downcase cpu) bits)))
    17 (defvar *cocoa-ide-force-compile* nil)
     17(defvar *cocoa-ide-force-compile* t)
    1818(defvar *cocoa-application-frameworks* #+cocotron '("ccl:cocotron;Foundation.framework;" "ccl:cocotron;AppKit.framework;" "ccl:cocotron;CoreData.framework;") #-cocotron nil)
    1919(defvar *cocoa-application-libraries* #+cocotron '("ccl:cocotron;Foundation>.1>.0.dll" "ccl:cocotron;AppKit>.1>.0.dll" "ccl:cocotron;CoreData>.1>.0.dll") #-cocotron nil)
  • branches/1.7-appstore/source/cocoa-ide/defsystem.lisp

    r15070 r15073  
    9595    (with-compilation-unit ()
    9696      (dolist (name names)
    97         (let* ((source (make-pathname :name name :type (pathname-type *.lisp-pathname*)
     97        (let* ((*save-source-locations* :no-text)
     98               (source (make-pathname :name name :type (pathname-type *.lisp-pathname*)
    9899                                      :defaults src-dir))
    99100               (fasl (make-pathname :name name :type (pathname-type *.fasl-pathname*)
  • branches/1.7-appstore/source/cocoa-ide/ide-bundle.lisp

    r13034 r15073  
    3838               (ccl-headers (make-pathname :host "ccl" :directory `(:absolute ,@subdirs)))
    3939               (dest-headers (make-pathname :host (pathname-host contents-dir)
    40                                             :directory (append (pathname-directory contents-dir)
    41                                                                (cons "Resources" subdirs)))))
     40                                            :directory
     41                                            (append
     42                                             (pathname-directory contents-dir)
     43                                             (list* "Resources" "ccl" subdirs)))))
    4244          (recursive-copy-directory ccl-headers dest-headers :if-exists if-exists :test #'ignore-test)))
    4345      (when install-altconsole
     
    100102  (require "FAKE-CFBUNDLE-PATH")
    101103  (create-ide-bundle *cocoa-application-path*)
    102   (ccl::fake-cfbundle-path *cocoa-application-path* "ccl:cocoa-ide;Info.plist-proto" "com.clozure" *cocoa-application-bundle-suffix* *cocoa-application-frameworks* *cocoa-application-libraries* #+windows-target "ccl:cocoa-ide;ide-contents;resources;openmcl-icon.ico"))
     104  (ccl::fake-cfbundle-path *cocoa-application-path* "ccl:cocoa-ide;Info.plist-proto" "com.clozure.store" *cocoa-application-bundle-suffix* *cocoa-application-frameworks* *cocoa-application-libraries* #+windows-target "ccl:cocoa-ide;ide-contents;resources;openmcl-icon.ico"))
  • branches/1.7-appstore/source/cocoa-ide/start.lisp

    r14244 r15073  
    3232  (let* ((path (ccl::ccl-directory))
    3333         (dir (pathname-directory path)))
    34     (if (equalp (last dir 2) '("Contents" "MacOS"))
     34    (if (equalp (last dir 3) '("Contents" "Resources" "ccl"))
    3535        (make-pathname :directory (butlast dir 3))
    3636        path)))
    37 
    3837
    3938(defmethod ccl::ui-object-do-operation ((o ns:ns-application)
     
    9392  (values nil nil nil nil))
    9493
    95 (eval-when (:compile-toplevel :load-toplevel :execute)
    96     (require :swank-listener))
    97 
    9894(defmethod toplevel-function ((a cocoa-application) init-file)
    9995  (declare (ignore init-file))
     
    10399    (#_ _exit -1))
    104100  (setq *standalone-cocoa-ide* t)
    105   (maybe-start-swank-listener)
    106101  (with-slots  (have-interactive-terminal-io) ccl::*current-process*
    107102    (when (and (eql (nth-value 4 (ccl::%stat "/dev/null"))
     
    147142    (ccl::touch bundle-path)
    148143
    149     (let ((image-file (make-pathname :name (ccl::standard-kernel-name) :type nil :version nil
    150                                      :defaults (merge-pathnames (format nil";Contents;~a;" #+darwin-target "MacOS" #+cocotron "Windows")  bundle-path))))
     144    (let ((kernel-file (make-pathname :name (ccl::standard-kernel-name)
     145                                      :type nil
     146                                      :version nil
     147                                      :defaults (merge-pathnames
     148                                                 ";Contents;MacOS;"
     149                                                 bundle-path)))
     150          (image-file (make-pathname :name (ccl::standard-kernel-name)
     151                                     :type "image"
     152                                     :version nil
     153                                     :defaults (merge-pathnames
     154                                                ";Contents;Resources;ccl;"
     155                                                bundle-path))))
    151156      (format *error-output* "~2%Saving application to ~a~2%" (truename bundle-path))
    152157      (force-output *error-output*)
     158      (ensure-directories-exist kernel-file)
     159      (ccl:copy-file (ccl::kernel-path) kernel-file :if-exists :supersede
     160                     :preserve-attributes t)
    153161      (ensure-directories-exist image-file)
    154162      (save-application image-file
    155                         :prepend-kernel t
    156                         :application-class 'cocoa-application
    157                         #+windows-target #+windows-target
    158                         :application-type :gui)))
     163                        :application-class 'cocoa-application)))
    159164
    160165;;; If we're running as a standalone .app, try to see if a bundle named
  • branches/1.7-appstore/source/lisp-kernel/pmcl-kernel.c

    r14880 r15073  
    9898#include <mach-o/dyld.h>
    9999#include <dlfcn.h>
     100#include <libgen.h>
    100101#endif
    101102
     
    960961#endif
    961962
    962 
     963#ifdef DARWIN
     964/*
     965 * Look for a heap image in the application bundle.
     966 */
     967char *
     968bundle_image_name(char *orig)
     969{
     970  char *base = basename(orig);
     971  char *dir = dirname(orig);
     972  char path[MAXPATHLEN];
     973
     974  snprintf(path, MAXPATHLEN, "%s/../Resources/ccl/%s", dir, base);
     975  return path_by_appending_image(path);
     976}
     977#endif
    963978
    964979char *program_name = NULL;
     
    19221937    } else {
    19231938      image_name = default_image_name(real_executable_name);
     1939#ifdef DARWIN
     1940      if (!probe_file(image_name)) {
     1941        image_name = bundle_image_name(real_executable_name);
     1942      }
     1943#endif
    19241944    }
    19251945  }
  • branches/1.7-appstore/source/objc-bridge/fake-cfbundle-path.lisp

    r14913 r15073  
    2828                           (format nil "~d (~a~d)" *openmcl-svn-revision* cpu bits)))
    2929         (needles `(("OPENMCL-KERNEL" . ,kernel-name)
     30                    ("OPENMCL-SVN-REVISION" . ,*openmcl-svn-revision*)
    3031                    ("OPENMCL-NAME" . ,bundle-name)
    3132                    ("OPENMCL-IDENTIFIER" . ,bundle-id)
Note: See TracChangeset for help on using the changeset viewer.