Skip to content

Commit

Permalink
Merge branch 'master' into v0.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
djungelorm committed Feb 19, 2017
2 parents 887871a + 7075383 commit a906b63
Show file tree
Hide file tree
Showing 34 changed files with 131 additions and 88 deletions.
33 changes: 22 additions & 11 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,38 +6,49 @@ addons:
sources:
- ubuntu-toolchain-r-test
packages:
- wget
- autoconf
- automake
- curl
- g++
- inotify-tools
- libasio-dev
- liblua5.1-0-dev
- librsvg2-bin
- libtool
- libxml2-dev
- libxslt1-dev
- lua5.1
- make
- pkg-config
- python
- python-virtualenv
- python-dev
- python-pip
- texlive-latex-base
- texlive-latex-recommended
- python-virtualenv
- texlive-fonts-recommended
- texlive-latex-base
- texlive-latex-extra
- librsvg2-bin
- lua5.1
- liblua5.1-0-dev
- inotify-tools
- python-dev
- libxml2-dev
- libxslt1-dev
- texlive-latex-recommended
- unzip
- wget

language: csharp
mono:
- latest

install:
- ./tools/travis-ci/install-luarocks.sh
- ./tools/travis-ci/install-protobuf.sh
- ./tools/travis-ci/install-bazel.sh
- ./tools/travis-ci/install-ksp-libs.sh

script:
- stty cols 120
- ./tools/travis-ci/set-version.py
- bazel fetch //...
- bazel build //:krpc //doc:html //doc:compile-scripts //:csproj //tools/krpctools //tools/TestServer:archive
- xbuild KRPC.sln
- bazel test //:ci-test
- client/cpp/test-build.sh
- tools/dist/genfiles.sh

after_script:
Expand Down
38 changes: 19 additions & 19 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -3,29 +3,29 @@ workspace(name = "krpc")
new_http_archive(
name = 'protoc_linux_x86_32',
build_file = 'tools/build/protobuf/protoc_linux_x86_32.BUILD',
url = 'https://github.com/google/protobuf/releases/download/v3.1.0/protoc-3.1.0-linux-x86_32.zip',
sha256 = 'ed83ac3226b7d4334054c712a911669351b0a65d88cff04f32d5251b3c1e1bc5'
url = 'https://github.com/google/protobuf/releases/download/v3.2.0/protoc-3.2.0-linux-x86_32.zip',
sha256 = '62cd0b537122b9659e3684e89d4cc14595b0bce1ba7eaea083b37330bea8b397'
)

new_http_archive(
name = 'protoc_linux_x86_64',
build_file = 'tools/build/protobuf/protoc_linux_x86_64.BUILD',
url = 'https://github.com/google/protobuf/releases/download/v3.1.0/protoc-3.1.0-linux-x86_64.zip',
sha256 = '7c98f9e8a3d77e49a072861b7a9b18ffb22c98e37d2a80650264661bfaad5b3a'
url = 'https://github.com/google/protobuf/releases/download/v3.2.0/protoc-3.2.0-linux-x86_64.zip',
sha256 = '9cf9a8661d649b8477fe0ad32a8b28d351a170a62e210bf848d90a29f1f4df9d'
)

new_http_archive(
name = 'protoc_osx_x86_32',
build_file = 'tools/build/protobuf/protoc_osx_x86_32.BUILD',
url = 'https://github.com/google/protobuf/releases/download/v3.1.0/protoc-3.1.0-osx-x86_32.zip',
sha256 = '8291317f41253b9d8182d272d739b06febf25acd1d9787996a92fe5cae936898'
url = 'https://github.com/google/protobuf/releases/download/v3.2.0/protoc-3.2.0-osx-x86_32.zip',
sha256 = '2c524f270544823c1533c06aecfbc1047702650153548a8c5f0c42ac331d72c4'
)

new_http_archive(
name = 'protoc_win32',
build_file = 'tools/build/protobuf/protoc_win32.BUILD',
url = 'https://github.com/google/protobuf/releases/download/v3.1.0/protoc-3.1.0-win32.zip',
sha256 = 'e46b3b7c5c99361bbdd1bbda93c67e5cbf2873b7098482d85ff8e587ff596b23'
url = 'https://github.com/google/protobuf/releases/download/v3.2.0/protoc-3.2.0-win32.zip',
sha256 = '162fbb853fb1ec49c947d0b950b6d225f28967ee062f981cb875d589233cef56'
)

http_file(
Expand All @@ -37,9 +37,9 @@ http_file(
new_http_archive(
name = 'csharp_protobuf',
build_file = 'tools/build/csharp_protobuf.BUILD',
url = 'https://www.nuget.org/api/v2/package/Google.Protobuf/3.1.0',
url = 'https://www.nuget.org/api/v2/package/Google.Protobuf/3.2.0',
type = 'zip',
sha256 = '032057472194471ab61cc6e8fd9046f2e243338a1194d9cfa5c0e2aaaad42a0d'
sha256 = '4be0c8edd935124ae66a62f1b7ce22f95a509d321f727ba8074e1abd58370a13'
)

http_file(
Expand Down Expand Up @@ -82,9 +82,9 @@ new_http_archive(

http_archive(
name = 'cpp_protobuf',
url = 'https://github.com/google/protobuf/releases/download/v3.1.0/protobuf-cpp-3.1.0.tar.gz',
strip_prefix = 'protobuf-3.1.0',
sha256 = '51ceea9957c875bdedeb1f64396b5b0f3864fe830eed6a2d9c066448373ea2d6'
url = 'https://github.com/google/protobuf/releases/download/v3.2.0/protobuf-cpp-3.2.0.tar.gz',
strip_prefix = 'protobuf-3.2.0',
sha256 = '51d773e4297238b282eaa4c1dd317099675b12eef2b414732b851c00459225c6'
)

new_http_archive(
Expand Down Expand Up @@ -117,8 +117,8 @@ http_file(

http_file(
name = 'java_protobuf',
url = 'https://repo1.maven.org/maven2/com/google/protobuf/protobuf-java/3.1.0/protobuf-java-3.1.0.jar',
sha256 = '8d7ec605ca105747653e002bfe67bddba90ab964da697aaa5daa1060923585db'
url = 'https://repo1.maven.org/maven2/com/google/protobuf/protobuf-java/3.2.0/protobuf-java-3.2.0.jar',
sha256 = 'b1c2d420d2833429d11e405a58251e13bd7e3f22c266b49227c41e4d21361286'
)

http_file(
Expand Down Expand Up @@ -235,8 +235,8 @@ http_file(

http_file(
name = 'python_protobuf',
url = 'https://pypi.python.org/packages/a5/bb/11821bdc46cb9aad8e18618715e5e93eef44abb642ed862c4b080c474183/protobuf-3.1.0.post1-py2.py3-none-any.whl',
sha256 = '42315e73409eaefdcc11e216695ff21f87dc483ad0595c57999baddf7f841180'
url = 'https://pypi.python.org/packages/43/16/cdfe80080683b5a76ea489a516bb5859f1550476fdec9b20260987fa42c6/protobuf-3.2.0-py2.py3-none-any.whl',
sha256 = '55030bccd91a54836b9c551b99234f5efbc9721c8b93c80569fbe94aca0b9c35'
)

http_file(
Expand Down Expand Up @@ -283,8 +283,8 @@ http_file(

http_file(
name = 'python_sphinx_tabs',
url = 'https://pypi.python.org/packages/a5/8b/389bd1837fa5661ff5241eea0724f57870226193ad969682a523c63c7831/sphinx-tabs-0.1.0.tar.gz',
sha256 = '745e6b2e6beab6d2874d881d9ea7c1f67ba32bc461f257fe73d4ca1f059318a7'
url = 'https://pypi.python.org/packages/b2/82/b867824daeb4f4c159e26cee72994015ce8ed4cfd4a54a078033bc8397fa/sphinx-tabs-0.2.0.tar.gz',
sha256 = '6904e12da3db7044fb0883196befda8ff8b2547e41475e235fda5376b11f85ce'
)

http_file(
Expand Down
6 changes: 5 additions & 1 deletion client/cpp/CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ v0.4.0
* Remove connection retries. Client will now fail fast if it fails to connect to the server.
* Add support for RPCs to throw exceptions

v0.3.8
* Update to protobuf v3.2.0
* Update build scripts to check for protobuf >= 3.2 (#374)

v0.3.7
* Add missing header to automake script
* Add stream freezing (#357)
Expand All @@ -12,7 +16,7 @@ v0.3.6
* Fix configure script

v0.3.4
* Update protobuf to v3.0.0-beta-3
* Update to protobuf v3.0.0-beta-3

v0.2.3
* Make client thread safe
Expand Down
2 changes: 1 addition & 1 deletion client/cpp/CMakeLists.txt.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ if(CMAKE_COMPILER_IS_GNUCXX)
endif()

# Check for protobuf
find_package(Protobuf REQUIRED)
find_package(Protobuf 3.2 REQUIRED)

# Check for ASIO headers
find_path(HAVE_ASIO asio.hpp)
Expand Down
4 changes: 2 additions & 2 deletions client/cpp/configure.ac.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ AC_PROG_CXX
AC_LANG([C++])
AX_CXX_COMPILE_STDCXX_11(noext, mandatory)
AC_PROG_LIBTOOL
AC_CHECK_HEADER(google/protobuf/message.h, , AC_MSG_ERROR([Couldn't find protobuf headers."]))
AC_CHECK_HEADER(asio.hpp, , AC_MSG_ERROR([Couldn't find ASIO headers. Try "sudo apt-get install libasio-dev"]))
PKG_CHECK_MODULES([protobuf], [protobuf >= 3.2])
AC_CHECK_HEADER(asio.hpp, , AC_MSG_ERROR([Couldn't find ASIO headers.]))
AC_OUTPUT(Makefile include/Makefile src/Makefile)
31 changes: 31 additions & 0 deletions client/cpp/test-build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#!/bin/bash
# Test building the C++ client using autotools and CMake

set -ev

bazel build //client/cpp

out=bazel-bin/client/cpp/test-build
version=`tools/krpc-version.sh`

# Extract
rm -rf $out
mkdir -p $out
unzip -q bazel-bin/client/cpp/krpc-cpp-$version.zip -d $out
mv $out/krpc-cpp-$version/* $out/
rm -r $out/krpc-cpp-$version
pushd $out

# Autotools build
./configure --prefix=`pwd`/local-configure
make -j`nproc`
make install -j`nproc`

# CMake build
mkdir build-cmake
cd build-cmake
cmake .. -DCMAKE_INSTALL_PREFIX=`pwd`/../local-cmake
make -j`nproc`
make install -j`nproc`

popd
7 changes: 5 additions & 2 deletions client/csharp/CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,11 @@ v0.4.0
* Add support for RPCs to throw exceptions
* Build for .NET 4.5

v0.3.8
* Update to protobuf v3.2.0

v0.3.7
* Update to Protocol Buffers 3.1.0
* Update to protobuf v3.1.0
* Remove pre-release flag from nuget version

v0.3.5
Expand All @@ -14,7 +17,7 @@ v0.3.5
* Fix issue with receiving partial protobuf messages

v0.3.4
* Update protobuf to v3.0.0-beta-3
* Update to protobuf v3.0.0-beta-3

v0.2.3
* Make client thread safe
Expand Down
5 changes: 4 additions & 1 deletion client/java/CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,11 @@ v0.4.0
as these errors should not occur as a result of user input.
* Minor code clean up, and source now checked with CheckStyle

v0.3.8
* Update to protobuf v3.2.0

v0.3.4
* Update protobuf to v3.0.0-beta-3
* Update to protobuf v3.0.0-beta-3

v0.2.3
* Make client thread safe
Expand Down
3 changes: 3 additions & 0 deletions client/lua/CHANGES.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
v0.4.0
* Updated protocol in line with server changes

v0.3.8
* Update to protobuf v3.2.0

v0.2.2
* Remove support for protobuf enumeration and custom protobuf messages

Expand Down
2 changes: 2 additions & 0 deletions client/python/CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ v0.4.0

v0.3.8
* Clean up code to meet PEP 8 guidelines
* Update to protobuf v3.2.0
* Change package requirements to protobuf >= 3.2

v0.3.7
* Fix bug parsing nested collection types
Expand Down
2 changes: 1 addition & 1 deletion client/python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
if os.getenv('BAZEL_BUILD') and not os.path.exists(os.path.join(dirpath, 'VERSION.txt')):
dirpath = os.getcwd()

install_requires = ['protobuf >= 3.0.0']
install_requires = ['protobuf >= 3.2']
if sys.version_info < (3, 4):
install_requires.append('enum34 >= 0.9')

Expand Down
4 changes: 3 additions & 1 deletion doc/conf.py.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ html_theme = 'sphinx_rtd_theme'
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
htmlhelp_basename = 'krpc-doc'
html_static_path = ['crafts', 'scripts', '_static']
html_context = { 'css_files': ['_static/jquery-ui.min.css', '_static/custom.css'] }

def setup(app):
app.add_stylesheet('custom.css')

todo_include_todos = True

Expand Down
29 changes: 0 additions & 29 deletions doc/src/_static/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,32 +10,3 @@
display: inline;
padding-right: 0;
}

.rst-content .ui-tabs .ui-tabs-nav {
margin-bottom: 0;
}

.rst-content .ui-tabs .ui-tabs-nav .ui-tabs-anchor {
padding: 0.2em;
padding-left: 0.4em;
padding-right: 0.4em;
}

.rst-content .ui-tabs .ui-tabs-nav li {
margin-left: 0.4em;
list-style: none;
border: 1px solid #2980B9;
border-radius: 3px;
}

.rst-content .ui-tabs ul.ui-tabs-nav li.ui-tabs-active {
border-color: #404040;
}

.rst-content .ui-tabs ul.ui-tabs-nav li.ui-tabs-active a {
color: #404040;
}

.rst-content .ui-tabs ul.ui-tabs-nav li.ui-tabs-active a:hover {
color: #404040;
}
2 changes: 1 addition & 1 deletion doc/src/scripts/VisualDebugging.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System;
using KRPC.Client;
using KRPC.Client.Services.SpaceCenter;
using KRPC.Client.Services.Drawing;
using KRPC.Client.Services.SpaceCenter;

class VisualDebugging
{
Expand Down
3 changes: 3 additions & 0 deletions server/CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ v0.4.0
* Added ability for RPCs to throw custom exception types in the calling client
* Update to Protocol Buffers v3.1.0

v0.3.8
* Update to Protobuf Buffers v3.2.0

v0.3.7
* Support for KSP 1.2.2
* Add KRPCDefaultValue attribute. Can be used to set default arguments to non-compile time constants.
Expand Down
2 changes: 1 addition & 1 deletion server/src/Addon.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ namespace KRPC
/// </summary>
[KSPAddon (KSPAddon.Startup.AllGameScenes, false)]
[SuppressMessage ("Gendarme.Rules.Correctness", "DeclareEventsExplicitlyRule")]
sealed public class Addon : MonoBehaviour
public sealed class Addon : MonoBehaviour
{
// TODO: clean this up
internal static ConfigurationFile config;
Expand Down
4 changes: 2 additions & 2 deletions server/src/Continuations/Continuation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public object RunUntyped ()
{
return Run ();
}
};
}

/// <summary>
/// A continuation that does not return a value
Expand All @@ -37,5 +37,5 @@ public object RunUntyped ()
Run ();
return null;
}
};
}
}
2 changes: 1 addition & 1 deletion server/src/Continuations/IContinuation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ public interface IContinuation
/// Run the continuation and return the result.
/// </summary>
object RunUntyped ();
};
}
}
2 changes: 1 addition & 1 deletion server/src/Service/RequestContinuation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -72,5 +72,5 @@ public override Response Run ()
return response;
}
}
};
}
}
Loading

0 comments on commit a906b63

Please sign in to comment.