Skip to content
This repository was archived by the owner on Oct 28, 2020. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ version = "0.2.0"
[dependencies]
pistoncore-input = "0.10.0"
pistoncore-window = "0.17.0"
tcod = "0.9.0"
tcod = { path = "tcod", version = "*" }

[dependencies.clippy]
optional = true
Expand Down
19 changes: 8 additions & 11 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@ matrix:
- RUST_CHANNEL: nightly
environment:
matrix:
- TARGET: x86_64-pc-windows-msvc
ARCH: amd64
VS: C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat
- TARGET: i686-pc-windows-msvc
ARCH: x86
VS: C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat
#- TARGET: x86_64-pc-windows-msvc
#ARCH: amd64
#VS: C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat
#- TARGET: i686-pc-windows-msvc
#ARCH: x86
#VS: C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat
- TARGET: x86_64-pc-windows-gnu
MSYS_BITS: 64
- TARGET: i686-pc-windows-gnu
MSYS_BITS: 32
#- TARGET: i686-pc-windows-gnu
#MSYS_BITS: 32

# Install Rust and Cargo
install:
Expand All @@ -37,7 +37,4 @@ build: false
# Equivalent to Travis' `script` phase
test_script:
- cargo build --verbose
# This is a temporary measure to fix the doc tests failing on `pc-window-gnu`
# builds with a "cannot find -lSDL.dll" error.
- cp target/debug/build/tcod-sys-*/out/SDL.dll target/debug/deps/SDL.dll.dll
- cargo test --verbose
39 changes: 39 additions & 0 deletions tcod/.cargo/config
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Using binary distribution of libtcod instead of building it from source:
# For more info, read: http://doc.crates.io/build-script.html and http://doc.crates.io/config.html
#
# In general, you download your the compiled libraries (libtcod.so/dll/ and
# libtcodgui.so/dll), put them into `precompiled/$target` and uncomment the
# corresponding section below.


# 64-bit Linux:
#
# Download this: http://roguecentral.org/doryen/?file_id=28
# Copy libtcod.so and libtcodgui.so to: precompiled/x86_64-unknown-linux-gnu
# You may also need to create libtcod.so.1 and libtcodgui.so.1 because reasons?
# Uncomment this section:
#
# [target.x86_64-unknown-linux-gnu.tcod]
# rustc-flags = "-L precompiled/x86_64-unknown-linux-gnu -l tcod"


# 32-bit Linux:
#
# Download this: http://roguecentral.org/doryen/?file_id=26
# Copy libtcod.so and libtcodgui.so to: precompiled/i686-unknown-linux-gnu
# You may also need to create libtcod.so.1 and libtcodgui.so.1 because reasons?
# Uncomment this section:
#
# [target.i686-unknown-linux-gnu.tcod]
# rustc-flags = "-L precompiled/i686-unknown-linux-gnu -l tcod"


# Windows:
#
# Download this: http://roguecentral.org/doryen/?file_id=27
# Copy libtcod-mingw.dll, libtcod-gui-mingw.dll and SDL.dll to: precompiled/i686-pc-windows-gnu
# You must also create libtcod.dll and libtcod-gui.dll because reasons?
# Uncomment this section:
#
# [target.i686-pc-windows-gnu.tcod]
# rustc-flags = "-L precompiled/i686-pc-windows-gnu -l tcod"
31 changes: 31 additions & 0 deletions tcod/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
.DS_Store
*~
*#
*.a
*.o
*.so
*.dylib
*.swp
*.dSYM
*.dll
*.rlib
*.dummy
*.exe
*-test
/bin/main
/bin/test-internal
/bin/test-external
/doc/
/target/
/build/
/.rust/
rusti.sh
watch.sh
/examples/**
!/examples/*.rs
!/examples/*.txt
!/examples/assets/
*Cargo.lock
/tcod_sys/target/
!/tcod_sys/libtcod/SDL*.dll
!/tcod_sys/libtcod/dependencies/**
40 changes: 40 additions & 0 deletions tcod/.travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
language: rust
os:
- linux
- osx
rust:
- nightly
- stable
before_install:
- '[ "$TRAVIS_OS_NAME" = linux ] && sudo apt-get update -qq || brew update'
install:
- '[ "$TRAVIS_OS_NAME" = linux ] && sudo apt-get install -y libsdl1.2-dev || brew install sdl'
script:
- cargo build --verbose
- cargo test --verbose
- cargo test --features "rustc-serialize serde" --verbose
after_success: ! '[ $TRAVIS_BRANCH = master ] &&

[ "$TRAVIS_OS_NAME" = linux ] &&

[ $TRAVIS_PULL_REQUEST = false ] &&

cargo doc &&

echo ''<meta http-equiv=refresh content="0;url=tcod/index.html">'' > target/doc/index.html
&&

git config --global user.email "travis@travis-ci.org" &&

git config --global user.name "travis-ci" &&

sudo pip install ghp-import &&

ghp-import -n target/doc &&

git push -fq https://${TOKEN}@github.com/${TRAVIS_REPO_SLUG}.git gh-pages

'
env:
global:
- secure: h21kqC5s6iVs4p5n9KFZ5ZTWtPF8nGVFpaPP6t/1Sg+xMaHMDyr/sBYI1gsNGTXrVsiP2Zs6cRTBEbX12PVL6MXFgKpdhKG1+lBCMk6HxU8/W2UHCh6Y38+W4Ybyv5fuoWqkUOX3yODNkRZWrqNhdm8lCdE2uGczkIKPi7hDYMM=
13 changes: 13 additions & 0 deletions tcod/COPYING.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004

Copyright (C) 2014 Tomas Sedovic <tomas@sedovic.cz>

Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.

DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION

0. You just DO WHAT THE FUCK YOU WANT TO.
42 changes: 42 additions & 0 deletions tcod/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
[package]
name = "tcod"
description = "The Rust bindings for the Doryen library (a.k.a. libtcod)."
version = "0.9.0"
homepage = "https://github.com/tomassedovic/tcod-rs"
repository = "https://github.com/tomassedovic/tcod-rs"
documentation = "http://tomassedovic.github.io/tcod-rs/tcod/index.html"
readme = "README.md"
keywords = ["gamedev", "roguelike", "libtcod"]
license = "WTFPL"
authors = ["Tomas Sedovic <tomas@sedovic.cz>",
"Bastien Léonard <bastien.leonard@gmail.com>",
"Darren Kaste <darrenkaste@gmail.com>",
"Edu Garcia <arcnorj@gmail.com>",
"Guillermo Galizzi <galizzi.guillermo@gmail.com>",
"Gustorn <gustorn@gmail.com>",
"Jared McFarland <jared.online@gmail.com>",
"Jonny Gilchrist (@jgilchrist)",
"LaylConway <laylconway@live.com>",
"Moredread <code@andre-bubel.de>",
"Nikita Pekin",
"Paul Sanford <me@paulsanford.net>",
"Pranz <jesper.fridefors@gmail.com>"]

[lib]
name = "tcod"
path = "src/lib.rs"

[dependencies]
bitflags = "0.1"
libc = "0.2"
lazy_static = "0.1"
rustc-serialize = { optional = true, version = "0.3" }
serde = { optional = true, version = "0.6" }

[dependencies.tcod-sys]
path = "tcod_sys"
version = "4.0"

[dev-dependencies]
rand = "0.3"
serde_json = "0.6"
14 changes: 14 additions & 0 deletions tcod/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
build:
cargo build

test:
cargo test --features "rustc-serialize_impls"

package: clean
cargo package --manifest-path tcod_sys/Cargo.toml
cargo package

clean:
git clean -x -f -d

.PHONY: build test package clean
Loading