Browse Source

Make lol-lua an optional dependency.

legacy
Sam Hocevar 7 years ago
parent
commit
487c82609c
36 changed files with 43 additions and 73 deletions
  1. +2
    -1
      build/autotools/m4/lol-conf.m4
  2. +0
    -3
      doc/samples/benchsuite.vcxproj
  3. +0
    -3
      doc/samples/btphystest.vcxproj
  4. +1
    -1
      doc/samples/meshviewer/Makefile.am
  5. +2
    -0
      doc/samples/meshviewer/meshviewer.cpp
  6. +2
    -0
      doc/samples/meshviewer/scenesetup.cpp
  7. +0
    -3
      doc/samples/nacl_phystest.vcxproj
  8. +0
    -3
      doc/tutorial/01_triangle.vcxproj
  9. +0
    -3
      doc/tutorial/02_cube.vcxproj
  10. +0
    -3
      doc/tutorial/03_noise.vcxproj
  11. +0
    -3
      doc/tutorial/04_texture.vcxproj
  12. +1
    -0
      doc/tutorial/05_easymesh.cpp
  13. +0
    -3
      doc/tutorial/06_sprite.vcxproj
  14. +0
    -3
      doc/tutorial/07_input.vcxproj
  15. +0
    -3
      doc/tutorial/08_fbo.vcxproj
  16. +0
    -3
      doc/tutorial/11_fractal.vcxproj
  17. +0
    -3
      doc/tutorial/12_voronoi.vcxproj
  18. +0
    -3
      doc/tutorial/13_shader_builder.vcxproj
  19. +2
    -0
      doc/tutorial/14_lol_lua.cpp
  20. +0
    -3
      doc/tutorial/15_lolimgui.vcxproj
  21. +2
    -2
      doc/tutorial/Makefile.am
  22. +1
    -0
      src/Makefile.am
  23. +0
    -1
      src/application/application.cpp
  24. +1
    -0
      src/easymesh/easymeshlua.cpp
  25. +0
    -3
      src/engine/world.cpp
  26. +1
    -1
      src/engine/world.h
  27. +1
    -3
      src/lol-core.vcxproj
  28. +3
    -0
      src/lol-core.vcxproj.filter
  29. +0
    -4
      src/lol/extras.h
  30. +23
    -0
      src/lol/lua.h
  31. +1
    -0
      src/lolua/baselua.cpp
  32. +0
    -3
      src/t/test-base.vcxproj
  33. +0
    -3
      src/t/test-entity.vcxproj
  34. +0
    -3
      src/t/test-image.vcxproj
  35. +0
    -3
      src/t/test-math.vcxproj
  36. +0
    -3
      src/t/test-sys.vcxproj

+ 2
- 1
build/autotools/m4/lol-conf.m4 View File

@@ -244,7 +244,7 @@ LOL_CFLAGS="$LOL_CFLAGS $SDL_CFLAGS $GL_CFLAGS $EGL_CFLAGS $LIBPNG_CFLAGS"
LOL_LIBS="$LOL_LIBS $SDL_LIBS $GL_LIBS $EGL_LIBS $LIBPNG_LIBS $D3D_LIBS"
LOL_DEPS="${LOL_DEPS} \$(lol_builddir)/src/liblol-core.a"
LOL_DEPS="${LOL_DEPS} \$(lol_builddir)/src/3rdparty/liblol-bullet.a"
LOL_DEPS="${LOL_DEPS} \$(lol_builddir)/src/3rdparty/liblol-lua.a"
LOL_LUA_DEPS="${LOL_LUA_DEPS} \$(lol_builddir)/src/3rdparty/liblol-lua.a"

dnl How to use the Lol Engine inside this tree
AM_CPPFLAGS="${AM_CPPFLAGS} -I\$(lol_srcdir)/src"
@@ -257,6 +257,7 @@ dnl Extra flags
AC_SUBST(LOL_CFLAGS)
AC_SUBST(LOL_LIBS)
AC_SUBST(LOL_DEPS)
AC_SUBST(LOL_LUA_DEPS)

AC_SUBST(AM_CFLAGS)
AC_SUBST(AM_CPPFLAGS)


+ 0
- 3
doc/samples/benchsuite.vcxproj View File

@@ -44,9 +44,6 @@
<ProjectReference Include="$(LolDir)\src\3rdparty\lol-bullet.vcxproj">
<Project>{83d3b207-c601-4025-8f41-01dedc354661}</Project>
</ProjectReference>
<ProjectReference Include="$(LolDir)\src\3rdparty\lol-lua.vcxproj">
<Project>{d84021ca-b233-4e0f-8a52-071b83bbccc4}</Project>
</ProjectReference>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{B1E10086-A1DA-401A-834D-969C9DBB5CC1}</ProjectGuid>


+ 0
- 3
doc/samples/btphystest.vcxproj View File

@@ -54,9 +54,6 @@
<ProjectReference Include="$(LolDir)\src\3rdparty\lol-bullet.vcxproj">
<Project>{83d3b207-c601-4025-8f41-01dedc354661}</Project>
</ProjectReference>
<ProjectReference Include="$(LolDir)\src\3rdparty\lol-lua.vcxproj">
<Project>{d84021ca-b233-4e0f-8a52-071b83bbccc4}</Project>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<None Include="Makefile.am">


+ 1
- 1
doc/samples/meshviewer/Makefile.am View File

@@ -11,7 +11,7 @@ meshviewer_SOURCES = meshviewer.cpp meshviewer.h \
scenesetup.cpp scenesetup.h \
shinymvtexture.lolfx shinyfur.lolfx
meshviewer_CPPFLAGS = $(AM_CPPFLAGS)
meshviewer_DEPENDENCIES = @LOL_DEPS@
meshviewer_DEPENDENCIES = @LOL_DEPS@ @LOL_LUA_DEPS@
meshviewer_LDFLAGS = $(AM_LDFLAGS)
if LOL_USE_EMSCRIPTEN
meshviewer_LDFLAGS += -s EXPORTED_FUNCTIONS="['_main', '_C_Send']"


+ 2
- 0
doc/samples/meshviewer/meshviewer.cpp View File

@@ -18,6 +18,8 @@
#include <cfloat> /* for FLT_MAX */

#include <lol/engine.h>
#include <lol/lua.h>

#include "scenesetup.h"

using namespace lol;


+ 2
- 0
doc/samples/meshviewer/scenesetup.cpp View File

@@ -14,6 +14,8 @@
#endif

#include <lol/engine.h>
#include <lol/lua.h>

#include "scenesetup.h"

namespace lol


+ 0
- 3
doc/samples/nacl_phystest.vcxproj View File

@@ -43,9 +43,6 @@
<ProjectReference Include="$(LolDir)\src\3rdparty\lol-bullet.vcxproj">
<Project>{83d3b207-c601-4025-8f41-01dedc354661}</Project>
</ProjectReference>
<ProjectReference Include="$(LolDir)\src\3rdparty\lol-lua.vcxproj">
<Project>{d84021ca-b233-4e0f-8a52-071b83bbccc4}</Project>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<None Include="Makefile.am">


+ 0
- 3
doc/tutorial/01_triangle.vcxproj View File

@@ -43,9 +43,6 @@
<ProjectReference Include="$(LolDir)\src\3rdparty\lol-bullet.vcxproj">
<Project>{83d3b207-c601-4025-8f41-01dedc354661}</Project>
</ProjectReference>
<ProjectReference Include="$(LolDir)\src\3rdparty\lol-lua.vcxproj">
<Project>{d84021ca-b233-4e0f-8a52-071b83bbccc4}</Project>
</ProjectReference>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{b92abadc-45be-4cc5-b724-9426053123a1}</ProjectGuid>


+ 0
- 3
doc/tutorial/02_cube.vcxproj View File

@@ -43,9 +43,6 @@
<ProjectReference Include="$(LolDir)\src\3rdparty\lol-bullet.vcxproj">
<Project>{83d3b207-c601-4025-8f41-01dedc354661}</Project>
</ProjectReference>
<ProjectReference Include="$(LolDir)\src\3rdparty\lol-lua.vcxproj">
<Project>{d84021ca-b233-4e0f-8a52-071b83bbccc4}</Project>
</ProjectReference>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{7b083da2-fe08-4f6d-bfdd-195d5c2783eb}</ProjectGuid>


+ 0
- 3
doc/tutorial/03_noise.vcxproj View File

@@ -43,9 +43,6 @@
<ProjectReference Include="$(LolDir)\src\3rdparty\lol-bullet.vcxproj">
<Project>{83d3b207-c601-4025-8f41-01dedc354661}</Project>
</ProjectReference>
<ProjectReference Include="$(LolDir)\src\3rdparty\lol-lua.vcxproj">
<Project>{d84021ca-b233-4e0f-8a52-071b83bbccc4}</Project>
</ProjectReference>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{b0a53d75-cbb4-4fdf-93ac-2d12a79ada0e}</ProjectGuid>


+ 0
- 3
doc/tutorial/04_texture.vcxproj View File

@@ -43,9 +43,6 @@
<ProjectReference Include="$(LolDir)\src\3rdparty\lol-bullet.vcxproj">
<Project>{83d3b207-c601-4025-8f41-01dedc354661}</Project>
</ProjectReference>
<ProjectReference Include="$(LolDir)\src\3rdparty\lol-lua.vcxproj">
<Project>{d84021ca-b233-4e0f-8a52-071b83bbccc4}</Project>
</ProjectReference>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{834852db-edb6-4fd0-bcf9-45cd01126962}</ProjectGuid>


+ 1
- 0
doc/tutorial/05_easymesh.cpp View File

@@ -16,6 +16,7 @@
#endif

#include <lol/engine.h>
#include <lol/lua.h>

using namespace lol;



+ 0
- 3
doc/tutorial/06_sprite.vcxproj View File

@@ -40,9 +40,6 @@
<ProjectReference Include="$(LolDir)\src\3rdparty\lol-bullet.vcxproj">
<Project>{83d3b207-c601-4025-8f41-01dedc354661}</Project>
</ProjectReference>
<ProjectReference Include="$(LolDir)\src\3rdparty\lol-lua.vcxproj">
<Project>{d84021ca-b233-4e0f-8a52-071b83bbccc4}</Project>
</ProjectReference>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{E05E23A5-67DE-42B5-98A3-E63CCE0CC0AF}</ProjectGuid>


+ 0
- 3
doc/tutorial/07_input.vcxproj View File

@@ -43,9 +43,6 @@
<ProjectReference Include="$(LolDir)\src\3rdparty\lol-bullet.vcxproj">
<Project>{83d3b207-c601-4025-8f41-01dedc354661}</Project>
</ProjectReference>
<ProjectReference Include="$(LolDir)\src\3rdparty\lol-lua.vcxproj">
<Project>{d84021ca-b233-4e0f-8a52-071b83bbccc4}</Project>
</ProjectReference>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{572E5B9C-7E19-489C-BD8A-E8401CFBBC47}</ProjectGuid>


+ 0
- 3
doc/tutorial/08_fbo.vcxproj View File

@@ -43,9 +43,6 @@
<ProjectReference Include="$(LolDir)\src\3rdparty\lol-bullet.vcxproj">
<Project>{83d3b207-c601-4025-8f41-01dedc354661}</Project>
</ProjectReference>
<ProjectReference Include="$(LolDir)\src\3rdparty\lol-lua.vcxproj">
<Project>{d84021ca-b233-4e0f-8a52-071b83bbccc4}</Project>
</ProjectReference>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{BCEE0132-8E24-49BE-AFEB-96DAD14396BA}</ProjectGuid>


+ 0
- 3
doc/tutorial/11_fractal.vcxproj View File

@@ -43,9 +43,6 @@
<ProjectReference Include="$(LolDir)\src\3rdparty\lol-bullet.vcxproj">
<Project>{83d3b207-c601-4025-8f41-01dedc354661}</Project>
</ProjectReference>
<ProjectReference Include="$(LolDir)\src\3rdparty\lol-lua.vcxproj">
<Project>{d84021ca-b233-4e0f-8a52-071b83bbccc4}</Project>
</ProjectReference>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{6bf81b39-edc2-4227-9992-c2d8abea95af}</ProjectGuid>


+ 0
- 3
doc/tutorial/12_voronoi.vcxproj View File

@@ -47,9 +47,6 @@
<ProjectReference Include="$(LolDir)\src\3rdparty\lol-bullet.vcxproj">
<Project>{83d3b207-c601-4025-8f41-01dedc354661}</Project>
</ProjectReference>
<ProjectReference Include="$(LolDir)\src\3rdparty\lol-lua.vcxproj">
<Project>{d84021ca-b233-4e0f-8a52-071b83bbccc4}</Project>
</ProjectReference>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{6bf81b39-edc2-4227-9982-c2d8abea95af}</ProjectGuid>


+ 0
- 3
doc/tutorial/13_shader_builder.vcxproj View File

@@ -37,9 +37,6 @@
<ProjectReference Include="$(LolDir)\src\3rdparty\lol-bullet.vcxproj">
<Project>{83d3b207-c601-4025-8f41-01dedc354661}</Project>
</ProjectReference>
<ProjectReference Include="$(LolDir)\src\3rdparty\lol-lua.vcxproj">
<Project>{d84021ca-b233-4e0f-8a52-071b83bbccc4}</Project>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<ClCompile Include="13_shader_builder.cpp" />


+ 2
- 0
doc/tutorial/14_lol_lua.cpp View File

@@ -15,6 +15,8 @@
#endif

#include <lol/engine.h>
#include <lol/lua.h>

#include "loldebug.h"
#include <cstdio>



+ 0
- 3
doc/tutorial/15_lolimgui.vcxproj View File

@@ -37,9 +37,6 @@
<ProjectReference Include="$(LolDir)\src\3rdparty\lol-bullet.vcxproj">
<Project>{83d3b207-c601-4025-8f41-01dedc354661}</Project>
</ProjectReference>
<ProjectReference Include="$(LolDir)\src\3rdparty\lol-lua.vcxproj">
<Project>{d84021ca-b233-4e0f-8a52-071b83bbccc4}</Project>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<ClCompile Include="15_lolimgui.cpp" />


+ 2
- 2
doc/tutorial/Makefile.am View File

@@ -31,7 +31,7 @@ tutorials += 16_movie

05_easymesh_SOURCES = 05_easymesh.cpp
05_easymesh_CPPFLAGS = $(AM_CPPFLAGS)
05_easymesh_DEPENDENCIES = @LOL_DEPS@
05_easymesh_DEPENDENCIES = @LOL_DEPS@ @LOL_LUA_DEPS@

06_sprite_SOURCES = 06_sprite.cpp 06_sprite.png
06_sprite_CPPFLAGS = $(AM_CPPFLAGS)
@@ -69,7 +69,7 @@ endif

14_lol_lua_SOURCES = 14_lol_lua.cpp
14_lol_lua_CPPFLAGS = $(AM_CPPFLAGS)
14_lol_lua_DEPENDENCIES = @LOL_DEPS@
14_lol_lua_DEPENDENCIES = @LOL_DEPS@ @LOL_LUA_DEPS@

15_lolimgui_SOURCES = 15_lolimgui.cpp
15_lolimgui_CPPFLAGS = $(AM_CPPFLAGS)


+ 1
- 0
src/Makefile.am View File

@@ -31,6 +31,7 @@ liblol_core_a_CPPFLAGS = $(AM_CPPFLAGS) -I$(srcdir)/3rdparty/bullet3/src -I$(src

liblol_core_headers = \
lol/engine-internal.h lol/engine.h lol/public.h lol/extras.h lol/legacy.h \
lol/lua.h \
\
lol/base/all.h \
lol/base/avl_tree.h lol/base/features.h lol/base/tuple.h lol/base/types.h \


+ 0
- 1
src/application/application.cpp View File

@@ -176,7 +176,6 @@ Application::Application(char const *name, ivec2 resolution, float framerate)
{
SceneDisplay::Add(new ApplicationDisplay(name, resolution));
data = new ApplicationData(name, resolution, framerate);
g_world.ExecLuaFile("lua/init.lua");
}

bool Application::MustTick()


+ 1
- 0
src/easymesh/easymeshlua.cpp View File

@@ -17,6 +17,7 @@
#include <cstdio>

#include <lol/engine.h>
#include <lol/lua.h>
#include "loldebug.h"

using namespace lol;


+ 0
- 3
src/engine/world.cpp View File

@@ -24,7 +24,6 @@ namespace lol
class WorldData
{
friend class World;
lua_State *m_lua_state;
};

static WorldData g_world_data;
@@ -35,9 +34,7 @@ World g_world;
*/

World::World()
: LuaLoader()
{
g_world_data.m_lua_state = GetLuaState();
}

World::~World()


+ 1
- 1
src/engine/world.h View File

@@ -18,7 +18,7 @@
namespace lol
{

class World : public LuaLoader
class World
{
public:
World();


+ 1
- 3
src/lol-core.vcxproj View File

@@ -292,6 +292,7 @@
<ClInclude Include="lol\image\movie.h" />
<ClInclude Include="lol\image\pixel.h" />
<ClInclude Include="lol\image\resource.h" />
<ClInclude Include="lol\lua.h" />
<ClInclude Include="lol\math\all.h" />
<ClInclude Include="lol\math\arraynd.h" />
<ClInclude Include="lol\math\bigint.h" />
@@ -400,9 +401,6 @@
<ProjectReference Include="3rdparty\lol-bullet.vcxproj">
<Project>{83d3b207-c601-4025-8f41-01dedc354661}</Project>
</ProjectReference>
<ProjectReference Include="3rdparty\lol-lua.vcxproj">
<Project>{d84021ca-b233-4e0f-8a52-071b83bbccc4}</Project>
</ProjectReference>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">


+ 3
- 0
src/lol-core.vcxproj.filter View File

@@ -505,6 +505,9 @@
<ClInclude Include="lol\extras.h">
<Filter>lol</Filter>
</ClInclude>
<ClInclude Include="lol\lua.h">
<Filter>lol</Filter>
</ClInclude>
<ClInclude Include="lol\public.h">
<Filter>lol</Filter>
</ClInclude>


+ 0
- 4
src/lol/extras.h View File

@@ -20,9 +20,6 @@
#include <lol/../utils.h>
#include <lol/../numeric.h>

// Lua
#include <lol/../lolua/baselua.h>

// Static classes
#include <lol/../platform.h>
#include <lol/../video.h>
@@ -59,7 +56,6 @@
#include <lol/../application/application.h>
#include <lol/../easymesh/csgbsp.h>
#include <lol/../easymesh/easymesh.h>
#include <lol/../easymesh/easymeshlua.h>

// Managers
#include <lol/../forge.h>


+ 23
- 0
src/lol/lua.h View File

@@ -0,0 +1,23 @@
//
// Lol Engine
//
// Copyright © 2010—2017 Sam Hocevar <sam@hocevar.net>
//
// Lol Engine is free software. It comes without any warranty, to
// the extent permitted by applicable law. You can redistribute it
// and/or modify it under the terms of the Do What the Fuck You Want
// to Public License, Version 2, as published by the WTFPL Task Force.
// See http://www.wtfpl.net/ for more details.
//

#pragma once

//
// Lua subsystem
// -------------
//

// Lua
#include <lol/../lolua/baselua.h>
#include <lol/../easymesh/easymeshlua.h>


+ 1
- 0
src/lolua/baselua.cpp View File

@@ -12,6 +12,7 @@
//

#include <lol/engine-internal.h>
#include <lol/lua.h>

#include <cstring>
#include <cstdlib>


+ 0
- 3
src/t/test-base.vcxproj View File

@@ -45,9 +45,6 @@
<ProjectReference Include="$(LolDir)\src\3rdparty\lol-bullet.vcxproj">
<Project>{83d3b207-c601-4025-8f41-01dedc354661}</Project>
</ProjectReference>
<ProjectReference Include="$(LolDir)\src\3rdparty\lol-lua.vcxproj">
<Project>{d84021ca-b233-4e0f-8a52-071b83bbccc4}</Project>
</ProjectReference>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{8f59a635-0240-4d7f-a80d-050c3f1670c2}</ProjectGuid>


+ 0
- 3
src/t/test-entity.vcxproj View File

@@ -41,9 +41,6 @@
<ProjectReference Include="$(LolDir)\src\3rdparty\lol-bullet.vcxproj">
<Project>{83d3b207-c601-4025-8f41-01dedc354661}</Project>
</ProjectReference>
<ProjectReference Include="$(LolDir)\src\3rdparty\lol-lua.vcxproj">
<Project>{d84021ca-b233-4e0f-8a52-071b83bbccc4}</Project>
</ProjectReference>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{d7f6c2ca-5a13-4fd0-8468-1833923e3ee3}</ProjectGuid>


+ 0
- 3
src/t/test-image.vcxproj View File

@@ -42,9 +42,6 @@
<ProjectReference Include="$(LolDir)\src\3rdparty\lol-bullet.vcxproj">
<Project>{83d3b207-c601-4025-8f41-01dedc354661}</Project>
</ProjectReference>
<ProjectReference Include="$(LolDir)\src\3rdparty\lol-lua.vcxproj">
<Project>{d84021ca-b233-4e0f-8a52-071b83bbccc4}</Project>
</ProjectReference>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{5a27ff18-a1ec-49be-9455-415f1c701153}</ProjectGuid>


+ 0
- 3
src/t/test-math.vcxproj View File

@@ -58,9 +58,6 @@
<ProjectReference Include="$(LolDir)\src\3rdparty\lol-bullet.vcxproj">
<Project>{83d3b207-c601-4025-8f41-01dedc354661}</Project>
</ProjectReference>
<ProjectReference Include="$(LolDir)\src\3rdparty\lol-lua.vcxproj">
<Project>{d84021ca-b233-4e0f-8a52-071b83bbccc4}</Project>
</ProjectReference>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{962d4e25-45d3-4ace-8c02-69fa3713abd4}</ProjectGuid>


+ 0
- 3
src/t/test-sys.vcxproj View File

@@ -41,9 +41,6 @@
<ProjectReference Include="$(LolDir)\src\3rdparty\lol-bullet.vcxproj">
<Project>{83d3b207-c601-4025-8f41-01dedc354661}</Project>
</ProjectReference>
<ProjectReference Include="$(LolDir)\src\3rdparty\lol-lua.vcxproj">
<Project>{d84021ca-b233-4e0f-8a52-071b83bbccc4}</Project>
</ProjectReference>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{1782f849-b6e1-466d-9f02-a751f3f8712c}</ProjectGuid>


Loading…
Cancel
Save