lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


May I suggest a small update? See attached batchfile it includes 2 comment lines, which provide an options to build with COMPAT, which is currently disabled.

> REM Uncomment line below to build with compatibility for Lua 5.1
> REM @set COMPAT=/DLUA_COMPAT_ALL

Or alternatively update the lines to build with COMPAT by default, and an option to disable it

> REM Comment line below out to build without compatibility for Lua 5.1
> @set COMPAT=/DLUA_COMPAT_ALL

Thijs



> -----Original Message-----
> From: lua-l-bounces@lists.lua.org [mailto:lua-l-bounces@lists.lua.org] On
> Behalf Of Luiz Henrique de Figueiredo
> Sent: woensdag 8 januari 2014 20:27
> To: Lua mailing list
> Subject: Re: Where is 'luavs.bat' in 5.2
> 
> > > c1 : fatal error C1083: Cannot open source file: 'print.c': No such file
> or directory
> 
> Sorry about that. It's fixed now. Thanks for reporting.

@rem Script to build Lua 5.2 under "Visual Studio .NET Command Prompt".
@rem Do not run from this directory; run it from the toplevel: etc\luavs.bat .
@rem It creates lua52.dll, lua52.lib, lua.exe, and luac.exe in src.
@rem (contributed by David Manura and Mike Pall)

@setlocal

REM Uncomment line below to build with compatibility for Lua 5.1
REM @set COMPAT=/DLUA_COMPAT_ALL

@set MYCOMPILE=cl /nologo /MD /O2 /W3 /c /D_CRT_SECURE_NO_DEPRECATE %COMPAT%
@set MYLINK=link /nologo
@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% l*.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 ..