summary refs log blame commit diff stats
path: root/win32/deps/lua/build-x64.bat
blob: 1567ac6332a0d3a6af01ccd22e300d26c5f1bfab (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
pre { line-height: 125%; }
td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
.highlight .hll { background-color: #ffffcc }
.highlight .c { color: #888888 } /* Comment */
.highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */
.highlight .k { color: #008800; font-weight: bold } /* Keyword */
.highlight .ch { color: #888888 } /* Comment.Hashbang */
.highlight .cm { color: #888888 } /* Comment.Multiline */
.highlight .cp { color: #cc0000; font-weight: bold } /* Comment.Preproc */
.highlight .cpf { color: #888888 } /* Comment.PreprocFile */
.highlight .c1 { color: #888888 } /* Comment.Single */
.highlight .cs { color: #cc0000; font-weight: bold; background-color: #fff0f0 } /* Comment.Special */
.highlight .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */
.highlight .ge { font-style: italic } /* Generic.Emph */
.highlight .ges { font-weight: bold; font-style: italic } /* Generic.EmphStrong */
.highlight .gr { color: #aa0000 } /* Generic.Error */
.highlight .gh { color: #333333 } /* Generic.Heading */
.highlight .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */
.highlight .go { color: #888888 } /* Generic.Output */
.highlight .gp { color: #555555 } /* Generic.Prompt */
.highlight .gs { font-weight: bold } /* Generic.Strong */
.highlight .gu { color: #666666 } /* Generic.Subheading */
.highlight .gt { color: #aa0000 } /* Generic.Traceback */
.highlight .kc { color: #008800; font-weight: bold } /* Keyword.Constant */
.highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */
.highlight .kn
:: run this from a VS x64 command prompt
@echo off

SET PACKAGE_NAME=lua-5.1.5

:: copied from etc\luavs.bat
set MYCOMPILE=cl /nologo /MD /Ox /W3 /c /D_CRT_SECURE_NO_DEPRECATE
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: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 ..
:: end of etc\luavs.bat

set LUA_SRC=%cd%
set LUA_DEST=%cd%-x64
echo.Press return when ready to install!
pause

rmdir /q /s %LUA_DEST%
mkdir %LUA_DEST%
mkdir %LUA_DEST%\bin
mkdir %LUA_DEST%\include
mkdir %LUA_DEST%\lib
mkdir %LUA_DEST%\share
mkdir %LUA_DEST%\share\doc
mkdir %LUA_DEST%\share\doc\lua
copy COPYRIGHT %LUA_DEST%\share\doc\lua\COPYING
:: binaries and libraries
copy src\lua.exe %LUA_DEST%\bin
copy src\lua51.dll %LUA_DEST%\bin
copy src\luac.exe %LUA_DEST%\bin
:: library
copy src\lua51.lib %LUA_DEST%\lib
:: api
copy src\lua.h %LUA_DEST%\include
copy src\luaconf.h %LUA_DEST%\include
copy src\lualib.h %LUA_DEST%\include
copy src\lauxlib.h %LUA_DEST%\include
copy etc\lua.hpp %LUA_DEST%\include

cd %LUA_DEST%
set PATH=%PATH%;%ProgramFiles%\7-zip
del ..\%PACKAGE_NAME%-x64.7z
7z a ..\%PACKAGE_NAME%-x64.7z *
cd %LUA_SRC%
rmdir /q /s %LUA_DEST%

echo.Finished!
pause
nsionTargets"> </ImportGroup> </Project>