Fresh windows 20H2 (OS Build 19042.746) feature experience pack 120.2212.551.0
(Everywhere
<username> is used, replace with the foldername of the actual logged in windows user)
- install Visual Studio 2019 Community Edition (online installer) 16.8.4 with these options
ASP.NET and web development
.NET desktop development
Desktop development with C++
- install git for windows (v 2.30.0-64bit)
All standard options (just keep on clicking next>)
o Start Visual Studio - Continue without code
o From the Visual Studio menu open a developer command prompt
Code: Select all
Tools -> Command Line -> Developer Command Prompt
o Close Visual Studio (keep developer command prompt open)
o In the developer command prompt execute (leave the command prompt open)
Code: Select all
git clone https://github.com/domoticz/domoticz
o Download the
WindowsLibraries.7z from
https://github.com/domoticz/win32-libraries
and extract the contents into the domoticz\msbuild folder so that you have the
path
domoticz\msbuild\Windows Libraries
o In the developer command prompt execute (leave the command prompt open)
Code: Select all
git clone https://github.com/microsoft/vcpkg.git
o In the developer command prompt execute (leave the command prompt open)
o In the developer command prompt execute (leave the command prompt open)
Code: Select all
call bootstrap-vcpkg.bat -disableMetrics
o In the developer command prompt execute (leave the command prompt open)
Code: Select all
set VCPKG_DEFAULT_TRIPLET=x86-windows
o In explorer find the file
domoticz\msbuild\vcpkg-packages.txt copy the contents
and paste it in the next command that must be executed in the developer command
prompt(leave the command prompt open) -
this command may take some time to complete
Code: Select all
vcpkg install [i]<PASTE CONTENT HERE>[/i]
o In the developer command prompt execute the following line (when asked press yes to install)
o Close the developer command prompt
o Open Visual Studio
o From Visual Studio open the domoticz project (
domoticz\msbuild\domoticz.sln)
o Right click the domoticz
project -> properties
- in
Configuration Properties -> Debugging set "
Working Directory" to
- in
Configuration Properties -> Build Events -> Post-Build Event set "
Command Line" to
Code: Select all
copy "$(ProjectDir)Windows Libraries\openzwave\openzwave*.dll" $(OutDir)
o Right click the domoticz project and choose build to build the project. Building ends for me with these lines in the Visual Studio output view
Code: Select all
1> Creating library C:\Users\<username>\source\repos\domoticz\msbuild\Debug\domoticz.lib and object C:\Users\<username>\source\repos\domoticz\msbuild\Debug\domoticz.exp
1>domoticz.vcxproj -> C:\Users\<username>\source\repos\domoticz\msbuild\Debug\domoticz.exe
1>C:\Users\<username>\source\repos\domoticz\msbuild\Windows Libraries\openzwave\OpenZWave.dll
1>C:\Users\<username>\source\repos\domoticz\msbuild\Windows Libraries\openzwave\OpenZWaved.dll
1> 2 file(s) copied.
1>Done building project "domoticz.vcxproj".
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
o Copy the following folders and their contents
C:\Users\<username>\source\repos\domoticz\Config
C:\Users\<username>\source\repos\domoticz\dzVents
C:\Users\<username>\source\repos\domoticz\plugins
C:\Users\<username>\source\repos\domoticz\scripts
C:\Users\<username>\source\repos\domoticz\www
entirly into
C:\Users\<username>\source\repos\domoticz\msbuild\Debug\
o Now you can start domoticz in the
C:\Users\<username>\source\repos\domoticz\msbuild\Debug\ folder
NOTE 1:
For building python3 is not needed. For running, it may be needed to install python3
NOTE 2:
If you test with Microsoft Edge, and URL "
http://localhost:8080" does not work,
Check
https://superuser.com/a/1466252 and if that does not work you can try to open
a cmd prompt with administrator rights and execute the following line
Code: Select all
CheckNetIsolation LoopbackExempt -a -n=Microsoft.Win32WebViewHost_cw5n1h2txyewy
-- Happy Compiling, Happy Debugging --