Bump bockbuild for GTK fix
[mono-project.git] / msvc / test-config-setup.bat
blobadb174d80939b2cdc92a75afddde2828b3055fd0
1 @ECHO off
3 SET MONO_RESULT=1
4 SET CONFIG_PATH=%1
5 SET MONO_MODULE_PATH=%2
6 SET CPU_ARCH=%3
8 IF "" == "%CONFIG_PATH%" (
9         ECHO Error: No configuration path set.
10         GOTO ON_ERROR
13 IF "" == "%MONO_MODULE_PATH%" (
14         ECHO Error: No mono module path set.
15         GOTO ON_ERROR
18 IF "" == "%CPU_ARCH%" (
19         ECHO Error: No cpu architecture set.
20         GOTO ON_ERROR
23 IF NOT "x86" == "%CPU_ARCH%" (
25         IF NOT "x86-64" == "%CPU_ARCH%" (
26                 ECHO Error: Unknown cpu architecture, %CPU_ARCH%.
27                 GOTO ON_ERROR
28         )
31 SET CONFIG_PATH=%CONFIG_PATH:"=%
32 SET CONFIG_PATH=%CONFIG_PATH:/=\%
34 SET MONO_MODULE_PATH=%MONO_MODULE_PATH:"=%
35 SET MONO_MODULE_PATH=%MONO_MODULE_PATH:/=\%
37 REM Setup test configuration file.
38 >%CONFIG_PATH% ECHO ^<configuration^>
39 >>%CONFIG_PATH% ECHO ^<dllmap os="windows" cpu="%CPU_ARCH%" dll="libtest" target="%MONO_MODULE_PATH%\libtest.dll" /^>
40 >>%CONFIG_PATH% ECHO ^</configuration^>
42 SET MONO_RESULT=0
43 ECHO Successfully setup test configuration file, %CONFIG_PATH%.
45 GOTO ON_EXIT
47 :ON_ERROR
48         ECHO Failed to setup test configuration file.
49         ECHO test-config-setup.bat [CONFIG_FILE_PATH] [MONO_MODULE_PATH] [x86|x86-64]
50         SET MONO_RESULT=1
51         GOTO ON_EXIT
52         
53 :ON_EXIT
54         EXIT /b %MONO_RESULT%
56 @ECHO on