1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124
|
@echo off
set type=%1
set mode=%2
set msvc=%3
set libname=%4
rem ************************************************************************
rem * check script arguments
if "%type%"=="dll" goto argonegiven
if "%type%"=="lib" goto argonegiven
goto argproblem
:argonegiven
if "%mode%"=="release" goto argtwogiven
if "%mode%"=="debug" goto argtwogiven
goto argproblem
:argtwogiven
if "%msvc%"=="msvc6" goto argthreegiven
if "%msvc%"=="msvc7" goto argthreegiven
if "%msvc%"=="msvc8" goto argthreegiven
goto argproblem
:argthreegiven
if "%libname%"=="coin2" goto argfourgiven
if "%libname%"=="coin3" goto argfourgiven
if "%libname%"=="simage1" goto argfourgiven
if "%libname%"=="smallchange1" goto argfourgiven
if "%libname%"=="simvoleon1" goto argfourgiven
if "%libname%"=="nutsnbolts0" goto argfourgiven
if "%libname%"=="soqt1" goto argfourgiven
if "%libname%"=="sowin1" goto argfourgiven
rem goto argproblem
:argfourgiven
goto argtestdone
:argproblem
echo Error with script arguments "%1" "%2" "%3" "%4".
echo Usage:
echo install-sdk.bat {dll,lib} {release,debug} {msvc6,msvc7,msvc8} libname
exit
:argtestdone
rem ************************************************************************
rem * check environment variables
if not "%COINDIR%"=="" goto coindirset
echo The COINDIR environment variable must be set to point to a directory
echo to be able to perform the installation procedure.
exit
:coindirset
if exist %COINDIR%\*.* goto coindirexists
echo The COINDIR environment variable must point to an existing directory
echo to be able to perform the installation procedure.
exit
:coindirexists
echo Installing to %COINDIR%
rem **********************************************************************
rem * Create all the directories
call ..\misc\create-directories.bat
rem **********************************************************************
rem * Copy files
echo Installing header files...
call ..\misc\install-headers.bat %msvc%
if "%libname%"=="coin2" goto installcoindata
if "%libname%"=="coin3" goto installcoindata
goto skipinstallcoindata
:installcoindata
echo Installing data files...
xcopy ..\..\data\draggerDefaults\*.iv %COINDIR%\data\draggerDefaults\ /R /Y
xcopy ..\..\data\shaders\lights\*.glsl %COINDIR%\data\shaders\lights\ /R /Y
xcopy ..\..\data\shaders\vsm\*.glsl %COINDIR%\data\shaders\vsm\ /R /Y
:skipinstallcoindata
rem **********************************************************************
echo Installing binaries...
if "%1"=="dll" goto installdll
goto installlib
:installdll
if "%2"=="debug" goto installdlldebug
goto installdllrelease
:installdlldebug
xcopy %libname%d.dll %COINDIR%\bin\ /R /Y
xcopy Debug\%libname%d.pdb %COINDIR%\bin\ /R /Y
xcopy Debug\%libname%d.lib %COINDIR%\lib\ /R /Y
goto binariesdone
:installdllrelease
xcopy %libname%.dll %COINDIR%\bin\ /R /Y
xcopy Release\%libname%.pdb %COINDIR%\bin\ /R /Y
xcopy Release\%libname%.lib %COINDIR%\lib\ /R /Y
goto binariesdone
:installlib
if "%2"=="debug" goto installlibdebug
goto installlibrelease
:installlibdebug
xcopy %libname%sd.lib %COINDIR%\lib\ /R /Y
goto binariesdone
:installlibrelease
xcopy %libname%s.lib %COINDIR%\lib\ /R /Y
goto binariesdone
:binariesdone
|