8 SET XCOPY_COMMAND=%windir%\system32\xcopy
10 SET BUILD_DIR=%BUILD_DIR:"=%
11 SET BUILD_DIR=%BUILD_DIR:/=\%
13 IF "" == "%PLATFORM%" (
14 ECHO Error: No platform parameter set.
19 ECHO Error: No configuration parameter set.
23 IF "" == "%BUILD_DIR%" (
24 ECHO Error: No MONO_BUILD_DIR_PREFIX parameter set.
28 IF NOT EXIST %BUILD_DIR% (
29 ECHO Error: '%BUILD_DIR%', directory doesn't eixst.
33 IF "\" == "%BUILD_DIR:~-1%" (
34 SET BUILD_DIR=%BUILD_DIR:~0,-1%
37 IF NOT EXIST %BUILD_DIR%\%PLATFORM%\lib\%CONFIG% (
38 ECHO Error: No lib directory available for %PLATFORM% %CONFIG% at '%BUILD_DIR%'. Any build availalbe for platform, configuration pair?
42 IF NOT EXIST %BUILD_DIR%\%PLATFORM%\bin\%CONFIG% (
43 ECHO Error: No bin directory available for %PLATFORM% %CONFIG% at '%BUILD_DIR%'. Any build availalbe for platform, configuration pair?
47 SET PACKAGE_DIR=%BUILD_DIR%\package\%PLATFORM%\%CONFIG%
51 IF "-v" == "%ARGUMENTS%" (
52 SET OPTIONS=/f /s /e /y
55 IF "-q" == "%ARGUMENTS%" (
56 SET "OPTIONS=/s /e /q /y"
59 ECHO Packaging mono build %PLATFORM% %CONFIG% into '%PACKAGE_DIR%' ...
61 IF EXIST %PACKAGE_DIR% rmdir %PACKAGE_DIR% /s /q
63 mkdir %PACKAGE_DIR%\include\mono-2.0
65 SET RUN=%XCOPY_COMMAND% ".\include\*.*" "%PACKAGE_DIR%\include\mono-2.0\" %OPTIONS%
66 call :runCommand "%RUN%" %ARGUMENTS%
68 SET RUN=%XCOPY_COMMAND% "%BUILD_DIR%\%PLATFORM%\lib\%CONFIG%\*.lib" "%PACKAGE_DIR%\lib\" %OPTIONS%
69 call :runCommand "%RUN%" %ARGUMENTS%
71 SET RUN=%XCOPY_COMMAND% "%BUILD_DIR%\%PLATFORM%\lib\%CONFIG%\*.pdb" "%PACKAGE_DIR%\lib\" %OPTIONS%
72 call :runCommand "%RUN%" %ARGUMENTS%
74 SET RUN=%XCOPY_COMMAND% "%BUILD_DIR%\%PLATFORM%\bin\%CONFIG%\*.exe" "%PACKAGE_DIR%\bin\" %OPTIONS%
75 call :runCommand "%RUN%" %ARGUMENTS%
77 SET RUN=%XCOPY_COMMAND% "%BUILD_DIR%\%PLATFORM%\bin\%CONFIG%\*.dll" "%PACKAGE_DIR%\bin\" %OPTIONS%
78 call :runCommand "%RUN%" %ARGUMENTS%
80 SET RUN=%XCOPY_COMMAND% "%BUILD_DIR%\%PLATFORM%\bin\%CONFIG%\*.pdb" "%PACKAGE_DIR%\bin\" %OPTIONS%
81 call :runCommand "%RUN%" %ARGUMENTS%
83 SET RUN=%XCOPY_COMMAND% "%BUILD_DIR%\%PLATFORM%\bin\%CONFIG%\*.lib" "%PACKAGE_DIR%\bin\" %OPTIONS%
84 call :runCommand "%RUN%" %ARGUMENTS%
86 ECHO Packaging of mono build %PLATFORM% %CONFIG% into '%PACKAGE_DIR%' DONE.
91 ECHO "package.bat [win32|x64] [Debug|Release] [MONO_BUILD_DIR_PREFIX] [ARGUMENTS]"