Lisp HUG Maillist Archive

Current path for system

This is a common practice I use in LW and I just wanted to check and see 
if this is really a good idea or if there's something better I could be 
doing?

(defconstant +project-path+
   (eval-when (:compile-toplevel :load-toplevel)
     (or *load-pathname* *compile-file-pathname*)))

(defsystem project (:default-pathname +project-path+) ...)

This works for my purposes just fine, but I'm not quite sure if - for 
example - it won't work for delivery or if there's other ways to do this 
better? Should I just be setting the current directory instead of 
setting the :default-pathname? Something else?

Jeff M.

_______________________________________________
Lisp Hug - the mailing list for LispWorks users
lisp-hug@lispworks.com
http://www.lispworks.com/support/lisp-hug.html


Re: Current path for system

Jeffrey Massung <massung@gmail.com> writes:

> This works for my purposes just fine, but I'm not quite sure if - for
> example - it won't work for delivery or if there's other ways to do
> this better? Should I just be setting the current directory instead of
> setting the :default-pathname? Something else?

I'm not quite sure what you're going to use this pathname for in an
delivered application, but you may consider using
#'common-lisp:user-homedir-pathname

(user-homedir-pathname) usually returns something useful on most
platforms, but may be a bit unreliable on old windows versions and on
badly managed Windows networks.
-- 
  (espen)

_______________________________________________
Lisp Hug - the mailing list for LispWorks users
lisp-hug@lispworks.com
http://www.lispworks.com/support/lisp-hug.html


Re: Current path for system

Unable to parse email body. Email id is 12402

Re: Current path for system

Unable to parse email body. Email id is 12405

Updated at: 2020-12-10 08:35 UTC