Skip to content
Snippets Groups Projects
Commit bb90da28 authored by Francois-Rene Rideau's avatar Francois-Rene Rideau
Browse files

1.719: Better, portable windows support.

Also fix a bug in 1.714 (oops) whereby we fail to correctly find symbol-named
components (incorrectly used string instead of coerce-name).
Thanks to Alessandro Piras for beta-testing on Windows SBCL.
parent 46a763d9
No related branches found
No related tags found
No related merge requests found
...@@ -70,7 +70,7 @@ ...@@ -70,7 +70,7 @@
:test 'equalp :key 'car)) :test 'equalp :key 'car))
(let* ((asdf-version (let* ((asdf-version
;; the 1+ helps the version bumping script discriminate ;; the 1+ helps the version bumping script discriminate
(subseq "VERSION:1.718" (1+ (length "VERSION")))) (subseq "VERSION:1.719" (1+ (length "VERSION"))))
(existing-asdf (find-package :asdf)) (existing-asdf (find-package :asdf))
(vername '#:*asdf-version*) (vername '#:*asdf-version*)
(versym (and existing-asdf (versym (and existing-asdf
...@@ -1174,7 +1174,7 @@ to `~a` which is not a directory.~@:>" ...@@ -1174,7 +1174,7 @@ to `~a` which is not a directory.~@:>"
(defmethod find-component ((component component) (name symbol)) (defmethod find-component ((component component) (name symbol))
(if name (if name
(find-component component (string name)) (find-component component (coerce-name name))
component)) component))
(defmethod find-component ((module module) (name cons)) (defmethod find-component ((module module) (name cons))
...@@ -2402,9 +2402,7 @@ located." ...@@ -2402,9 +2402,7 @@ located."
#+(and (or win32 windows mswindows mingw32) (not cygwin)) #+(and (or win32 windows mswindows mingw32) (not cygwin))
,@`(#+lispworks ,(try (sys:get-folder-path :common-appdata) "common-lisp/config/") ,@`(#+lispworks ,(try (sys:get-folder-path :common-appdata) "common-lisp/config/")
;;; read-windows-registry HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders\AppData ;;; read-windows-registry HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders\AppData
#+(not cygwin) ,(try (getenv "APPDATA") "common-lisp/config/"))
,(try (or (getenv "USERPROFILE") (user-homedir))
"Application Data/common-lisp/config/"))
,(try (user-homedir) ".config/common-lisp/"))))) ,(try (user-homedir) ".config/common-lisp/")))))
(defun system-configuration-directories () (defun system-configuration-directories ()
(remove-if (remove-if
...@@ -2476,27 +2474,16 @@ Each mapping is a pair of a source pathname and destination pathname, ...@@ -2476,27 +2474,16 @@ Each mapping is a pair of a source pathname and destination pathname,
and the order is by decreasing length of namestring of the source pathname.") and the order is by decreasing length of namestring of the source pathname.")
(defvar *user-cache* (defvar *user-cache*
(or (flet ((try (x &rest sub) (and x `(,x ,@sub))))
(let ((h (getenv "XDG_CACHE_HOME"))) (or
(and h `(,h "common-lisp" :implementation))) (try (getenv "XDG_CACHE_HOME") "common-lisp" :implementation)
#+(and windows lispworks) #+(and (or win32 windows mswindows mingw32) (not cygwin))
(let ((h (sys:get-folder-path :common-appdata))) ;; no :common-caches in Windows??? (try (getenv "APPDATA") "common-lisp" "cache" :implementation)
(and h `(,h "common-lisp" "cache"))) '(:home ".cache" "common-lisp" :implementation))))
#+(and (or win32 windows mswindows mingw32) (not cygwin))
;;; read-windows-registry HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders\Cache
(let ((h (or (getenv "USERPROFILE") (user-homedir))))
(and h `(,h "Local Settings" "Temporary Internet Files" "common-lisp")))
'(:home ".cache" "common-lisp" :implementation)))
(defvar *system-cache* (defvar *system-cache*
(or ;; No good default, plus there's a security problem
#+(and windows lispworks) ;; with other users messing with such directories.
(let ((h (sys:get-folder-path :common-appdata))) ;; no :common-caches in Windows??? *user-cache*)
(and h `(,h "common-lisp" "cache")))
#+(and (or win32 windows mswindows mingw32) (not cygwin))
(let ((h (or (getenv "USERPROFILE") (user-homedir))))
(and h `(,h "Local Settings" "Temporary Internet Files" "common-lisp")))
#+(or unix cygwin)
'("/var/cache/common-lisp" :uid :implementation)))
(defun output-translations () (defun output-translations ()
(car *output-translations*)) (car *output-translations*))
...@@ -3170,10 +3157,7 @@ with a different configuration, so the configuration would be re-read then." ...@@ -3170,10 +3157,7 @@ with a different configuration, so the configuration would be re-read then."
(or (getenv "XDG_DATA_DIRS") "/usr/local/share:/usr/share")) (or (getenv "XDG_DATA_DIRS") "/usr/local/share:/usr/share"))
(dirs (cons datahome (split-string datadirs :separator ":")))) (dirs (cons datahome (split-string datadirs :separator ":"))))
#+(and (or win32 windows mswindows mingw32) (not cygwin)) #+(and (or win32 windows mswindows mingw32) (not cygwin))
((datahome ((datahome (getenv "APPDATA"))
#+lispworks (sys:get-folder-path :common-appdata)
#-lispworks (try (or (getenv "USERPROFILE") (user-homedir))
"Application Data"))
(datadir (datadir
#+lispworks (sys:get-folder-path :local-appdata) #+lispworks (sys:get-folder-path :local-appdata)
#-lispworks (try (getenv "ALLUSERSPROFILE") #-lispworks (try (getenv "ALLUSERSPROFILE")
......
...@@ -2466,7 +2466,7 @@ a slightly older version about which none of the HEAD users have complained. ...@@ -2466,7 +2466,7 @@ a slightly older version about which none of the HEAD users have complained.
There is also a STABLE version, which is earlier than release. There is also a STABLE version, which is earlier than release.
You may get the ASDF source repository using git: You may get the ASDF source repository using git:
@kbd{git clone http://common-lisp.net/project/asdf/asdf.git} @kbd{git clone git://common-lisp.net/projects/asdf/asdf.git}
You will find the above referenced tags in this repository. You will find the above referenced tags in this repository.
You can also browse the repository on You can also browse the repository on
...@@ -2577,8 +2577,18 @@ ASDF 2 provides a well-documented way to configure ASDF, ...@@ -2577,8 +2577,18 @@ ASDF 2 provides a well-documented way to configure ASDF,
with sensible defaults, adequate configuration languages, with sensible defaults, adequate configuration languages,
and a coherent set of configuration files and hooks. and a coherent set of configuration files and hooks.
We believe it's a vast improvement because it decouples
application distribution from library distribution.
The application writer can avoid thinking where the libraries are,
and the library distributor (dpkg, clbuild, advanced user, etc.)
can configure them once and for every application.
Yet settings can be easily overridden where needed,
so whoever needs control has exactly as much as required.
At the same time, ASDF 2 remains compatible At the same time, ASDF 2 remains compatible
with the old magic you may have in your build scripts with the old magic you may have in your build scripts
(using @code{*central-registry*} and
@code{*system-definition-search-functions*})
to tailor the ASDF configuration to your build automation needs, to tailor the ASDF configuration to your build automation needs,
and also allows for new magic, simpler and more powerful magic. and also allows for new magic, simpler and more powerful magic.
......
...@@ -64,7 +64,7 @@ ...@@ -64,7 +64,7 @@
</li> </li>
<li>pull the latest from our git repository <li>pull the latest from our git repository
(<a href="http://common-lisp.net/gitweb?p=projects/asdf/asdf.git">browse</a>) (<a href="http://common-lisp.net/gitweb?p=projects/asdf/asdf.git">browse</a>)
<pre>git clone http://common-lisp.net/project/asdf/asdf.git</pre> <pre>git clone git://common-lisp.net/projects/asdf/asdf.git</pre>
</li></ul> </li></ul>
<a id="bugs"> <a id="bugs">
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment