if app depends on ASDF: require compiler and add path to ASDF registry

This commit is contained in:
pls.153 2024-09-28 08:46:40 +02:00
parent 0591be3df3
commit 172f940762
2 changed files with 13 additions and 1 deletions

View file

@ -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