forked from niftools/max_nif_plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
stagenif.bat
74 lines (64 loc) · 3.06 KB
/
stagenif.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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
@echo off
setlocal
pushd "%~dp0"
set SRC=%~dp0
set DEST=%~dp0\output\%1
if "%1" == "" (
echo Give a version ...
goto exit
)
rm -r -f "%DEST%"
for %%j in (Win32) do (
for /L %%i in (5,1,8) do (
mkdir "%DEST%\%%j\max-%%i-plugins-%1\plugcfg" > nul 2<&1
mkdir "%DEST%\%%j\max-%%i-plugins-%1\plugins" > nul 2<&1
xcopy /D /Y /I "%SRC%*.txt" "%DEST%\%%j\max-%%i-plugins-%1\" > nul 2<&1
xcopy /D /Y /I "%SRC%MaxNifTools.ini" "%DEST%\%%j\max-%%i-plugins-%1\plugcfg\" > nul 2<&1
xcopy /D /Y /I "%SRC%staging\%%j\release - max %%i\NifPlugins\*.dl*" "%DEST%\%%j\max-%%i-plugins-%1\plugins\" > nul 2<&1
xcopy /D /Y /I "%SRC%..\NifMopp\NifMopp.dll" "%DEST%\%%j\max-%%i-plugins-%1\plugins\" > nul 2<&1
xcopy /D /Y /I "%SRC%..\NifMagic\%%j\NifMagic.dll" "%DEST%\%%j\max-%%i-plugins-%1\plugins\" > nul 2<&1
REM pushd "%DEST%\max-%%i-plugins-%1\" && ntzip -9 -r "..\max-%%i-plugins-%1.zip" * && popd
)
mkdir "%DEST%\%%j\gmax-1.2-plugins-%1\plugcfg" > nul 2<&1
mkdir "%DEST%\%%j\gmax-1.2-plugins-%1\plugins" > nul 2<&1
xcopy /D /Y /I "%SRC%README.txt" "%DEST%\%%j\gmax-1.2-plugins-%1\" > nul 2<&1
xcopy /D /Y /I "%SRC%MaxNifTools.ini" "%DEST%\%%j\gmax-1.2-plugins-%1\plugcfg\" > nul 2<&1
xcopy /D /Y /I "%SRC%staging\%%j\release - gmax\NifPlugins\*.dl*" "%DEST%\%%j\gmax-1.2-plugins-%1\plugins\" > nul 2<&1
xcopy /D /Y /I "\gmax12\winmm.dll" "%DEST%\%%j\gmax-1.2-plugins-%1\" > nul 2<&1
xcopy /D /Y /I "%SRC%..\NifMopp\%%j\NifMopp.dll" "%DEST%\%%j\gmax-1.2-plugins-%1\plugins\" > nul 2<&1
xcopy /D /Y /I "%SRC%..\NifMagic\%%j\NifMagic.dll" "%DEST%\%%j\gmax-1.2-plugins-%1\plugins\" > nul 2<&1
REM pushd "%DEST%\gmax-1.2-plugins-%1\" && ntzip -9 -r "..\gmax-1.2-plugins-%1.zip" * && popd
)
for %%j in (Win32 x64) do (
for %%i in (9 2008 2009 2010 2011 2012) do (
mkdir "%DEST%\%%j\max-%%i-plugins-%1\plugcfg" > nul 2<&1
mkdir "%DEST%\%%j\max-%%i-plugins-%1\plugins" > nul 2<&1
xcopy /D /Y /I "%SRC%README.txt" "%DEST%\%%j\max-%%i-plugins-%1\" > nul 2<&1
xcopy /D /Y /I "%SRC%MaxNifTools.ini" "%DEST%\%%j\max-%%i-plugins-%1\plugcfg\" > nul 2<&1
xcopy /D /Y /I "%SRC%staging\%%j\release - max %%i\NifPlugins\*.dl*" "%DEST%\%%j\max-%%i-plugins-%1\plugins\" > nul 2<&1
xcopy /D /Y /I "%SRC%..\NifMopp\%%j\NifMopp.dll" "%DEST%\%%j\max-%%i-plugins-%1\plugins\" > nul 2<&1
xcopy /D /Y /I "%SRC%..\NifMagic\%%j\NifMagic.dll" "%DEST%\%%j\max-%%i-plugins-%1\plugins\" > nul 2<&1
)
)
pushd "%DEST%"
rm -r -f NifPlugins_Development_Readme.txt
popd
pushd "%SRC%"
set VERSION=%1
set GITVERSION=0
for /f "usebackq delims=|" %%i in (`git log -1 "--pretty=format:%%h"`) do set VERSION=%VERSION%.%%i
IF EXIST "c:\Program Files\7-Zip\7z.exe" (
pushd "%DEST%"
"c:\Program Files\7-Zip\7z.exe" a -r niftools-max-plugins-%VERSION%.7z *
popd
)
IF EXIST "c:\Program Files\Inno Setup 5\ISCC.exe" (
pushd "%SRC%"
"c:\Program Files\Inno Setup 5\ISCC.exe" /Q /fniftools-max-plugins-%VERSION% "/o%DEST%\" MaxNifTools.iss
popd
)
popd
:exit
endlocal
popd
REM cd "%DEST%\"