|
| 1 | +--- |
| 2 | +title: Lem WebView |
| 3 | +weight: -15 |
| 4 | +geekdocCollapseSection: true |
| 5 | +--- |
| 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 fd-find libgtk-4-dev libwebkitgtk-6.0-dev |
| 30 | +``` |
| 31 | + |
| 32 | +- **Fedora**-like distro |
| 33 | + |
| 34 | +``` |
| 35 | +sudo dnf install sbcl fd-find gtk4-devel webkitgtk6.0-devel |
| 36 | +sudo dnf group install c-development development-tools |
| 37 | +``` |
| 38 | + |
| 39 | +- **MacOS**: install WebKit. |
| 40 | + |
| 41 | +- **Windows**: |
| 42 | + |
| 43 | +``` |
| 44 | + WebView2 from NuGet. |
| 45 | + Windows libraries: advapi32 ole32 shell32 shlwapi user32 version |
| 46 | +``` |
| 47 | + |
| 48 | +- **FreeBSD**: |
| 49 | + |
| 50 | +``` |
| 51 | +pkg install sbcl webkit2-gtk4 |
| 52 | +``` |
| 53 | + |
| 54 | + |
| 55 | +### Install qlot |
| 56 | + |
| 57 | +- Automatic installer |
| 58 | + |
| 59 | +``` |
| 60 | +curl -L https://qlot.tech/installer | bash |
| 61 | +``` |
| 62 | + |
| 63 | +> **Note:** For an alternative installation, see https://github.com/fukamachi/qlot#installation |
| 64 | +
|
| 65 | +### Build |
| 66 | + |
| 67 | +``` |
| 68 | +git clone https://github.com/lem-project/lem.git |
| 69 | +cd lem && make webview |
| 70 | +``` |
| 71 | + |
| 72 | + |
| 73 | +Optionnally, do: |
| 74 | + |
| 75 | +``` |
| 76 | +sudo make install |
| 77 | +``` |
| 78 | + |
| 79 | +This will: |
| 80 | + |
| 81 | +- Install the executable system-wide |
| 82 | +- Add a desktop entry file with relevant file associations |
| 83 | +- Configure webview as the default interface |
| 84 | + |
| 85 | +You can still switch between interfaces using the `-i / --interface` option when launching Lem. |
| 86 | + |
| 87 | +## MacOS |
| 88 | + |
| 89 | +### How to Fix “App Is Damaged and Can’t Be Opened” on OSX |
| 90 | +Copy the app file to the applications folder and type the following in your terminal: |
| 91 | +``` |
| 92 | +xattr -d com.apple.quarantine /Applications/lem.app |
| 93 | +``` |
| 94 | +### Make it an Application |
| 95 | + |
| 96 | +To create an executable that you can run as a GUI you will need to use Automator. |
| 97 | + |
| 98 | +- Launch Automator |
| 99 | +- Choose 'Application' as the type for your document |
| 100 | + |
| 101 | +You should now see three columns. In the second column there will be a collection of actions |
| 102 | +that you can run in this 'application'. Scroll down until you see `Run Shell Script`. Double click |
| 103 | +on this and on the right you should now see a text box where you can enter your script: |
| 104 | + |
| 105 | +Replace the contents of this shell script with the following: |
| 106 | + |
| 107 | +```zsh |
| 108 | +source ~/.zshrc |
| 109 | +cd ~/common-lisp/lem |
| 110 | +./lem -i sdl2 & |
| 111 | +exit 0 |
| 112 | +``` |
| 113 | + |
| 114 | +Save this as an application (this should be the default) with the name `Lem` to `\Applications`. |
| 115 | + |
| 116 | +You should now be abel to run this as an application from the Applications folder. |
| 117 | + |
| 118 | +## Japanese Industrial Standard keyboard layout |
| 119 | + |
| 120 | +If your keyboard is a JIS layout, you need to put the following settings in `$HOME/.lem/init.lisp` |
| 121 | + |
| 122 | +```common-lisp |
| 123 | +#+lem-sdl2 |
| 124 | +(lem-sdl2:set-keyboard-layout :jis) |
| 125 | +``` |
0 commit comments