Skip to content

Commit

Permalink
Mention sample program execution with Linux framebuffer in README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
shengwen-tw committed Jul 28, 2024
1 parent 34dfd79 commit 55d89b1
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,14 @@ benefiting the entire application stack.
`Mado` is built with a minimalist design in mind. However, its verification
relies on certain third-party packages for full functionality and access to all
its features. To ensure proper operation, the development environment should
have the [SDL2 library](https://www.libsdl.org/), [libjpeg](https://www.ijg.org/), and [libpng](https://github.com/pnggroup/libpng) installed.
have the [libjpeg](https://www.ijg.org/), and [libpng](https://github.com/pnggroup/libpng) installed.
The [SDL2 library](https://www.libsdl.org/) is optional and only needed if the
user chooses to use SDL as the backend over the Linux framebuffer.
* macOS: `brew install sdl2 jpeg libpng`
* Ubuntu Linux / Debian: `sudo apt install libsdl2-dev libjpeg-dev libpng-dev`

Configure via [Kconfiglib](https://pypi.org/project/kconfiglib/)
Configure via [Kconfiglib](https://pypi.org/project/kconfiglib/), the user should select either SDL
video output or the Linux framebuffer.
```shell
$ make config
```
Expand All @@ -72,13 +75,20 @@ Build the library and demo program.
$ make
```

Run sample `Mado` program:
Run sample `Mado` program with SDL backend:
```shell
$ ./demo-sdl
```

Once the window appears, you should be able to move the windows and interact with the widgets.

Run sample `Mado` program with the Linux framebuffer backend:
```shell
$ sudo FRAMEBUFFER=/dev/fb0 ./demo-fbdev
```

If the `FRAMEBUFFER` environment variable is not set, `Mado` will use `/dev/fb0` by default.

## License

`Mado` is available under a MIT-style license, permitting liberal commercial use.
Expand Down

0 comments on commit 55d89b1

Please sign in to comment.