+ 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
This commit is contained in:
parent
113662edf2
commit
424ac04194
23
pkg-def.scm
23
pkg-def.scm
|
@ -30,14 +30,19 @@
|
||||||
(libdir (get-directory 'lib #f))
|
(libdir (get-directory 'lib #f))
|
||||||
(load-xft-packages (get-option-value 'with-xft)))
|
(load-xft-packages (get-option-value 'with-xft)))
|
||||||
(write-to-load-script
|
(write-to-load-script
|
||||||
`((user)
|
`((new-package)
|
||||||
(load-package 'dynamic-externals)
|
(load-package 'dynamic-externals)
|
||||||
|
(load-package 'reinitializers)
|
||||||
|
(open 'scheme-with-scsh)
|
||||||
|
(open 'srfi-13)
|
||||||
(open 'dynamic-externals)
|
(open 'dynamic-externals)
|
||||||
(open 'external-calls)
|
(open 'external-calls)
|
||||||
(open 'configure)
|
(open 'configure)
|
||||||
(open 'signals)
|
(open 'signals)
|
||||||
|
(open 'reinitializers)
|
||||||
,@(map (lambda (x) `(run ',x)) tmpl-libtool-la-reader)
|
,@(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"))
|
(la-file-name (string-append lib-dir "/libscx.la"))
|
||||||
(initializer-name "scx_init_xlib"))
|
(initializer-name "scx_init_xlib"))
|
||||||
(let ((la-alist (read-libtool-la la-file-name)))
|
(let ((la-alist (read-libtool-la la-file-name)))
|
||||||
|
@ -46,13 +51,17 @@
|
||||||
=> (lambda (p)
|
=> (lambda (p)
|
||||||
(let ((module-file (string-append lib-dir "/" (cdr p))))
|
(let ((module-file (string-append lib-dir "/" (cdr p))))
|
||||||
(dynamic-load module-file)
|
(dynamic-load module-file)
|
||||||
|
(lookup-all-externals) ;;; important when resuming images
|
||||||
(call-external (get-external initializer-name))
|
(call-external (get-external initializer-name))
|
||||||
,(if load-xft-packages
|
,@(if load-xft-packages
|
||||||
'(begin
|
'((begin
|
||||||
(call-external (get-external "scx_xft_init"))
|
(call-external (get-external "scx_xft_init"))
|
||||||
(call-external (get-external "scx_xrender_init")))))))
|
(call-external (get-external "scx_xrender_init"))))
|
||||||
|
'()))))
|
||||||
(else
|
(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)
|
(config)
|
||||||
(load ,(string-append schemedir "/xlib/xlib-interfaces.scm"))
|
(load ,(string-append schemedir "/xlib/xlib-interfaces.scm"))
|
||||||
(load ,(string-append schemedir "/xlib/xlib-packages.scm"))
|
(load ,(string-append schemedir "/xlib/xlib-packages.scm"))
|
||||||
|
|
Loading…
Reference in New Issue