Changeset 12644


Ignore:
Timestamp:
05/01/10 17:45:49 (13 years ago)
Author:
Mark Evenson
Message:

Fix for loading ASDF systems from jar files under win32.

Changed synthetic '/:jar:file:/' path into the hopefully never used
'/_jar_file_root_/' string which doesn't turn out to be a
relative pathname under Windows (thanks to Carlos Ungil).

Add Windows drive letter to output translation path to allow
identically named jars on different drives to be handled.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/abcl/src/org/armedbear/lisp/asdf.lisp

    r12618 r12644  
    25172517    #+clozure (,(wilden (ccl::ccl-directory)) ()) ; not needed: no precompiled ASDF system
    25182518    #+abcl (#p"jar:file:/**/*.jar!/**/*.*" (:function translate-jar-pathname))
    2519     #+abcl (#p"/:jar:file/**/*.*" (:user-cache #p"**/*.*"))
     2519    #+abcl (#p"/___jar___file___root___/**/*.*" (:user-cache #p"**/*.*"))
    25202520    ;; All-import, here is where we want user stuff to be:
    25212521    :inherit-configuration
     
    27072707(defun translate-jar-pathname (source wildcard)
    27082708  (declare (ignore wildcard))
    2709   (let ((root (apply-output-translations
    2710                (concatenate 'string
    2711                             "/:jar:file/"
    2712                             (namestring (first (pathname-device
    2713                                                 source))))))
    2714         (entry (make-pathname :directory (pathname-directory source)
    2715                               :name (pathname-name source)
    2716                               :type (pathname-type source))))
     2709  (let* ((p (first (pathname-device source)))
     2710   (r (concatenate 'string 
     2711       (if (and (find :windows *features*)
     2712          (not (null (pathname-device p))))
     2713           (format nil "~A/" (pathname-device p))
     2714           "")
     2715       (namestring (make-pathname :directory (pathname-directory p)
     2716                :name (pathname-name p)
     2717                :type (pathname-type p)))))
     2718   (root (apply-output-translations
     2719    (format nil "/___jar___file___root___/~A" r)))
     2720   (entry (make-pathname :directory (pathname-directory source)
     2721             :name (pathname-name source)
     2722             :type (pathname-type source))))
    27172723    (concatenate 'string (namestring root) (namestring entry))))
    27182724
Note: See TracChangeset for help on using the changeset viewer.