akirakyle / emacs-webkit

An Emacs Dynamic Module for WebKit, aka a fully fledged browser inside emacs
GNU General Public License v3.0
419 stars 24 forks source link

I fixed an issue with the straight.el recipe. #35

Closed Dunkmania101 closed 2 years ago

Dunkmania101 commented 2 years ago

Greetings! As the title states, I think I managed to fix the build process in the straight.el recipe. Specifically, I was getting an error where the ("make") bit was of an invalid type. I haven't seen any other issues regarding this, so I might have just been doing something wrong, but what I've created here fixed it for me:

(defun make-in-dir (dir)
  (start-process-shell-command "make" "*Messages*" (concat "make --directory=" dir)))

(defun straight--build-make-webkit (ignored)
  (make-in-dir (expand-file-name "straight/build/webkit" user-emacs-directory)))

(straight-use-package
 '(webkit :type git :host github :repo "akirakyle/emacs-webkit"
          :branch "main"
          :files (:defaults "*.js" "*.css" "*.so" "*.h" "*.c" "Makefile")
          :build (make-webkit autoloads compile native-compile info)))
;; optional configuration
(defun webkit--display-progress (progress)
  (setq webkit--progress-formatted
        (if (equal progress 100.0)
            ""
          (format "%s%.0f%%  " (all-the-icons-faicon "spinner") progress)))
  (force-mode-line-update))

Hope this helps!

Dunkmania101 commented 2 years ago

Never mind, it looks like all I needed to do was to change :build to :pre-build.

My solution still works, but it's less clean.

akirakyle commented 2 years ago

Thanks, I've updated the readme as straight has changed it's key syntax since