4 IF EXIST "%ProgramFiles%\NSIS\makensis.exe" (
5 set NSIS="%ProgramFiles%\NSIS\makensis.exe"
6 ) ELSE IF EXIST "%ProgramFiles(x86)%\NSIS\makensis.exe" (
7 set NSIS="%ProgramFiles(x86)%\NSIS\makensis.exe"
10 rem Check for the Windows DDK
11 IF NOT EXIST "C:\WinDDK\7600.16385.1" GOTO NODDK
12 set DDK="C:\WinDDK\7600.16385.1"
15 IF "%VS100COMNTOOLS%"=="" (
16 set COMPILER10="%ProgramFiles%\Microsoft Visual Studio 10.0\Common7\IDE\VCExpress.exe"
17 ) ELSE IF EXIST "%VS100COMNTOOLS%\..\IDE\VCExpress.exe" (
18 set COMPILER10="%VS100COMNTOOLS%\..\IDE\VCExpress.exe"
19 ) ELSE IF EXIST "%VS100COMNTOOLS%\..\IDE\devenv.exe" (
20 set COMPILER10="%VS100COMNTOOLS%\..\IDE\devenv.exe"
27 rem Skip to libCEC/x86 when we're running on win32
28 if "%PROCESSOR_ARCHITECTURE%"=="x86" if "%PROCESSOR_ARCHITEW6432%"=="" goto libcecx86
30 rem Compile libCEC and cec-client x64
31 echo. Cleaning libCEC (x64)
32 %COMPILER10% libcec.sln /clean "Release|x64"
33 echo. Compiling libCEC (x64)
34 %COMPILER10% libcec.sln /build "Release|x64" /project libcec
35 echo. Compiling cec-client (x64)
36 %COMPILER10% libcec.sln /build "Release|x64" /project testclient
39 rem Compile libCEC and cec-client Win32
40 echo. Cleaning libCEC (x86)
41 %COMPILER10% libcec.sln /clean "Release|Win32"
42 echo. Compiling libCEC (x86)
43 %COMPILER10% libcec.sln /build "Release|Win32" /project libcec
44 echo. Compiling cec-client (x86)
45 %COMPILER10% libcec.sln /build "Release|Win32" /project testclient
48 IF "%VS90COMNTOOLS%"=="" (
49 set COMPILER9="%ProgramFiles%\Microsoft Visual Studio 9.0\Common7\IDE\VCExpress.exe"
50 ) ELSE IF EXIST "%VS90COMNTOOLS%\..\IDE\VCExpress.exe" (
51 set COMPILER9="%VS90COMNTOOLS%\..\IDE\VCExpress.exe"
52 ) ELSE IF EXIST "%VS90COMNTOOLS%\..\IDE\devenv.exe" (
53 set COMPILER9="%VS90COMNTOOLS%\..\IDE\devenv.exe"
56 rem Skip to libCEC/x86 when we're running on win32
57 if "%PROCESSOR_ARCHITECTURE%"=="x86" if "%PROCESSOR_ARCHITEW6432%"=="" goto libcecsharpx86
59 rem Compile LibCecSharp (x64)
60 echo. Cleaning LibCecSharp (x64)
61 %COMPILER9% LibCecSharp.Net2.sln /clean "Release|x64"
62 echo. Compiling LibCecSharp (x64)
63 %COMPILER9% LibCecSharp.sln /build "Release|x64" /project LibCecSharp
64 %COMPILER9% LibCecSharp.sln /build "Release|x64" /project CecSharpTester
66 copy ..\build\LibCecSharp.dll ..\build\x64\LibCecSharp.dll
67 copy ..\build\CecSharpTester.exe ..\build\x64\CecSharpTester.exe
70 rem Compile LibCecSharp (x86)
71 echo. Cleaning LibCecSharp (x86)
72 %COMPILER9% LibCecSharp.sln /clean "Release|x86"
73 echo. Compiling LibCecSharp (x86)
74 %COMPILER9% LibCecSharp.sln /build "Release|x86" /project LibCecSharp
75 %COMPILER9% LibCecSharp.sln /build "Release|x86" /project CecSharpTester
79 echo. Copying driver installer
80 copy "%DDK%\redist\DIFx\dpinst\MultiLin\amd64\dpinst.exe" ..\build\dpinst-amd64.exe
81 copy "%DDK%\redist\DIFx\dpinst\MultiLin\x86\dpinst.exe" ..\build\dpinst-x86.exe
83 rem Clean things up before creating the installer
84 del ..\build\LibCecSharp.pdb
85 del ..\build\CecSharpTester.pdb
86 copy ..\build\cec-client.x64.exe ..\build\x64\cec-client.x64.exe
87 del ..\build\cec-client.x64.exe
88 copy ..\build\libcec.x64.dll ..\build\x64\libcec.x64.dll
89 del ..\build\libcec.x64.dll
90 copy ..\build\libcec.x64.lib ..\build\x64\libcec.x64.lib
91 del ..\build\libcec.x64.lib
93 echo. Creating the installer
94 %NSIS% /V1 /X"SetCompressor /FINAL lzma" "libCEC.nsi"
96 echo. The installer can be found here: ..\build\libCEC-installer.exe
101 echo. Both Visual Studio 2010 and Visual C++ Express 2010 were not found on your system.
105 echo. NSIS could not be found on your system.
109 echo. Windows DDK could not be found on your system