diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..af61d31 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,17 @@ +# Visual Studio wants crlf, but if we do so, git will +# normalise files and git-svn will push LF files to SVN, +# so we revert back to binary. +*.sln -text +*.csproj -text +*.vcxproj -text + +# Vim doesn't like CRLF, even on Windows +*.vim eol=lf + +# Source files should be normalised in the repository +*.c eol=lf +*.cpp eol=lf +*.cc eol=lf +*.h eol=lf +*.hh eol=lf +*.lolfx eol=lf diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..ac1c5d3 --- /dev/null +++ b/.gitignore @@ -0,0 +1,60 @@ +# Autotools cruft +*.o +*.lo +*.a +*.la +*.exe +*.so +*.elf +*.self +*.nexe +*.userprefs +*.usertasks +*.pidb +.auto +.libs +.deps +.dirstamp +.*.androiddir +.*.androidstamp +Makefile +Makefile.in +aclocal.m4 +autom4te.cache +config.h.in +config.h +config.log +config.status +configure +libtool +stamp-* +*-stamp +test-suite.log +# Personal stuff +patch-*.diff +# Debugging cruft +core +!core/ +core.* +vgcore.* +callgrind.out.* +perf.data* +*.gcda +*.gcno +# Editor cruft +.*.swp +*~ +.ycm_extra_conf.pyc +# Visual Studio cruft +*.vcxproj.user +*.csproj.user +binaries/*Debug +binaries/*Release +.vs +*.VC.VC.opendb +*.VC.db +*.sdf +*.suo +*.opensdf +# ReSharper cruft +_ReSharper.* diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..5dcfd56 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "lol"] + path = lol + url = ../../lolengine/lol.git diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..24b95e3 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,33 @@ +sudo: required +dist: trusty +language: c++ +env: VERBOSE=1 + +addons: + apt: + packages: + - build-essential + - automake + - autoconf + - libtool + - pkg-config + - libsdl2-dev + - libsdl2-image-dev + - libsdl2-mixer-dev + - libglew-dev + # this can fix clang compilation + - clang-3.8 + - libc++-dev + +before_install: + - if [ "$CC" = "clang" ]; then export CC="clang-3.8"; fi + - if [ "$CXX" = "clang++" ]; then export CXX="clang++-3.8 -stdlib=libc++"; fi + - ./bootstrap + +os: + - linux + +compiler: + - gcc + - clang + diff --git a/Makefile.am b/Makefile.am new file mode 100644 index 0000000..4121d2f --- /dev/null +++ b/Makefile.am @@ -0,0 +1,9 @@ + +include $(top_srcdir)/lol/build/autotools/common.am + +ACLOCAL_AMFLAGS = -I lol/build/autotools/m4 + +SUBDIRS = lol roflmao + +test: check + diff --git a/README.md b/README.md new file mode 100644 index 0000000..19d0707 --- /dev/null +++ b/README.md @@ -0,0 +1,47 @@ +# roflmao + +[![Build Status (Travis-CI)](https://travis-ci.org/lolengine/lol-roflmao.svg?branch=master)](https://travis-ci.org/lolengine/lol-roflmao) +[![Build Status (Semaphore-CI)](https://semaphoreci.com/api/v1/samhocevar/lol-roflmao/branches/master/badge.svg)](https://semaphoreci.com/samhocevar/lol-roflmao) + +`roflmao` is a simple project using Lol Engine. If you want to get +started with Lol Engine, you may either: + + - fork this project + - duplicate this project (see [“duplicating a repository”](https://help.github.com/articles/duplicating-a-repository/)) + +## Setup + +Make sure Lol Engine and its submodules are properly initialised: + + git submodule update --init --recursive + +On Linux, make sure the following packages are installed: + + automake autoconf libtool pkg-config + libglew-dev + libsdl2-dev libsdl2-image-dev libsdl2-mixer-dev + +## Configure + +The default application is called `roflmao` and lies in its own subdirectory. +You should rename it to whatever your application will be called. Make sure +to modify the following files: + + configure.ac + Makefile.am + roflmao/Makefile.am + roflmao/roflmao.cpp + +You can of course have several projects in the same repository. + +## Build + +Then bootstrap the project and configure it: + + ./bootstrap + ./configure + +Finally, build the project: + + make + diff --git a/bootstrap b/bootstrap new file mode 100755 index 0000000..af50f77 --- /dev/null +++ b/bootstrap @@ -0,0 +1,21 @@ +#!/bin/sh + +# Check that the repository is properly set up +if [ ! -x "./lol/bootstrap" ]; then +cat << EOF +Error: cannot execute lol/bootstrap + +Did you configure the Lol Engine submodule? The following may help: + + git submodule update --init --recursive + +EOF + exit 1 +fi + +# Bootstrap this project first, using the Lol Engine script +./lol/bootstrap + +# Then bootstrap Lol Engine itself +(cd lol && ./bootstrap) + diff --git a/configure.ac b/configure.ac new file mode 100644 index 0000000..f43a1ee --- /dev/null +++ b/configure.ac @@ -0,0 +1,37 @@ +dnl +dnl Configure script for a Lol Engine project +dnl + +AC_INIT(roflmao, 0.0) + +dnl +dnl Standard autoconf setup and tools requirements +dnl + +AC_PREREQ(2.50) +AC_CONFIG_AUX_DIR(.auto) +AC_CANONICAL_SYSTEM +AM_INIT_AUTOMAKE([subdir-objects no-define tar-ustar silent-rules]) +AM_DEFAULT_VERBOSITY=0 + +AC_PROG_CXX +AM_PROG_LIBTOOL +AC_LIBTOOL_CXX + +AC_CONFIG_FILES( + [Makefile + roflmao/Makefile +]) + +dnl +dnl Inherit all Lol Engine checks +dnl + +LOL_AC_SUBPROJECT() + +dnl +dnl Perform the actual commands +dnl + +AC_OUTPUT + diff --git a/lol b/lol new file mode 160000 index 0000000..99c8c23 --- /dev/null +++ b/lol @@ -0,0 +1 @@ +Subproject commit 99c8c2353e082b20cf8d6f2a5501331dfc2a54ca diff --git a/roflmao.sln b/roflmao.sln new file mode 100644 index 0000000..989a914 --- /dev/null +++ b/roflmao.sln @@ -0,0 +1,83 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 14 +VisualStudioVersion = 14.0.25420.1 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "lol-core", "lol\src\lol-core.vcxproj", "{9E62F2FE-3408-4EAE-8238-FD84238CEEDA}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "lol-bullet", "lol\src\bullet\lol-bullet.vcxproj", "{83D3B207-C601-4025-8F41-01DEDC354661}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "lol-lua", "lol\src\lua\lol-lua.vcxproj", "{D84021CA-B233-4E0F-8A52-071B83BBCCC4}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Engine", "Engine", "{1AFD580B-98B8-4689-B661-38C41132C60E}" + ProjectSection(SolutionItems) = preProject + msbuild\config-build.xml = msbuild\config-build.xml + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "roflmao", "roflmao\roflmao.vcxproj", "{3D02B33D-C348-43C8-AB6A-FB6E6F3C0E7C}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Roflmao", "Roflmao", "{03B9D2E1-AFBA-4F66-8DE0-6499C9F9155F}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|ORBIS = Debug|ORBIS + Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 + Release|ORBIS = Release|ORBIS + Release|Win32 = Release|Win32 + Release|x64 = Release|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {9E62F2FE-3408-4EAE-8238-FD84238CEEDA}.Debug|ORBIS.ActiveCfg = Debug|Win32 + {9E62F2FE-3408-4EAE-8238-FD84238CEEDA}.Debug|Win32.ActiveCfg = Debug|Win32 + {9E62F2FE-3408-4EAE-8238-FD84238CEEDA}.Debug|Win32.Build.0 = Debug|Win32 + {9E62F2FE-3408-4EAE-8238-FD84238CEEDA}.Debug|x64.ActiveCfg = Debug|x64 + {9E62F2FE-3408-4EAE-8238-FD84238CEEDA}.Debug|x64.Build.0 = Debug|x64 + {9E62F2FE-3408-4EAE-8238-FD84238CEEDA}.Release|ORBIS.ActiveCfg = Release|Win32 + {9E62F2FE-3408-4EAE-8238-FD84238CEEDA}.Release|Win32.ActiveCfg = Release|Win32 + {9E62F2FE-3408-4EAE-8238-FD84238CEEDA}.Release|Win32.Build.0 = Release|Win32 + {9E62F2FE-3408-4EAE-8238-FD84238CEEDA}.Release|x64.ActiveCfg = Release|x64 + {9E62F2FE-3408-4EAE-8238-FD84238CEEDA}.Release|x64.Build.0 = Release|x64 + {83D3B207-C601-4025-8F41-01DEDC354661}.Debug|ORBIS.ActiveCfg = Debug|Win32 + {83D3B207-C601-4025-8F41-01DEDC354661}.Debug|Win32.ActiveCfg = Debug|Win32 + {83D3B207-C601-4025-8F41-01DEDC354661}.Debug|Win32.Build.0 = Debug|Win32 + {83D3B207-C601-4025-8F41-01DEDC354661}.Debug|x64.ActiveCfg = Debug|x64 + {83D3B207-C601-4025-8F41-01DEDC354661}.Debug|x64.Build.0 = Debug|x64 + {83D3B207-C601-4025-8F41-01DEDC354661}.Release|ORBIS.ActiveCfg = Release|Win32 + {83D3B207-C601-4025-8F41-01DEDC354661}.Release|Win32.ActiveCfg = Release|Win32 + {83D3B207-C601-4025-8F41-01DEDC354661}.Release|Win32.Build.0 = Release|Win32 + {83D3B207-C601-4025-8F41-01DEDC354661}.Release|x64.ActiveCfg = Release|x64 + {83D3B207-C601-4025-8F41-01DEDC354661}.Release|x64.Build.0 = Release|x64 + {D84021CA-B233-4E0F-8A52-071B83BBCCC4}.Debug|ORBIS.ActiveCfg = Debug|Win32 + {D84021CA-B233-4E0F-8A52-071B83BBCCC4}.Debug|Win32.ActiveCfg = Debug|Win32 + {D84021CA-B233-4E0F-8A52-071B83BBCCC4}.Debug|Win32.Build.0 = Debug|Win32 + {D84021CA-B233-4E0F-8A52-071B83BBCCC4}.Debug|x64.ActiveCfg = Debug|x64 + {D84021CA-B233-4E0F-8A52-071B83BBCCC4}.Debug|x64.Build.0 = Debug|x64 + {D84021CA-B233-4E0F-8A52-071B83BBCCC4}.Release|ORBIS.ActiveCfg = Release|Win32 + {D84021CA-B233-4E0F-8A52-071B83BBCCC4}.Release|Win32.ActiveCfg = Release|Win32 + {D84021CA-B233-4E0F-8A52-071B83BBCCC4}.Release|Win32.Build.0 = Release|Win32 + {D84021CA-B233-4E0F-8A52-071B83BBCCC4}.Release|x64.ActiveCfg = Release|x64 + {D84021CA-B233-4E0F-8A52-071B83BBCCC4}.Release|x64.Build.0 = Release|x64 + {3D02B33D-C348-43C8-AB6A-FB6E6F3C0E7C}.Debug|ORBIS.ActiveCfg = Debug|ORBIS + {3D02B33D-C348-43C8-AB6A-FB6E6F3C0E7C}.Debug|ORBIS.Build.0 = Debug|ORBIS + {3D02B33D-C348-43C8-AB6A-FB6E6F3C0E7C}.Debug|Win32.ActiveCfg = Debug|Win32 + {3D02B33D-C348-43C8-AB6A-FB6E6F3C0E7C}.Debug|Win32.Build.0 = Debug|Win32 + {3D02B33D-C348-43C8-AB6A-FB6E6F3C0E7C}.Debug|x64.ActiveCfg = Debug|x64 + {3D02B33D-C348-43C8-AB6A-FB6E6F3C0E7C}.Debug|x64.Build.0 = Debug|x64 + {3D02B33D-C348-43C8-AB6A-FB6E6F3C0E7C}.Release|ORBIS.ActiveCfg = Release|ORBIS + {3D02B33D-C348-43C8-AB6A-FB6E6F3C0E7C}.Release|ORBIS.Build.0 = Release|ORBIS + {3D02B33D-C348-43C8-AB6A-FB6E6F3C0E7C}.Release|Win32.ActiveCfg = Release|Win32 + {3D02B33D-C348-43C8-AB6A-FB6E6F3C0E7C}.Release|Win32.Build.0 = Release|Win32 + {3D02B33D-C348-43C8-AB6A-FB6E6F3C0E7C}.Release|x64.ActiveCfg = Release|x64 + {3D02B33D-C348-43C8-AB6A-FB6E6F3C0E7C}.Release|x64.Build.0 = Release|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(NestedProjects) = preSolution + {9E62F2FE-3408-4EAE-8238-FD84238CEEDA} = {1AFD580B-98B8-4689-B661-38C41132C60E} + {83D3B207-C601-4025-8F41-01DEDC354661} = {1AFD580B-98B8-4689-B661-38C41132C60E} + {D84021CA-B233-4E0F-8A52-071B83BBCCC4} = {1AFD580B-98B8-4689-B661-38C41132C60E} + {3D02B33D-C348-43C8-AB6A-FB6E6F3C0E7C} = {03B9D2E1-AFBA-4F66-8DE0-6499C9F9155F} + EndGlobalSection +EndGlobal diff --git a/roflmao/.gitignore b/roflmao/.gitignore new file mode 100644 index 0000000..4b8e9f8 --- /dev/null +++ b/roflmao/.gitignore @@ -0,0 +1,2 @@ +roflmao +*.exe diff --git a/roflmao/Makefile.am b/roflmao/Makefile.am new file mode 100644 index 0000000..55d3524 --- /dev/null +++ b/roflmao/Makefile.am @@ -0,0 +1,10 @@ + +include $(top_srcdir)/lol/build/autotools/common.am + +bin_PROGRAMS = roflmao + +roflmao_SOURCES = roflmao.cpp +roflmao_CPPFLAGS = $(AM_CPPFLAGS) +roflmao_DEPENDENCIES = @LOL_DEPS@ +roflmao_LDFLAGS = $(AM_LDFLAGS) + diff --git a/roflmao/roflmao.cpp b/roflmao/roflmao.cpp new file mode 100644 index 0000000..bc76424 --- /dev/null +++ b/roflmao/roflmao.cpp @@ -0,0 +1,16 @@ +// +// Roflmao — Lol Engine Test App +// + +#if HAVE_CONFIG_H +# include "config.h" +#endif + +#include + +int main(int argc, char **argv) +{ + lol::System::Init(argc, argv); + return EXIT_SUCCESS; +} + diff --git a/roflmao/roflmao.vcxproj b/roflmao/roflmao.vcxproj new file mode 100644 index 0000000..ed35ffb --- /dev/null +++ b/roflmao/roflmao.vcxproj @@ -0,0 +1,67 @@ + + + + $(SolutionDir)\lol + $(SolutionDir)\.. + + + + Debug + ORBIS + + + Debug + Win32 + + + Debug + x64 + + + Release + ORBIS + + + Release + Win32 + + + Release + x64 + + + + + + + + {9e62f2fe-3408-4eae-8238-fd84238ceeda} + + + {83d3b207-c601-4025-8f41-01dedc354661} + + + {d84021ca-b233-4e0f-8a52-071b83bbccc4} + + + + {3d02b33d-c348-43c8-ab6a-fb6e6f3c0e7c} + Application + Win32Proj + + + + + + + + + + + + + + + + +