Permalink
Browse files

New SConscript (hopefully better)

Fixes a lot of bugs, also almost all options are no longer needed and are just auto-detected
  • Loading branch information...
jacob1 committed Jun 8, 2014
1 parent 4440582 commit 6749c2547f5771a5b5bcea6e8d9991abf854ceed
Showing with 604 additions and 867 deletions.
  1. +526 −547 SConscript
  2. +14 −0 SConstruct
  3. +2 −8 generator.py
  4. +6 −11 src/Config.h
  5. +9 −2 src/PowderToySDL.cpp
  6. 0 { → src}/SDLMain.h
  7. +4 −0 { → src}/SDLMain.m
  8. +4 −0 src/gui/interface/Keys.h
  9. +1 −6 src/lua/LuaBit.cpp
  10. +0 −6 src/lua/LuaButton.cpp
  11. +0 −6 src/lua/LuaButton.h
  12. +0 −6 src/lua/LuaCheckbox.cpp
  13. +0 −6 src/lua/LuaCheckbox.h
  14. +0 −6 src/lua/LuaComponent.cpp
  15. +0 −6 src/lua/LuaComponent.h
  16. +0 −6 src/lua/LuaLabel.cpp
  17. +0 −6 src/lua/LuaLabel.h
  18. +1 −4 src/lua/LuaLuna.h
  19. +0 −6 src/lua/LuaProgressBar.cpp
  20. +0 −6 src/lua/LuaProgressBar.h
  21. +1 −6 src/lua/LuaScriptInterface.h
  22. +0 −6 src/lua/LuaSlider.cpp
  23. +0 −6 src/lua/LuaSlider.h
  24. +0 −6 src/lua/LuaTextbox.cpp
  25. +0 −6 src/lua/LuaTextbox.h
  26. +0 −6 src/lua/LuaWindow.cpp
  27. +0 −6 src/lua/LuaWindow.h
  28. +23 −0 src/lua/luainc.h
  29. 0 src/{ → lua}/socket/auxiliar.c
  30. +1 −2 src/{ → lua}/socket/auxiliar.h
  31. +0 −3 src/{ → lua}/socket/buffer.c
  32. +1 −1 src/{ → lua}/socket/buffer.h
  33. +0 −3 src/{ → lua}/socket/except.c
  34. +1 −1 src/{ → lua}/socket/except.h
  35. +0 −3 src/{ → lua}/socket/inet.c
  36. +1 −1 src/{ → lua}/socket/inet.h
  37. 0 src/{ → lua}/socket/io.c
  38. +1 −1 src/{ → lua}/socket/io.h
  39. +0 −10 src/{ → lua}/socket/luasocket.c
  40. +1 −1 src/{ → lua}/socket/luasocket.h
  41. +0 −2 src/{ → lua}/socket/options.c
  42. +1 −1 src/{ → lua}/socket/options.h
  43. +0 −3 src/{ → lua}/socket/select.c
  44. 0 src/{ → lua}/socket/select.h
  45. 0 src/{ → lua}/socket/socket.h
  46. +1 −5 src/{ → lua}/socket/socket.lua.cpp
  47. +1 −1 src/{ → lua}/socket/socket.lua.h
  48. +0 −3 src/{ → lua}/socket/tcp.c
  49. +1 −1 src/{ → lua}/socket/tcp.h
  50. +0 −3 src/{ → lua}/socket/timeout.c
  51. +1 −1 src/{ → lua}/socket/timeout.h
  52. +0 −3 src/{ → lua}/socket/udp.c
  53. +1 −1 src/{ → lua}/socket/udp.h
  54. +0 −3 src/{ → lua}/socket/unix.c
  55. +1 −1 src/{ → lua}/socket/unix.h
  56. 0 src/{ → lua}/socket/usocket.c
  57. 0 src/{ → lua}/socket/usocket.h
  58. 0 src/{ → lua}/socket/wsocket.c
  59. 0 src/{ → lua}/socket/wsocket.h
  60. +0 −133 src/socket/socket.lua
1,073 SConscript 100755 → 100644

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -1,2 +1,16 @@
#run generator.py
if not GetOption('clean'):
execfile("generator.py")
AddOption('--builddir',dest="builddir",default="build",help="Directory to build to.")
SConscript('SConscript', variant_dir=GetOption('builddir'), duplicate=0)
if GetOption('clean'):
import os, shutil
try:
shutil.rmtree(".sconf_temp/")
except:
print "couldn't remove .sconf_temp"
try:
os.remove(".sconsign.dblite")
except:
print "couldn't remove .sconsign.dblite"
@@ -223,11 +223,5 @@ class {0}: public SimTool
f.write(toolContent)
f.close()
if(len(sys.argv) > 3):
if(sys.argv[1] == "elements"):
generateElements(sys.argv[4:], sys.argv[2], sys.argv[3])
elif(sys.argv[1] == "tools"):
generateTools(sys.argv[4:], sys.argv[2], sys.argv[3])
else:
generateElements(os.listdir("src/simulation/elements"), "generated/ElementClasses.cpp", "generated/ElementClasses.h")
generateTools(os.listdir("src/simulation/simtools"), "generated/ToolClasses.cpp", "generated/ToolClasses.h")
generateElements(os.listdir("src/simulation/elements"), "generated/ElementClasses.cpp", "generated/ElementClasses.h")
generateTools(os.listdir("src/simulation/simtools"), "generated/ToolClasses.cpp", "generated/ToolClasses.h")
@@ -26,20 +26,11 @@
#ifndef SNAPSHOT_ID
#define SNAPSHOT_ID 0
#endif
#ifndef STABLE
#ifndef BETA
#define BETA
#define SNAPSHOT
#endif
#endif
//VersionInfoEnd
//#define IGNORE_UPDATES //uncomment this for mods, to not get any update notifications
#if defined(DEBUG) || defined(RENDERER) || defined(X86_SSE2)
#define HIGH_QUALITY_RESAMPLE //High quality image resampling, slower but much higher quality than my terribad linear interpolation
#endif
#if defined(SNAPSHOT)
#define IDENT_RELTYPE "S"
@@ -52,14 +43,18 @@
#if defined(WIN)
#if defined(_64BIT)
#define IDENT_PLATFORM "WIN64"
#else
#elif defined(_32BIT)
#define IDENT_PLATFORM "WIN32"
#else
#define IDENT_PLATFORM "WIN"
#endif
#elif defined(LIN)
#if defined(_64BIT)
#define IDENT_PLATFORM "LIN64"
#else
#elif defined(_32BIT)
#define IDENT_PLATFORM "LIN32"
#else
#define IDENT_PLATFORM "LIN"
#endif
#elif defined(MACOSX)
#define IDENT_PLATFORM "MACOSX"
@@ -3,10 +3,13 @@
#include <map>
#include <string>
#include <time.h>
#ifdef SDL_INC
#include "SDL/SDL.h"
#else
#include "SDL.h"
#endif
#ifdef WIN
#define _WIN32_WINNT 0x0501 //Necessary for some macros and functions, tells windows.h to include functions only available in Windows XP or later
#include "SDL_syswm.h"
#include <direct.h>
#endif
#include <iostream>
@@ -49,9 +52,13 @@ extern "C" {
using namespace std;
#if defined(USE_SDL) && defined(LIN)
#if defined(WIN) || defined(LIN)
#ifdef SDL_INC
#include <SDL/SDL_syswm.h>
#else
#include <SDL_syswm.h>
#endif
#endif
#if defined(USE_SDL) && defined(LIN) && defined(SDL_VIDEO_DRIVER_X11)
SDL_SysWMinfo sdl_wminfo;
Atom XA_CLIPBOARD, XA_TARGETS, XA_UTF8_STRING;
File renamed without changes.
@@ -5,7 +5,11 @@
Feel free to customize this file to suit your needs
*/
#ifdef SDL_INC
#include "SDL/SDL.h"
#else
#include "SDL.h"
#endif
#include "SDLMain.h"
#include <sys/param.h> /* for MAXPATHLEN */
#include <unistd.h>
@@ -1,6 +1,10 @@
#if defined(USE_SDL)
#ifdef SDL_INC
#include "SDL/SDL.h"
#else
#include "SDL.h"
#endif
#define KEY_UNKNOWN SDLK_UNKNOWN
#define KEY_UP SDLK_UP
#define KEY_NUM_UP SDLK_KP8
@@ -29,12 +29,7 @@
#define LUA_BITOP_VERSION "1.0.2"
extern "C"
{
#include "lua.h"
#include "lauxlib.h"
#include "lualib.h"
}
#include "luainc.h"
#ifdef _MSC_VER
/* MSVC is stuck in the last century and doesn't have C99's stdint.h. */
@@ -1,10 +1,4 @@
#ifdef LUACONSOLE
extern "C"
{
#include "lua.h"
#include "lauxlib.h"
#include "lualib.h"
}
#include <iostream>
#include "LuaButton.h"
@@ -1,11 +1,5 @@
#pragma once
extern "C" {
#include "lua.h"
#include "lauxlib.h"
#include "lualib.h"
}
#include "LuaLuna.h"
#include "LuaComponent.h"
@@ -1,10 +1,4 @@
#ifdef LUACONSOLE
extern "C"
{
#include "lua.h"
#include "lauxlib.h"
#include "lualib.h"
}
#include <iostream>
#include "LuaCheckbox.h"
@@ -1,11 +1,5 @@
#pragma once
extern "C" {
#include "lua.h"
#include "lauxlib.h"
#include "lualib.h"
}
#include "LuaLuna.h"
#include "LuaComponent.h"
@@ -1,10 +1,4 @@
#ifdef LUACONSOLE
extern "C"
{
#include "lua.h"
#include "lauxlib.h"
#include "lualib.h"
}
#include <iostream>
#include "LuaComponent.h"
@@ -1,11 +1,5 @@
#pragma once
extern "C" {
#include "lua.h"
#include "lauxlib.h"
#include "lualib.h"
}
#include "LuaLuna.h"
namespace ui
@@ -1,10 +1,4 @@
#ifdef LUACONSOLE
extern "C"
{
#include "lua.h"
#include "lauxlib.h"
#include "lualib.h"
}
#include <iostream>
#include "LuaScriptInterface.h"
@@ -1,11 +1,5 @@
#pragma once
extern "C" {
#include "lua.h"
#include "lauxlib.h"
#include "lualib.h"
}
#include "LuaLuna.h"
#include "LuaComponent.h"
@@ -1,10 +1,7 @@
#pragma once
//http://lua-users.org/wiki/SimplerCppBinding
extern "C" {
#include "lua.h"
#include "lauxlib.h"
}
#include "luainc.h"
template <typename T> class Luna
{
@@ -1,10 +1,4 @@
#ifdef LUACONSOLE
extern "C"
{
#include "lua.h"
#include "lauxlib.h"
#include "lualib.h"
}
#include <iostream>
#include "LuaProgressBar.h"
@@ -1,11 +1,5 @@
#pragma once
extern "C" {
#include "lua.h"
#include "lauxlib.h"
#include "lualib.h"
}
#include "LuaLuna.h"
#include "LuaComponent.h"
@@ -1,12 +1,7 @@
#ifndef LUASCRIPTINTERFACE_H_
#define LUASCRIPTINTERFACE_H_
extern "C"
{
#include "lua.h"
#include "lauxlib.h"
#include "lualib.h"
}
#include "luainc.h"
#include "CommandInterface.h"
#include "simulation/Simulation.h"
@@ -1,10 +1,4 @@
#ifdef LUACONSOLE
extern "C"
{
#include "lua.h"
#include "lauxlib.h"
#include "lualib.h"
}
#include <iostream>
#include "LuaSlider.h"
@@ -1,11 +1,5 @@
#pragma once
extern "C" {
#include "lua.h"
#include "lauxlib.h"
#include "lualib.h"
}
#include "LuaLuna.h"
#include "LuaComponent.h"
@@ -1,10 +1,4 @@
#ifdef LUACONSOLE
extern "C"
{
#include "lua.h"
#include "lauxlib.h"
#include "lualib.h"
}
#include <iostream>
#include "LuaScriptInterface.h"
@@ -1,11 +1,5 @@
#pragma once
extern "C" {
#include "lua.h"
#include "lauxlib.h"
#include "lualib.h"
}
#include "LuaLuna.h"
#include "LuaComponent.h"
@@ -1,10 +1,4 @@
#ifdef LUACONSOLE
extern "C"
{
#include "lua.h"
#include "lauxlib.h"
#include "lualib.h"
}
#include <iostream>
#include "LuaScriptInterface.h"
@@ -1,11 +1,5 @@
#pragma once
extern "C" {
#include "lua.h"
#include "lauxlib.h"
#include "lualib.h"
}
#include "LuaLuna.h"
#include "gui/interface/Platform.h"
@@ -0,0 +1,23 @@
#ifndef LUAINC_H
#define LUAINC_H
#ifdef __cplusplus
extern "C"
{
#endif
#ifdef LUA_INC
#include "lua5.1/lua.h"
#include "lua5.1/lauxlib.h"
#include "lua5.1/lualib.h"
#else
#include "lua.h"
#include "lauxlib.h"
#include "lualib.h"
#endif
#ifdef __cplusplus
}
#endif
#endif
File renamed without changes.
@@ -31,8 +31,7 @@
* RCS ID: $Id: auxiliar.h,v 1.9 2005/10/07 04:40:59 diego Exp $
\*=========================================================================*/
#include "lua.h"
#include "lauxlib.h"
#include "../luainc.h"
int auxiliar_open(lua_State *L);
void auxiliar_newclass(lua_State *L, const char *classname, luaL_reg *func);
@@ -4,9 +4,6 @@
*
* RCS ID: $Id: buffer.c,v 1.28 2007/06/11 23:44:54 diego Exp $
\*=========================================================================*/
#include "lua.h"
#include "lauxlib.h"
#include "buffer.h"
/*=========================================================================*\
Oops, something went wrong.

0 comments on commit 6749c25

Please sign in to comment.