summary refs log tree commit diff stats
path: root/win32/ext
diff options
context:
space:
mode:
authorBerke Viktor <berkeviktor@aol.com>2012-01-10 15:57:33 +0100
committerBerke Viktor <berkeviktor@aol.com>2012-01-10 15:57:33 +0100
commitcf761e9871897328c2754b54492144bd6e419c51 (patch)
tree95d406ba81cec6054cb90c2121d6334a974bd124 /win32/ext
parent3321be6edbf6bf7325639bb762825f3836295019 (diff)
update Lua-WDK to 5.2
Diffstat (limited to 'win32/ext')
-rw-r--r--win32/ext/lua-wdk/COPYRIGHT34
-rw-r--r--win32/ext/lua-wdk/build-x64.bat36
-rw-r--r--win32/ext/lua-wdk/build-x86.bat36
-rw-r--r--win32/ext/lua-wdk/lua-wdk.patch82
4 files changed, 128 insertions, 60 deletions
diff --git a/win32/ext/lua-wdk/COPYRIGHT b/win32/ext/lua-wdk/COPYRIGHT
new file mode 100644
index 00000000..ef050312
--- /dev/null
+++ b/win32/ext/lua-wdk/COPYRIGHT
@@ -0,0 +1,34 @@
+Lua License
+-----------
+
+Lua is licensed under the terms of the MIT license reproduced below.
+This means that Lua is free software and can be used for both academic
+and commercial purposes at absolutely no cost.
+
+For details and rationale, see http://www.lua.org/license.html .
+
+===============================================================================
+
+Copyright (C) 1994-2011 Lua.org, PUC-Rio.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+
+===============================================================================
+
+(end of COPYRIGHT)
diff --git a/win32/ext/lua-wdk/build-x64.bat b/win32/ext/lua-wdk/build-x64.bat
index a160cd97..f51baee1 100644
--- a/win32/ext/lua-wdk/build-x64.bat
+++ b/win32/ext/lua-wdk/build-x64.bat
@@ -4,9 +4,31 @@ set OPATH=%PATH%
 set INCLUDE=%WDK_ROOT%\inc\api;%WDK_ROOT%\inc\crt;%WDK_ROOT%\inc\ddk

 set LIB=%WDK_ROOT%\lib\wnet\amd64;%WDK_ROOT%\lib\Crt\amd64

 set PATH=%PROGRAMFILES(X86)%\Microsoft Visual Studio 10.0\VC\bin\amd64

-set DEST=..\lua-wdk-5.1.4-2-x64

-call etc\luavs-x64.bat

-@echo off

+set DEST=..\lua-wdk-5.2.0-x64

+

+set MYCOMPILE=cl /nologo /MD /O2 /W3 /c

+set MYLINK=link /nologo msvcrt_win2003.obj

+set MYMT=mt /nologo

+

+cd src

+%MYCOMPILE% /DLUA_BUILD_AS_DLL l*.c

+del lua.obj luac.obj

+%MYLINK% /DLL /out:lua52.dll l*.obj

+if exist lua52.dll.manifest^

+  %MYMT% -manifest lua52.dll.manifest -outputresource:lua52.dll;2

+%MYCOMPILE% /DLUA_BUILD_AS_DLL lua.c

+%MYLINK% /out:lua.exe lua.obj lua52.lib

+if exist lua.exe.manifest^

+  %MYMT% -manifest lua.exe.manifest -outputresource:lua.exe

+%MYCOMPILE% luac.c

+@rem del lua.obj linit.obj lbaselib.obj ldblib.obj liolib.obj lmathlib.obj^

+@rem    loslib.obj ltablib.obj lstrlib.obj loadlib.obj

+%MYLINK% /out:luac.exe luac.obj lua52.lib

+if exist luac.exe.manifest^

+  %MYMT% -manifest luac.exe.manifest -outputresource:luac.exe

+del *.obj *.manifest

+cd ..

+

 echo.Press return when ready to install!

 pause

 set PATH=%OPATH%

@@ -18,16 +40,16 @@ mkdir %DEST%\include
 copy COPYRIGHT %DEST%\LICENSE.LUA

 :: binaries and libraries

 copy src\lua.exe %DEST%\bin

-copy src\lua51.dll %DEST%\bin

-copy src\lua51.exp %DEST%\bin

+copy src\lua52.dll %DEST%\bin

+copy src\lua52.exp %DEST%\bin

 copy src\luac.exe %DEST%\bin

 :: library

-copy src\lua51.lib %DEST%\lib

+copy src\lua52.lib %DEST%\lib

 :: api

 copy src\lua.h %DEST%\include

 copy src\luaconf.h %DEST%\include

 copy src\lualib.h %DEST%\include

 copy src\lauxlib.h %DEST%\include

-copy etc\lua.hpp %DEST%\include

+copy src\lua.hpp %DEST%\include

 echo.Finished!

 pause

diff --git a/win32/ext/lua-wdk/build-x86.bat b/win32/ext/lua-wdk/build-x86.bat
index 75a054ed..0bfb7b49 100644
--- a/win32/ext/lua-wdk/build-x86.bat
+++ b/win32/ext/lua-wdk/build-x86.bat
@@ -4,9 +4,31 @@ set OPATH=%PATH%
 set INCLUDE=%WDK_ROOT%\inc\api;%WDK_ROOT%\inc\crt;%WDK_ROOT%\inc\ddk

 set LIB=%WDK_ROOT%\lib\wxp\i386;%WDK_ROOT%\lib\Crt\i386

 set PATH=%PROGRAMFILES(X86)%\Microsoft Visual Studio 10.0\VC\bin;%PROGRAMFILES(X86)%\Microsoft Visual Studio 10.0\Common7\IDE

-set DEST=..\lua-wdk-5.1.4-2-x86

-call etc\luavs.bat

-@echo off

+set DEST=..\lua-wdk-5.2.0-x86

+

+set MYCOMPILE=cl /nologo /MD /O2 /W3 /c

+set MYLINK=link /nologo msvcrt_winxp.obj

+set MYMT=mt /nologo

+

+cd src

+%MYCOMPILE% /DLUA_BUILD_AS_DLL l*.c

+del lua.obj luac.obj

+%MYLINK% /DLL /out:lua52.dll l*.obj

+if exist lua52.dll.manifest^

+  %MYMT% -manifest lua52.dll.manifest -outputresource:lua52.dll;2

+%MYCOMPILE% /DLUA_BUILD_AS_DLL lua.c

+%MYLINK% /out:lua.exe lua.obj lua52.lib

+if exist lua.exe.manifest^

+  %MYMT% -manifest lua.exe.manifest -outputresource:lua.exe

+%MYCOMPILE% luac.c

+@rem del lua.obj linit.obj lbaselib.obj ldblib.obj liolib.obj lmathlib.obj^

+@rem    loslib.obj ltablib.obj lstrlib.obj loadlib.obj

+%MYLINK% /out:luac.exe luac.obj lua52.lib

+if exist luac.exe.manifest^

+  %MYMT% -manifest luac.exe.manifest -outputresource:luac.exe

+del *.obj *.manifest

+cd ..

+

 echo.Press return when ready to install!

 pause

 set PATH=%OPATH%

@@ -18,16 +40,16 @@ mkdir %DEST%\include
 copy COPYRIGHT %DEST%\LICENSE.LUA

 :: binaries and libraries

 copy src\lua.exe %DEST%\bin

-copy src\lua51.dll %DEST%\bin

-copy src\lua51.exp %DEST%\bin

+copy src\lua52.dll %DEST%\bin

+copy src\lua52.exp %DEST%\bin

 copy src\luac.exe %DEST%\bin

 :: library

-copy src\lua51.lib %DEST%\lib

+copy src\lua52.lib %DEST%\lib

 :: api

 copy src\lua.h %DEST%\include

 copy src\luaconf.h %DEST%\include

 copy src\lualib.h %DEST%\include

 copy src\lauxlib.h %DEST%\include

-copy etc\lua.hpp %DEST%\include

+copy src\lua.hpp %DEST%\include

 echo.Finished!

 pause

diff --git a/win32/ext/lua-wdk/lua-wdk.patch b/win32/ext/lua-wdk/lua-wdk.patch
index 8173d951..5ba3415c 100644
--- a/win32/ext/lua-wdk/lua-wdk.patch
+++ b/win32/ext/lua-wdk/lua-wdk.patch
@@ -1,46 +1,36 @@
-diff -ruN --strip-trailing-cr lua-5.1.4.orig/etc/luavs-x64.bat lua-5.1.4/etc/luavs-x64.bat
---- lua-5.1.4.orig/etc/luavs-x64.bat	1970-01-01 01:00:00 +0100
-+++ lua-5.1.4/etc/luavs-x64.bat	2010-08-16 13:02:08 +0200
-@@ -0,0 +1,28 @@
-+@rem Script to build Lua under "Visual Studio .NET Command Prompt".
-+@rem Do not run from this directory; run it from the toplevel: etc\luavs.bat .
-+@rem It creates lua51.dll, lua51.lib, lua.exe, and luac.exe in src.
-+@rem (contributed by David Manura and Mike Pall)
-+
-+@setlocal
-+@set MYCOMPILE=cl /nologo /MD /O2 /W3 /c
-+@set MYLINK=link /nologo msvcrt_win2003.obj
-+@set MYMT=mt /nologo
-+
-+cd src
-+%MYCOMPILE% /DLUA_BUILD_AS_DLL l*.c
-+del lua.obj luac.obj
-+%MYLINK% /DLL /out:lua51.dll l*.obj
-+if exist lua51.dll.manifest^
-+  %MYMT% -manifest lua51.dll.manifest -outputresource:lua51.dll;2
-+%MYCOMPILE% /DLUA_BUILD_AS_DLL lua.c
-+%MYLINK% /out:lua.exe lua.obj lua51.lib
-+if exist lua.exe.manifest^
-+  %MYMT% -manifest lua.exe.manifest -outputresource:lua.exe
-+%MYCOMPILE% l*.c print.c
-+del lua.obj linit.obj lbaselib.obj ldblib.obj liolib.obj lmathlib.obj^
-+    loslib.obj ltablib.obj lstrlib.obj loadlib.obj
-+%MYLINK% /out:luac.exe *.obj
-+if exist luac.exe.manifest^
-+  %MYMT% -manifest luac.exe.manifest -outputresource:luac.exe
-+del *.obj *.manifest
-+cd ..
-diff -ruN --strip-trailing-cr lua-5.1.4.orig/etc/luavs.bat lua-5.1.4/etc/luavs.bat
---- lua-5.1.4.orig/etc/luavs.bat	2008-01-20 17:40:10 +0100
-+++ lua-5.1.4/etc/luavs.bat	2010-08-16 13:02:18 +0200
-@@ -4,8 +4,8 @@
- @rem (contributed by David Manura and Mike Pall)
- 
- @setlocal
--@set MYCOMPILE=cl /nologo /MD /O2 /W3 /c /D_CRT_SECURE_NO_DEPRECATE
--@set MYLINK=link /nologo
-+@set MYCOMPILE=cl /nologo /MD /O2 /W3 /c
-+@set MYLINK=link /nologo msvcrt_winxp.obj
- @set MYMT=mt /nologo
- 
- cd src
+diff -ruN --strip-trailing-cr lua-5.2.0.orig/src/lopcodes.h lua-5.2.0/src/lopcodes.h
+--- lua-5.2.0.orig/src/lopcodes.h	2011-07-15 15:50:28 +0200
++++ lua-5.2.0/src/lopcodes.h	2012-01-10 15:41:33 +0100
+@@ -269,7 +269,8 @@
+   OpArgK   /* argument is a constant or register/constant */
+ };
+ 
+-LUAI_DDEC const lu_byte luaP_opmodes[NUM_OPCODES];
++/* LUAI_DDEC const lu_byte luaP_opmodes[NUM_OPCODES]; */
++const lu_byte luaP_opmodes[NUM_OPCODES];
+ 
+ #define getOpMode(m)	(cast(enum OpMode, luaP_opmodes[m] & 3))
+ #define getBMode(m)	(cast(enum OpArgMask, (luaP_opmodes[m] >> 4) & 3))
+@@ -278,7 +279,8 @@
+ #define testTMode(m)	(luaP_opmodes[m] & (1 << 7))
+ 
+ 
+-LUAI_DDEC const char *const luaP_opnames[NUM_OPCODES+1];  /* opcode names */
++/* LUAI_DDEC const char *const luaP_opnames[NUM_OPCODES+1]; */
++const char *const luaP_opnames[NUM_OPCODES+1];  /* opcode names */
+ 
+ 
+ /* number of list items to accumulate before a SETLIST instruction */
+diff -ruN --strip-trailing-cr lua-5.2.0.orig/src/lundump.h lua-5.2.0/src/lundump.h
+--- lua-5.2.0.orig/src/lundump.h	2011-05-06 16:35:16 +0200
++++ lua-5.2.0/src/lundump.h	2012-01-10 15:39:37 +0100
+@@ -17,7 +17,8 @@
+ LUAI_FUNC void luaU_header (lu_byte* h);
+ 
+ /* dump one chunk; from ldump.c */
+-LUAI_FUNC int luaU_dump (lua_State* L, const Proto* f, lua_Writer w, void* data, int strip);
++/* LUAI_FUNC int luaU_dump (lua_State* L, const Proto* f, lua_Writer w, void* data, int strip); */
++LUALIB_API int luaU_dump (lua_State* L, const Proto* f, lua_Writer w, void* data, int strip);
+ 
+ /* data to catch conversion errors */
+ #define LUAC_TAIL		"\x19\x93\r\n\x1a\n"