From 45f517b8b71671631cbcb2f790c6fc9690f73d38 Mon Sep 17 00:00:00 2001 From: Vito Van Date: Sun, 28 May 2023 20:05:14 +0800 Subject: [PATCH 01/12] fix version check in panic.lisp for `calm hello` --- s/usr/all/panic.lisp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/s/usr/all/panic.lisp b/s/usr/all/panic.lisp index 497e481f..e50e832b 100644 --- a/s/usr/all/panic.lisp +++ b/s/usr/all/panic.lisp @@ -10,7 +10,8 @@ (when (uiop:version< calm-version required-version) (format t "Sorry, this is built on CALM ~A, older version (current: ~A) of CALM won't work.~%" - required-version calm-versio))) + required-version calm-version) + (uiop:quit))) ;; From a79b1848dcbc0f61cfe5ccc4791e806e56bc5874 Mon Sep 17 00:00:00 2001 From: VitoVan Date: Sun, 28 May 2023 15:10:28 +0000 Subject: [PATCH 02/12] ci: use draft instead of prerelease --- .github/workflows/calm.yml | 8 ++++---- .github/workflows/example-circles.yml | 8 ++++---- .github/workflows/example-fan.yml | 8 ++++---- .github/workflows/example-meditator.yml | 8 ++++---- .github/workflows/example-mondrian.yml | 8 ++++---- .github/workflows/sbcl.yml | 6 +++--- 6 files changed, 23 insertions(+), 23 deletions(-) diff --git a/.github/workflows/calm.yml b/.github/workflows/calm.yml index d00dbfeb..277173b8 100644 --- a/.github/workflows/calm.yml +++ b/.github/workflows/calm.yml @@ -8,7 +8,7 @@ on: jobs: - Linux: + Linux-and-Web: runs-on: ubuntu-22.04 steps: @@ -33,7 +33,7 @@ jobs: - name: GH Release uses: softprops/action-gh-release@v0.1.14 with: - prerelease: true + draft: true files: | *.tar *.tgz @@ -59,7 +59,7 @@ jobs: - name: GH Release uses: softprops/action-gh-release@v0.1.14 with: - prerelease: true + draft: true files: | *.tgz *.dmg @@ -80,7 +80,7 @@ jobs: - name: GH Release uses: softprops/action-gh-release@v0.1.14 with: - prerelease: true + draft: true files: | *.tgz *.zip diff --git a/.github/workflows/example-circles.yml b/.github/workflows/example-circles.yml index 18c988cd..63003803 100644 --- a/.github/workflows/example-circles.yml +++ b/.github/workflows/example-circles.yml @@ -34,7 +34,7 @@ jobs: - name: GH Release uses: softprops/action-gh-release@v0.1.14 with: - prerelease: true + draft: true files: | *-web.zip Linux: @@ -60,7 +60,7 @@ jobs: - name: GH Release uses: softprops/action-gh-release@v0.1.14 with: - prerelease: true + draft: true files: | *.AppImage macOS: @@ -98,7 +98,7 @@ jobs: - name: GH Release uses: softprops/action-gh-release@v0.1.14 with: - prerelease: true + draft: true files: | *.dmg Windows: @@ -128,6 +128,6 @@ jobs: - name: GH Release uses: softprops/action-gh-release@v0.1.14 with: - prerelease: true + draft: true files: | *.exe diff --git a/.github/workflows/example-fan.yml b/.github/workflows/example-fan.yml index 6b7b867d..0cd99530 100644 --- a/.github/workflows/example-fan.yml +++ b/.github/workflows/example-fan.yml @@ -34,7 +34,7 @@ jobs: - name: GH Release uses: softprops/action-gh-release@v0.1.14 with: - prerelease: true + draft: true files: | *-web.zip Linux: @@ -60,7 +60,7 @@ jobs: - name: GH Release uses: softprops/action-gh-release@v0.1.14 with: - prerelease: true + draft: true files: | *.AppImage macOS: @@ -98,7 +98,7 @@ jobs: - name: GH Release uses: softprops/action-gh-release@v0.1.14 with: - prerelease: true + draft: true files: | *.dmg Windows: @@ -128,6 +128,6 @@ jobs: - name: GH Release uses: softprops/action-gh-release@v0.1.14 with: - prerelease: true + draft: true files: | *.exe diff --git a/.github/workflows/example-meditator.yml b/.github/workflows/example-meditator.yml index e059f577..f53504b3 100644 --- a/.github/workflows/example-meditator.yml +++ b/.github/workflows/example-meditator.yml @@ -37,7 +37,7 @@ jobs: - name: GH Release uses: softprops/action-gh-release@v0.1.14 with: - prerelease: true + draft: true files: | *-web.zip Linux: @@ -63,7 +63,7 @@ jobs: - name: GH Release uses: softprops/action-gh-release@v0.1.14 with: - prerelease: true + draft: true files: | *.AppImage macOS: @@ -101,7 +101,7 @@ jobs: - name: GH Release uses: softprops/action-gh-release@v0.1.14 with: - prerelease: true + draft: true files: | *.dmg Windows: @@ -131,6 +131,6 @@ jobs: - name: GH Release uses: softprops/action-gh-release@v0.1.14 with: - prerelease: true + draft: true files: | *.exe diff --git a/.github/workflows/example-mondrian.yml b/.github/workflows/example-mondrian.yml index c4c8579d..8755ba83 100644 --- a/.github/workflows/example-mondrian.yml +++ b/.github/workflows/example-mondrian.yml @@ -34,7 +34,7 @@ jobs: - name: GH Release uses: softprops/action-gh-release@v0.1.14 with: - prerelease: true + draft: true files: | *-web.zip Linux: @@ -60,7 +60,7 @@ jobs: - name: GH Release uses: softprops/action-gh-release@v0.1.14 with: - prerelease: true + draft: true files: | *.AppImage macOS: @@ -98,7 +98,7 @@ jobs: - name: GH Release uses: softprops/action-gh-release@v0.1.14 with: - prerelease: true + draft: true files: | *.dmg Windows: @@ -128,6 +128,6 @@ jobs: - name: GH Release uses: softprops/action-gh-release@v0.1.14 with: - prerelease: true + draft: true files: | *.exe diff --git a/.github/workflows/sbcl.yml b/.github/workflows/sbcl.yml index b1567b45..a8f42293 100644 --- a/.github/workflows/sbcl.yml +++ b/.github/workflows/sbcl.yml @@ -47,7 +47,7 @@ jobs: - name: GH Release uses: softprops/action-gh-release@v0.1.14 with: - prerelease: true + draft: true files: | *.zip @@ -92,7 +92,7 @@ jobs: - name: GH Release uses: softprops/action-gh-release@v0.1.14 with: - prerelease: true + draft: true files: | *.zip @@ -146,6 +146,6 @@ jobs: - name: GH Release uses: softprops/action-gh-release@v0.1.14 with: - prerelease: true + draft: true files: | *.zip From 8f51df6311728d867e0338fec1dd8652a58ae329 Mon Sep 17 00:00:00 2001 From: Vito Van Date: Fri, 2 Jun 2023 16:24:02 +0800 Subject: [PATCH 03/12] refactor c:play-music and c:play-wav use key parameters instead of optional --- src/c.lisp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/c.lisp b/src/c.lisp index a1980b0b..86482c83 100644 --- a/src/c.lisp +++ b/src/c.lisp @@ -154,7 +154,7 @@ #-jscl (sdl2-mixer:allocate-channels 8))) -(defun play-music (pathname &optional (loops 0)) +(defun play-music (pathname &key (loops 0)) (open-audio-if-not-yet) (let* ((music-pathname #+jscl @@ -179,7 +179,7 @@ #-jscl (sdl2-mixer:play-music music-object loops))) -(defun play-wav (pathname &optional (loops 0)) +(defun play-wav (pathname &key (loops 0) (channel -1)) (open-audio-if-not-yet) (let* ((wav-pathname #+jscl @@ -204,9 +204,9 @@ (unless wav-object-cache (push (cons wav-pathname wav-object) calm::*calm-state-loaded-audio*)) #+jscl - (#j:_Mix_PlayChannelTimed -1 wav-object loops -1) + (#j:_Mix_PlayChannelTimed channel wav-object loops -1) #-jscl - (sdl2-mixer:play-channel -1 wav-object loops))) + (sdl2-mixer:play-channel channel wav-object loops))) (defun playing () #+jscl From 0a43f703a4bce758215c4ba696db0127aeafc867 Mon Sep 17 00:00:00 2001 From: Vito Van Date: Fri, 2 Jun 2023 16:24:41 +0800 Subject: [PATCH 04/12] add halt-wav --- src/c.lisp | 6 ++++++ src/package.lisp | 1 + 2 files changed, 7 insertions(+) diff --git a/src/c.lisp b/src/c.lisp index 86482c83..1bf5eab4 100644 --- a/src/c.lisp +++ b/src/c.lisp @@ -220,6 +220,12 @@ #-jscl (sdl2-mixer:halt-music)) +(defun halt-wav (&optional (channel -1)) + #+jscl + (#j:_Mix_HaltChannel channel) + #-jscl + (sdl2-mixer:halt-channel channel)) + (defun get-ticks () #+jscl (#j:_SDL_GetTicks) diff --git a/src/package.lisp b/src/package.lisp index d839ea22..fdfe81b0 100644 --- a/src/package.lisp +++ b/src/package.lisp @@ -8,6 +8,7 @@ :play-wav :playing :halt-music + :halt-wav :get-ticks :keq :show-png From 70b120799124cb2379ec56e3b0fb04de50b2623e Mon Sep 17 00:00:00 2001 From: Vito Van Date: Fri, 2 Jun 2023 16:25:00 +0800 Subject: [PATCH 05/12] add fc-init-reinitialize this is needed by dev stage with CALM --- src/config.lisp | 3 ++- src/fontconfig.lisp | 2 ++ src/package.lisp | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/config.lisp b/src/config.lisp index f8bf36ec..655f735b 100644 --- a/src/config.lisp +++ b/src/config.lisp @@ -174,10 +174,11 @@ (format t "fontpath: ~A~%" (uiop:native-namestring (merge-pathnames "fonts/" *calm-env-app-dir*))) (format t "fontfile: ~A~%" (uiop:native-namestring (merge-pathnames "fonts/fonts.conf" *calm-env-app-dir*))) + ;; https://www.freedesktop.org/software/fontconfig/fontconfig-user.html#DEBUG ;; (setf (uiop:getenv "FC_DEBUG") "1024") ;; init fc - (fontconfig:fc-init) + (fontconfig:fc-init-reinitialize) ) #+jscl diff --git a/src/fontconfig.lisp b/src/fontconfig.lisp index 0dd53fe6..50255e5b 100644 --- a/src/fontconfig.lisp +++ b/src/fontconfig.lisp @@ -40,6 +40,8 @@ (cffi:defcfun (fc-init "FcInit") :pointer) +(cffi:defcfun (fc-init-reinitialize "FcInitReinitialize") :pointer) + (cffi:defcfun (fc-create-pattern "FcPatternCreate") :pointer) (cffi:defcfun (fc-pattern-add-string "FcPatternAddString") :bool diff --git a/src/package.lisp b/src/package.lisp index fdfe81b0..f2652fd3 100644 --- a/src/package.lisp +++ b/src/package.lisp @@ -51,6 +51,7 @@ :weight :slant :fc-init + :fc-init-reinitialize :fc-create-pattern :fc-pattern-add-string :fc-pattern-add-integer From 9b1cc5f398a684ed039e9d860755438f522b88b4 Mon Sep 17 00:00:00 2001 From: Vito Van Date: Fri, 2 Jun 2023 16:41:26 +0800 Subject: [PATCH 06/12] turn fancy dmg back --- s/usr/macos/dmg.lisp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/s/usr/macos/dmg.lisp b/s/usr/macos/dmg.lisp index 1eaf18a5..7b5e9201 100644 --- a/s/usr/macos/dmg.lisp +++ b/s/usr/macos/dmg.lisp @@ -16,7 +16,11 @@ (u:exec (str:concat - "create-dmg --skip-jenkins --hdiutil-verbose --volname \"" app-name " - CALM\"" + "create-dmg " + (if (string= (uiop:getenv "CI_MATRIX_OS") "macos-13") + " --skip-jenkins" ;; macos-13 not working yet + " ") + " --hdiutil-verbose --volname \"" app-name " - CALM\"" " --volicon \"" dmg-icon "\"" " --window-pos 200 120" " --window-size 800 280" From fcb1cfd463dc7cd0a0fdb04b744f0647804db18a Mon Sep 17 00:00:00 2001 From: Vito Van Date: Sat, 3 Jun 2023 20:23:04 +0800 Subject: [PATCH 07/12] add volume control and fix halt-wav on web --- s/usr/web/wasm.lisp | 3 +++ src/c.lisp | 18 +++++++++++++++++- src/package.lisp | 2 ++ src/web/package.lisp | 3 +++ 4 files changed, 25 insertions(+), 1 deletion(-) diff --git a/s/usr/web/wasm.lisp b/s/usr/web/wasm.lisp index 862fb8cc..55e8190f 100644 --- a/s/usr/web/wasm.lisp +++ b/s/usr/web/wasm.lisp @@ -262,6 +262,9 @@ "_SDL_RWFromFile," "_Mix_PlayMusic," "_Mix_HaltMusic," + "_Mix_HaltChannel," + "_Mix_Volume," + "_Mix_VolumeMusic," "_Mix_PlayChannelTimed," "_Mix_Playing," "_Mix_AllocateChannels," diff --git a/src/c.lisp b/src/c.lisp index 1bf5eab4..ad8e7f91 100644 --- a/src/c.lisp +++ b/src/c.lisp @@ -127,6 +127,7 @@ (show-layout layout :cr cr))) (defun open-audio-if-not-yet () + ;; (format t "open-audio-if-not-yet, already opened?: ~A~%" calm::*calm-state-audio-open*) (unless calm::*calm-state-audio-open* ;; ;; if we put the following code outside of this function, @@ -152,9 +153,11 @@ #+jscl (#j:_Mix_AllocateChannels 8) #-jscl - (sdl2-mixer:allocate-channels 8))) + (sdl2-mixer:allocate-channels 8) + (setf calm::*calm-state-audio-open* t))) (defun play-music (pathname &key (loops 0)) + ;; (format t "playing music: ~A~%" pathname) (open-audio-if-not-yet) (let* ((music-pathname #+jscl @@ -180,6 +183,7 @@ (sdl2-mixer:play-music music-object loops))) (defun play-wav (pathname &key (loops 0) (channel -1)) + ;; (format t "playing wav: ~A~%" pathname) (open-audio-if-not-yet) (let* ((wav-pathname #+jscl @@ -214,6 +218,18 @@ #-jscl (sdl2-mixer:playing -1)) +(defun volume-music (music-volume) + #+jscl + (#j:_Mix_VolumeMusic music-volume) + #-jscl + (sdl2-mixer:volume-music music-volume)) + +(defun volume (channel volume) + #+jscl + (#j:_Mix_Volume channel volume) + #-jscl + (sdl2-mixer:volume channel volume)) + (defun halt-music () #+jscl (#j:_Mix_HaltMusic) diff --git a/src/package.lisp b/src/package.lisp index f2652fd3..2c9f989a 100644 --- a/src/package.lisp +++ b/src/package.lisp @@ -9,6 +9,8 @@ :playing :halt-music :halt-wav + :volume + :volume-music :get-ticks :keq :show-png diff --git a/src/web/package.lisp b/src/web/package.lisp index 1e55382b..c48c1c04 100644 --- a/src/web/package.lisp +++ b/src/web/package.lisp @@ -149,6 +149,9 @@ :play-music :play-wav :halt-music + :halt-wav + :volume + :volume-music :get-ticks :keq :show-png From 053b7fb95e8a300b3cdee76ff07c751bae812a6e Mon Sep 17 00:00:00 2001 From: Vito Van Date: Sat, 3 Jun 2023 20:23:39 +0800 Subject: [PATCH 08/12] web only: add play-audio and halt-audio --- src/c.lisp | 26 ++++++++++++++++++++++++++ src/web/package.lisp | 2 ++ 2 files changed, 28 insertions(+) diff --git a/src/c.lisp b/src/c.lisp index ad8e7f91..7f338e8a 100644 --- a/src/c.lisp +++ b/src/c.lisp @@ -212,6 +212,23 @@ #-jscl (sdl2-mixer:play-channel channel wav-object loops))) +#+jscl +(defun play-audio (audio-url &key (loop-audio-p nil) (volume 1)) + (format t "playing audio: ~A~%" audio-url) + (let* ((audio-object-cache + (cdr (assoc audio-url calm::*calm-state-loaded-audio* :test #'string=))) + (audio-object + (or audio-object-cache + ;; https://github.com/jscl-project/jscl/wiki/JSCL-and-manipulations-with-JS-objects + (#j:window:eval (concatenate 'string "new Audio('" audio-url "')")) + ))) + (unless audio-object-cache + (push (cons audio-url audio-object) calm::*calm-state-loaded-audio*)) + (when loop-audio-p + (setf (jscl::oget audio-object "loop") t)) + (setf (jscl::oget audio-object "volume") volume) + ((jscl::oget audio-object "play")))) + (defun playing () #+jscl (#j:_Mix_Playing -1) @@ -242,6 +259,15 @@ #-jscl (sdl2-mixer:halt-channel channel)) +#+jscl +(defun halt-audio (&optional (url nil)) + (loop + for object in calm::*calm-state-loaded-audio* + when (or (null url) (string= (car object) url)) + do + (format t "halting: ~A~%" object) + ((jscl::oget (cdr object) "pause")))) + (defun get-ticks () #+jscl (#j:_SDL_GetTicks) diff --git a/src/web/package.lisp b/src/web/package.lisp index c48c1c04..23339ed3 100644 --- a/src/web/package.lisp +++ b/src/web/package.lisp @@ -148,8 +148,10 @@ :playing :play-music :play-wav + :play-audio :halt-music :halt-wav + :halt-audio :volume :volume-music :get-ticks From e7e89e9658daf1661757510d3238cfc031d0c4b6 Mon Sep 17 00:00:00 2001 From: Vito Van Date: Tue, 13 Jun 2023 16:10:25 +0800 Subject: [PATCH 09/12] fix SDL2_Mixer audio channel issue https://github.com/VitoVan/lisp-game-jam-2023/issues/2 --- src/c.lisp | 37 ++++++++++++++++++++----------------- src/config.lisp | 16 +++++++++------- 2 files changed, 29 insertions(+), 24 deletions(-) diff --git a/src/c.lisp b/src/c.lisp index 7f338e8a..3af109c8 100644 --- a/src/c.lisp +++ b/src/c.lisp @@ -139,21 +139,21 @@ ;; (sdl2-mixer:init) #+jscl (#j:_Mix_OpenAudio - calm::*calm-music-frequency* - calm::*calm-music-format* - calm::*calm-music-channels* - calm::*calm-music-chunksize*) + calm::*calm-audio-frequency* + calm::*calm-audio-format* + calm::*calm-audio-channels* + calm::*calm-audio-chunksize*) #-jscl (sdl2-mixer:open-audio - calm::*calm-music-frequency* - calm::*calm-music-format* + calm::*calm-audio-frequency* + calm::*calm-audio-format* ;; channels: number of channels (1 is mono, 2 is stereo, etc). - calm::*calm-music-channels* - calm::*calm-music-chunksize*) + calm::*calm-audio-channels* + calm::*calm-audio-chunksize*) #+jscl - (#j:_Mix_AllocateChannels 8) + (#j:_Mix_AllocateChannels calm::*calm-audio-numchans*) #-jscl - (sdl2-mixer:allocate-channels 8) + (sdl2-mixer:allocate-channels calm::*calm-audio-numchans*) (setf calm::*calm-state-audio-open* t))) (defun play-music (pathname &key (loops 0)) @@ -186,14 +186,14 @@ ;; (format t "playing wav: ~A~%" pathname) (open-audio-if-not-yet) (let* ((wav-pathname - #+jscl + #+jscl (concatenate 'string "/usr/share/" pathname) ;; /usr/share/assets/ will be embedded #-jscl (or (uiop:absolute-pathname-p pathname) (uiop:merge-pathnames* pathname (uiop:getenv "CALM_APP_DIR")))) (wav-object-cache - (cdr (assoc wav-pathname calm::*calm-state-loaded-audio* - #+jscl :test #+jscl #'string=))) + (cdr (assoc wav-pathname calm::*calm-state-loaded-audio* + #+jscl :test #+jscl #'string=))) (wav-object (or wav-object-cache #+jscl (let* ((wav-pathname-allocated-ptr (#j:allocateUTF8 wav-pathname)) @@ -207,10 +207,13 @@ (sdl2-mixer:load-wav wav-pathname)))) (unless wav-object-cache (push (cons wav-pathname wav-object) calm::*calm-state-loaded-audio*)) - #+jscl - (#j:_Mix_PlayChannelTimed channel wav-object loops -1) - #-jscl - (sdl2-mixer:play-channel channel wav-object loops))) + + ;; only play when there is/are available channel(s) + (when (< (playing) calm::*calm-audio-numchans*) + #+jscl + (#j:_Mix_PlayChannelTimed channel wav-object loops -1) + #-jscl + (sdl2-mixer:play-channel channel wav-object loops)))) #+jscl (defun play-audio (audio-url &key (loop-audio-p nil) (volume 1)) diff --git a/src/config.lisp b/src/config.lisp index 655f735b..c8cb33c0 100644 --- a/src/config.lisp +++ b/src/config.lisp @@ -43,26 +43,28 @@ setting it back to `t' will paint the canvas again and again by calling the `draw' function, again. ") #-jscl -(defparameter *calm-music-format* sdl2-ffi:+audio-s32sys+) +(defparameter *calm-audio-format* sdl2-ffi:+audio-s32sys+) #+jscl -(defparameter *calm-music-format* 32800) +(defparameter *calm-audio-format* 32800) -(defparameter *calm-music-frequency* 44100) -(defparameter *calm-music-channels* 2) +(defparameter *calm-audio-frequency* 44100) +(defparameter *calm-audio-channels* 2) ;; ;; chunksize: audio buffer size in sample FRAMES (total samples divided by channel count). -;; I thought it should be: (* calm::*calm-music-channels* calm::*calm-music-frequency*) +;; I thought it should be: (* calm::*calm-audio-channels* calm::*calm-audio-frequency*) ;; but, it was delayed, I have to set it to `1024' according to this: ;; https://stackoverflow.com/questions/983997/i-have-an-unintended-delay-in-playing-a-mix-chunk #-jscl -(defparameter *calm-music-chunksize* 1024) +(defparameter *calm-audio-chunksize* 1024) ;; but, when it is on the browser, ;; I have to set it to a very large value to make things a little more smooth, ;; it still suffers some wierd noises sometimes. ;; I don't know why, please enlight me if you know something about this #+jscl -(defparameter *calm-music-chunksize* (* 4 1024)) +(defparameter *calm-audio-chunksize* (* 4 1024)) +;; the number of channels +(defparameter *calm-audio-numchans* 8) ;; runtime variables From bca188eabca8e204dc0ec0bbfe12bff7d49afb04 Mon Sep 17 00:00:00 2001 From: Vito Van Date: Tue, 13 Jun 2023 20:18:23 +0800 Subject: [PATCH 10/12] ci: disable HOMEBREW auto clean/update --- .github/workflows/calm.yml | 2 ++ .github/workflows/example-circles.yml | 4 +++- .github/workflows/example-fan.yml | 2 ++ .github/workflows/example-meditator.yml | 2 ++ .github/workflows/example-mondrian.yml | 2 ++ 5 files changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/calm.yml b/.github/workflows/calm.yml index 277173b8..a9214a28 100644 --- a/.github/workflows/calm.yml +++ b/.github/workflows/calm.yml @@ -48,6 +48,8 @@ jobs: env: CI_MATRIX_OS: ${{ matrix.os }} + HOMEBREW_NO_AUTO_UPDATE: 1 + HOMEBREW_NO_INSTALL_CLEANUP: 1 steps: - uses: actions/checkout@v3 diff --git a/.github/workflows/example-circles.yml b/.github/workflows/example-circles.yml index 63003803..df1ad08f 100644 --- a/.github/workflows/example-circles.yml +++ b/.github/workflows/example-circles.yml @@ -72,7 +72,9 @@ jobs: env: CI_MATRIX_OS: ${{ matrix.os }} - + HOMEBREW_NO_AUTO_UPDATE: 1 + HOMEBREW_NO_INSTALL_CLEANUP: 1 + steps: - uses: actions/checkout@v3 diff --git a/.github/workflows/example-fan.yml b/.github/workflows/example-fan.yml index 0cd99530..35b9c34a 100644 --- a/.github/workflows/example-fan.yml +++ b/.github/workflows/example-fan.yml @@ -72,6 +72,8 @@ jobs: env: CI_MATRIX_OS: ${{ matrix.os }} + HOMEBREW_NO_AUTO_UPDATE: 1 + HOMEBREW_NO_INSTALL_CLEANUP: 1 steps: - uses: actions/checkout@v3 diff --git a/.github/workflows/example-meditator.yml b/.github/workflows/example-meditator.yml index f53504b3..28833f26 100644 --- a/.github/workflows/example-meditator.yml +++ b/.github/workflows/example-meditator.yml @@ -75,6 +75,8 @@ jobs: env: CI_MATRIX_OS: ${{ matrix.os }} + HOMEBREW_NO_AUTO_UPDATE: 1 + HOMEBREW_NO_INSTALL_CLEANUP: 1 steps: - uses: actions/checkout@v3 diff --git a/.github/workflows/example-mondrian.yml b/.github/workflows/example-mondrian.yml index 8755ba83..ab80ba2f 100644 --- a/.github/workflows/example-mondrian.yml +++ b/.github/workflows/example-mondrian.yml @@ -72,6 +72,8 @@ jobs: env: CI_MATRIX_OS: ${{ matrix.os }} + HOMEBREW_NO_AUTO_UPDATE: 1 + HOMEBREW_NO_INSTALL_CLEANUP: 1 steps: - uses: actions/checkout@v3 From 6f56fc08efa1f2f9780b0c10faa66f9b14ec9eaf Mon Sep 17 00:00:00 2001 From: Vito Van Date: Wed, 14 Jun 2023 14:23:31 +0800 Subject: [PATCH 11/12] ci: disable brew update --- build/build.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/build/build.sh b/build/build.sh index 9f922157..4b03e441 100644 --- a/build/build.sh +++ b/build/build.sh @@ -32,7 +32,9 @@ build_fedora () { } build_darwin () { - brew update + # don't do this, some stupid CI would take forever and then fail + # brew update + echo "build launcher ..." brew install gcc gcc src/calm.c -o calm From 0d398b5c3762ea95353f1c50b6ebf345665cf263 Mon Sep 17 00:00:00 2001 From: Vito Van Date: Thu, 15 Jun 2023 16:39:54 +0800 Subject: [PATCH 12/12] bump version to 0.1.3 --- .github/workflows/example-circles.yml | 8 ++++---- .github/workflows/example-fan.yml | 8 ++++---- .github/workflows/example-meditator.yml | 8 ++++---- .github/workflows/example-mondrian.yml | 8 ++++---- calm.asd | 2 +- docs/changelog.org | 10 ++++++++++ s/usr/all/panic.lisp | 2 +- 7 files changed, 28 insertions(+), 18 deletions(-) diff --git a/.github/workflows/example-circles.yml b/.github/workflows/example-circles.yml index df1ad08f..cb2b08ac 100644 --- a/.github/workflows/example-circles.yml +++ b/.github/workflows/example-circles.yml @@ -19,7 +19,7 @@ jobs: - name: Build run: | set -x - curl -L -o calm.tgz https://github.com/VitoVan/calm/releases/download/0.1.2/calm.tgz + curl -L -o calm.tgz https://github.com/VitoVan/calm/releases/download/0.1.3/calm.tgz mkdir calm tar xvf calm.tgz --directory=calm ls -lah calm @@ -46,7 +46,7 @@ jobs: - name: Build run: | set -x - curl -L -o calm.tgz https://github.com/VitoVan/calm/releases/download/0.1.2/calm.tgz + curl -L -o calm.tgz https://github.com/VitoVan/calm/releases/download/0.1.3/calm.tgz mkdir calm tar xvf calm.tgz --directory=calm ls -lah calm @@ -82,7 +82,7 @@ jobs: run: | set -x export OS_SUBFIX=".${CI_MATRIX_OS}" - curl -L -o calm.dmg https://github.com/VitoVan/calm/releases/download/0.1.2/calm${OS_SUBFIX}.dmg + curl -L -o calm.dmg https://github.com/VitoVan/calm/releases/download/0.1.3/calm${OS_SUBFIX}.dmg hdiutil attach calm.dmg cp -R "/Volumes/Calm - CALM/Calm.app/Contents/MacOS/" calm ls -lah calm @@ -116,7 +116,7 @@ jobs: run: | set -x pacman -S --noconfirm --needed unzip - curl -L -o calm.zip https://github.com/VitoVan/calm/releases/download/0.1.2/calm.zip + curl -L -o calm.zip https://github.com/VitoVan/calm/releases/download/0.1.3/calm.zip unzip calm.zip -d calm ls -lah calm export PATH=$PATH:$(pwd)/calm/ diff --git a/.github/workflows/example-fan.yml b/.github/workflows/example-fan.yml index 35b9c34a..fb0e777b 100644 --- a/.github/workflows/example-fan.yml +++ b/.github/workflows/example-fan.yml @@ -19,7 +19,7 @@ jobs: - name: Build run: | set -x - curl -L -o calm.tgz https://github.com/VitoVan/calm/releases/download/0.1.2/calm.tgz + curl -L -o calm.tgz https://github.com/VitoVan/calm/releases/download/0.1.3/calm.tgz mkdir calm tar xvf calm.tgz --directory=calm ls -lah calm @@ -46,7 +46,7 @@ jobs: - name: Build run: | set -x - curl -L -o calm.tgz https://github.com/VitoVan/calm/releases/download/0.1.2/calm.tgz + curl -L -o calm.tgz https://github.com/VitoVan/calm/releases/download/0.1.3/calm.tgz mkdir calm tar xvf calm.tgz --directory=calm ls -lah calm @@ -82,7 +82,7 @@ jobs: run: | set -x export OS_SUBFIX=".${CI_MATRIX_OS}" - curl -L -o calm.dmg https://github.com/VitoVan/calm/releases/download/0.1.2/calm${OS_SUBFIX}.dmg + curl -L -o calm.dmg https://github.com/VitoVan/calm/releases/download/0.1.3/calm${OS_SUBFIX}.dmg hdiutil attach calm.dmg cp -R "/Volumes/Calm - CALM/Calm.app/Contents/MacOS/" calm ls -lah calm @@ -116,7 +116,7 @@ jobs: run: | set -x pacman -S --noconfirm --needed unzip - curl -L -o calm.zip https://github.com/VitoVan/calm/releases/download/0.1.2/calm.zip + curl -L -o calm.zip https://github.com/VitoVan/calm/releases/download/0.1.3/calm.zip unzip calm.zip -d calm ls -lah calm export PATH=$PATH:$(pwd)/calm/ diff --git a/.github/workflows/example-meditator.yml b/.github/workflows/example-meditator.yml index 28833f26..4466978e 100644 --- a/.github/workflows/example-meditator.yml +++ b/.github/workflows/example-meditator.yml @@ -20,7 +20,7 @@ jobs: - name: Build run: | set -x - curl -L -o calm.tgz https://github.com/VitoVan/calm/releases/download/0.1.2/calm.tgz + curl -L -o calm.tgz https://github.com/VitoVan/calm/releases/download/0.1.3/calm.tgz mkdir calm tar xvf calm.tgz --directory=calm ls -lah calm @@ -49,7 +49,7 @@ jobs: - name: Build run: | set -x - curl -L -o calm.tgz https://github.com/VitoVan/calm/releases/download/0.1.2/calm.tgz + curl -L -o calm.tgz https://github.com/VitoVan/calm/releases/download/0.1.3/calm.tgz mkdir calm tar xvf calm.tgz --directory=calm ls -lah calm @@ -85,7 +85,7 @@ jobs: run: | set -x export OS_SUBFIX=".${CI_MATRIX_OS}" - curl -L -o calm.dmg https://github.com/VitoVan/calm/releases/download/0.1.2/calm${OS_SUBFIX}.dmg + curl -L -o calm.dmg https://github.com/VitoVan/calm/releases/download/0.1.3/calm${OS_SUBFIX}.dmg hdiutil attach calm.dmg cp -R "/Volumes/Calm - CALM/Calm.app/Contents/MacOS/" calm ls -lah calm @@ -119,7 +119,7 @@ jobs: run: | set -x pacman -S --noconfirm --needed unzip - curl -L -o calm.zip https://github.com/VitoVan/calm/releases/download/0.1.2/calm.zip + curl -L -o calm.zip https://github.com/VitoVan/calm/releases/download/0.1.3/calm.zip unzip calm.zip -d calm ls -lah calm export PATH=$PATH:$(pwd)/calm/ diff --git a/.github/workflows/example-mondrian.yml b/.github/workflows/example-mondrian.yml index ab80ba2f..a235c0cf 100644 --- a/.github/workflows/example-mondrian.yml +++ b/.github/workflows/example-mondrian.yml @@ -19,7 +19,7 @@ jobs: - name: Build run: | set -x - curl -L -o calm.tgz https://github.com/VitoVan/calm/releases/download/0.1.2/calm.tgz + curl -L -o calm.tgz https://github.com/VitoVan/calm/releases/download/0.1.3/calm.tgz mkdir calm tar xvf calm.tgz --directory=calm ls -lah calm @@ -46,7 +46,7 @@ jobs: - name: Build run: | set -x - curl -L -o calm.tgz https://github.com/VitoVan/calm/releases/download/0.1.2/calm.tgz + curl -L -o calm.tgz https://github.com/VitoVan/calm/releases/download/0.1.3/calm.tgz mkdir calm tar xvf calm.tgz --directory=calm ls -lah calm @@ -82,7 +82,7 @@ jobs: run: | set -x export OS_SUBFIX=".${CI_MATRIX_OS}" - curl -L -o calm.dmg https://github.com/VitoVan/calm/releases/download/0.1.2/calm${OS_SUBFIX}.dmg + curl -L -o calm.dmg https://github.com/VitoVan/calm/releases/download/0.1.3/calm${OS_SUBFIX}.dmg hdiutil attach calm.dmg cp -R "/Volumes/Calm - CALM/Calm.app/Contents/MacOS/" calm ls -lah calm @@ -116,7 +116,7 @@ jobs: run: | set -x pacman -S --noconfirm --needed unzip - curl -L -o calm.zip https://github.com/VitoVan/calm/releases/download/0.1.2/calm.zip + curl -L -o calm.zip https://github.com/VitoVan/calm/releases/download/0.1.3/calm.zip unzip calm.zip -d calm ls -lah calm export PATH=$PATH:$(pwd)/calm/ diff --git a/calm.asd b/calm.asd index 02112770..fa84acd2 100644 --- a/calm.asd +++ b/calm.asd @@ -1,6 +1,6 @@ (asdf:defsystem #:calm :description "CALM - Canvas Aided Lisp Magic" - :version "0.1.2" + :version "0.1.3" :author "Vito Van" :license "GNU General Public License, version 2" :depends-on ( diff --git a/docs/changelog.org b/docs/changelog.org index f2571416..57df91bf 100644 --- a/docs/changelog.org +++ b/docs/changelog.org @@ -1,4 +1,14 @@ * CALM +** 0.1.3 +- fix version check in command `calm hello` +- add `c:halt-wav` + i.e. SDL2_mixer/Mix_HaltChannel +- add `fc-init-reinitialize` + to load fonts while developing with `calm` command +- add volume controle `c:volume` and `c:volume-music` + i.e. SDL2_mixer/Mix_Volume, SDL2_mixer/Mix_VolumeMusic +- add `c:play-audio` and `c:halt-audio` on web + i.e. HTMLAudioElement: new Audio(url) ** 0.1.2 - add touch event support, mainly for mobile + web should also work on all platforms diff --git a/s/usr/all/panic.lisp b/s/usr/all/panic.lisp index e50e832b..f2a78828 100644 --- a/s/usr/all/panic.lisp +++ b/s/usr/all/panic.lisp @@ -5,7 +5,7 @@ ;; version check won't work on JSCL, since the lack of ASDF ;; #-jscl -(let ((required-version "0.1.2") +(let ((required-version "0.1.3") (calm-version (slot-value (asdf:find-system 'calm) 'asdf:version))) (when (uiop:version< calm-version required-version) (format t