Giter Club home page Giter Club logo

Comments (2)

bohonghuang avatar bohonghuang commented on August 20, 2024

Just as your description, asdf:program-op works, but it seems that program-op does not have a core compression option;

Add the following code to the ASD file of your application:

#+sb-core-compression
(defmethod asdf:perform ((o asdf:image-op) (c asdf:system))
  (uiop:dump-image (asdf:output-file o c) :executable t :compression t))

and if I try to use sb-ext:save-lisp-and-die straightly, another issue happened: The restored image cannot load GIR namespace correctly, even if I have specified correct path to girepository-1.0/ using gir:repository-prepend-search-path. The required namespace seems always empty, expressions like (gir:nget (gir:require-namespace "Gtk") "Application") will return NIL.

If the following code is functioning properly, the problem should not occur:

cl-gtk4/cl-gtk4.asd

Lines 16 to 22 in ff60e34

(uiop:register-image-restore-hook
(lambda ()
(let* ((namespace "Gtk")
(package (find-package (string-upcase namespace))))
(when package
(setf (symbol-value (find-symbol "*NS*" package))
(uiop:symbol-call :gir :require-namespace namespace "4.0"))))))

If I just want to apply core compression, uiop:dump-image will be useful, which is the inner function of program-op. The core facility that makes it useful maybe is uiop:restore-image, which will automatically execute after image loaded, and will reset variables to previous state.

from cl-gtk4.

apr3vau avatar apr3vau commented on August 20, 2024

Thank you! I will take a look...

from cl-gtk4.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.