Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
RazrFalcon committed Dec 18, 2017
0 parents commit 8164587
Show file tree
Hide file tree
Showing 687 changed files with 50,768 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
target
.idea
*.sublime-*
Cargo.lock
*.pro.user
*.pro.user.*
.qmake.stash
45 changes: 45 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
language: rust
rust:
- stable
before_install:
- sudo add-apt-repository ppa:beineri/opt-qt562-trusty -y
- sudo apt-get update -qq
install:
# we need gtk3 for capi/examples/cairo
- sudo apt-get install -y libpango1.0-dev libgtk-3-dev
- sudo apt-get install -qq qt56base
# prepare custom Qt
- source /opt/qt56/bin/qt56-env.sh;
script:
# exit on error
- set -e
# test qt backend
- cd "$TRAVIS_BUILD_DIR"/tools/rendersvg
- cargo build --verbose --features="qt-backend"
- cd "$TRAVIS_BUILD_DIR"/tests/regression
- mkdir workdir-qt
- export QT_QPA_PLATFORM=offscreen
- sudo ln -s /usr/share/fonts /opt/qt56/lib/fonts
- cargo run --release -- --workdir=./workdir-qt --backend=qt --use-prev-commit
# test cairo backend
- cd "$TRAVIS_BUILD_DIR"/tools/rendersvg
- cargo build --verbose --features="cairo-backend"
- cd "$TRAVIS_BUILD_DIR"/tests/regression
- mkdir workdir-cairo
- cargo run --release -- --workdir=./workdir-cairo --backend=cairo --use-prev-commit
# try to build with all backends
- cd "$TRAVIS_BUILD_DIR"/tools/rendersvg
- cargo build --verbose --features="cairo-backend qt-backend"
# build C-API
- cd "$TRAVIS_BUILD_DIR"/capi
- cargo build --verbose --features="cairo-backend qt-backend"
# build cairo C example
- cd "$TRAVIS_BUILD_DIR"/examples/cairo-capi
- make
# build demo
- cd "$TRAVIS_BUILD_DIR"/demo
- qmake CONFIG+=debug
- make
# build cairo-rs example
- cd "$TRAVIS_BUILD_DIR"/examples/cairo-rs
- cargo build
52 changes: 52 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
[package]
name = "resvg"
version = "0.1.0"
authors = ["Evgeniy Reizner <[email protected]>"]
keywords = ["svg", "render", "raster"]
license = "MPL-2.0"

[dependencies]
base64 = "0.8"
log = "0.3"
libflate = "0.1"

[dependencies.error-chain]
version = "0.11"
default-features = false

[dependencies.pango]
version = "0.3"
optional = true

[dependencies.pangocairo]
version = "0.4.1"
optional = true

[dependencies.resvg-qt]
# git = "https://github.com/RazrFalcon/resvg-qt"
version = "0.1.0"
optional = true

[dependencies.cairo-rs]
version = "0.3"
features = ["png"]
optional = true

[dependencies.svgdom]
version = "0.9"
# git = "https://github.com/RazrFalcon/libsvgdom.git"
# branch = "devel"
# path = "../svgdom"

[dependencies.image]
version = "0.18"
default-features = false
features = ["jpeg", "png_codec"]
optional = true

[features]
cairo-backend = ["cairo-rs", "pango", "pangocairo", "image"]
qt-backend = ["resvg-qt"]

[lib]
doctest = false
Loading

0 comments on commit 8164587

Please sign in to comment.