]> Creatis software - creaToolsTools.git/blob - Install/scripts/creaTools/compilemodCreaTools.bat
Feature #1530 --- creaTools win64 installers release version
[creaToolsTools.git] / Install / scripts / creaTools / compilemodCreaTools.bat
1 @echo off
2
3 echo buildtype = %1 
4 echo Module Sources = %2
5 echo creatoolsGeneration = %3
6
7 echo Architecture found = %PROCESSOR_ARCHITECTURE%
8 if %PROCESSOR_ARCHITECTURE%==x86  (
9   set ProgramFilesPath_x86=%ProgramFiles%
10   set "compilerVersion=Visual Studio 10"
11 ) else (
12   set "ProgramFilesPath_x64=%ProgramFiles%"
13   set "ProgramFilesPath_x86=%ProgramFiles(x86)%"
14   set "compilerVersion=Visual Studio 10 Win64"
15 )
16 set vcvarsall="%ProgramFilesPath_x86%\Microsoft Visual Studio 10.0\VC\vcvarsall.bat"
17 if not exist %vcvarsall% set vcvarsall="%ProgramFilesPath_x64%\Microsoft Visual Studio 10.0\VC\vcvarsall.bat"
18 if not exist %vcvarsall% (
19   echo ERROR!!! Visual Studio has not been found in the system
20   exit
21 )
22
23 if %forcex86%==ON (
24         call %vcvarsall%
25         set "compilerVersion=Visual Studio 10"
26         echo "Compilation forced x86"
27 ) else (
28         if %PROCESSOR_ARCHITECTURE%==x86 (
29                 call %vcvarsall%
30         ) else (
31                 call %vcvarsall% amd64
32         )
33 )
34
35 set binfolder=%3\creatools_bin\%1Bin
36 cd %binfolder%
37 FOR /R %%a IN (*.sln) DO msbuild /m:%NUMBER_OF_PROCESSORS% /p:UseEnv=true;BuildInParallel=true;Configuration=%1 PACKAGE.vcxproj
38 copy %2*.exe %3\Result_Installers\
39