]> Creatis software - creaToolsTools.git/blob - Install/scripts/compilemod.bat
DFCH: Compiler updates
[creaToolsTools.git] / Install / scripts / compilemod.bat
1 REM %1 = <buildtype>  
2 REM %2 = <Module Sources Ex crea bbtk creaMaracasVisu ...>
3 REM %3 = <creatoolsGeneration>
4
5 if %PROCESSOR_ARCHITECTURE%==x86 (
6   set ProgramFilesPath_x86=%ProgramFiles%
7   echo "Architecture found = x86"
8 ) else
9 (
10   set "ProgramFilesPath_x86=%ProgramFiles(x86)%"
11   echo "Architecture found = x64"
12 )
13 set compilerVersion="Visual Studio 10"
14 set vcvarsall="%ProgramFilesPath_x86%\Microsoft Visual Studio 10.0\VC\vcvarsall.bat"
15 if not exist %vcvarsall% set vcvarsall="%ProgramFilesPath_x64%\Microsoft Visual Studio 10.0\VC\vcvarsall.bat"
16 if not exist %vcvarsall% (
17   set compilerVersion="Visual Studio 9 2008"
18   set vcvarsall="%ProgramFilesPath_x86%\Microsoft Visual Studio 9.0\VC\vcvarsall.bat"
19   if not exist %vcvarsall% set vcvarsall="%ProgramFilesPath_x64%\Microsoft Visual Studio 9.0\VC\vcvarsall.bat"
20   if not exist %vcvarsall% (
21     echo ERROR!!! Visual Studio has not been found in the system
22     exit
23   )
24 )
25
26 call %vcvarsall%
27
28 set binfolder=%3\creatools_bin\%2Bin
29
30 cd %binfolder%
31 if %compilerVersion%=="Visual Studio 10"
32 (
33         FOR /R %%a IN (*.sln) DO msbuild %%a /p:Configuration=%1
34         msbuild /p:Configuration=%1 ALL_BUILD.vcxproj
35         msbuild /p:Configuration=%1 INSTALL.vcxproj
36         msbuild /p:Configuration=%1 PACKAGE.vcxproj
37         copy %2*.exe %3\Result_Installers\
38 )
39 else
40 (
41         FOR /R %%a IN (*.sln) DO msbuild %%a /p:Configuration=%1
42         msbuild /p:Configuration=%1 INSTALL.vcproj
43         msbuild /p:Configuration=%1 PACKAGE.vcproj
44         copy %2*.exe %3\Result_Installers\
45 )