]> 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   set "ProgramFilesPath_x86=%ProgramFiles(x86)%"
10   echo "Architecture found = x64"
11 )
12 set compilerVersion="Visual Studio 10"
13 set vcvarsall="%ProgramFilesPath_x86%\Microsoft Visual Studio 10.0\VC\vcvarsall.bat"
14 if not exist %vcvarsall% set vcvarsall="%ProgramFilesPath_x64%\Microsoft Visual Studio 10.0\VC\vcvarsall.bat"
15 if not exist %vcvarsall% (
16   set compilerVersion="Visual Studio 9 2008"
17   set vcvarsall="%ProgramFilesPath_x86%\Microsoft Visual Studio 9.0\VC\vcvarsall.bat"
18   if not exist %vcvarsall% set vcvarsall="%ProgramFilesPath_x64%\Microsoft Visual Studio 9.0\VC\vcvarsall.bat"
19   if not exist %vcvarsall% (
20     echo ERROR!!! Visual Studio has not been found in the system
21     exit
22   )
23 )
24
25 call %vcvarsall%
26
27 set binfolder=%3\creatools_bin\%1Bin
28
29 cd %binfolder%
30
31 if %compilerVersion%=="Visual Studio 10" (
32   FOR /R %%a IN (*.sln) DO msbuild /p:Configuration=%1 PACKAGE.vcxproj
33   copy %2*.exe %3\Result_Installers\
34 ) else (
35   FOR /R %%a IN (*.sln) DO msbuild /p:Configuration=%1 PACKAGE.vcproj
36   copy %2*.exe %3\Result_Installers\
37 )