@@ -95,6 +95,7 @@ set BUILD_NOUZ=0
9595set BUILD_SILENT = 0
9696set BUILD_NOBIND = 0
9797set BUILD_BYTEHAX = 0
98+ set BUILD_STRIP = 0
9899set VERBOSE = 0
99100
100101:ParseArgs
@@ -104,6 +105,7 @@ set VERBOSE=0
104105 if /I " %1 " EQU " Silent" ( set BUILD_SILENT = 1 )
105106 if /I " %1 " EQU " NoBind" ( set BUILD_NOBIND = 1 )
106107 if /I " %1 " EQU " ByteHax" ( set BUILD_BYTEHAX = 1 )
108+ if /I " %1 " EQU " Strip" ( set BUILD_STRIP = 1 )
107109
108110 if /I " %1 " EQU " Verbose" ( set /A VERBOSE += 1 )
109111
@@ -167,6 +169,11 @@ call :Invoke ucc make !MAKE_PARAMS!
167169:: dont do the post-process steps if compilation failed
168170if ERRORLEVEL 1 goto compile_failed
169171
172+ :: strip source code if requested
173+ if %BUILD_STRIP% == 1 (
174+ call :Invoke ucc Editor.StripSourceCommandlet %PACKAGE_NAME%
175+ )
176+
170177:: copy to release location
171178if not exist " %BUILD_DIR% System" (mkdir " %BUILD_DIR% System" )
172179copy " %PACKAGE_NAME% .u" " %BUILD_DIR% System" > NUL
@@ -175,7 +182,7 @@ copy "%PACKAGE_NAME%.ucl" "%BUILD_DIR%System" >NUL
175182if %BUILD_NOUZ% == 0 (
176183 :: generate compressed file for redirects
177184 call :Invoke ucc compress " %PACKAGE_NAME% .u"
178- copy " %PACKAGE_NAME% .u.uz " " %BUILD_DIR% System" > NUL
185+ copy " %PACKAGE_NAME% .u.uz2 " " %BUILD_DIR% System" > NUL
179186)
180187
181188if %BUILD_NOINT% == 0 (
@@ -324,11 +331,11 @@ exit /B %ERRORLEVEL%
324331:PrepareDependencies
325332 if [%1 ] EQU [] exit /B %ERRORLEVEL%
326333 if exist " %BUILD_DIR% Build/Dependencies/%1 /" (
327- if %VERBOSE% GEQ 1 echo Copying Dependency %1
334+ if %VERBOSE% GEQ 1 echo Copying Dependency %1
328335 if %VERBOSE% GEQ 2 (
329- robocopy " %BUILD_DIR% Build/Dependencies/%1 /" .. *.* /S /NJH /NJS /NS /NC /NP
336+ robocopy " %BUILD_DIR% Build/Dependencies/%1 /" .. *.* /S /NJH /NJS /NS /NC /NP
330337 ) else (
331- robocopy " %BUILD_DIR% Build/Dependencies/%1 /" .. *.* /S > NUL
338+ robocopy " %BUILD_DIR% Build/Dependencies/%1 /" .. *.* /S > NUL
332339 )
333340 if exist " %BUILD_DIR% Build/Dependencies/%1 /System/%1 .u" (
334341 set EDITPACKAGES = !EDITPACKAGES! %1
0 commit comments