Skip to content

Commit

Permalink
Merge pull request #124 from VitoVan/pre-014
Browse files Browse the repository at this point in the history
publish 0.1.4
  • Loading branch information
VitoVan authored Jun 19, 2023
2 parents 07a1b4e + 961b2a3 commit 5e4cc45
Show file tree
Hide file tree
Showing 18 changed files with 135 additions and 90 deletions.
8 changes: 2 additions & 6 deletions .github/workflows/calm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ jobs:

- name: Build for Linux
run: |
docker run --env CI=true -v $PWD:/calm -w /calm fedora:34 bash build/build.sh
docker run --env CI=true -v $PWD:/calm -w /calm fedora:32 bash build/build.sh
ls -lah .
- name: Build for Web
run: |
mkdir calm
tar xvf calm.tgz --directory=calm
tar xvf calm.tgz
ls -lah calm
export PATH=$PATH:$(pwd)/calm/
calm hello
Expand All @@ -37,7 +37,6 @@ jobs:
files: |
*.tar
*.tgz
*.AppImage
macOS:
runs-on: ${{ matrix.os }}
Expand All @@ -63,7 +62,6 @@ jobs:
with:
draft: true
files: |
*.tgz
*.dmg
Windows:
Expand All @@ -84,6 +82,4 @@ jobs:
with:
draft: true
files: |
*.tgz
*.zip
Hello.exe
14 changes: 7 additions & 7 deletions .github/workflows/example-circles.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ jobs:
- name: Build
run: |
set -x
curl -L -o calm.tgz https://github.com/VitoVan/calm/releases/download/0.1.3/calm.tgz
curl -L -o calm.tgz https://github.com/VitoVan/calm/releases/download/0.1.4/calm.tgz
mkdir calm
tar xvf calm.tgz --directory=calm
tar xvf calm.tgz
ls -lah calm
export PATH=$PATH:$(pwd)/calm/
export APP_NAME=Circles
Expand All @@ -46,9 +46,9 @@ jobs:
- name: Build
run: |
set -x
curl -L -o calm.tgz https://github.com/VitoVan/calm/releases/download/0.1.3/calm.tgz
curl -L -o calm.tgz https://github.com/VitoVan/calm/releases/download/0.1.4/calm.tgz
mkdir calm
tar xvf calm.tgz --directory=calm
tar xvf calm.tgz
ls -lah calm
export PATH=$PATH:$(pwd)/calm/
export APP_NAME=Circles
Expand Down Expand Up @@ -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.3/calm${OS_SUBFIX}.dmg
curl -L -o calm.dmg https://github.com/VitoVan/calm/releases/download/0.1.4/calm${OS_SUBFIX}.dmg
hdiutil attach calm.dmg
cp -R "/Volumes/Calm - CALM/Calm.app/Contents/MacOS/" calm
ls -lah calm
Expand Down Expand Up @@ -116,8 +116,8 @@ jobs:
run: |
set -x
pacman -S --noconfirm --needed unzip
curl -L -o calm.zip https://github.com/VitoVan/calm/releases/download/0.1.3/calm.zip
unzip calm.zip -d calm
curl -L -o calm.zip https://github.com/VitoVan/calm/releases/download/0.1.4/calm.zip
unzip calm.zip
ls -lah calm
export PATH=$PATH:$(pwd)/calm/
export APP_NAME=Circles
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/example-fan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ jobs:
- name: Build
run: |
set -x
curl -L -o calm.tgz https://github.com/VitoVan/calm/releases/download/0.1.3/calm.tgz
curl -L -o calm.tgz https://github.com/VitoVan/calm/releases/download/0.1.4/calm.tgz
mkdir calm
tar xvf calm.tgz --directory=calm
tar xvf calm.tgz
ls -lah calm
export PATH=$PATH:$(pwd)/calm/
export APP_NAME=Fan
Expand All @@ -46,9 +46,9 @@ jobs:
- name: Build
run: |
set -x
curl -L -o calm.tgz https://github.com/VitoVan/calm/releases/download/0.1.3/calm.tgz
curl -L -o calm.tgz https://github.com/VitoVan/calm/releases/download/0.1.4/calm.tgz
mkdir calm
tar xvf calm.tgz --directory=calm
tar xvf calm.tgz
ls -lah calm
export PATH=$PATH:$(pwd)/calm/
export APP_NAME=Fan
Expand Down Expand Up @@ -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.3/calm${OS_SUBFIX}.dmg
curl -L -o calm.dmg https://github.com/VitoVan/calm/releases/download/0.1.4/calm${OS_SUBFIX}.dmg
hdiutil attach calm.dmg
cp -R "/Volumes/Calm - CALM/Calm.app/Contents/MacOS/" calm
ls -lah calm
Expand Down Expand Up @@ -116,8 +116,8 @@ jobs:
run: |
set -x
pacman -S --noconfirm --needed unzip
curl -L -o calm.zip https://github.com/VitoVan/calm/releases/download/0.1.3/calm.zip
unzip calm.zip -d calm
curl -L -o calm.zip https://github.com/VitoVan/calm/releases/download/0.1.4/calm.zip
unzip calm.zip
ls -lah calm
export PATH=$PATH:$(pwd)/calm/
export APP_NAME=Fan
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/example-meditator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ jobs:
- name: Build
run: |
set -x
curl -L -o calm.tgz https://github.com/VitoVan/calm/releases/download/0.1.3/calm.tgz
curl -L -o calm.tgz https://github.com/VitoVan/calm/releases/download/0.1.4/calm.tgz
mkdir calm
tar xvf calm.tgz --directory=calm
tar xvf calm.tgz
ls -lah calm
export PATH=$PATH:$(pwd)/calm/
export APP_NAME=Meditator
Expand All @@ -49,9 +49,9 @@ jobs:
- name: Build
run: |
set -x
curl -L -o calm.tgz https://github.com/VitoVan/calm/releases/download/0.1.3/calm.tgz
curl -L -o calm.tgz https://github.com/VitoVan/calm/releases/download/0.1.4/calm.tgz
mkdir calm
tar xvf calm.tgz --directory=calm
tar xvf calm.tgz
ls -lah calm
export PATH=$PATH:$(pwd)/calm/
export APP_NAME=Meditator
Expand Down Expand Up @@ -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.3/calm${OS_SUBFIX}.dmg
curl -L -o calm.dmg https://github.com/VitoVan/calm/releases/download/0.1.4/calm${OS_SUBFIX}.dmg
hdiutil attach calm.dmg
cp -R "/Volumes/Calm - CALM/Calm.app/Contents/MacOS/" calm
ls -lah calm
Expand Down Expand Up @@ -119,8 +119,8 @@ jobs:
run: |
set -x
pacman -S --noconfirm --needed unzip
curl -L -o calm.zip https://github.com/VitoVan/calm/releases/download/0.1.3/calm.zip
unzip calm.zip -d calm
curl -L -o calm.zip https://github.com/VitoVan/calm/releases/download/0.1.4/calm.zip
unzip calm.zip
ls -lah calm
export PATH=$PATH:$(pwd)/calm/
export APP_NAME=Meditator
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/example-mondrian.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ jobs:
- name: Build
run: |
set -x
curl -L -o calm.tgz https://github.com/VitoVan/calm/releases/download/0.1.3/calm.tgz
curl -L -o calm.tgz https://github.com/VitoVan/calm/releases/download/0.1.4/calm.tgz
mkdir calm
tar xvf calm.tgz --directory=calm
tar xvf calm.tgz
ls -lah calm
export PATH=$PATH:$(pwd)/calm/
export APP_NAME=Mondrian
Expand All @@ -46,9 +46,9 @@ jobs:
- name: Build
run: |
set -x
curl -L -o calm.tgz https://github.com/VitoVan/calm/releases/download/0.1.3/calm.tgz
curl -L -o calm.tgz https://github.com/VitoVan/calm/releases/download/0.1.4/calm.tgz
mkdir calm
tar xvf calm.tgz --directory=calm
tar xvf calm.tgz
ls -lah calm
export PATH=$PATH:$(pwd)/calm/
export APP_NAME=Mondrian
Expand Down Expand Up @@ -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.3/calm${OS_SUBFIX}.dmg
curl -L -o calm.dmg https://github.com/VitoVan/calm/releases/download/0.1.4/calm${OS_SUBFIX}.dmg
hdiutil attach calm.dmg
cp -R "/Volumes/Calm - CALM/Calm.app/Contents/MacOS/" calm
ls -lah calm
Expand Down Expand Up @@ -116,8 +116,8 @@ jobs:
run: |
set -x
pacman -S --noconfirm --needed unzip
curl -L -o calm.zip https://github.com/VitoVan/calm/releases/download/0.1.3/calm.zip
unzip calm.zip -d calm
curl -L -o calm.zip https://github.com/VitoVan/calm/releases/download/0.1.4/calm.zip
unzip calm.zip
ls -lah calm
export PATH=$PATH:$(pwd)/calm/
export APP_NAME=Mondrian
Expand Down
62 changes: 25 additions & 37 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
# <img style="vertical-align:middle;margin-right:10px;" width="100" alt="Calm" src="docs/images/calm.png"> Canvas Aided Lisp Magic

Calm down and draw something, in Lisp.

[![CI](https://github.com/VitoVan/calm/actions/workflows/calm.yml/badge.svg)](https://github.com/VitoVan/calm/actions/workflows/calm.yml) [![GitHub all releases](https://img.shields.io/github/downloads/vitovan/calm/total?color=brightgreen&label=Downloads&style=flat)](https://github.com/VitoVan/calm/releases/latest)

A Lisp development environment that enables you to build and distribute canvas based applications as Linux AppImage, macOS Application Bundle, Windows Installer and Web Application.

## Hello World

Find whatever directory, create a file: **canvas.lisp**

```lisp
(defparameter *color-list* '((0.83 0.82 0.84) (0.89 0.12 0.17) (0.94 0.87 0.47) (0 0.35 0.59)))
(defun draw ()
(c:set-operator :darken)
(dotimes (i 7)
(c:set-operator :darken)
(c:arc (+ 72 (* (- (/ *calm-window-width* 5) 44) i)) 73 50 0 (* 2 pi))
(apply #'c:set-source-rgb (nth (if (>= i 4) (- i 4) i) *color-list*))
(c:fill-path)))
Expand All @@ -26,39 +26,29 @@ calm

[![Hello World](docs/examples/circles/canvas.png)](#hello-world)

Or:

```bash
calm publish-web
```

and then:

[![open in the browser](https://img.shields.io/badge/open-in%20the%20browser-brightgreen?logo=webassembly&logoColor=white)](<https://vitovan.com/calm/examples-0.1.2/circles/calm.html>)

## Examples

<p align="center">
<a href="https://vitovan.com/calm/examples-0.1.2/fan/calm.html"><img width="250" alt="Fan" src="./docs/examples/fan/canvas.png"></a>
<a href="https://vitovan.com/calm/examples-0.1.2/mondrian/calm.html"><img width="250" alt="Mondrian" src="./docs/examples/mondrian/canvas.png"></a>
<a href="https://vitovan.com/calm/examples-0.1.2/meditator/calm.html"><img width="250" alt="Meditator" src="./docs/examples/meditator/canvas.png"></a>
<a href="https://vitovan.com/calm/examples-0.1.3/fan/calm.html"><img width="250" alt="Fan" src="./docs/examples/fan/canvas.png"></a>
<a href="https://vitovan.com/calm/examples-0.1.3/mondrian/calm.html"><img width="250" alt="Mondrian" src="./docs/examples/mondrian/canvas.png"></a>
<a href="https://vitovan.com/calm/examples-0.1.3/meditator/calm.html"><img width="250" alt="Meditator" src="./docs/examples/meditator/canvas.png"></a>
</p>

No need to download, you can check these examples [in your browser](https://github.com/VitoVan/calm/releases/tag/examples-0.1.2).
Source files and binaries for the above examples are [here](https://github.com/VitoVan/calm/tree/main/docs/examples) and [here](https://github.com/VitoVan/calm/releases/tag/examples-0.1.3).

For more examples, please check this list: [Made with CALM](https://github.com/VitoVan/made-with-calm).
For more applications made with CALM, please check: [Made with CALM](https://github.com/VitoVan/made-with-calm).

## <img style="vertical-align:middle;margin-right:5px;" width="50" alt="Calm Installer" src="./build/calm.png"> Installation

### Pre-built Binary

1. Download for your platform
1. Download

[![Linux Download](https://img.shields.io/badge/Linux-glibc%202.33+-FFD032.svg?logo=linux)](<https://github.com/VitoVan/calm/releases/latest/download/calm.tgz>) [![macOS Ventura Download](https://img.shields.io/badge/macOS-Ventura-black?logo=apple)](<https://github.com/VitoVan/calm/releases/latest/download/calm.macos-13.dmg>) [![Windows Download](https://img.shields.io/badge/Windows-Windows%2010/11-017fd5.svg?logo=windows)](<https://github.com/VitoVan/calm/releases/latest/download/calm.zip>) [![macOS Monterey Download](https://img.shields.io/badge/macOS-Monterey-white?logo=apple)](<https://github.com/VitoVan/calm/releases/latest/download/calm.macos-12.dmg>) [![macOS Big Sur Download](https://img.shields.io/badge/macOS-Big%20Sur-white?logo=apple)](<https://github.com/VitoVan/calm/releases/latest/download/calm.macos-11.dmg>)
[![Linux Download](https://img.shields.io/badge/Linux-glibc%202.31+-FFD032.svg?logo=linux)](<https://github.com/VitoVan/calm/releases/latest/download/calm.tgz>) [![macOS Ventura Download](https://img.shields.io/badge/macOS-Ventura-black?logo=apple)](<https://github.com/VitoVan/calm/releases/latest/download/calm.macos-13.dmg>) [![Windows Download](https://img.shields.io/badge/Windows-Windows%2010/11-017fd5.svg?logo=windows)](<https://github.com/VitoVan/calm/releases/latest/download/calm.zip>) [![macOS Monterey Download](https://img.shields.io/badge/macOS-Monterey-white?logo=apple)](<https://github.com/VitoVan/calm/releases/latest/download/calm.macos-12.dmg>) [![macOS Big Sur Download](https://img.shields.io/badge/macOS-Big%20Sur-white?logo=apple)](<https://github.com/VitoVan/calm/releases/latest/download/calm.macos-11.dmg>)

2. Extract the content
2. Extract

3. Add the extracted folder into your PATH environment
3. Add the extracted directory into your PATH environment

for macOS, add `/path/to/Calm.app/Contents/MacOS/` instead

Expand Down Expand Up @@ -94,8 +84,6 @@ This command will generate different packages on different platforms:

>**Note**
>
>_You don't need to read this if you don't care about what I am going to install on your machine_
>
>DMG creation is powered by [create-dmg](https://github.com/create-dmg/create-dmg), will be installed by `brew install create-dmg` if it were not present.
>
>So if you don't have create-dmg, this will install create-dmg for you.
Expand All @@ -110,8 +98,6 @@ This command will generate different packages on different platforms:

> **Note**
>
> _You don't need to read this if you don't care about what I am going to install on your machine_
>
> Installer creation is powered by [NSIS](https://nsis.sourceforge.io/), will be installed by `winget install nsis` if it were not present.
>
> So if you don't have NSIS (i.e., `makensis`) under your PATH, this will install NSIS for you.
Expand All @@ -120,27 +106,29 @@ This command will generate different packages on different platforms:
>
> The binary detection was done by `where makensis` and `where winget`.
### Customization

If you want to change the generated application name, icon, etc, please use the following command:
### To the Web

```bash
calm publish-with-options
calm publish-web
```

You will be asked for all the customization options and the default value will also be provided.
This command could compoile your Lisp code into web pages that could be served on the internet.

> **Note**
>
> docker and git should be present.
### Customization

### On the Web
If you want to change the generated application name, icon, etc, please use the following command:

```bash
calm publish-web
calm publish-with-options
```

This command could compoile your Lisp code into web pages that could be served on the internet.

There is also another `calm publish-web-with-options` command for more customization.
You will be asked for all the customization options and the default value will also be provided.

I haven't write any document yet, but the command should deliver, docker and git are needed. Please let me know if you encountered any problems.
There is also another `calm publish-web-with-options` command for web-end customization.

## Environment Variables

Expand Down
1 change: 1 addition & 0 deletions build/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ build_msys () {

echo "packing ..."
./calm s dev msys pack.sh
echo "DONE."

}

Expand Down
2 changes: 1 addition & 1 deletion calm.asd
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
(asdf:defsystem #:calm
:description "CALM - Canvas Aided Lisp Magic"
:version "0.1.3"
:version "0.1.4"
:author "Vito Van"
:license "GNU General Public License, version 2"
:depends-on (
Expand Down
4 changes: 4 additions & 0 deletions docs/changelog.org
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
* CALM
** 0.1.4
- downgrade glibc version 2.33+ -> 2.31(for Linux)
now CALM applications could run on the old Ubuntu 20.04 LTS
- more elegant circles/canvas.lisp
** 0.1.3
- fix version check in command `calm hello`
- add `c:halt-wav`
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/circles/canvas.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@

(defparameter *color-list* '((0.83 0.82 0.84) (0.89 0.12 0.17) (0.94 0.87 0.47) (0 0.35 0.59)))
(defun draw ()
(c:set-operator :darken)
(dotimes (i 7)
(c:set-operator :darken)
(c:arc (+ 72 (* (- (/ *calm-window-width* 5) 44) i)) 73 50 0 (* 2 pi))
(apply #'c:set-source-rgb (nth (if (>= i 4) (- i 4) i) *color-list*))
(c:fill-path)))
Loading

0 comments on commit 5e4cc45

Please sign in to comment.