-
Notifications
You must be signed in to change notification settings - Fork 12
/
deploy-full.bat
52 lines (39 loc) · 1.95 KB
/
deploy-full.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
@echo off
SET SEVENZIP=C:\Program Files\7-Zip
IF NOT EXIST "%SEVENZIP%\7z.exe" SET SEVENZIP=C:\Program Files (x86)\7-Zip
IF NOT EXIST "%SEVENZIP%\7z.exe" SET SEVENZIP=C:\Programs\7-Zip
set CurDir=%CD%
set DeployDir=%CurDir%\LunaLUA-bin
set DeployDirL=%CurDir%\LunaLUA-loader-bin
if exist "%DeployDir%\*" del /Q /F /S "%DeployDir%\*" > NUL
if not exist "%DeployDir%\*" md "%DeployDir%" > NUL
if exist "%DeployDirL%\*" del /Q /F /S "%DeployDirL%\*" > NUL
if not exist "%DeployDirL%\*" md "%DeployDirL%" > NUL
echo Copying Lua scripts library (+ Optional Libraries) ...
xcopy /Y /E /I %CurDir%\LuaScriptsLib\*.* "%DeployDir%\LuaScriptsLib" > NUL
xcopy /Y /E /I %CurDir%\LuaScriptsLibExt\*.* "%DeployDir%\LuaScriptsLib" > NUL
echo Copying LunaLUA binaries...
copy "%CurDir%\Release\LunaDll.dll" "%DeployDir%" > NUL
copy "%CurDir%\Release\LunaDll.pdb" "%DeployDir%" > NUL
copy "%CurDir%\Release\LunaLoader.exe" "%DeployDirL%" > NUL
if exist "%CurDir%\build-LunaExec\bin\LunaLoader-exec.exe" copy "%CurDir%\build-LunaExec\bin\LunaLoader-exec.exe" "%DeployDirL%" > NUL
echo Installing SDL2 and SDL2_mixer_ext...
copy "%CurDir%\LunaDll\libs\sdl\bin\*.dll" "%DeployDir%" > NUL
rem Free image no needed if static FreeImageLite was built
rem echo Installing FreeImage...
rem copy "%CurDir%\LunaDll\libs\freeimage\*.dll" "%DeployDir%" > NUL
echo Installing Glew32...
copy "%CurDir%\LunaDll\libs\glew\bin\Release\Win32\*.dll" "%DeployDir%" > NUL
copy "%CurDir%\LunaDll\Changelog.txt" "%DeployDir%" > NUL
echo Packing LunaLUA...
"%SEVENZIP%\7z" a -tzip "LunaLUA-bin.zip" %DeployDir%\*.* "%DeployDir%\LuaScriptsLib" > NUL
echo Packing LunaLoader...
"%SEVENZIP%\7z" a -tzip "LunaLoader-bin.zip" %DeployDirL%\*.* > NUL
if exist "%CurDir%\build-LunaExec\bin\LunaLoader-exec.exe" (
echo Packing LunaLoader-exec...
"%SEVENZIP%\7z" a -t7z "LunaLoader-exec.7z" "%CurDir%\build-LunaExec\bin\LunaLoader-exec.exe" > NUL
)
echo.
echo "Everything is completed!"
echo.
if not "%1"=="nopause" pause