generated from Raicuparta/unity-libs-nuget
-
Notifications
You must be signed in to change notification settings - Fork 0
/
strip-assembiles.bat
37 lines (25 loc) · 906 Bytes
/
strip-assembiles.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
@echo off
@REM Add all the assemblies you want to publicize in this list
set toPublicize=Assembly-CSharp.dll Assembly-CSharp-firstpass.dll
@REM Add all the assemblies you want to copy as-is to the package in this list
set dontTouch=
set exePath=%1
echo exePath: %exePath%
@REM Remove quotes
set exePath=%exePath:"=%
set managedPath=%exePath:.exe=_Data\Managed%
echo managedPath: %managedPath%
set outPath=%~dp0\package\lib
@REM Strip all assembiles, but keep them private.
%~dp0\tools\NStrip.exe "%managedPath%" -o %outPath%
@REM Strip and publicize assemblies from toPublicize.
(for %%a in (%toPublicize%) do (
echo a: %%a
%~dp0\tools\NStrip.exe "%managedPath%\%%a" -o "%outPath%\%%a" -cg -p --cg-exclude-events
))
@REM Copy over original assemblies for ones we don't want to touch.
(for %%a in (%dontTouch%) do (
echo a: %%a
xcopy "%managedPath%\%%a" "%outPath%\%%a" /y /v
))
pause