Changeset 9309


Ignore:
Timestamp:
Apr 27, 2008, 3:28:52 PM (11 years ago)
Author:
mikel
Message:

more work toward un-hardwiring Info.plist data in build-application, and eventually adding support for user-defined delegate classes

Location:
trunk/source/cocoa-ide
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/cocoa-ide/build-application.lisp

    r9282 r9309  
    2929
    3030(defun build-application (&key
    31                           (name "MyApplication")
    32                           (type-string "APPL")
    33                           (creator-string "OMCL")
     31                          (name $default-application-bundle-name)
     32                          (type-string $default-application-type-string)
     33                          (creator-string $default-application-creator-string)
    3434                          (directory (current-directory))
    3535                          (copy-ide-resources t) ; whether to copy the IDE's resources
     
    7171                      :prepend-kernel t)))
    7272
    73 
     73#|
     74(require :build-application)
     75(load "/usr/local/ccl/trunk/source/cocoa-ide/builder-utilities.lisp")
     76(ccl::build-application :name "Foo"
     77                        :directory "/Users/mikel/Desktop"
     78                        :copy-ide-resources t)
     79|#
  • trunk/source/cocoa-ide/builder-utilities.lisp

    r9285 r9309  
    1717;;; application-building tools for building and copying bundles,
    1818;;; resource directories, and magic files used by OSX applications.
     19
     20;;; DEFAULTS
     21;;; Some useful default values for use when creating application bundles
     22
     23(defparameter $default-application-bundle-name "MyApplication")
     24(defparameter $default-application-type-string "APPL")
     25(defparameter $default-application-creator-string "OMCL")
     26(defparameter $default-application-version-number "1.0")
     27
     28;;; defaults related to Info.plist files
     29
     30(defparameter $default-info-plist-development-region "English")
     31(defparameter $default-info-plist-executable $default-application-bundle-name)
     32(defparameter $default-info-plist-getInfo-string (format nil "~A Copyright ~C 2008"
     33                                                         $default-application-version-number
     34                                                         #\Copyright_Sign))
     35(defparameter $default-info-plist-help-book-folder (format nil "~AHelp" $default-application-bundle-name))
     36(defparameter $default-info-plist-help-book-name (format nil "~A Help" $default-application-bundle-name))
     37(defparameter $default-info-plist-icon-file (format nil "~A.icns" $default-application-bundle-name))
     38(defparameter $default-info-plist-bundle-identifier (format nil "com.clozure.ccl.apps.~A"
     39                                                            (string-downcase $default-application-bundle-name)))
     40(defparameter $default-info-dictionary-version "6.0")
     41(defparameter $default-info-plist-bundle-name $default-application-bundle-name)
     42(defparameter $default-info-plist-bundle-package-type "APPL")
     43(defparameter $default-info-plist-short-version-string $default-application-version-number)
     44(defparameter $default-info-plist-bundle-signature "OMCL")
     45(defparameter $default-info-plist-version $default-application-version-number)
     46(defparameter $default-info-plist-has-localized-display-name 0)
     47(defparameter $default-info-plist-minimum-system-version "10.5")
     48(defparameter $default-info-plist-main-nib-file "MainMenu")
     49(defparameter $default-info-plist-principal-class "LispApplication")
     50
     51
     52;;; COPY-NIBFILE (srcnib dest-directory &key (if-exists :overwrite))
     53;;; Copies a nibfile (which may in fact be a directory) to the
     54;;; destination path (which may already exist, and may need to
     55;;; be overwritten
    1956
    2057(defun copy-nibfile (srcnib dest-directory &key (if-exists :overwrite))
     
    83120                       :if-exists :supersede)
    84121    (format out "~A~A" package-type bundle-signature)))
     122
     123;;; MAKE-INFO-PLIST
     124;;; returns a newly-created NSDictionary with contents
     125;;; specified by the input parameters
     126(defun make-info-plist (&key
     127                        (development-region $default-info-plist-development-region)
     128                        (executable $default-info-plist-executable)
     129                        (getinfo-string $default-info-plist-getinfo-string)
     130                        (help-book-folder $default-info-plist-help-book-folder)
     131                        (help-book-name $default-info-plist-help-book-name)
     132                        (icon-file $default-info-plist-icon-file)
     133                        (bundle-identifier $default-info-plist-bundle-identifier)
     134                        (dictionary-version $default-info-dictionary-version)
     135                        (bundle-name $default-info-plist-bundle-name)
     136                        (bundle-package-type $default-info-plist-bundle-package-type)
     137                        (short-version-string $default-info-plist-short-version-string)
     138                        (bundle-signature $default-info-plist-bundle-signature)
     139                        (version $default-info-plist-version)
     140                        (has-localized-display-name $default-info-plist-has-localized-display-name)
     141                        (minimum-system-version $default-info-plist-minimum-system-version)
     142                        (main-nib-file $default-info-plist-main-nib-file)
     143                        (principal-class $default-info-plist-principal-class))
     144  (error "Not yet implemented"))
    85145
    86146;;; READ-INFO-PLIST info-path
     
    130190           (ide-plist-path-str (namestring (path ide-bundle-path
    131191                                                 "Contents" "Info.plist")))
    132            (info-dict (#/dictionaryWithContentsOfFile: ns:ns-mutable-dictionary
    133                                                        ide-plist-path-str))
     192           (info-dict (read-info-plist ide-plist-path-str))
    134193           (app-name-key (%make-nsstring "CFBundleExecutable"))
    135194           (app-name-str (%make-nsstring name))
Note: See TracChangeset for help on using the changeset viewer.