Skip to content

Commit

Permalink
Merge branch 'develop' into release
Browse files Browse the repository at this point in the history
* develop: (105 commits)
  Add latest Ponder, 3.1, as submodule.
  Move Ponder to submodule. First delete.
  Fix warning.
  Fix typo in util/CMakeLists.txt
  Add option to support SFML 2.5 on Windows, second attempt
  Fix duplicate definition.
  Fix warnings
  Update Ponder to V3.0.0
  Fix flags.
  Mention Ponder #30, bump version to 1.0.
  Fix null sample.
  Update gitignore
  Add Irrlicht, help.
  Remove brackets from macro with no args.
  git subrepo pull deps/ponder
  Fixes
  Renaming
  Ensure Ponder is statically linked.
  Fix Windows min/max macros. - Why?!!
  Fix MSVC compilation. - Please make sure you have the latest MSVC for bugfixes in C++1y
  ...

# Conflicts:
#	CHANGELOG.md
#	cmake/Config.cmake
  • Loading branch information
billyquith committed Jul 6, 2019
2 parents 103561f + 0231a68 commit ea2d701
Show file tree
Hide file tree
Showing 195 changed files with 7,897 additions and 1,112 deletions.
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ source/platform/include/Gwork/Version.h

bin/
lib/
deps/

build*/
maintain_*.txt

source/test/stats/*_report.*
source/test/stats/curr_allocs.*
Expand All @@ -16,4 +16,4 @@ source/test/stats/curr_allocs.*
CMakeSettings.json

#Visual Studio Code
.vscode/
.vscode/
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "deps/ponder"]
path = deps/ponder
url = https://github.com/billyquith/ponder.git
106 changes: 39 additions & 67 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
# Gwork Travis config

# Life cycle: (https://docs.travis-ci.com/user/customizing-the-build/)
#
# - OPTIONAL Install apt addons
# - OPTIONAL Install cache components
# - before_install
# - install
# - before_script
# - script
# - OPTIONAL before_cache (for cleaning up cache)
# - after_success or after_failure
# - OPTIONAL before_deploy
# - OPTIONAL deploy
# - OPTIONAL after_deploy
# - after_script


# Use Ubuntu Trusty (14) for mostly up-to-date packages
sudo: required
dist: trusty
Expand All @@ -14,86 +30,42 @@ language: cpp
#
# currently issue for adding the Trusty LLVM ppa to Travis’ whitelist, previous, 12.04
# issue: https://github.com/travis-ci/apt-source-whitelist/pull/205

# Linux packages are got using apt on Travis.
# See: https://docs.travis-ci.com/user/installing-dependencies/

matrix:
include:
- os: linux
compiler: gcc
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-4.9
env: COMPILER=g++-4.9 BUILD_CONFIG=Debug
- os: linux
compiler: gcc
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-5
- doxygen
env: COMPILER=g++-5 BUILD_CONFIG=Debug
env: FEATURES="-DWANT_REFLECTION=OFF"
- os: linux
compiler: gcc
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-6
- doxygen
env: COMPILER=g++-6 BUILD_CONFIG=Debug
- os: linux
compiler: clang
addons:
apt:
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-precise-3.6
packages:
- clang-3.6
env: COMPILER=clang++-3.6 BUILD_CONFIG=Debug
env: FEATURES="-DWANT_REFLECTION=ON"

- os: linux
compiler: clang
addons:
apt:
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-precise-3.7
packages:
- clang-3.7
env: COMPILER=clang++-3.7 BUILD_CONFIG=Debug
env: FEATURES="-DWANT_REFLECTION=OFF"
- os: linux
compiler: clang
addons:
apt:
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-precise-3.8
packages:
- clang-3.8
- doxygen
env: COMPILER=clang++-3.8 BUILD_CONFIG=Debug
- os: osx
osx_image: xcode7.3
compiler: clang
env: COMPILER=clang++ BUILD_CONFIG=Debug
install: ./ci/travis/install.sh
- os: osx
osx_image: xcode8.2
compiler: clang
env: COMPILER=clang++ BUILD_CONFIG=Release
install: ./ci/travis/install.sh

# install: ./ci/travis/install.sh
env: FEATURES="-DWANT_REFLECTION=ON"

before_script: ./ci/travis/make_build.sh $COMPILER
- os: osx # Xcode (previous)
osx_image: xcode8.3
env: FEATURES="-DWANT_REFLECTION=OFF"
- os: osx
osx_image: xcode8.3
env: FEATURES="-DWANT_REFLECTION=ON"

script:
- cd build && cmake --build . --target GworkNullSample --config $BUILD_CONFIG
- os: osx # Xcode (latest)
osx_image: xcode9.2
env: FEATURES="-DWANT_REFLECTION=OFF"
- os: osx
osx_image: xcode9.2
env: FEATURES="-DWANT_REFLECTION=ON"

script: ./ci/travis/build.sh

notifications:
email:
on_failure: change
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ Changelog

This is a changelog for Gwork. There are also notes [on my blog][blog]

## 1.0

- Added reflection to Gwork using [Ponder][ponder] reflection library. #30.

#### 0.3.1

- Add option to use SFML 2.5 cmake config. Thanks roepel@github. #94
Expand Down Expand Up @@ -70,6 +74,7 @@ This is a changelog for Gwork. There are also notes [on my blog][blog]
* camelCase variables.


[ponder]: https://github.com/billyquith/ponder
[gwen]: https://github.com/garrynewman/GWEN
[sdl2]: https://www.libsdl.org/
[sfml2]: http://www.sfml-dev.org
Expand Down
3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
cmake_minimum_required(VERSION 3.1)

# we require C++11 - this set appropriate flags for compilers, which may not be portable
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD 14)

project(gwork)

Expand Down Expand Up @@ -35,4 +35,5 @@ configure_file(

# add our projects
add_subdirectory(source)
add_subdirectory(deps)
add_subdirectory(docs)
3 changes: 3 additions & 0 deletions attic/renderers/Direct2D/Direct2D.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -513,3 +513,6 @@ bool Direct2D::EndContext(Gwk::WindowProvider* window)

}
}

} // namespace Renderer
} // namespace Gwk
3 changes: 2 additions & 1 deletion attic/renderers/Direct2D/Direct2DSample.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* See license in Gwork.h
*/

#define GWK_SAMPLE
#define WIN32_LEAN_AND_MEAN
#include <windows.h>

Expand Down Expand Up @@ -190,7 +191,7 @@ int main(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nCm
createDeviceResources();

// Create path calculator and resource loader.
Gwk::Platform::RelativeToExecutablePaths paths(GWORK_RESOURCE_DIR);
Gwk::Platform::RelativeToExecutablePaths paths(GWK_SAMPLE_RESOURCE_DIR);
Gwk::Renderer::Direct2DResourceLoader loader(paths, g_rT, g_dWriteFactory, g_wICFactory);

// Create a Gwork Direct2D renderer
Expand Down
4 changes: 2 additions & 2 deletions attic/renderers/GDIPlus/GDIPlus.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -218,5 +218,5 @@ bool GDIPlus::EndContext(Gwk::WindowProvider* window)
return true;
}

}
}
} // namespace Renderer
} // namespace Gwk
1 change: 1 addition & 0 deletions attic/renderers/GDIPlus/GDIPlusSample.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* See license in Gwork.h
*/

#define GWK_SAMPLE
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <objbase.h>
Expand Down
74 changes: 74 additions & 0 deletions ci/travis/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
#!/usr/bin/env bash
# Prepare the build files for Travis to build
# args: <C++ compiler> "<want opts>"

set -ev

uname -a
env

BUILD_OS=$TRAVIS_OS_NAME
WITH_OPTS="-DWITH_TESTS=ON -DWITH_SAMPLE=ON -DRENDER_NULL=ON $FEATURES"
RENDER_SAMPLE=GworkNullSample

cmake --version
echo "Using C++ compiler: CXX=$CXX, CC=$CC"
echo "Options for cmake generation: $WITH_OPTS"


function prepare_osx
{
mkdir build
pushd build
cmake .. -GXcode $WITH_OPTS
popd
}

function prepare_linux
{
mkdir build
pushd build
# Travis doesn't pass on the COMPILER version so we'll use env CXX variable
local ccmd="cmake .. -G \"Unix Makefiles\" $WITH_OPTS"
echo "$ccmd"
eval "$ccmd"
popd
}


function build # (config)
{
echo "==== Building config $1 ===="
pushd build
cmake --build . --target $RENDER_SAMPLE --config $1
popd
}

function test_osx # (config)
{
# OSX outputs to bin/CONFIG
pushd bin/$1
./$RENDER_SAMPLE.app/Contents/MacOS/$RENDER_SAMPLE
popd
}

function test_linux # (config)
{
# All Linux configs output to bin/
pwd
ls
pushd bin
./$RENDER_SAMPLE
popd
}

function build_and_test # (config)
{
build $1
test_$BUILD_OS $1
}

prepare_$BUILD_OS "$@"

build_and_test Debug
build_and_test Release
66 changes: 59 additions & 7 deletions ci/travis/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,69 @@ set -ev

echo "Lang:$LANG, OS:$TRAVIS_OS_NAME, CC:$CC"

function install_osx {
brew update
if [[ -z `brew list | grep doxygen` ]]; then brew install doxygen; fi
if [[ -z `brew list | grep cmake` ]]; then brew install cmake; fi
brew outdated cmake || brew upgrade cmake

function install_ponder
{
git clone --depth=3 https://github.com/billyquith/ponder.git
cd ponder
mkdir build && cd build
cmake .. -G "Unix Makefiles"
cmake --build . --target install
cd ../..
}

function install_lua53
{
# https://www.lua.org/download.html
curl -R -O http://www.lua.org/ftp/lua-5.3.4.tar.gz
tar zxf lua-5.3.4.tar.gz
cd lua-5.3.4

# From Lua makefile: Convenience platforms targets.
# PLATS= aix bsd c89 freebsd generic linux macosx mingw posix solaris

make $1 test
make install
}

function install_linux {

# $1 - "+what +we +want"
function setup_osx
{
echo "Requested: $1"

# if [[ -z `brew list --versions cmake` ]]; then
# brew install cmake
# else
# # Update cmake to latest version (will also update brew)
# brew outdated cmake || brew upgrade cmake
# fi
#
# if [[ -z `echo $1 | grep "+doxygen"` ]]; then
# if [[ -z `brew list --versions doxygen` ]]; then
# brew install doxygen
# fi
# fi

if [[ -z `echo $1 | grep "+lua"` ]]; then
#brew install [email protected]
install_lua53 macosx
fi

if [[ -z `echo $1 | grep "+ponder"` ]]; then
install_ponder
fi
}

function setup_linux
{
# sudo apt-get -qq update
# sudo apt-get install -y cmake doxygen
echo "See .travis.yml for packages/addons install/update"

if [[ -z `echo $1 | grep "+lua"` ]]; then
install_lua53 linux
fi
}

install_$TRAVIS_OS_NAME
setup_$TRAVIS_OS_NAME "$@"
Loading

0 comments on commit ea2d701

Please sign in to comment.