mirror of
https://gitlab.com/eql/lqml.git
synced 2025-12-06 02:30:38 -08:00
if app depends on ASDF: require compiler and add path to ASDF registry
This commit is contained in:
parent
0591be3df3
commit
172f940762
2 changed files with 13 additions and 1 deletions
|
|
@ -146,8 +146,14 @@ int main(int argc, char* argv[]) {
|
|||
#endif
|
||||
|
||||
#ifdef INI_ASDF
|
||||
LQML::eval("(x:ensure-compiler)");
|
||||
ecl_init_module(NULL, init_lib_ASDF);
|
||||
LQML::eval("(push *default-pathname-defaults* asdf:*central-registry*)");
|
||||
// needed for desktop/SFOS apps that depend on ASDF and need additional files
|
||||
// at runtime; in this case, the absolute app path must be passed when
|
||||
// launching the app, like 'qt-runner /usr/bin/my-app/my-app' (SFOS)
|
||||
LQML::eval("(let ((path (ext:argv 0)))"
|
||||
" (x:when-it (position #\\/ path :from-end t)"
|
||||
" (push (subseq path 0 (1+ x:it)) asdf:*central-registry*)))");
|
||||
#endif
|
||||
|
||||
// load .eclrc
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@
|
|||
#:d
|
||||
#:do-string
|
||||
#:empty-string
|
||||
#:ensure-compiler
|
||||
#:ensure-list
|
||||
#:ends-with
|
||||
#:it
|
||||
|
|
@ -137,3 +138,8 @@
|
|||
(package-name (symbol-package callback))
|
||||
(symbol-name callback))))
|
||||
|
||||
(defun ensure-compiler ()
|
||||
(ignore-errors (ext:install-c-compiler))
|
||||
(unless (find-symbol "*CC*" :c)
|
||||
(ext:install-bytecodes-compiler)))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue