From 424ac041948c2032160e67a2ab48c5a9c0b6d821 Mon Sep 17 00:00:00 2001 From: mainzelm Date: Thu, 12 Feb 2004 16:32:01 +0000 Subject: [PATCH] + Create a new package before opening anything + Use LOOKUP-ALL-EXTERNALS to reinitialize the external bindings in the VM + Fix code for not loading xft + Define reinitializer (needs sunterlib from CVS) for loading the shared objects --- pkg-def.scm | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/pkg-def.scm b/pkg-def.scm index 9824cf8..307e3f7 100644 --- a/pkg-def.scm +++ b/pkg-def.scm @@ -30,14 +30,19 @@ (libdir (get-directory 'lib #f)) (load-xft-packages (get-option-value 'with-xft))) (write-to-load-script - `((user) + `((new-package) (load-package 'dynamic-externals) + (load-package 'reinitializers) + (open 'scheme-with-scsh) + (open 'srfi-13) (open 'dynamic-externals) (open 'external-calls) (open 'configure) (open 'signals) + (open 'reinitializers) ,@(map (lambda (x) `(run ',x)) tmpl-libtool-la-reader) - (run '(let* ((lib-dir (string-append ,libdir "/" (host))) + (run '(define (init-scx) + (let* ((lib-dir (string-append ,libdir "/" (host))) (la-file-name (string-append lib-dir "/libscx.la")) (initializer-name "scx_init_xlib")) (let ((la-alist (read-libtool-la la-file-name))) @@ -46,13 +51,17 @@ => (lambda (p) (let ((module-file (string-append lib-dir "/" (cdr p)))) (dynamic-load module-file) + (lookup-all-externals) ;;; important when resuming images (call-external (get-external initializer-name)) - ,(if load-xft-packages - '(begin - (call-external (get-external "scx_xft_init")) - (call-external (get-external "scx_xrender_init"))))))) + ,@(if load-xft-packages + '((begin + (call-external (get-external "scx_xft_init")) + (call-external (get-external "scx_xrender_init")))) + '())))) (else - (error "Could not figure out libscx's name" la-file-name)))))) + (error "Could not figure out libscx's name" la-file-name))))))) + (run '(define scx-reinitializer (make-reinitializer init-scx))) + (run '(init-scx)) (config) (load ,(string-append schemedir "/xlib/xlib-interfaces.scm")) (load ,(string-append schemedir "/xlib/xlib-packages.scm"))