Skip to content

Commit

Permalink
Merge pull request #151 from xi-editor/druid-gtk
Browse files Browse the repository at this point in the history
druid linux/gtk backend (take 3)
  • Loading branch information
cmyr authored Oct 22, 2019
2 parents 6ea0380 + a108ff2 commit cae9ac9
Show file tree
Hide file tree
Showing 21 changed files with 2,040 additions and 43 deletions.
32 changes: 28 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,20 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macOS-10.14, windows-2019]
os: [macOS-10.14, windows-2019, ubuntu-latest]
name: cargo check stable
steps:
- uses: actions/checkout@v1
- name: install cairo
run: brew install cairo
if: contains(matrix.os, 'mac')

- name: install libgtk-dev
run: |
sudo apt update
sudo apt install libgtk-3-dev
if: contains(matrix.os, 'ubuntu')

- name: install stable toolchain
uses: actions-rs/toolchain@v1
with:
Expand Down Expand Up @@ -77,7 +83,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macOS-10.14, windows-2019]
os: [macOS-10.14, windows-2019, ubuntu-latest]
name: cargo test stable
steps:
- uses: actions/checkout@v1
Expand All @@ -86,6 +92,12 @@ jobs:
run: brew install cairo
if: contains(matrix.os, 'mac')

- name: install libgtk-dev
run: |
sudo apt update
sudo apt install libgtk-3-dev
if: contains(matrix.os, 'ubuntu')

- name: install stable toolchain
uses: actions-rs/toolchain@v1
with:
Expand All @@ -108,7 +120,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macOS-10.14, windows-2019]
os: [macOS-10.14, windows-2019, ubuntu-latest]
name: cargo test nightly
steps:
- uses: actions/checkout@v1
Expand All @@ -117,6 +129,12 @@ jobs:
run: brew install cairo
if: contains(matrix.os, 'mac')

- name: install libgtk-dev
run: |
sudo apt update
sudo apt install libgtk-3-dev
if: contains(matrix.os, 'ubuntu')

- name: install nightly toolchain
uses: actions-rs/toolchain@v1
with:
Expand All @@ -140,14 +158,20 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macOS-10.14, windows-2019]
os: [macOS-10.14, windows-2019, ubuntu-latest]
steps:
- uses: actions/checkout@v1

- name: install cairo
run: brew install cairo
if: contains(matrix.os, 'mac')

- name: install libgtk-dev
run: |
sudo apt update
sudo apt install libgtk-3-dev
if: contains(matrix.os, 'ubuntu')

- name: install nightly toolchain
uses: actions-rs/toolchain@v1
with:
Expand Down
1 change: 0 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,5 @@ information on using pull requests.
If your name does not already appear in the [AUTHORS] file, please feel free to
add it as part of your patch.

[gtk-rs dependencies]: http://gtk-rs.org/docs/requirements.html
[GitHub Help]: https://help.github.com/articles/about-pull-requests/
[AUTHORS]: AUTHORS
241 changes: 241 additions & 0 deletions Cargo.lock

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ edition = "2018"
[package.metadata.docs.rs]
default-target = "x86_64-pc-windows-msvc"

[features]
use_gtk = ["druid-shell/use_gtk"]

[badges]
travis-ci = { repository = "xi-editor/druid" }

Expand Down
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,6 @@ uses Direct2D (and DirectWrite for text). One way forward is to create a
[2d graphics] abstraction.

## Build
Currently, druid only builds on Windows and macOS.

Other options may work, but not tested.

#### Windows

Expand All @@ -59,6 +56,11 @@ You may also need to set your `PKG_CONFIG_PATH`; assuming you have installed `ca
```shell
$> PKG_CONFIG_PATH="/usr/local/opt/libffi/lib/pkgconfig" cargo build
```
#### Linux

On Linux, druid requires gtk+3; see[gtk-rs dependencies] for installation instructions.

run `cargo build`

## Alternatives

Expand Down Expand Up @@ -89,3 +91,4 @@ The main author is Raph Levien.
[ggez]: https://github.com/ggez/ggez
[CONTRIBUTING.md]: CONTRIBUTING.md
[Zulip chat instance]: https://xi.zulipchat.com
[gtk-rs dependencies]: http://gtk-rs.org/docs/requirements.html
Loading

0 comments on commit cae9ac9

Please sign in to comment.