From 4d760b54bdb48f04c4d5cfb265bea960493d0a6b Mon Sep 17 00:00:00 2001 From: Lars Op den Kamp Date: Wed, 18 Jan 2012 02:13:32 +0100 Subject: [PATCH] cec: only target .net 2.0, include all the new stuff in the installer --- .gitignore | 34 ++-- project/CecSharpClient.sln | 20 --- ...Sharp.Net2-dev.snk => LibCecSharp-dev.snk} | Bin project/LibCecSharp.Net2.sln | 26 --- project/LibCecSharp.sln | 36 ++++ ...ecSharp.Net2.vcproj => LibCecSharp.vcproj} | 38 ++-- project/LibCecSharp.vcxproj | 165 ------------------ project/LibCecSharp.vcxproj.filters | 36 ---- project/create-installer.cmd | 96 ++++++---- project/libCEC.nsi | 33 ++-- project/libcec.sln | 33 ++-- project/libcec.vcxproj | 51 +++--- project/testclient.vcxproj | 24 ++- src/CecSharpTester/CecSharpClient.cs | 3 +- ...arpClient.csproj => CecSharpTester.csproj} | 66 ++++--- .../{ => Properties}/AssemblyInfo.cs | 2 +- src/CecSharpTester/app.config | 3 + src/lib/AdapterDetection.cpp | 2 + src/lib/LibCECDll.cpp | 2 +- 19 files changed, 247 insertions(+), 423 deletions(-) delete mode 100644 project/CecSharpClient.sln rename project/{LibCecSharp.Net2-dev.snk => LibCecSharp-dev.snk} (100%) delete mode 100644 project/LibCecSharp.Net2.sln create mode 100644 project/LibCecSharp.sln rename project/{LibCecSharp.Net2.vcproj => LibCecSharp.vcproj} (88%) delete mode 100644 project/LibCecSharp.vcxproj delete mode 100644 project/LibCecSharp.vcxproj.filters rename src/CecSharpTester/{CecSharpClient.csproj => CecSharpTester.csproj} (51%) rename src/CecSharpTester/{ => Properties}/AssemblyInfo.cs (99%) create mode 100644 src/CecSharpTester/app.config diff --git a/.gitignore b/.gitignore index 6ec51bd..4da907e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,13 +1,18 @@ -/.project +/build /.cproject -/*.dll -/*.exe -/*.exp -/*.ilk -/*.lib -/*.manifest -/*.metagen -/*.pdb +/.project +*.dll +*.exe +*.exp +*.ilk +*.lib +*.manifest +*.metagen +*.ncb +*.opensdf +*.pdb +*.suo +*.user aclocal.m4 autom4te.cache @@ -25,8 +30,6 @@ Makefile Makefile.in missing -build - include/boost project/bin @@ -35,12 +38,9 @@ project/*.exe project/Release/ project/ipch/ project/libcec.sdf -project/*.ncb project/obj -project/*.opensdf project/Properties -project/*.suo -project/*.user + project/x64 src/lib/.deps @@ -64,7 +64,11 @@ src/testclient/.libs src/testclient/cec-client src/testclient/*.o +src/CecSharpTester/bin src/CecSharpTester/obj +src/libcec-wmc/bin +src/libcec-wmc/obj + /dpinst-x86.exe /dpinst-amd64.exe diff --git a/project/CecSharpClient.sln b/project/CecSharpClient.sln deleted file mode 100644 index 0a4d822..0000000 --- a/project/CecSharpClient.sln +++ /dev/null @@ -1,20 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2010 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CecSharpClient", "..\src\CecSharpTester\CecSharpClient.csproj", "{47EF8EFE-5758-4E82-B9BA-F9B002F9C0D4}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|x86 = Debug|x86 - Release|x86 = Release|x86 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {47EF8EFE-5758-4E82-B9BA-F9B002F9C0D4}.Debug|x86.ActiveCfg = Debug|x86 - {47EF8EFE-5758-4E82-B9BA-F9B002F9C0D4}.Debug|x86.Build.0 = Debug|x86 - {47EF8EFE-5758-4E82-B9BA-F9B002F9C0D4}.Release|x86.ActiveCfg = Release|x86 - {47EF8EFE-5758-4E82-B9BA-F9B002F9C0D4}.Release|x86.Build.0 = Release|x86 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/project/LibCecSharp.Net2-dev.snk b/project/LibCecSharp-dev.snk similarity index 100% rename from project/LibCecSharp.Net2-dev.snk rename to project/LibCecSharp-dev.snk diff --git a/project/LibCecSharp.Net2.sln b/project/LibCecSharp.Net2.sln deleted file mode 100644 index ac97f5f..0000000 --- a/project/LibCecSharp.Net2.sln +++ /dev/null @@ -1,26 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 10.00 -# Visual Studio 2008 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "LibCecSharp.Net2", "LibCecSharp.Net2.vcproj", "{E54D4581-CD59-4687-BB10-694B8192EABA}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Debug|x64 = Debug|x64 - Release|Win32 = Release|Win32 - Release|x64 = Release|x64 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {E54D4581-CD59-4687-BB10-694B8192EABA}.Debug|Win32.ActiveCfg = Debug|Win32 - {E54D4581-CD59-4687-BB10-694B8192EABA}.Debug|Win32.Build.0 = Debug|Win32 - {E54D4581-CD59-4687-BB10-694B8192EABA}.Debug|x64.ActiveCfg = Debug|x64 - {E54D4581-CD59-4687-BB10-694B8192EABA}.Debug|x64.Build.0 = Debug|x64 - {E54D4581-CD59-4687-BB10-694B8192EABA}.Release|Win32.ActiveCfg = Release|Win32 - {E54D4581-CD59-4687-BB10-694B8192EABA}.Release|Win32.Build.0 = Release|Win32 - {E54D4581-CD59-4687-BB10-694B8192EABA}.Release|x64.ActiveCfg = Release|x64 - {E54D4581-CD59-4687-BB10-694B8192EABA}.Release|x64.Build.0 = Release|x64 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/project/LibCecSharp.sln b/project/LibCecSharp.sln new file mode 100644 index 0000000..93d654a --- /dev/null +++ b/project/LibCecSharp.sln @@ -0,0 +1,36 @@ + +Microsoft Visual Studio Solution File, Format Version 10.00 +# Visual Studio 2008 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CecSharpTester", "..\src\CecSharpTester\CecSharpTester.csproj", "{B6A7F3A9-F47C-41E5-9754-0BFF233B1172}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "LibCecSharp", "LibCecSharp.vcproj", "{E54D4581-CD59-4687-BB10-694B8192EABA}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 + Release|x64 = Release|x64 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {B6A7F3A9-F47C-41E5-9754-0BFF233B1172}.Debug|x64.ActiveCfg = Debug|x64 + {B6A7F3A9-F47C-41E5-9754-0BFF233B1172}.Debug|x64.Build.0 = Debug|x64 + {B6A7F3A9-F47C-41E5-9754-0BFF233B1172}.Debug|x86.ActiveCfg = Debug|x86 + {B6A7F3A9-F47C-41E5-9754-0BFF233B1172}.Debug|x86.Build.0 = Debug|x86 + {B6A7F3A9-F47C-41E5-9754-0BFF233B1172}.Release|x64.ActiveCfg = Release|x64 + {B6A7F3A9-F47C-41E5-9754-0BFF233B1172}.Release|x64.Build.0 = Release|x64 + {B6A7F3A9-F47C-41E5-9754-0BFF233B1172}.Release|x86.ActiveCfg = Release|x86 + {B6A7F3A9-F47C-41E5-9754-0BFF233B1172}.Release|x86.Build.0 = Release|x86 + {E54D4581-CD59-4687-BB10-694B8192EABA}.Debug|x64.ActiveCfg = Debug|x64 + {E54D4581-CD59-4687-BB10-694B8192EABA}.Debug|x64.Build.0 = Debug|x64 + {E54D4581-CD59-4687-BB10-694B8192EABA}.Debug|x86.ActiveCfg = Debug|Win32 + {E54D4581-CD59-4687-BB10-694B8192EABA}.Debug|x86.Build.0 = Debug|Win32 + {E54D4581-CD59-4687-BB10-694B8192EABA}.Release|x64.ActiveCfg = Release|x64 + {E54D4581-CD59-4687-BB10-694B8192EABA}.Release|x64.Build.0 = Release|x64 + {E54D4581-CD59-4687-BB10-694B8192EABA}.Release|x86.ActiveCfg = Release|Win32 + {E54D4581-CD59-4687-BB10-694B8192EABA}.Release|x86.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/project/LibCecSharp.Net2.vcproj b/project/LibCecSharp.vcproj similarity index 88% rename from project/LibCecSharp.Net2.vcproj rename to project/LibCecSharp.vcproj index e65be24..3bd367b 100644 --- a/project/LibCecSharp.Net2.vcproj +++ b/project/LibCecSharp.vcproj @@ -2,9 +2,9 @@ - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {1AC27FBD-653A-4F5F-ADBC-2A8FD074EEB7} - v4.0 - ManagedCProj - LibCecSharp - - - - DynamicLibrary - true - true - Unicode - - - DynamicLibrary - true - true - Unicode - - - DynamicLibrary - false - true - Unicode - - - DynamicLibrary - false - true - MultiByte - - - - - - - - - - - - - - - - - - - $(SolutionDir)\..\include;$(IncludePath) - $(ProjectName) - $(SolutionDir)..\ - $(SolutionDir)LibCecSharp.Net2-dev.snk - - - true - $(SolutionDir)\..\include;$(IncludePath) - $(ProjectName).x64 - $(SolutionDir)..\ - $(SolutionDir)LibCecSharp.Net2-dev.snk - - - $(SolutionDir)\..\include;$(IncludePath) - $(SolutionDir)LibCecSharp.Net2-dev.snk - $(SolutionDir)..\ - - - $(SolutionDir)\..\include;$(IncludePath) - $(SolutionDir)LibCecSharp.Net2-dev.snk - $(ProjectName).x64 - $(SolutionDir)..\ - - - - Level3 - Disabled - _DEBUG;%(PreprocessorDefinitions) - NotUsing - - - true - - - MachineX86 - - - - - Level3 - Disabled - _WIN64;_DEBUG;%(PreprocessorDefinitions) - NotUsing - - - true - - - - - - - Level3 - NDEBUG;%(PreprocessorDefinitions) - NotUsing - - - true - - - - - - - Level3 - _WIN64;NDEBUG;%(PreprocessorDefinitions) - NotUsing - - - true - - - - - - - - - - - - - - - - - - - - - {c04b0fb1-667d-4f1c-bdae-a07cdffaaaa0} - - - - - - \ No newline at end of file diff --git a/project/LibCecSharp.vcxproj.filters b/project/LibCecSharp.vcxproj.filters deleted file mode 100644 index 0119fa2..0000000 --- a/project/LibCecSharp.vcxproj.filters +++ /dev/null @@ -1,36 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hpp;hxx;hm;inl;inc;xsd - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - - - - - Header Files - - - Header Files - - - Header Files - - - - - Source Files - - - Source Files - - - \ No newline at end of file diff --git a/project/create-installer.cmd b/project/create-installer.cmd index 369e408..49e4fda 100644 --- a/project/create-installer.cmd +++ b/project/create-installer.cmd @@ -1,42 +1,50 @@ @echo off +rem Check for NSIS IF EXIST "%ProgramFiles%\NSIS\makensis.exe" ( set NSIS="%ProgramFiles%\NSIS\makensis.exe" ) ELSE IF EXIST "%ProgramFiles(x86)%\NSIS\makensis.exe" ( set NSIS="%ProgramFiles(x86)%\NSIS\makensis.exe" ) ELSE GOTO NONSIS +rem Check for the Windows DDK IF NOT EXIST "C:\WinDDK\7600.16385.1" GOTO NODDK set DDK="C:\WinDDK\7600.16385.1" +rem Check for VC10 IF "%VS100COMNTOOLS%"=="" ( set COMPILER10="%ProgramFiles%\Microsoft Visual Studio 10.0\Common7\IDE\VCExpress.exe" ) ELSE IF EXIST "%VS100COMNTOOLS%\..\IDE\VCExpress.exe" ( set COMPILER10="%VS100COMNTOOLS%\..\IDE\VCExpress.exe" ) ELSE IF EXIST "%VS100COMNTOOLS%\..\IDE\devenv.exe" ( set COMPILER10="%VS100COMNTOOLS%\..\IDE\devenv.exe" -) +) ELSE GOTO NOSDK10 -echo Cleaning libCEC -%COMPILER10% libcec.sln /clean "Release|Win32" -echo Compiling libCEC -%COMPILER10% libcec.sln /build "Release|Win32" /project libcec -echo Compiling cec-client -%COMPILER10% libcec.sln /build "Release|Win32" /project testclient -echo Compiling LibCecSharp -%COMPILER10% libcec.sln /build "Release|Win32" /project LibCecSharp +del /s /f /q ..\build +mkdir ..\build +mkdir ..\build\x64 + +rem Skip to libCEC/x86 when we're running on win32 +if "%PROCESSOR_ARCHITECTURE%"=="x86" if "%PROCESSOR_ARCHITEW6432%"=="" goto libcecx86 -IF EXIST "%ProgramFiles(x86)%" ( -echo Cleaning libCEC x64 +rem Compile libCEC and cec-client x64 +echo. Cleaning libCEC (x64) %COMPILER10% libcec.sln /clean "Release|x64" -echo Compiling libCEC x64 +echo. Compiling libCEC (x64) %COMPILER10% libcec.sln /build "Release|x64" /project libcec -echo Compiling cec-client x64 +echo. Compiling cec-client (x64) %COMPILER10% libcec.sln /build "Release|x64" /project testclient -echo Compiling LibCecSharp x64 -%COMPILER10% libcec.sln /build "Release|x64" /project LibCecSharp -) +:libcecx86 +rem Compile libCEC and cec-client Win32 +echo. Cleaning libCEC (x86) +%COMPILER10% libcec.sln /clean "Release|Win32" +echo. Compiling libCEC (x86) +%COMPILER10% libcec.sln /build "Release|Win32" /project libcec +echo. Compiling cec-client (x86) +%COMPILER10% libcec.sln /build "Release|Win32" /project testclient + +rem Check for VC9 IF "%VS90COMNTOOLS%"=="" ( set COMPILER9="%ProgramFiles%\Microsoft Visual Studio 9.0\Common7\IDE\VCExpress.exe" ) ELSE IF EXIST "%VS90COMNTOOLS%\..\IDE\VCExpress.exe" ( @@ -45,35 +53,59 @@ IF "%VS90COMNTOOLS%"=="" ( set COMPILER9="%VS90COMNTOOLS%\..\IDE\devenv.exe" ) ELSE GOTO NOSDK9 -echo Cleaning LibCecSharp.Net2 -%COMPILER9% LibCecSharp.Net2.sln /clean "Release|Win32" -echo Compiling LibCecSharp.Net2 -%COMPILER9% LibCecSharp.Net2.sln /build "Release|Win32" +rem Skip to libCEC/x86 when we're running on win32 +if "%PROCESSOR_ARCHITECTURE%"=="x86" if "%PROCESSOR_ARCHITEW6432%"=="" goto libcecsharpx86 -IF EXIST "%ProgramFiles(x86)%" ( -echo Cleaning LibCecSharp.Net2 x64 +rem Compile LibCecSharp (x64) +echo. Cleaning LibCecSharp (x64) %COMPILER9% LibCecSharp.Net2.sln /clean "Release|x64" -echo Compiling LibCecSharp.Net2 x64 -%COMPILER9% LibCecSharp.Net2.sln /build "Release|x64" -) +echo. Compiling LibCecSharp (x64) +%COMPILER9% LibCecSharp.sln /build "Release|x64" /project LibCecSharp +%COMPILER9% LibCecSharp.sln /build "Release|x64" /project CecSharpTester + +copy ..\build\LibCecSharp.dll ..\build\x64\LibCecSharp.dll +copy ..\build\CecSharpTester.exe ..\build\x64\CecSharpTester.exe + +:libcecsharpx86 +rem Compile LibCecSharp (x86) +echo. Cleaning LibCecSharp (x86) +%COMPILER9% LibCecSharp.sln /clean "Release|x86" +echo. Compiling LibCecSharp (x86) +%COMPILER9% LibCecSharp.sln /build "Release|x86" /project LibCecSharp +%COMPILER9% LibCecSharp.sln /build "Release|x86" /project CecSharpTester :NOSDK9 -echo Copying driver installer -copy "%DDK%\redist\DIFx\dpinst\MultiLin\amd64\dpinst.exe" ..\dpinst-amd64.exe -copy "%DDK%\redist\DIFx\dpinst\MultiLin\x86\dpinst.exe" ..\dpinst-x86.exe +:CREATEINSTALLER +echo. Copying driver installer +copy "%DDK%\redist\DIFx\dpinst\MultiLin\amd64\dpinst.exe" ..\build\dpinst-amd64.exe +copy "%DDK%\redist\DIFx\dpinst\MultiLin\x86\dpinst.exe" ..\build\dpinst-x86.exe -echo Creating the installer +rem Clean things up before creating the installer +del ..\build\LibCecSharp.pdb +del ..\build\CecSharpTester.pdb +copy ..\build\cec-client.x64.exe ..\build\x64\cec-client.x64.exe +del ..\build\cec-client.x64.exe +copy ..\build\libcec.x64.dll ..\build\x64\libcec.x64.dll +del ..\build\libcec.x64.dll +copy ..\build\libcec.x64.lib ..\build\x64\libcec.x64.lib +del ..\build\libcec.x64.lib + +echo. Creating the installer %NSIS% /V1 /X"SetCompressor /FINAL lzma" "libCEC.nsi" -echo The installer can be found here: libCEC-installer.exe +echo. The installer can be found here: ..\build\libCEC-installer.exe + +GOTO EXIT +:NOSDK10 +echo. Both Visual Studio 2010 and Visual C++ Express 2010 were not found on your system. GOTO EXIT :NOSIS -echo NSIS could not be found on your system. +echo. NSIS could not be found on your system. GOTO EXIT :NODDK -echo Windows DDK could not be found on your system +echo. Windows DDK could not be found on your system :EXIT diff --git a/project/libCEC.nsi b/project/libCEC.nsi index 2ec8c06..23f341a 100644 --- a/project/libCEC.nsi +++ b/project/libCEC.nsi @@ -8,7 +8,7 @@ !include "x64.nsh" Name "libCEC" -OutFile "libCEC-installer.exe" +OutFile "..\build\libCEC-installer.exe" XPStyle on InstallDir "$PROGRAMFILES\libCEC" @@ -45,30 +45,42 @@ Section "libCEC" SecLibCEC SetShellVarContext current SectionIn RO SectionIn 1 #section is in installtype Full + + ; Copy to the installation directory SetOutPath "$INSTDIR" File "..\AUTHORS" - File "..\cec*.exe" + File /x dpinst*.exe "..\build\*.exe" File "..\ChangeLog" File "..\COPYING" - File "..\libcec*.dll" - File "..\libcec*.lib" - File "..\LibCecSharp*.dll" File "..\README" + File "..\build\*.dll" + SetOutPath "$INSTDIR\x64" + File /nonfatal "..\build\x64\*" ; Copy to XBMC\system ReadRegStr $1 HKCU "Software\XBMC" "" ${If} $1 != "" SetOutPath "$1\system" - File "..\libcec.dll" + File "..\build\libcec.dll" ${EndIf} + ; Copy the driver installer and .inf file SetOutPath "$INSTDIR\driver" - File "..\dpinst-amd64.exe" - File "..\dpinst-x86.exe" + File "..\build\dpinst-amd64.exe" + File "..\build\dpinst-x86.exe" File "..\OEM001.inf" + + ; Copy the headers SetOutPath "$INSTDIR\include" File /r /x *.so "..\include\cec*.*" + ; Copy libcec.dll and libcec.x64.dll to the system directory + SetOutPath "$SYSDIR" + File "..\build\libcec.dll" + ${If} ${RunningX64} + File /nonfatal "..\build\x64\libcec.x64.dll" + ${EndIf} + ;Store installation folder WriteRegStr HKCU "Software\libCEC" "" $INSTDIR @@ -83,7 +95,7 @@ Section "libCEC" SecLibCEC "" "$INSTDIR\cec-client.exe" 0 SW_SHOWNORMAL \ "" "Start the CEC Test client." ${If} ${RunningX64} - CreateShortCut "$SMPROGRAMS\$StartMenuFolder\CEC Test client (x64).lnk" "$INSTDIR\cec-client.x64.exe" \ + CreateShortCut "$SMPROGRAMS\$StartMenuFolder\CEC Test client (x64).lnk" "$INSTDIR\x64\cec-client.x64.exe" \ "" "$INSTDIR\cec-client.x64.exe" 0 SW_SHOWNORMAL \ "" "Start the CEC Test client (x64)." ${EndIf} @@ -141,7 +153,8 @@ Section "Uninstall" Delete "$INSTDIR\COPYING" Delete "$INSTDIR\*.dll" Delete "$INSTDIR\*.lib" - Delete "$INSTDIR\*.pdb" + Delete "$INSTDIR\x64\*.dll" + Delete "$INSTDIR\x64\*.lib" Delete "$INSTDIR\README" Delete "$INSTDIR\driver\OEM001.inf" Delete "$INSTDIR\driver\dpinst-amd64.exe" diff --git a/project/libcec.sln b/project/libcec.sln index b1969d7..83d6d89 100644 --- a/project/libcec.sln +++ b/project/libcec.sln @@ -8,43 +8,30 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testclient", "testclient.vc {C04B0FB1-667D-4F1C-BDAE-A07CDFFAAAA0} = {C04B0FB1-667D-4F1C-BDAE-A07CDFFAAAA0} EndProjectSection EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "LibCecSharp", "LibCecSharp.vcxproj", "{1AC27FBD-653A-4F5F-ADBC-2A8FD074EEB7}" - ProjectSection(ProjectDependencies) = postProject - {C04B0FB1-667D-4F1C-BDAE-A07CDFFAAAA0} = {C04B0FB1-667D-4F1C-BDAE-A07CDFFAAAA0} - EndProjectSection -EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|x64 = Debug|x64 Debug|Win32 = Debug|Win32 - Release|x64 = Release|x64 + Debug|x64 = Debug|x64 Release|Win32 = Release|Win32 + Release|x64 = Release|x64 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {C04B0FB1-667D-4F1C-BDAE-A07CDFFAAAA0}.Debug|x64.ActiveCfg = Debug|x64 - {C04B0FB1-667D-4F1C-BDAE-A07CDFFAAAA0}.Debug|x64.Build.0 = Debug|x64 {C04B0FB1-667D-4F1C-BDAE-A07CDFFAAAA0}.Debug|Win32.ActiveCfg = Debug|Win32 {C04B0FB1-667D-4F1C-BDAE-A07CDFFAAAA0}.Debug|Win32.Build.0 = Debug|Win32 - {C04B0FB1-667D-4F1C-BDAE-A07CDFFAAAA0}.Release|x64.ActiveCfg = Release|x64 - {C04B0FB1-667D-4F1C-BDAE-A07CDFFAAAA0}.Release|x64.Build.0 = Release|x64 + {C04B0FB1-667D-4F1C-BDAE-A07CDFFAAAA0}.Debug|x64.ActiveCfg = Debug|x64 + {C04B0FB1-667D-4F1C-BDAE-A07CDFFAAAA0}.Debug|x64.Build.0 = Debug|x64 {C04B0FB1-667D-4F1C-BDAE-A07CDFFAAAA0}.Release|Win32.ActiveCfg = Release|Win32 {C04B0FB1-667D-4F1C-BDAE-A07CDFFAAAA0}.Release|Win32.Build.0 = Release|Win32 - {F01222BF-6B3D-43BD-B254-434031CB9887}.Debug|x64.ActiveCfg = Debug|x64 - {F01222BF-6B3D-43BD-B254-434031CB9887}.Debug|x64.Build.0 = Debug|x64 + {C04B0FB1-667D-4F1C-BDAE-A07CDFFAAAA0}.Release|x64.ActiveCfg = Release|x64 + {C04B0FB1-667D-4F1C-BDAE-A07CDFFAAAA0}.Release|x64.Build.0 = Release|x64 {F01222BF-6B3D-43BD-B254-434031CB9887}.Debug|Win32.ActiveCfg = Debug|Win32 {F01222BF-6B3D-43BD-B254-434031CB9887}.Debug|Win32.Build.0 = Debug|Win32 - {F01222BF-6B3D-43BD-B254-434031CB9887}.Release|x64.ActiveCfg = Release|x64 - {F01222BF-6B3D-43BD-B254-434031CB9887}.Release|x64.Build.0 = Release|x64 + {F01222BF-6B3D-43BD-B254-434031CB9887}.Debug|x64.ActiveCfg = Debug|x64 + {F01222BF-6B3D-43BD-B254-434031CB9887}.Debug|x64.Build.0 = Debug|x64 {F01222BF-6B3D-43BD-B254-434031CB9887}.Release|Win32.ActiveCfg = Release|Win32 {F01222BF-6B3D-43BD-B254-434031CB9887}.Release|Win32.Build.0 = Release|Win32 - {1AC27FBD-653A-4F5F-ADBC-2A8FD074EEB7}.Debug|x64.ActiveCfg = Debug|x64 - {1AC27FBD-653A-4F5F-ADBC-2A8FD074EEB7}.Debug|x64.Build.0 = Debug|x64 - {1AC27FBD-653A-4F5F-ADBC-2A8FD074EEB7}.Debug|Win32.ActiveCfg = Debug|Win32 - {1AC27FBD-653A-4F5F-ADBC-2A8FD074EEB7}.Debug|Win32.Build.0 = Debug|Win32 - {1AC27FBD-653A-4F5F-ADBC-2A8FD074EEB7}.Release|x64.ActiveCfg = Release|x64 - {1AC27FBD-653A-4F5F-ADBC-2A8FD074EEB7}.Release|x64.Build.0 = Release|x64 - {1AC27FBD-653A-4F5F-ADBC-2A8FD074EEB7}.Release|Win32.ActiveCfg = Release|Win32 - {1AC27FBD-653A-4F5F-ADBC-2A8FD074EEB7}.Release|Win32.Build.0 = Release|Win32 + {F01222BF-6B3D-43BD-B254-434031CB9887}.Release|x64.ActiveCfg = Release|x64 + {F01222BF-6B3D-43BD-B254-434031CB9887}.Release|x64.Build.0 = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/project/libcec.vcxproj b/project/libcec.vcxproj index 4d320b3..fa96f6d 100644 --- a/project/libcec.vcxproj +++ b/project/libcec.vcxproj @@ -113,43 +113,31 @@ - $(SolutionDir)..\ + $(SolutionDir)..\build\ - $(SolutionDir)..\ + $(SolutionDir)..\build\ - $(ProjectName) - .dll + libcec $(ProjectName).x64 - .dll - *.cdf;*.cache;*.obj;*.ilk;*.resources;*.tlb;*.tli;*.tlh;*.tmp;*.rsp;*.pgc;*.pgd;*.meta;*.tlog;*.manifest;*.res;*.pch;*.exp;*.idb;*.rep;*.xdc;*.pdb;*_manifest.rc;*.bsc;*.sbr;*.xml;*.dll $(SolutionDir)..\include;$(IncludePath) - false - true - *.cdf;*.cache;*.obj;*.ilk;*.resources;*.tlb;*.tli;*.tlh;*.tmp;*.rsp;*.pgc;*.pgd;*.meta;*.tlog;*.manifest;*.res;*.pch;*.exp;*.idb;*.rep;*.xdc;*.pdb;*_manifest.rc;*.bsc;*.sbr;*.xml;*.dll $(SolutionDir)..\include;$(IncludePath) - false - true - $(SolutionDir)..\ + $(SolutionDir)..\build\ libcec - .dll - *.cdf;*.cache;*.obj;*.ilk;*.resources;*.tlb;*.tli;*.tlh;*.tmp;*.rsp;*.pgc;*.pgd;*.meta;*.tlog;*.manifest;*.res;*.pch;*.exp;*.idb;*.rep;*.xdc;*.pdb;*_manifest.rc;*.bsc;*.sbr;*.xml;*.dll $(SolutionDir)..\include;$(IncludePath) - $(SolutionDir)..\ + $(SolutionDir)..\build\ $(ProjectName).x64 - .dll - *.cdf;*.cache;*.obj;*.ilk;*.resources;*.tlb;*.tli;*.tlh;*.tmp;*.rsp;*.pgc;*.pgd;*.meta;*.tlog;*.manifest;*.res;*.pch;*.exp;*.idb;*.rep;*.xdc;*.pdb;*_manifest.rc;*.bsc;*.sbr;*.xml;*.dll $(SolutionDir)..\include;$(IncludePath) @@ -164,9 +152,6 @@ true - $(SolutionDir)..\$(TargetName)$(TargetExt) - %(AdditionalDependencies);setupapi.lib - libcmtd @@ -182,12 +167,13 @@ true - true - $(SolutionDir)..\$(TargetName)$(TargetExt) - %(AdditionalDependencies);setupapi.lib - libcmtd + + + + + true @@ -207,9 +193,6 @@ false true true - $(SolutionDir)..\libcec.dll - %(AdditionalDependencies);setupapi.lib - libcmt @@ -218,7 +201,6 @@ Level4 Full - true true $(SolutionDir)..\include;%(AdditionalIncludeDirectories) _WIN64;_CRT_SECURE_NO_WARNINGS;_WINSOCKAPI_;__STDC_CONSTANT_MACROS;DLL_EXPORT;%(PreprocessorDefinitions) @@ -231,12 +213,19 @@ false true true - $(SolutionDir)..\$(TargetName)$(TargetExt) - %(AdditionalDependencies);setupapi.lib - libcmt + + + + + + + MachineX64 + true + Windows + diff --git a/project/testclient.vcxproj b/project/testclient.vcxproj index 1d1a9bd..0db6eb2 100644 --- a/project/testclient.vcxproj +++ b/project/testclient.vcxproj @@ -61,21 +61,19 @@ - true - $(SolutionDir)..\ + $(SolutionDir)..\build\ cec-client - true - $(SolutionDir)..\ + $(SolutionDir)..\build\ cec-client.x64 - $(SolutionDir)..\ + $(SolutionDir)..\build\ cec-client - $(SolutionDir)..\ + $(SolutionDir)..\build\ cec-client.x64 @@ -93,8 +91,6 @@ Console true - %(AdditionalDependencies) - $(SolutionDir)..\$(TargetName)$(TargetExt) @@ -114,8 +110,8 @@ Console true - %(AdditionalDependencies) - $(SolutionDir)..\$(TargetName)$(TargetExt) + + @@ -133,13 +129,13 @@ $(SolutionDir)..\include;%(AdditionalIncludeDirectories) + Speed Console false true true - %(AdditionalDependencies) @@ -150,23 +146,23 @@ Full - false true _WIN64;_CRT_SECURE_NO_WARNINGS;_WINSOCKAPI_;__STDC_CONSTANT_MACROS;%(PreprocessorDefinitions) true $(SolutionDir)..\include;%(AdditionalIncludeDirectories) + Speed Console false true true - %(AdditionalDependencies) + + - $(SolutionDir)..\$(TargetName)$(TargetExt) diff --git a/src/CecSharpTester/CecSharpClient.cs b/src/CecSharpTester/CecSharpClient.cs index 342d7c0..8f6c576 100644 --- a/src/CecSharpTester/CecSharpClient.cs +++ b/src/CecSharpTester/CecSharpClient.cs @@ -32,7 +32,6 @@ using System; using System.Collections.Generic; -using System.Linq; using System.Text; namespace CecSharpClient @@ -334,7 +333,7 @@ namespace CecSharpClient Console.WriteLine("CEC bus information"); Console.WriteLine("==================="); CecLogicalAddresses addresses = Lib.GetActiveDevices(); - for (int iPtr = 0; iPtr < addresses.Addresses.Count(); iPtr++) + for (int iPtr = 0; iPtr < addresses.Addresses.Length; iPtr++) { CecLogicalAddress address = (CecLogicalAddress)iPtr; if (!addresses.IsSet(address)) diff --git a/src/CecSharpTester/CecSharpClient.csproj b/src/CecSharpTester/CecSharpTester.csproj similarity index 51% rename from src/CecSharpTester/CecSharpClient.csproj rename to src/CecSharpTester/CecSharpTester.csproj index 9a7e65d..eb00508 100644 --- a/src/CecSharpTester/CecSharpClient.csproj +++ b/src/CecSharpTester/CecSharpTester.csproj @@ -1,55 +1,67 @@  - + Debug - x86 - 8.0.30703 + AnyCPU + 9.0.21022 2.0 - {47EF8EFE-5758-4E82-B9BA-F9B002F9C0D4} + {B6A7F3A9-F47C-41E5-9754-0BFF233B1172} Exe Properties - CecSharpClient - CecSharpClient - v4.0 - Client + CecSharpTester + CecSharpTester + v2.0 512 - - x86 + true + ..\..\build\ + DEBUG;TRACE full - false - ..\..\ + x64 + prompt + + + ..\..\build\ + TRACE + true + pdbonly + x64 + prompt + + + true + ..\..\build\ DEBUG;TRACE + full + x86 prompt - 4 - x86 - pdbonly - true - bin\Release\ + ..\..\build\ TRACE + true + pdbonly + x86 prompt - 4 - - False - ..\..\LibCecSharp.dll - - - - - - + + + {E54D4581-CD59-4687-BB10-694B8192EABA} + LibCecSharp + + + + +