Created
October 4, 2023 01:54
-
-
Save sgithens/2955fa6c7299a579b2ba3a6cb168f068 to your computer and use it in GitHub Desktop.
Hacking to get all of current Boxer source to load/compile in to SBCL with asdf and fail on an actual unit test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/boxer-sunrise-test.asd b/boxer-sunrise-test.asd | |
index 212c92a..9466ba6 100644 | |
--- a/boxer-sunrise-test.asd | |
+++ b/boxer-sunrise-test.asd | |
@@ -21,7 +21,7 @@ | |
(:test-file "alternate-names-tests") | |
;; (:test-file "chunker-tests") | |
(:test-file "vrtdef-tests") | |
- (:test-file "loader-tests") | |
+ ; (:test-file "loader-tests") | |
(:test-file "keydef-high-tests") | |
(:test-file "gdispl-tests") | |
(:test-file "dumper-tests") | |
diff --git a/boxer-sunrise.asd b/boxer-sunrise.asd | |
index 1a7aeb9..5bb2468 100644 | |
--- a/boxer-sunrise.asd | |
+++ b/boxer-sunrise.asd | |
@@ -25,6 +25,7 @@ | |
:pngload | |
:qbase64 | |
:quri | |
+ :serapeum | |
:trivial-garbage | |
:uiop | |
:zip | |
@@ -51,7 +52,7 @@ | |
(:file "freetype-fonts") | |
(:file "draw-low-opengl"))) | |
- (:file "boxwin/lw-capi/boxwin-330gl") | |
+ #+lispworks (:file "boxwin/lw-capi/boxwin-330gl") | |
;; Beginning of `DRAW` module | |
(:file "draw/draw-high-common") | |
@@ -174,8 +175,8 @@ | |
(:file "compiler/comp") | |
;; Beginning of `STEPPER` module | |
;; "The Movie Stepper" | |
- (:file "stepper/stepper") | |
- (:file "stepper/stepper-eval") | |
+ #+lispworks (:file "stepper/stepper") | |
+ #+lispworks (:file "stepper/stepper-eval") | |
;; Beginning of `FILESYSTEM` module | |
;; "Saving and Restoring Boxes To/From Files" | |
@@ -245,14 +246,14 @@ | |
(:file "coms/popup") | |
;; Beginning of `keys` module | |
;; "Install Commands on Specific Keys" | |
- (:file "keydef/keys-new") | |
+ #+lispworks (:file "keydef/keys-new") | |
;; Beginning of `UTILITIES` module | |
;; "Various useful tools for Boxer system hacking" | |
(:file "utilities/mcl-utils") | |
;; Beginning of `printer` module | |
;; "Utilities for printing out boxes in various ways" | |
;; (:file "printer/ps") | |
- (:file "printer/deep-print") | |
+ #+lispworks (:file "printer/deep-print") | |
;; Beginning of `site` modules | |
;; "Utilities for Site specific customizations" | |
(:file "site/site") | |
diff --git a/docs/dev-debugging-inspecting.md b/docs/dev-debugging-inspecting.md | |
index b930cdb..bec60d5 100644 | |
--- a/docs/dev-debugging-inspecting.md | |
+++ b/docs/dev-debugging-inspecting.md | |
@@ -41,7 +41,9 @@ be restarted at the REPL with: | |
## Using `trace` | |
+``` | |
(trace (boxer::reset-region :break (equal boxer::*debug-reset-region* t))) | |
+``` | |
## Dumping the contents of a Box file | |
diff --git a/src/av/av-stubs.lisp b/src/av/av-stubs.lisp | |
index 2306f71..8e839ec 100644 | |
--- a/src/av/av-stubs.lisp | |
+++ b/src/av/av-stubs.lisp | |
@@ -99,7 +99,7 @@ | |
(cond ((eq rate 'bu::normal) *normal-frame-pause-time*) | |
((eq rate 'bu::fastest) 0) | |
((numberp rate) (/ .1 (abs rate))) | |
- (t (error "~A is not a legal playback rate")))) | |
+ (t (error "~A is not a legal playback rate" rate)))) | |
;; ****stub**** | |
;; Note: need to also handle audio only | |
@@ -238,7 +238,7 @@ | |
;; here temporarily | |
;; as in option-a-key (a for av ? can't use "v" because it's already taken) | |
-(boxer-eval::defboxer-key (bu::a-key 4) com-make-av-box) | |
+#+lispworks (boxer-eval::defboxer-key (bu::a-key 4) com-make-av-box) | |
;; Primitives | |
(boxer-eval::defboxer-primitive bu::set-av-file ((bu::port-to av-box) | |
diff --git a/src/boxwin/eval-command-loop.lisp b/src/boxwin/eval-command-loop.lisp | |
index d18530b..9c551ac 100644 | |
--- a/src/boxwin/eval-command-loop.lisp | |
+++ b/src/boxwin/eval-command-loop.lisp | |
@@ -148,7 +148,8 @@ | |
(and (not *automagic-lisp-error-handling*) *debug-errors*)) | |
(invoke-debugger c)) | |
((and (not *debug-errors*) (not *automagic-lisp-error-handling*)) | |
- (show-error-dialog (format nil "Lisp Error:~A ~% backtrace: ~%~A" | |
+ ;; TODO sgithens Cross platform version of this | |
+ #+lispworks (show-error-dialog (format nil "Lisp Error:~A ~% backtrace: ~%~A" | |
c (with-output-to-string (str) | |
(dbg::output-backtrace :brief :stream str) | |
(format str "~%~%Verbose:~%") | |
diff --git a/src/chnkpr/chunker.lisp b/src/chnkpr/chunker.lisp | |
index 30b0d75..83f6320 100644 | |
--- a/src/chnkpr/chunker.lisp | |
+++ b/src/chnkpr/chunker.lisp | |
@@ -513,7 +513,7 @@ Oldness and Oldossity..... | |
:adjustable t | |
:element-type | |
#+(or excl lucid) 'string-char | |
- #+(or lispworks mcl symbolics) 'character))) | |
+ #+(or lispworks mcl symbolics sbcl ecl) 'character))) | |
(defun chunk-string () | |
(let ((cs (or (pop *chunk-strings*) | |
@@ -522,7 +522,7 @@ Oldness and Oldossity..... | |
:adjustable t | |
:element-type | |
#+(or excl lucid) 'string-char | |
- #+(or lispworks mcl symbolics) 'character)))) | |
+ #+(or lispworks mcl symbolics sbcl ecl) 'character)))) | |
(setf (fill-pointer cs) 0) | |
cs)) | |
diff --git a/src/coms/coms-fs.lisp b/src/coms/coms-fs.lisp | |
index 9e69e57..0c66728 100644 | |
--- a/src/coms/coms-fs.lisp | |
+++ b/src/coms/coms-fs.lisp | |
@@ -388,7 +388,7 @@ Modification History (most recent at top) | |
(defboxer-command com-export-box-as (&optional (ffc *default-ffc*)) | |
"Write the contents of a box out in a different format" | |
(catch 'cancel-boxer-file-dialog | |
- (let ((filename (capi:prompt-for-file "Export box to..." | |
+ #+lispworks (let ((filename (capi:prompt-for-file "Export box to..." | |
:filter (ffc-file-filter ffc) | |
:filters *foreign-file-filters* | |
:operation :save | |
diff --git a/src/coms/coms-oglmouse.lisp b/src/coms/coms-oglmouse.lisp | |
index 15ac03d..f78e7e8 100644 | |
--- a/src/coms/coms-oglmouse.lisp | |
+++ b/src/coms/coms-oglmouse.lisp | |
@@ -267,7 +267,7 @@ | |
;(repaint-cursor) | |
boxer-eval::*novalue*) | |
-(defboxer-command com-mouse-define-region (&optional (window *boxer-pane*) | |
+#+lispworks (defboxer-command com-mouse-define-region (&optional (window *boxer-pane*) | |
(x (bw::boxer-pane-mouse-x)) | |
(y (bw::boxer-pane-mouse-y)) | |
(mouse-bp | |
@@ -763,7 +763,7 @@ | |
"Can't Resize the Outermost Box. Resize the Window instead.")) | |
(t | |
;; mouse grab, interactive loop | |
- (multiple-value-bind (box-window-x box-window-y) | |
+ #+lispworks (multiple-value-bind (box-window-x box-window-y) | |
(xy-position screen-box) | |
(multiple-value-bind (left top right bottom) | |
(box-borders-widths box-type screen-box) | |
@@ -1420,7 +1420,7 @@ | |
(com-scroll-up-row screen-box) | |
(com-scroll-dn-row screen-box)) | |
;; do one thing, show it, then pause... | |
- (capi::apply-in-pane-process *boxer-pane* #'repaint t) | |
+ #+lispworks (capi::apply-in-pane-process *boxer-pane* #'repaint t) | |
(simple-wait-with-timeout *initial-scroll-pause-time* #'(lambda () (zerop& (mouse-button-state)))) | |
;; sgithens 2021-03-11 This `if` is a temporary crash fix, as this method keeps getting called when there are | |
@@ -1566,7 +1566,7 @@ | |
(no-of-rows (length-in-rows eb))) | |
;; bind these so we dont have to calculate them for each iteration | |
;; of the tracking loop | |
- (boxer-window::with-mouse-tracking ((mouse-x x) (mouse-y y)) | |
+ #+lispworks (boxer-window::with-mouse-tracking ((mouse-x x) (mouse-y y)) | |
(declare (ignore mouse-x)) | |
(set-v-scroll-row screen-box | |
(min (/ (max 0 (- mouse-y y-offset)) v-working-height) 1) | |
diff --git a/src/coms/popup.lisp b/src/coms/popup.lisp | |
index f51ac51..fa37b4a 100644 | |
--- a/src/coms/popup.lisp | |
+++ b/src/coms/popup.lisp | |
@@ -243,7 +243,7 @@ Modification History (most recent at top) | |
(swap-graphics-buffers) | |
;; loop | |
(let ((current-y 0) (current-height 0)) | |
- (boxer-window::with-mouse-tracking ((mouse-x real-x) (mouse-y real-y)) | |
+ #+lispworks (boxer-window::with-mouse-tracking ((mouse-x real-x) (mouse-y real-y)) | |
(let ((local-x (- mouse-x real-x)) (local-y (- mouse-y real-y))) | |
(if (and (< 0 local-x mwid) (< 0 local-y mhei)) | |
;; this means we are IN the popup | |
diff --git a/src/draw-low-opengl330/freetype-fonts.lisp b/src/draw-low-opengl330/freetype-fonts.lisp | |
index 60b4db9..9ca1afe 100644 | |
--- a/src/draw-low-opengl330/freetype-fonts.lisp | |
+++ b/src/draw-low-opengl330/freetype-fonts.lisp | |
@@ -175,7 +175,7 @@ | |
(gl:bind-texture :texture-2d 0) | |
(incf *gl-glyph-texture-count*) | |
- (log:debug "~%glyph-texture: ~A mp: ~A" glyph-texture (mp:get-current-process)) | |
+ #+lispworks (log:debug "~%glyph-texture: ~A mp: ~A" glyph-texture (mp:get-current-process)) | |
glyph-texture)) | |
;;; | |
diff --git a/src/draw-low-opengl330/pixmap.lisp b/src/draw-low-opengl330/pixmap.lisp | |
index 2b0691f..24037be 100644 | |
--- a/src/draw-low-opengl330/pixmap.lisp | |
+++ b/src/draw-low-opengl330/pixmap.lisp | |
@@ -34,8 +34,8 @@ Modification History (most recent at top) | |
(in-package :boxer) | |
-(defvar *pixmap-data-type* opengl::*gl-rgba*) | |
-(defvar *pixmap-data-format* opengl::*gl-unsigned-byte*) | |
+(defvar *pixmap-data-type* :rgba) | |
+(defvar *pixmap-data-format* :unsigned-byte) | |
(defvar *pixmap-ffi-type* :unsigned-int | |
"The pointer type for foreign-alloc and reference of pixmap data") | |
diff --git a/src/editor-high/comdef.lisp b/src/editor-high/comdef.lisp | |
index db3238e..730122f 100644 | |
--- a/src/editor-high/comdef.lisp | |
+++ b/src/editor-high/comdef.lisp | |
@@ -562,7 +562,8 @@ Modification History (most recent at top) | |
(repaint) | |
(setq icon-on? nil))) | |
(icon-on) | |
- (multiple-value-bind (final-x final-y) | |
+ ;; TODO need a cross platform with-mouse-tracking | |
+ #+lispwork (multiple-value-bind (final-x final-y) | |
(boxer-window::with-mouse-tracking ((mouse-x x) (mouse-y y)) | |
(progn | |
(cond ((and (null icon-on?) | |
diff --git a/src/editor-high/oglscroll.lisp b/src/editor-high/oglscroll.lisp | |
index 83114e0..0c88b13 100644 | |
--- a/src/editor-high/oglscroll.lisp | |
+++ b/src/editor-high/oglscroll.lisp | |
@@ -806,11 +806,11 @@ Modification History (most recent at top) | |
;; the horizontal scrolling elevator which is where the new scrolling location is | |
;; calculated from | |
(declare (ignore box-window-y)) | |
- (ignore-errors | |
+ #+lispworks (ignore-errors | |
(let ((x-offset (+ box-window-x h-min-x)) | |
(h-working-width (- h-max-x h-min-x))) | |
(with-mouse-tracking ((mouse-x x) (mouse-y y)) | |
- (declare (ignore mouse-y)) | |
+ ; (declare (ignore mouse-y)) | |
(setf (slot-value screen-box 'scroll-x-offset) | |
(- (round (* (min (/ (max 0 (- mouse-x x-offset)) h-working-width) 1) | |
(- (slot-value screen-box 'max-scroll-wid) | |
diff --git a/src/grfdefs/gdispl.lisp b/src/grfdefs/gdispl.lisp | |
index ba523c2..944e531 100644 | |
--- a/src/grfdefs/gdispl.lisp | |
+++ b/src/grfdefs/gdispl.lisp | |
@@ -244,7 +244,7 @@ Modification History (most recent at the top) | |
(defun get-graphics-command-descriptor (opcode) | |
(let ((gc (gethash opcode *graphics-commands*))) | |
(make-graphics-command-descriptor :name (slot-value gc 'name) | |
- :slot (slot-value gc 'command-args) | |
+ :slots (slot-value gc 'command-args) | |
:transform-template (slot-value gc 'transform-template)) | |
)) | |
) | |
@@ -602,10 +602,11 @@ Modification History (most recent at the top) | |
;;; the foreground color is usually undefined until boxer startup time | |
(def-redisplay-initialization | |
- (setq *initial-graphics-state-current-pen-color* *foreground-color* | |
- *graphics-state-current-pen-color* *foreground-color*)) | |
+ (progn | |
+ (setq *initial-graphics-state-current-pen-color* *foreground-color* | |
+ *graphics-state-current-pen-color* *foreground-color*) | |
-(def-redisplay-initialization ; :turtle-shape | |
+; (def-redisplay-initialization ; :turtle-shape | |
(setq *default-graphics-object-shape* | |
(let ((%graphics-list (make-turtle-shape 8)) | |
(*graphics-command-recording-mode* ':boxer)) | |
@@ -632,7 +633,7 @@ Modification History (most recent at the top) | |
(record-boxer-graphics-command-line-segment | |
0.0 (* 2 (/ *turtle-height* 3)) | |
(- *turtle-half-base*) (- (/ *turtle-height* 3.0))) | |
- %graphics-list))) | |
+ %graphics-list)))) | |
;;; puts a graphics list into the initial state by issuing | |
;;; state changing commands when neccessary | |
diff --git a/src/grfdefs/wrap-line.lisp b/src/grfdefs/wrap-line.lisp | |
index cecd876..a1fea29 100644 | |
--- a/src/grfdefs/wrap-line.lisp | |
+++ b/src/grfdefs/wrap-line.lisp | |
@@ -142,7 +142,7 @@ | |
((beyond-top? to-y) ; y-intercept ? | |
;; must intersect with the top edge instead | |
(line-top-then-continue | |
- (top-x-intercept from-x from-y))) | |
+ (top-x-intercept from-x from-y slope))) | |
(t | |
;; must intersect with the bottom edge | |
(line-bottom-then-continue | |
diff --git a/src/keydef/keydef-high.lisp b/src/keydef/keydef-high.lisp | |
index 03b5f6d..a8eb794 100755 | |
--- a/src/keydef/keydef-high.lisp | |
+++ b/src/keydef/keydef-high.lisp | |
@@ -520,7 +520,7 @@ | |
; | |
;;; initial setup | |
-(eval-when (eval load) | |
+#+lispworks (eval-when (eval load) | |
(initialize-input-lookup-arrays) | |
(make-input-devices *initial-platform* nil) | |
) | |
@@ -621,7 +621,7 @@ | |
(mouse-position-values x-pos y-pos) | |
(declare (ignore mouse-bp local-x local-y)) | |
(lookup-click-name click bits area)))) | |
- ((sys:gesture-spec-p data) | |
+ #+lispworks ((sys:gesture-spec-p data) | |
(lookup-key-name (sys:gesture-spec-data data) (sys:gesture-spec-modifiers data))) | |
(t nil))) | |
diff --git a/src/keydef/keydef-lwm.lisp b/src/keydef/keydef-lwm.lisp | |
index a6f6354..9a55c2c 100644 | |
--- a/src/keydef/keydef-lwm.lisp | |
+++ b/src/keydef/keydef-lwm.lisp | |
@@ -196,7 +196,7 @@ Modification History (most recent at top) | |
the character code from the data bit. | |
For resolution of the modifiers, see `convert-gesture-spec-modifier` which converts the | |
gesture spec to boxers internal mapping of modifier keys." | |
- (let ((data (sys::gesture-spec-data gesture))) | |
+ #+lispworks (let ((data (sys::gesture-spec-data gesture))) | |
(cond ((numberp data) | |
(code-char data)) | |
((symbolp data) ;; TODO sgithens, when does this have a symbol for data and how to handle it in boxer-command-loop-internal | |
diff --git a/src/keydef/keys-new.lisp b/src/keydef/keys-new.lisp | |
index afe7a7e..d00d2cb 100755 | |
--- a/src/keydef/keys-new.lisp | |
+++ b/src/keydef/keys-new.lisp | |
@@ -392,7 +392,7 @@ | |
;; been binding to ctrl. Once we fix Command bindings, perhaps these bindings should be reviewed, | |
;; especially since ctrl-click is often used on MacOS to mimic a right click. | |
-(boxer-eval::defboxer-key bu::mouse-down com-mouse-define-region) | |
+#+lispworks (boxer-eval::defboxer-key bu::mouse-down com-mouse-define-region) | |
(boxer-eval::defboxer-key bu::mouse-click com-mouse-expand-box) | |
diff --git a/src/primitives/build.lisp b/src/primitives/build.lisp | |
index 4f94b98..e1590fb 100644 | |
--- a/src/primitives/build.lisp | |
+++ b/src/primitives/build.lisp | |
@@ -85,8 +85,8 @@ There are several parts to this file. | |
(forms nil) | |
(eval-list nil)) | |
-(defsubst cbo-code (x) (compiled-boxer-object-code x)) | |
-(defsubst cbo-args (x) (compiled-boxer-object-args x)) | |
+#+lispworks (defsubst cbo-code (x) (compiled-boxer-object-code x)) | |
+#+lispworks (defsubst cbo-args (x) (compiled-boxer-object-args x)) | |
;;;; Formal Arg Objects | |
diff --git a/src/primitives/file-prims.lisp b/src/primitives/file-prims.lisp | |
index 0910d55..477dba6 100755 | |
--- a/src/primitives/file-prims.lisp | |
+++ b/src/primitives/file-prims.lisp | |
@@ -1262,11 +1262,11 @@ Modification History (most recent at top) | |
(values))) | |
;;; spread it around | |
-(import 'salvage-boxer-world (find-package 'user)) | |
-(import 'salvage-boxer-world (find-package :boxer-window)) | |
-(import 'salvage-boxer-world (find-package :boxer-eval)) | |
+#+lispworks (import 'salvage-boxer-world (find-package 'user)) | |
+#+lispworks (import 'salvage-boxer-world (find-package :boxer-window)) | |
+#+lispworks (import 'salvage-boxer-world (find-package :boxer-eval)) | |
;; might as well be paranoid... | |
-(import 'salvage-boxer-world (find-package :boxer-user)) | |
+#+lispworks (import 'salvage-boxer-world (find-package :boxer-user)) | |
diff --git a/src/primitives/grprim2.lisp b/src/primitives/grprim2.lisp | |
index 1280e7e..68b70b7 100755 | |
--- a/src/primitives/grprim2.lisp | |
+++ b/src/primitives/grprim2.lisp | |
@@ -332,7 +332,7 @@ | |
;;; add throttling, i.e. dont record movement if there hasn't been any (or enough) | |
(defsprite-function bu::follow-mouse () (sprite turtle) | |
- (let ((screen-box (or (car (fast-memq (bp-screen-box *mouse-bp*) | |
+ #+lispworks (let ((screen-box (or (car (fast-memq (bp-screen-box *mouse-bp*) | |
;; is *mouse-bp* valid ? | |
(get-visible-screen-objs | |
(slot-value turtle 'assoc-graphics-box)))) | |
diff --git a/src/primitives/process-prims.lisp b/src/primitives/process-prims.lisp | |
index a7dd4e7..8323925 100644 | |
--- a/src/primitives/process-prims.lisp | |
+++ b/src/primitives/process-prims.lisp | |
@@ -406,10 +406,10 @@ If the box was not entered with EDIT-BOX, just insert a return." | |
:state-variables (*lexical-variables-root* *dynamic-variables-bottom*) | |
:before | |
(let* ((input (bw::get-boxer-input)) | |
- (mouse-p (not (or (system:gesture-spec-p input) (boxer::key-event? input))))) | |
+ (mouse-p (not (or #+lispworks (system:gesture-spec-p input) (boxer::key-event? input))))) | |
(multiple-value-bind (name mouse-bp) | |
(if (not mouse-p) | |
- (progn (if (system:gesture-spec-p input) | |
+ #+lispworks (progn (if (system:gesture-spec-p input) | |
(let* ((data (sys::gesture-spec-data input)) | |
(charcode (bw::input-gesture->char-code input)) | |
(charbits (sys:gesture-spec-modifiers input))) | |
diff --git a/src/primitives/sysprims.lisp b/src/primitives/sysprims.lisp | |
index fb53491..b1d2be0 100644 | |
--- a/src/primitives/sysprims.lisp | |
+++ b/src/primitives/sysprims.lisp | |
@@ -428,7 +428,7 @@ | |
editor | |
("Display the toolbar on the boxer editor window?")) | |
(setq bw::*boxer-window-show-toolbar-p* true-or-false) | |
- (capi::apply-in-pane-process *boxer-pane* #'bw::update-visible-editor-panes) | |
+ #+lispworks (capi::apply-in-pane-process *boxer-pane* #'bw::update-visible-editor-panes) | |
boxer-eval::*novalue*) | |
(defboxer-preference bu::boxer-window-show-statusbar (true-or-false) | |
@@ -437,7 +437,7 @@ | |
editor | |
("Display the status bar on the boxer editor window?")) | |
(setq bw::*boxer-window-show-statusbar-p* true-or-false) | |
- (capi::apply-in-pane-process *boxer-pane* #'bw::update-visible-editor-panes) | |
+ #+lispworks (capi::apply-in-pane-process *boxer-pane* #'bw::update-visible-editor-panes) | |
boxer-eval::*novalue*) | |
(defboxer-preference bu::report-crash (true-or-false) | |
diff --git a/src/script-support/applescript.lisp b/src/script-support/applescript.lisp | |
index 5cad9b9..a5009e9 100644 | |
--- a/src/script-support/applescript.lisp | |
+++ b/src/script-support/applescript.lisp | |
@@ -60,7 +60,7 @@ close-movie | |
(defun startup-applescript () | |
- (setq *applescript-stream* (sys:open-pipe nil :direction :io) | |
+ #+lispworks (setq *applescript-stream* (sys:open-pipe nil :direction :io) | |
*applescript-running?* T)) | |
(defun stop-applescript () | |
@@ -136,7 +136,7 @@ close-movie | |
(force-output *applescript-stream*)) | |
(cond ((null rtype) boxer-eval::*novalue*) | |
(t | |
- (mp:process-wait-local-with-timeout-and-periodic-checks "Applescript Response" | |
+ #+lispworks (mp:process-wait-local-with-timeout-and-periodic-checks "Applescript Response" | |
*apple-script-response-max-wait-time* | |
*apple-script-response-poll-period* | |
#'(lambda () (listen *applescript-stream*))) | |
diff --git a/src/site/xten.lisp b/src/site/xten.lisp | |
index 4912bd9..a2ec044 100644 | |
--- a/src/site/xten.lisp | |
+++ b/src/site/xten.lisp | |
@@ -122,7 +122,7 @@ Modification History (most recent at top) | |
(dolist (x (get-xtns)) (load-extension x))) | |
(defun get-xtns (&optional (dir (xdir))) | |
- (remove-duplicates | |
+ #+lispworks (remove-duplicates | |
(mapcar #'pathname-name | |
(directory (make-pathname :directory dir :name "*" | |
:type #+(and mcl powerpc) "PPC" | |
@@ -136,13 +136,13 @@ Modification History (most recent at top) | |
#'(lambda (f) (eq (ccl::mac-file-type f) :BOXE)))))) | |
(defun xpath (name &optional (dir (xdir))) | |
- (make-pathname :directory dir :name name | |
+ #+lispworks (make-pathname :directory dir :name name | |
:type #+(and mcl powerpc) "PPC" | |
#+(and mcl (not powerpc)) "68K" | |
#+win32 "bxe")) | |
(defun load-extension (x) | |
- (let ((xpath (xpath x))) | |
+ #+lispworks (let ((xpath (xpath x))) | |
(when (and (probe-file xpath) #+ccl (eq (ccl::mac-file-type xpath) :BOXE)) | |
(multiple-value-bind (major minor patch version-string version-info) | |
(xten-info xpath) | |
@@ -212,7 +212,7 @@ Modification History (most recent at top) | |
;; returns 3 boxes, currently loaded extensions, the startup list and the list | |
;; of available extensions | |
-(boxer-eval::defboxer-primitive bu::extension-info () | |
+#+lispworks (boxer-eval::defboxer-primitive bu::extension-info () | |
(insure-extension-dirs) | |
(let* ((current (mapcar #'boxer-extension-pretty-name *boxer-extensions*)) | |
(available (append (get-xtns (xdir)) (get-xtns (dxdir)))) | |
@@ -246,7 +246,7 @@ Modification History (most recent at top) | |
(defun xname-from-box (box) | |
(string-trim '(#\space #\tab #\newline) (box-text-string box))) | |
-(boxer-eval::defboxer-primitive bu::add-extension (x) | |
+#+lispworks (boxer-eval::defboxer-primitive bu::add-extension (x) | |
(insure-extension-dirs) | |
(let ((xstring (xname-from-box x)) | |
(current (get-xtns)) | |
@@ -264,7 +264,7 @@ Modification History (most recent at top) | |
"into the \"Extensions\" folder")))) | |
boxer-eval::*novalue*) | |
-(boxer-eval::defboxer-primitive bu::remove-extension (x) | |
+#+lispworks (boxer-eval::defboxer-primitive bu::remove-extension (x) | |
(insure-extension-dirs) | |
(let ((xstring (xname-from-box x)) | |
(current (get-xtns))) | |
@@ -319,7 +319,7 @@ Modification History (most recent at top) | |
|# | |
-(boxer-eval::defboxer-primitive bu::load-extension (x) | |
+#+lispworks (boxer-eval::defboxer-primitive bu::load-extension (x) | |
(insure-extension-dirs) | |
;(ccl::eval-enqueue `(load-extension ,(xname-from-box x))) | |
(load-extension (xname-from-box x)) | |
diff --git a/src/start-boxer.lisp b/src/start-boxer.lisp | |
index 7ba0fb8..a114cb4 100644 | |
--- a/src/start-boxer.lisp | |
+++ b/src/start-boxer.lisp | |
@@ -43,8 +43,8 @@ | |
other possible fixes. Hopefully this will be removed in the near future and the | |
asdf:load-system call used instead. | |
(asdf:load-system :cl-freetype2)" | |
- (let ((freetype-deps-dir (make-pathname | |
- :host (pathname-host (lw:lisp-image-name)) | |
+ #+lispworks (let ((freetype-deps-dir (make-pathname | |
+ :host (pathname-host #+lispworks (lw:lisp-image-name)) | |
:directory (append contents-dir '("PlugIns" | |
#+(and lispworks8 arm64 mac) "lw8-macos-arm" | |
#+(and lispworks8 x86-64 mac) "lw8-macos-x86" | |
@@ -86,8 +86,8 @@ | |
(log:info "Starting boxer") | |
;; Here we are adding the Resources/libs directory of the application bundle | |
;; which will libfreetype.6.dylib, as well as any other *.dylib and *.dll files. | |
- (pushnew | |
- (make-pathname :host (pathname-host (lw:lisp-image-name)) | |
+ #+lispworks (pushnew | |
+ (make-pathname :host (pathname-host #+lispworks (lw:lisp-image-name)) | |
:directory(append (base-install-folder) | |
'("Frameworks" | |
#+(and lispworks8 arm64) "lw8-macos-arm"))) | |
@@ -96,24 +96,24 @@ | |
(load-compiled-freetype-fasl-files) | |
- (setf *resources-dir* (make-pathname | |
- :host (pathname-host (lw:lisp-image-name)) | |
+ #+lispworks (setf *resources-dir* (make-pathname | |
+ :host (pathname-host #+lispworks (lw:lisp-image-name)) | |
:directory (append (base-install-folder) '("Resources")))) | |
- (setf *shaders-dir* (make-pathname | |
- :host (pathname-host (lw:lisp-image-name)) | |
+ #+lispworks (setf *shaders-dir* (make-pathname | |
+ :host (pathname-host #+lispworks (lw:lisp-image-name)) | |
:directory (append (base-install-folder) '("PlugIns" "shaders")))) | |
;; Adding the fonts directory based on whereever this MacOS application happens to | |
;; be running from. | |
- (setf *capogi-font-directory* (make-pathname | |
- :host (pathname-host (lw:lisp-image-name)) | |
+ #+lispworks (setf *capogi-font-directory* (make-pathname | |
+ :host (pathname-host #+lispworks (lw:lisp-image-name)) | |
:directory (append (base-install-folder) '("Resources" "Fonts")))) | |
;; See the above comments on freetype, but we are manually loading our code for it | |
;; here, because the freetype package is not yet declared when we build our system. | |
- (load (make-pathname | |
- :host (pathname-host (lw:lisp-image-name)) | |
+ #+lispworks (load (make-pathname | |
+ :host (pathname-host #+lispworks (lw:lisp-image-name)) | |
:directory (append (base-install-folder) '("PlugIns")) | |
:name "freetype-fonts" :type "lisp")) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment