@@ -16,14 +16,14 @@ IF EXIST "%ProgramFiles%\NSIS\makensis.exe" (
1616 set NSIS = " %ProgramFiles(x86)% \NSIS\makensis.exe"
1717) ELSE GOTO NONSIS
1818
19- rem Check for VC12
20- IF " %VS120COMNTOOLS % " == " " (
21- set COMPILER12 = " %ProgramFiles% \Microsoft Visual Studio 12 .0\Common7\IDE\devenv.com"
22- ) ELSE IF EXIST " %VS120COMNTOOLS % \..\IDE\VCExpress.exe" (
23- set COMPILER12 = " %VS120COMNTOOLS % \..\IDE\VCExpress.exe"
24- ) ELSE IF EXIST " %VS120COMNTOOLS % \..\IDE\devenv.com" (
25- set COMPILER12 = " %VS120COMNTOOLS % \..\IDE\devenv.com"
26- ) ELSE GOTO NOSDK11
19+ rem Check for VC14
20+ IF " %VS140COMNTOOLS % " == " " (
21+ set COMPILER14 = " %ProgramFiles% \Microsoft Visual Studio 14 .0\Common7\IDE\devenv.com"
22+ ) ELSE IF EXIST " %VS140COMNTOOLS % \..\IDE\VCExpress.exe" (
23+ set COMPILER14 = " %VS140COMNTOOLS % \..\IDE\VCExpress.exe"
24+ ) ELSE IF EXIST " %VS140COMNTOOLS % \..\IDE\devenv.com" (
25+ set COMPILER14 = " %VS140COMNTOOLS % \..\IDE\devenv.com"
26+ ) ELSE GOTO NOSDK14
2727
2828rmdir /s /q %MYDIR% ..\build 2 > nul
2929call %MYDIR% build.cmd
@@ -39,27 +39,27 @@ if "%PROCESSOR_ARCHITECTURE%"=="x86" if "%PROCESSOR_ARCHITEW6432%"=="" goto libc
3939
4040rem Compile libCEC and cec-client x64
4141echo . Cleaning libCEC (x64)
42- %COMPILER12 % libcec.sln /Clean " Release|x64"
42+ %COMPILER14 % libcec.sln /Clean " Release|x64"
4343echo . Compiling libCEC (x64)
44- %COMPILER12 % libcec.sln /Build " Release|x64" /Project LibCecSharp
45- %COMPILER12 % libcec.sln /Build " Release|x64"
44+ %COMPILER14 % libcec.sln /Build " Release|x64" /Project LibCecSharp
45+ %COMPILER14 % libcec.sln /Build " Release|x64"
4646echo . Compiling .Net applications
4747cd " %MYDIR% ..\src\dotnet\project"
48- %COMPILER12 % cec-dotnet.sln /Build " Release|x64"
48+ %COMPILER14 % cec-dotnet.sln /Build " Release|x64"
4949copy ..\build\x64\CecSharpTester.exe %MYDIR% ..\build\amd64\CecSharpTester.exe
5050copy ..\build\x64\cec-tray.exe %MYDIR% ..\build\amd64\cec-tray.exe
5151
5252:libcecx86
5353rem Compile libCEC and cec-client Win32
5454cd " %MYDIR% ..\project"
5555echo . Cleaning libCEC (x86)
56- %COMPILER12 % libcec.sln /Clean " Release|x86"
56+ %COMPILER14 % libcec.sln /Clean " Release|x86"
5757echo . Compiling libCEC (x86)
58- %COMPILER12 % libcec.sln /Build " Release|x86" /Project LibCecSharp
59- %COMPILER12 % libcec.sln /Build " Release|x86"
58+ %COMPILER14 % libcec.sln /Build " Release|x86" /Project LibCecSharp
59+ %COMPILER14 % libcec.sln /Build " Release|x86"
6060echo . Compiling .Net applications
6161cd " %MYDIR% ..\src\dotnet\project"
62- %COMPILER12 % cec-dotnet.sln /Build " Release|x86"
62+ %COMPILER14 % cec-dotnet.sln /Build " Release|x86"
6363copy ..\build\x86\CecSharpTester.exe %MYDIR% ..\build\x86\CecSharpTester.exe
6464copy ..\build\x86\cec-tray.exe %MYDIR% ..\build\x86\cec-tray.exe
6565cd " %MYDIR% ..\project"
@@ -68,6 +68,9 @@ rem Clean things up before creating the installer
6868del /q /f %MYDIR% ..\build\x86\LibCecSharp.pdb 2 > nul
6969del /q /f %MYDIR% ..\build\amd64\LibCecSharp.pdb 2 > nul
7070
71+ GOTO CREATEEGPLUGIN
72+
73+ :SIGNBINARIES
7174rem Check for sign-binary.cmd, only present on the Pulse-Eight production build system
7275rem Calls signtool.exe and signs the DLLs with Pulse-Eight's code signing key
7376IF NOT EXIST " ..\support\private\sign-binary.cmd" GOTO CREATEINSTALLER
@@ -88,7 +91,6 @@ CALL ..\support\private\sign-binary.cmd %MYDIR%..\build\amd64\CecSharpTester.exe
8891
8992:CREATEINSTALLER
9093echo . Creating the installer
91- GOTO CREATEEGPLUGIN
9294cd %MYDIR% ..\build\x86
9395copy cec.dll libcec.dll
9496cd ..\amd64
@@ -110,32 +112,31 @@ IF EXIST "..\support\private\sign-binary.cmd" (
110112
111113echo . The installer can be found here: %INSTALLER%
112114set EXITCODE = 0
113- GOTO EGPLUGINCLEANUP
115+ del /q /f %EGSOURCES% ..\pulse_eight.egplugin 2 > nul
114116GOTO EXIT
115117
116118:CREATEEGPLUGIN
117119echo . Creating EventGhost plugin file
118120SET EGSOURCES = %MYDIR% ..\src\eventghost\egplugin_sources\
119121copy %MYDIR% ..\build\x86\python\cec\__init__.py %EGSOURCES% PulseEight\cec
120- copy %MYDIR% ..\build\x86\python\_cec.pyd %EGSOURCES% PulseEight
122+ copy %MYDIR% ..\build\x86\python\cec\ _cec.pyd %EGSOURCES% PulseEight
121123copy %MYDIR% ..\build\x86\cec.dll %EGSOURCES% PulseEight
124+ del /q /f %EGSOURCES% ..\pulse_eight.egplugin 2 > nul
122125PowerShell -ExecutionPolicy ByPass -Command " Add-Type -Assembly System.IO.Compression.FileSystem;[System.IO.Compression.ZipFile]::CreateFromDirectory('%EGSOURCES% ', '%EGSOURCES% ..\pulse_eight.egplugin', [System.IO.Compression.CompressionLevel]::Optimal, $false)"
123- del %EGSOURCES% PulseEight\cec\__init__.py
124- del %EGSOURCES% PulseEight\_cec.pyd
125- del %EGSOURCES% PulseEight\cec.dll
126- IF NOT EXIST " %EGSOURCES% ..\pulse_eight.egplugin" (
126+ del /q /f %EGSOURCES% PulseEight\cec\__init__.py 2 > nul
127+ del /q /f %EGSOURCES% PulseEight\_cec.pyd 2 > nul
128+ del /q /f %EGSOURCES% PulseEight\cec.dll 2 > nul
129+ IF NOT EXIST " %EGSOURCES% ..\pulse_eight.egplugin" (
127130 GOTO NOEGPLUGIN
128131)
129-
130- :EGPLUGINCLEANUP
131- del %EGSOURCES% ..\pulse_eight.egplugin
132+ GOTO SIGNBINARIES
132133
133134:NOEGPLUGIN
134135echo . Failed to create the EventGhost plugin file.
135136GOTO EXIT
136137
137- :NOSDK11
138- echo . Visual Studio 2012 was not found on your system.
138+ :NOSDK14
139+ echo . Visual Studio 2015 was not found on your system.
139140GOTO EXIT
140141
141142:NOSIS
@@ -148,10 +149,9 @@ GOTO EXIT
148149
149150:ERRORCREATINGINSTALLER
150151echo . The installer could not be created. The most likely cause is that something went wrong while compiling.
151- GOTO RETURNEXIT
152152
153153:EXIT
154- cd %MYDIR%
154+ cd %MYDIR% ..
155155
156156:RETURNEXIT
157157exit /b %EXITCODE%
0 commit comments