set SCRIPT=%~0 for /f "delims=\ tokens=*" %%z in ("%SCRIPT%") do ( set SCRIPT_DRIVE=%%~dz set SCRIPT_PATH=%%~pz set SCRIPT_CURRENT_DIR=%%~dpz ) set QT_ROOT=%SCRIPT_CURRENT_DIR% call V:\QtBuild\qt-vc-F-2015-0118-0010\qtenv.bat echo on REM set PATH=%PATH%;%QT_ROOT%7-Zip REM set PATH=%PATH%;C:\Program Files\7-Zip REM set PATH=%PATH%;C:\Program Files\sakura REM set PATH=%PATH%;C:\Program Files (x86)\sakura REM set PATH=%MSYS_BIN%;%PATH% set PATH=%PATH%;%MSYS_BIN% set QT_NAME=lua-5.3.0 cd /d %QT_ROOT% echo START(1) %date%-%time% >> %QT_ROOT%%QT_NAME%-%QMAKESPEC%.log cd /d %QT_ROOT% rmdir /s /q %QT_NAME% rmdir /s /q %QT_NAME%-%QMAKESPEC% tar zxvf %QT_NAME%.tar.gz move %QT_NAME% %QT_NAME%-%QMAKESPEC% cd /d %QT_ROOT% cd %QT_NAME%-%QMAKESPEC%\src set PRO_FILE=lua_lib.pro set MAKE_FILE=Makefile.lua_lib del %PRO_FILE% %MAKE_FILE%* echo TEMPLATE = lib>>%PRO_FILE% echo CONFIG += staticlib>>%PRO_FILE% echo TARGET = lua>>%PRO_FILE% echo QT -= core gui>>%PRO_FILE% %MSYS_BIN%\find . -maxdepth 1 -type f -name "*.c" ! -name "lua*.c" | sed -e 's/[.][/]/SOURCES += /g'>>%PRO_FILE% cat %PRO_FILE% qmake -r -spec %QMAKESPEC% -o %MAKE_FILE% %PRO_FILE% rmdir /s /q debug %MAKE% -f %MAKE_FILE%.Release cd /d %QT_ROOT% cd %QT_NAME%-%QMAKESPEC%\src set PRO_FILE=lua_exe.pro set MAKE_FILE=Makefile.lua_exe del %PRO_FILE% %MAKE_FILE%* echo TEMPLATE = app>>%PRO_FILE% echo CONFIG += console>>%PRO_FILE% echo TARGET = lua>>%PRO_FILE% echo QT -= core gui>>%PRO_FILE% echo SOURCES += lua.c>>%PRO_FILE% echo QMAKE_LIBDIR += release>>%PRO_FILE% echo QMAKE_LIBS += -llua>>%PRO_FILE% cat %PRO_FILE% qmake -r -spec %QMAKESPEC% -o %MAKE_FILE% %PRO_FILE% rmdir /s /q debug %MAKE% -f %MAKE_FILE%.Release cd /d %QT_ROOT% cd %QT_NAME%-%QMAKESPEC%\src set PRO_FILE=luac_exe.pro set MAKE_FILE=Makefile.luac_exe del %PRO_FILE% %MAKE_FILE%* echo TEMPLATE = app>>%PRO_FILE% echo CONFIG += console>>%PRO_FILE% echo TARGET = luac>>%PRO_FILE% echo QT -= core gui>>%PRO_FILE% echo SOURCES += luac.c>>%PRO_FILE% echo QMAKE_LIBDIR += release>>%PRO_FILE% echo QMAKE_LIBS += -llua>>%PRO_FILE% cat %PRO_FILE% qmake -r -spec %QMAKESPEC% -o %MAKE_FILE% %PRO_FILE% rmdir /s /q debug %MAKE% -f %MAKE_FILE%.Release cd /d %QT_ROOT% cd %QT_NAME%-%QMAKESPEC%\src dir release\*.a release\*.lib release\*.exe :exit cd /d %QT_ROOT% echo END %date%-%time% >> %QT_ROOT%%QT_NAME%-%QMAKESPEC%.log