Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V0.12.0 rc.0 #76

Merged
merged 12 commits into from
Jun 25, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ jobs:
include:
- elixir: '1.12.3'
otp: '24.2'
- elixir: '1.16.0'
otp: '26.2'

steps:
- uses: actions/checkout@v3
Expand Down
36 changes: 34 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,38 @@
## Unreleased
* Added Cairo support - @ringlej
## 0.12.0-rc.0
This is a major update that adds support for Cairo and makes Cairo the default renderer:

* Add Cairo support - @ringlej
* Restructure C code - @ringlej
* Add CI - @axelson
* Updat README for 0.12 - @axelson
* Improve text handling - @JediLuke
* Better control of scene element opacity wiht `:clear` background - @seb3s
* Add `input_blacklist` options to remove `InputEvent` streams - @ringlej
crertel marked this conversation as resolved.
Show resolved Hide resolved
* Fix `script_opts_draw_line` to handle stroke properly - @ringlej
* Add arc script command - @GPrimola
* Fix `LINE_CAP_ROUND -> LINE_JOIN_ROUND` in nanovg backend - @ringlej
* Fix extra `free` in image code - @ringlej
* Fix hidden cursor on refocus and repaint for nanovg backend - @mneumann
* Fix readme typo - @seb3s
* Add FPS and debug logging - @ringlej
* Add alpha channel support for sprites - @seb3s
* Add support for rounded rectangles - @GPrimola
* Add configurable framebuffer device for cairo - @jimsynz
* Assorted updates for deprecations and warnings





Note: for Nerves setups you may need additional configuration for your display
to work as expected. If you're using an RPI3 you may want to add an `erlinit`
configuration so that your IEx output isn't displayed on the screen. To do so in your `config/target.exs` add:
```
# From: https://hexdocs.pm/nerves/1.10.5/connecting-to-a-nerves-target.html#hdmi-cable
`config :nerves, :erlinit, ctty: "ttyAMA0"`
```



## 0.11.0
Very minor fixes
Expand Down
18 changes: 12 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ This driver replaces both `:scenic_driver_glfw` and `:scenic_driver_nerves_rpi`

## Installation

If [available in Hex](https://hex.pm/docs/publish), the package can be installed
by adding `scenic_driver_local` to your list of dependencies in `mix.exs`:
scenic_driver_local can be installed by adding `scenic_driver_local` to your
list of dependencies in `mix.exs`:

```elixir
def deps do
[
{:scenic_driver_local, "~> 0.11.0"}
{:scenic_driver_local, "~> 0.12.0"}
]
end
```
Expand All @@ -35,9 +35,9 @@ Example:

There are quite a few new options as well. It uses `NimbleOptions` to confirm them, so look at the `Scenic.Driver.Local` module for details.

## Targets
## Targets (Nerves)

This driver figures out what underlying graphics technology to use depending on what your MIX_TARGET is set to.
This driver figures out what underlying graphics technology to use depending on what your `MIX_TARGET` environment variable is set to.

For example, for apps running on a Mac/PC/Linux, it is usually set to `host`, which causes the driver to use `cairo-gtk` as the underlying tech.

Expand All @@ -49,7 +49,10 @@ Previous versions of `scenic_driver_local` would use `bcm` (Broadcom Manager) fo
You can explicitly use these by setting `SCENIC_LOCAL_TARGET=bcm` or `SCENIC_LOCAL_TARGET=drm`, **but these options are being deprecated**.
Please try the default of `SCENIC_LOCAL_TARGET=cairo-fb` as this should work universally on any Nerves target.

`cairo-fb` will require that your `nerves_system_*` has the `cairo` library selected.
`cairo-fb` will require that your `nerves_system_*` has the `cairo` library
selected via the `BR2_PACKAGE_CAIRO=y` buildroot configuration. If you're using
one of the official nerves systems then `BR2_PACKAGE_CAIRO=y` is configured by
default if you're using 1.25.0 or greater.

## Prerequisites

Expand Down Expand Up @@ -108,6 +111,9 @@ Lastly, install the GLEW package. Find the packaged `include` folder and extract

Once these components have been installed, you should be able to build the `scenic_driver_local` driver.

### Installing on Nerves

See the "Targets" section above

## Documentation

Expand Down
54 changes: 37 additions & 17 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,27 +7,47 @@
};
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
let
inherit (pkgs.lib) optional optionals;
pkgs = import nixpkgs { inherit system; };
let
inherit (pkgs.lib) optional optionals;
pkgs = import nixpkgs { inherit system; };

elixir = pkgs.beam.packages.erlang.elixir;
in
with pkgs;
{
devShell = pkgs.mkShell {
buildInputs = [
elixir_1_16
elixir_ls
glibcLocales
glew glfw pkg-config
xorg.libX11 xorg.libXau xorg.libXdmcp
] ++ optional stdenv.isLinux inotify-tools
elixir = pkgs.beam.packages.erlang.elixir;
in
with pkgs;
{
devShell = pkgs.mkShell {
buildInputs = [
util-linux
libselinux
libthai
libdatrie
libsepol
libxkbcommon
libepoxy
pcre
pcre2
xorg.libXtst
cairo
gtk3
freeglut
elixir_1_16
elixir_ls
glibcLocales
glew
glfw
pkg-config
xorg.libX11
xorg.libXau
xorg.libXdmcp
xorg.libX11
xorg.libXau
xorg.libXdmcp
] ++ optional stdenv.isLinux inotify-tools
++ optional stdenv.isDarwin terminal-notifier
++ optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [
CoreFoundation
CoreServices
]);
};
});
};
});
}
4 changes: 2 additions & 2 deletions mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ defmodule Scenic.Driver.Local.MixProject do
use Mix.Project

@app_name :scenic_driver_local
@version "0.11.0"
@version "0.12.0-rc.0"
@github "https://github.com/ScenicFramework/scenic_driver_local"

def project do
Expand Down Expand Up @@ -49,7 +49,7 @@ defmodule Scenic.Driver.Local.MixProject do
defp deps do
[
{:input_event, "~> 1.0 or ~> 0.4"},
{:scenic, "~> 0.11.0"},
{:scenic, "~> 0.12"},

# Tools
{:credo, ">= 0.0.0", only: [:dev, :test], runtime: false},
Expand Down
Loading