Changeset 9699


Ignore:
Timestamp:
Jun 8, 2008, 6:30:52 PM (11 years ago)
Author:
mikel
Message:

building the ide's self-rebuild facility

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/cocoa-ide/ide-self-update.lisp

    r9698 r9699  
    1212(in-package :ccl)
    1313(require :sequence-utils)
     14
     15;;; -----------------------------------------------------------------
     16;;; IDE automated self-rebuild
     17;;; -----------------------------------------------------------------
     18;;; normally we run the self-rebuild after an update from the
     19;;; source repo. the steps are:
     20;;; 1. rename Clozure CL.app to Clozure CL-last.app
     21;;;    (check for older versions and rename with a numbering scheme)
     22;;; 2. run an external process that starts ccl and evaluates (rebuild-ccl :full t)
     23;;; 3. run an external process that starts ccl and evaluates (require :cocoa-application)
     24;;; 4. quit the current IDE (with a farewell message to the effect that the IDE has been rebuilt)
     25;;; 5. relaunch the IDE (?)
     26;;; (for a simple way to quit and relaunch, see http://www.cocoabuilder.com/archive/message/cocoa/2008/3/3/200352)
     27
     28(defun ide-self-rebuild ()
     29  (let* ((ccl-dir (gui::find-ccl-directory))
     30         (bundle (probe-file (merge-pathnames "Clozure CL.app" ccl-dir))))
     31    (if bundle
     32        (let* ((lisp (merge-pathnames (standard-kernel-name) ccl-dir)))
     33          lisp)
     34        ;; else: the bundle doesn't seem to be there
     35        (gui::alert-window :title "Rebuilding CCL Failed"
     36                        :message (format nil
     37                                         "Can't find the application '~A'."
     38                                         bundle)))))
    1439
    1540;;; -----------------------------------------------------------------
     
    237262    (t (let ((status (svn-update directory)))
    238263         (if (zerop status)
    239              (gui::alert-window :title "Update Succeeded"
     264             (progn
     265               ;; notify the user that the update succeeded and we'll now rebuild
     266               (gui::alert-window :title "Update Succeeded"
    240267                        :message (format nil "Subversion updated CCL source directory '~A'. CCL needs to be rebuilt."
    241268                                         directory))
     269               (ide-self-rebuild))
    242270             (gui::alert-window :title "Update Failed"
    243271                        :message (format nil "Subversion update of CCL directory '~A' failed with error code ~A."
Note: See TracChangeset for help on using the changeset viewer.