]> Creatis software - creaToolsTools.git/blob - Install/scripts/compilemodCreaTools.bat
DFCH: Compiler updates
[creaToolsTools.git] / Install / scripts / compilemodCreaTools.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\%1Bin
29
30 cd %binfolder%
31
32 if %compilerVersion%=="Visual Studio 10"
33 (
34   FOR /R %%a IN (*.sln) DO msbuild /p:Configuration=%1 PACKAGE.vcxproj
35   copy %2*.exe %3\Result_Installers\
36 )
37 else
38 (
39   FOR /R %%a IN (*.sln) DO msbuild /p:Configuration=%1 PACKAGE.vcproj
40   copy %2*.exe %3\Result_Installers\
41 )