Skip to content

Commit 7ba838c

Browse files
committed
installation/SDL2: one single page (instead of one by platform)
1 parent e30633e commit 7ba838c

File tree

5 files changed

+138
-202
lines changed

5 files changed

+138
-202
lines changed

content/en/installation/ncurses/_index.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,3 +140,12 @@ $ ros follow-dependency=t install lem-project/lem
140140
```
141141
export PATH=$PATH:~/.roswell/bin
142142
```
143+
144+
## Japanese Industrial Standard keyboard layout
145+
146+
If your keyboard is a JIS layout, you need to put the following settings in `$HOME/.lem/init.lisp`
147+
148+
```common-lisp
149+
#+lem-sdl2
150+
(lem-sdl2:set-keyboard-layout :jis)
151+
```

content/en/installation/sdl2/_index.md

Lines changed: 129 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,132 @@ title: Lem SDL2
33
weight: -20
44
geekdocCollapseSection: true
55
---
6+
7+
> **Note:** the SDL2 UI is deprecated in favor of the Webview one. It won't receive updates.
8+
9+
10+
## Using the binary
11+
12+
[Lem has nightly releases](https://github.com/lem-project/lem/releases) (Linux AppImages, MacOS and Windows binaries), but not for the SDL2 GUI.
13+
14+
15+
## Installation from scratch
16+
17+
Dependencies:
18+
19+
- [sbcl](https://www.sbcl.org/)
20+
- [sdl2](https://www.libsdl.org/)
21+
- [qlot](https://github.com/fukamachi/qlot)
22+
- [git](https://git-scm.com/)
23+
24+
### Install SBCL and SDL2 libraries
25+
26+
- Debian-like distro
27+
28+
```
29+
sudo apt install sbcl build-essential libsdl2-dev libsdl2-image-dev libsdl2-ttf-dev fd-find
30+
```
31+
32+
- Fedora-like distro
33+
34+
```
35+
sudo dnf install sbcl SDL2-devel SDL2_image-devel SDL2_ttf-devel fd-find
36+
sudo dnf group install c-development development-tools
37+
```
38+
39+
### Install qlot
40+
41+
- Automatic installer
42+
43+
```
44+
curl -L https://qlot.tech/installer | bash
45+
```
46+
47+
> **Note:** For an alternative installation, see https://github.com/fukamachi/qlot#installation
48+
49+
### Download and install
50+
51+
There are two ways to install Lem:
52+
53+
**1. Local installation:**
54+
55+
```
56+
mkdir $HOME/common-lisp
57+
cd $HOME/common-lisp
58+
git clone https://github.com/lem-project/lem.git
59+
cd lem && make sdl2
60+
```
61+
62+
> **Note:** You can also run `make sdl2-ncurses` to build Lem with both the SDL2 and ncurses interfaces. You can then choose the interface at startup with `-i / --interface`, either "sdl2" or "ncurses".
63+
64+
Then add the executable to your PATH by adding this line to your `~/.bashrc`:
65+
66+
```
67+
export PATH="$HOME/common-lisp/lem:$PATH"
68+
```
69+
70+
**2. System-wide installation:**
71+
72+
```
73+
git clone https://github.com/lem-project/lem.git
74+
cd lem
75+
```
76+
77+
First ensure qlot is installed for the root user:
78+
```
79+
sudo bash -c "curl -L https://qlot.tech/installer | bash"
80+
```
81+
82+
Then install Lem:
83+
```
84+
sudo make install
85+
```
86+
87+
This will:
88+
89+
- Build Lem with both SDL2 and ncurses interfaces
90+
- Install the executable system-wide
91+
- Add a desktop entry file with relevant file associations
92+
- Configure SDL2 as the default interface
93+
94+
You can still switch between interfaces using the `-i / --interface` option when launching Lem.
95+
96+
## MacOS
97+
98+
### How to Fix “App Is Damaged and Can’t Be Opened” on OSX
99+
Copy the app file to the applications folder and type the following in your terminal:
100+
```
101+
xattr -d com.apple.quarantine /Applications/lem.app
102+
```
103+
### Make it an Application
104+
105+
To create an executable that you can run as a GUI you will need to use Automator.
106+
107+
- Launch Automator
108+
- Choose 'Application' as the type for your document
109+
110+
You should now see three columns. In the second column there will be a collection of actions
111+
that you can run in this 'application'. Scroll down until you see `Run Shell Script`. Double click
112+
on this and on the right you should now see a text box where you can enter your script:
113+
114+
Replace the contents of this shell script with the following:
115+
116+
```zsh
117+
source ~/.zshrc
118+
cd ~/common-lisp/lem
119+
./lem -i sdl2 &
120+
exit 0
121+
```
122+
123+
Save this as an application (this should be the default) with the name `Lem` to `\Applications`.
124+
125+
You should now be abel to run this as an application from the Applications folder.
126+
127+
## Japanese Industrial Standard keyboard layout
128+
129+
If your keyboard is a JIS layout, you need to put the following settings in `$HOME/.lem/init.lisp`
130+
131+
```common-lisp
132+
#+lem-sdl2
133+
(lem-sdl2:set-keyboard-layout :jis)
134+
```

content/en/installation/sdl2/linux.md

Lines changed: 0 additions & 94 deletions
This file was deleted.

content/en/installation/sdl2/macos.md

Lines changed: 0 additions & 90 deletions
This file was deleted.

content/en/installation/sdl2/windows.md

Lines changed: 0 additions & 18 deletions
This file was deleted.

0 commit comments

Comments
 (0)