-
Notifications
You must be signed in to change notification settings - Fork 12
/
build.bat
48 lines (36 loc) · 1005 Bytes
/
build.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
@echo off
setlocal enabledelayedexpansion enableextensions
set BUILD_DIR=%~dp0
pushd "%BUILD_DIR%"
for /f "delims=" %%X IN ('dir /B /A /S *') DO (
for %%D in ("%%~dpX\.") do (
set PACKAGE_NAME=%%~nxD
goto FoundPkgName
)
)
:FoundPkgName
pushd ..\System
:: make sure to always rebuild the package
:: New package GUID, No doubts about staleness
del %PACKAGE_NAME%.u
del %PACKAGE_NAME%.ucl
ucc make -ini="%BUILD_DIR%make.ini"
popd
:: dont do the post-process steps if compilation failed
if ERRORLEVEL 1 goto cleanup
pushd ..\System
:: Generate compressed file for redirects
ucc compress %PACKAGE_NAME%.u
:: Dump i18n strings
del %PACKAGE_NAME%.int
ucc dumpint %PACKAGE_NAME%.u
:: copy to release location
copy %PACKAGE_NAME%.u "%BUILD_DIR%System" >NUL
copy %PACKAGE_NAME%.ucl "%BUILD_DIR%System" >NUL
copy %PACKAGE_NAME%.int "%BUILD_DIR%System" >NUL
copy %PACKAGE_NAME%.u.uz2 "%BUILD_DIR%System" >NUL
popd
if exist "PostBuildHook.bat" call "PostBuildHook.bat"
:cleanup
popd
endlocal