Lisp image loading
Thu May 14 14:27:03 CEST 2009 Tobias Rautenkranz <tobias@rautenkranz.ch>
* Lisp image loading
addfile ./make-bundle.sh
hunk ./make-bundle.sh 1
+#!/bin/sh
+if [[ $# -ne 0 ]]; then
+ echo "Create a qt.examples bundle."
+ echo "Usage: $0"
+ exit 1
+fi
+
+sbcl \
+ --eval '(mb:load :qt.examples)' \
+ --eval "(smoke::add-startup-function #'(lambda() (format t \"\
+cl-smoke: build: `date -R`~%\
+Run examples with: (qt.examples:launcher)\")))" \
+ --eval "(smoke:save-bundle \"cl-smoke-qt.examples.linux.x86.run\"\
+ '(\"src/widget.ui\" \"src/hello-world_de.qm\"))" \
+ --eval '(quit)'
hunk ./src/hello-world.lisp 11
- (qt:exec))))
+ (qt:exec widget))))
hunk ./src/hello-world_de.po 9
-"POT-Creation-Date: 2009-05-11 18:00+0200\n"
+"POT-Creation-Date: 2009-05-14 13:56+0200\n"
hunk ./src/hello-world_de.po 19
-#: i18n-hello-world.lisp:18
+#: i18n-hello-world.lisp:19
hunk ./src/hello-world_de.po 24
-#: i18n-hello-world.lisp:19
+#: i18n-hello-world.lisp:20
hunk ./src/i18n-hello-world.lisp 9
- (qt:with-translator [_$_]
- ;; ensures that the message catalogs are found regardless
- ;; of the current directory.
- (concatenate 'string
- (directory-namestring
- (mb.sysdef:input-file
- (mb.sysdef:find-component :qt.examples "src" "i18n-hello-world")))
- "hello-world")
- (let ((widget (make-instance 'qt:label)))
- (setf (cxx:window-title widget) (qt:tr "Lisp Qt Example" "hello-world")
- (cxx:text widget) (format nil (qt:tr "<h1>Hello world</h1>
+ ;; ensures that the message catalogs are found regardless
+ ;; of the current directory.
+ (let ((source-path (directory-namestring
+ (mb.sysdef:input-file
+ (mb.sysdef:find-component :qt.examples "src" [_$_]
+ "i18n-hello-world")))))
+ (qt:with-translator ("hello-world" [_$_]
+ *default-pathname-defaults*
+ source-path)
+ (let ((widget (make-instance 'qt:label)))
+ (setf (cxx:window-title widget) (qt:tr "Lisp Qt Example" "hello-world")
+ (cxx:text widget) (format nil (qt:tr "<h1>Hello world</h1>
hunk ./src/i18n-hello-world.lisp 23
- (lisp-implementation-type)
- (lisp-implementation-version)
- (software-type)
- (software-version)))
- (cxx:show widget)
- (qt:exec widget)))))
+ (lisp-implementation-type)
+ (lisp-implementation-version)
+ (software-type)
+ (software-version)))
+ (cxx:show widget)
+ (qt:exec widget))))))
hunk ./src/ui.lisp 13
- (concatenate 'string
- (directory-namestring
- (mb.sysdef:input-file
- (mb.sysdef:find-component :qt.examples "src" "ui")))
- "widget.ui"))
+ (namestring
+ (qt:search-file "widget.ui"
+ *default-pathname-defaults*
+ (directory-namestring
+ (mb.sysdef:input-file
+ (mb.sysdef:find-component :qt.examples "src" "ui"))))))