domoticz: bump to 3.8153
authorStijn Tintel <stijn@linux-ipv6.be>
Mon, 31 Jul 2017 13:23:33 +0000 (15:23 +0200)
committerStijn Tintel <stijn@linux-ipv6.be>
Mon, 31 Jul 2017 14:47:55 +0000 (16:47 +0200)
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
utils/domoticz/Makefile
utils/domoticz/patches/001-Add-sslkey-option-to-allow-separate-cert-key-files-1.patch [deleted file]
utils/domoticz/patches/002-Evohome-updates-to-6708.patch [deleted file]
utils/domoticz/patches/900_fix-build.patch
utils/domoticz/patches/901_no-udev.patch
utils/domoticz/patches/902_add-scripts-path.patch
utils/domoticz/patches/903_disable-libusb.patch

index dc042002971bcb9cc04550ebd7d6e609a4b26dbd..a7871d180d0356d80daa8bff35c860defd150f2f 100644 (file)
@@ -9,13 +9,13 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=domoticz
 PKG_VERSION_MAJOR:=3
-PKG_VERSION_PATCH:=5877
+PKG_VERSION_PATCH:=8153
 PKG_VERSION:=$(PKG_VERSION_MAJOR).$(PKG_VERSION_PATCH)
-PKG_RELEASE:=2
+PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://github.com/domoticz/domoticz/archive/$(PKG_VERSION)/$(PKG_SOURCE)
-PKG_HASH:=fb88edbe428851a7a337a85faa93f6da00713b3ad086ff6957031dc9b3b58bba
+PKG_HASH:=5ea8f37f2ef900e9bd17b1b5375e75bfdec4f09001e3e2e0b647a260989d014c
 
 PKG_LICENSE:=GPL-3.0
 PKG_LICENSE_FILES:=License.txt
@@ -72,12 +72,17 @@ define Build/Prepare
                buienradar_rain_example.pl \
                _domoticz_main.bat \
                download_update.sh \
+               dzVents/{documentation,examples,runtime/{integration-tests,tests}} \
                logrotate/ \
+               lua_parsers/example* \
+               lua/*demo.lua \
                python/ \
                readme.txt \
                restart_domoticz \
                templates/All.Python \
                update_domoticz
+       # Remove *.md
+       cd $(PKG_BUILD_DIR) && $(FIND) -name '*.md' -delete
 endef
 
 define Package/domoticz/install
diff --git a/utils/domoticz/patches/001-Add-sslkey-option-to-allow-separate-cert-key-files-1.patch b/utils/domoticz/patches/001-Add-sslkey-option-to-allow-separate-cert-key-files-1.patch
deleted file mode 100644 (file)
index 3e73465..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-From 2504f02de752aceb5a3c1d4749032147efde8082 Mon Sep 17 00:00:00 2001
-From: dwmw2 <dwmw2@infradead.org>
-Date: Fri, 3 Feb 2017 07:40:35 +0000
-Subject: [PATCH] Add -sslkey option to allow separate cert/key files (#1195)
-
----
- main/domoticz.cpp             | 11 +++++++++++
- webserver/server_settings.hpp |  2 +-
- 2 files changed, 12 insertions(+), 1 deletion(-)
-
---- a/main/domoticz.cpp
-+++ b/main/domoticz.cpp
-@@ -76,6 +76,7 @@ const char *szHelp=
- #ifdef WWW_ENABLE_SSL
-       "\t-sslwww port (for example -sslwww 443, or -sslwww 0 to disable https)\n"
-       "\t-sslcert file_path (for example /opt/domoticz/server_cert.pem)\n"
-+      "\t-sslkey file_path (if different from certificate file)\n"
-       "\t-sslpass passphrase (to access to server private key in certificate)\n"
-       "\t-sslmethod method (for SSL method)\n"
-       "\t-ssloptions options (for SSL options, default is 'default_workarounds,no_sslv2,single_dh_use')\n"
-@@ -682,6 +683,16 @@ int main(int argc, char**argv)
-                       return 1;
-               }
-               secure_webserver_settings.cert_file_path = cmdLine.GetSafeArgument("-sslcert", 0, "");
-+              secure_webserver_settings.private_key_file_path = secure_webserver_settings.cert_file_path;
-+      }
-+      if (cmdLine.HasSwitch("-sslkey"))
-+      {
-+              if (cmdLine.GetArgumentCount("-sslkey") != 1)
-+              {
-+                      _log.Log(LOG_ERROR, "Please specify a file path for your server SSL key file");
-+                      return 1;
-+              }
-+              secure_webserver_settings.private_key_file_path = cmdLine.GetSafeArgument("-sslkey", 0, "");
-       }
-       if (cmdLine.HasSwitch("-sslpass"))
-       {
---- a/webserver/server_settings.hpp
-+++ b/webserver/server_settings.hpp
-@@ -227,7 +227,7 @@ public:
-                       // use certificate file for all usage by default
-                       certificate_chain_file_path = ssl_settings.cert_file_path;
-                       ca_cert_file_path = ssl_settings.cert_file_path;
--                      private_key_file_path = ssl_settings.cert_file_path;
-+                      private_key_file_path = ssl_settings.private_key_file_path;
-                       tmp_dh_file_path = ssl_settings.cert_file_path;
-                       verify_file_path = ssl_settings.cert_file_path;
-               }
diff --git a/utils/domoticz/patches/002-Evohome-updates-to-6708.patch b/utils/domoticz/patches/002-Evohome-updates-to-6708.patch
deleted file mode 100644 (file)
index bf8d6ae..0000000
+++ /dev/null
@@ -1,68 +0,0 @@
-diff --git a/hardware/evohome.cpp b/hardware/evohome.cpp
-index fcbee6d..f77291e 100644
---- a/hardware/evohome.cpp
-+++ b/hardware/evohome.cpp
-@@ -423,11 +423,11 @@ void CEvohome::RunScript(const char *pdata, const unsigned char length)
-                       boost::replace_all(OnAction, "{state}", s_strid.str());
-                       boost::replace_all(OnAction, "{until}", CEvohomeDateTime::GetISODate(tsen->EVOHOME2));
-                       //Execute possible script
--                      std::string scriptname;
--                      if (OnAction.find("script:///") != std::string::npos)
--                              scriptname = OnAction.substr(9);
--                      else
--                              scriptname = OnAction.substr(8);
-+                      std::string scriptname = OnAction.substr(9);
-+#if !defined WIN32
-+                      if (scriptname.find("/") != 0)
-+                              scriptname = szUserDataFolder + "scripts/" + scriptname;
-+#endif
-                       std::string scriptparams="";
-                       //Add parameters
-                       int pindex=scriptname.find(' ');
-@@ -439,7 +439,7 @@ void CEvohome::RunScript(const char *pdata, const unsigned char length)
-                       
-                       if (file_exist(scriptname.c_str()))
-                       {
--                              m_sql.AddTaskItem(_tTaskItem::ExecuteScript(1,scriptname,scriptparams));
-+                              m_sql.AddTaskItem(_tTaskItem::ExecuteScript(0.2f,scriptname,scriptparams));
-                       }
-                       else
-                               _log.Log(LOG_ERROR,"evohome: Error script not found '%s'",scriptname.c_str());
-@@ -1321,7 +1321,7 @@ bool CEvohome::DecodeZoneName(CEvohomeMsg &msg)
-       }
-       if(memcmp(&msg.payload[2],m_szNameErr,18)==0)
-       {
--              Log(true,LOG_STATUS,"evohome: %s: Warning zone name not set: %d", tag, msg.payload[0]);
-+              Log(true,LOG_STATUS,"evohome: %s: Warning zone name not set: %d", tag, msg.payload[0]+1);
-               m_bStartup[0]=false;
-               return true;
-       }
-@@ -1606,9 +1606,11 @@ bool CEvohome::DecodeBatteryInfo(CEvohomeMsg &msg)
-       RFX_SETID3(msg.GetID(0),tsen.EVOHOME2.id1,tsen.EVOHOME2.id2,tsen.EVOHOME2.id3)
-       tsen.EVOHOME2.updatetype = updBattery;
-       
--      double dbCharge=0;
--      if(nBattery!=0xFF)
--              dbCharge=(double)nBattery/2.0; //Presumed to be the charge level where sent
-+      if (nBattery == 0xFF)
-+              nBattery = 100; // recode full battery (0xFF) to 100 for consistency across device types
-+      else
-+              nBattery = nBattery / 2;  // recode battery level values to 0-100 from original 0-200 values
-+
-       if(nLowBat==0)
-               nBattery=0;
-       tsen.EVOHOME2.battery_level=nBattery;
-@@ -1657,9 +1659,11 @@ bool CEvohome::DecodeBatteryInfo(CEvohomeMsg &msg)
-               tsen.EVOHOME2.type=pTypeEvohomeWater;
-               tsen.EVOHOME2.subtype=sTypeEvohomeWater;
-               tsen.EVOHOME2.zone=nDevNo;
--              sDecodeRXMessage(this, (const unsigned char *)&tsen.EVOHOME2, NULL, nBattery);
-+              RFX_SETID3(GetControllerID(), tsen.EVOHOME2.id1, tsen.EVOHOME2.id2, tsen.EVOHOME2.id3); 
-+              sDecodeRXMessage(this, (const unsigned char *)&tsen.EVOHOME2, "DHW Temp", nBattery);  // Update DHW Zone sensor
-       }
--      Log(true,LOG_STATUS,"evohome: %s: %s=%d charge=%d (%.1f %%) level=%d (%s)",tag,szType.c_str(),nDevNo,nBattery,dbCharge,nLowBat,(nLowBat==0)?"Low":"OK");
-+      
-+      Log(true,LOG_STATUS,"evohome: %s: %s=%d charge=%d(%%) level=%d (%s)",tag,szType.c_str(),nDevNo,nBattery,nLowBat,(nLowBat==0)?"Low":"OK");
-       
-       return true;
- }
index 58e3bbb6bffe4f253b89e68388280cbc4dcff0e9..b9fbebdcbfa2c7af51ec256f0f0bf67670bb774e 100644 (file)
@@ -1,6 +1,6 @@
 --- a/CMakeLists.txt
 +++ b/CMakeLists.txt
-@@ -606,8 +606,6 @@ else()
+@@ -645,8 +645,6 @@ else()
    target_link_libraries(domoticz -lrt ${Boost_LIBRARIES} ${ZLIB_LIBRARIES} ${CURL_LIBRARIES} pthread ${LUA_LIBRARIES} ${MQTT_LIBRARIES} ${SQLite_LIBRARIES} ${CMAKE_DL_LIBS} ${TELLDUS_LIBRARIES} ${EXECINFO_LIBRARIES})
  ENDIF()
  
index 7ac6b78f179a9f07f9595b37bd1e734377ce8ac0..0ea9dd9481653498f7714aa4872ba9ac3de07a57 100644 (file)
@@ -1,6 +1,6 @@
 --- a/CMakeLists.txt
 +++ b/CMakeLists.txt
-@@ -534,39 +534,6 @@ IF(OpenZWave)
+@@ -579,39 +579,6 @@ IF(OpenZWave)
    target_link_libraries(domoticz ${OpenZWave})
    include_directories(${CMAKE_SOURCE_DIR}/hardware/openzwave)
    add_definitions(-DWITH_OPENZWAVE)
 -      find_library(UDEV NAMES libudev.a)
 -      IF(UDEV)
 -        message(STATUS ${UDEV})
--        target_link_libraries(domoticz ${UDEV} -lrt)
+-        target_link_libraries(domoticz ${UDEV} -lrt -lresolv)
 -      else()
 -        find_library(UDEV NAMES libudev.so)
 -        IF(UDEV)
 -           message(STATUS ${UDEV})
--           target_link_libraries(domoticz ${UDEV} -lrt)
+-           target_link_libraries(domoticz ${UDEV} -lrt -lresolv)
 -        else()
 -           MESSAGE(FATAL_ERROR "LIB UDEV not found on your system, see install.txt how to get them installed.\nsudo apt-get install libudev-dev")
 -        ENDIF(UDEV)
index 919cfeeea6868ebcb040e2ebabbdae564a9bdf26..031321e91ebde0b1a5f3c9d7ba91a51732310b27 100644 (file)
@@ -1,7 +1,7 @@
 --- a/hardware/OpenZWave.cpp
 +++ b/hardware/OpenZWave.cpp
-@@ -993,7 +993,7 @@ bool COpenZWave::OpenSerialConnector()
-       }
+@@ -948,7 +948,7 @@ bool COpenZWave::OpenSerialConnector()
        m_nodes.clear();
        m_bNeedSave = false;
 -      std::string ConfigPath = szStartupFolder + "Config/";
        {
 --- a/main/EventSystem.cpp
 +++ b/main/EventSystem.cpp
-@@ -44,7 +44,7 @@ extern "C" {
- using namespace boost::python;
+@@ -33,7 +33,7 @@ extern "C" {
  #endif
+ }
  
 -extern std::string szUserDataFolder;
 +extern std::string szScriptsFolder;
+ extern http::server::CWebServerHelper m_webservers;
  
- CEventSystem::CEventSystem(void)
- {
-@@ -1086,9 +1086,9 @@ void CEventSystem::EvaluateEvent(const s
-       std::stringstream lua_DirT;
+ static std::string m_printprefix;
+@@ -149,7 +149,7 @@ void CEventSystem::StartEventSystem()
+       GetCurrentScenesGroups();
+       GetCurrentUserVariables();
+ #ifdef ENABLE_PYTHON
+-    Plugins::PythonEventsInitialize(szUserDataFolder);
++    Plugins::PythonEventsInitialize(szScriptsFolder);
+ #endif
  
+       m_thread = boost::shared_ptr<boost::thread>(new boost::thread(boost::bind(&CEventSystem::Do_Work, this)));
+@@ -181,9 +181,9 @@ void CEventSystem::LoadEvents()
+ {
+       std::string dzv_Dir,s;
  #ifdef WIN32
--      lua_DirT << szUserDataFolder << "scripts\\lua\\";
-+      lua_DirT << szScriptsFolder << "lua\\";
+-      dzv_Dir = szUserDataFolder + "scripts\\dzVents\\generated_scripts\\";
++      dzv_Dir = szScriptsFolder + "dzVents\\generated_scripts\\";
  #else
--      lua_DirT << szUserDataFolder << "scripts/lua/";
-+      lua_DirT << szScriptsFolder << "lua/";
+-      dzv_Dir = szUserDataFolder + "scripts/dzVents/generated_scripts/";
++      dzv_Dir = szScriptsFolder + "dzVents/generated_scripts/";
  #endif
-       std::string lua_Dir = lua_DirT.str();
-@@ -1139,9 +1139,9 @@ void CEventSystem::EvaluateEvent(const s
-       {
-               std::stringstream python_DirT;
+       boost::unique_lock<boost::shared_mutex> eventsMutexLock(m_eventsMutex);
+       _log.Log(LOG_STATUS, "EventSystem: reset all events...");
+@@ -274,18 +274,18 @@ void CEventSystem::LoadEvents()
+ void CEventSystem::Do_Work()
+ {
  #ifdef WIN32
--              python_DirT << szUserDataFolder << "scripts\\python\\";
-+              python_DirT << szScriptsFolder << "python\\";
+-      m_lua_Dir = szUserDataFolder + "scripts\\lua\\";
+-      m_dzv_Dir = szUserDataFolder + "scripts\\dzVents\\runtime\\";
++      m_lua_Dir = szScriptsFolder + "lua\\";
++      m_dzv_Dir = szScriptsFolder + "dzVents\\runtime\\";
  #else
--              python_DirT << szUserDataFolder << "scripts/python/";
-+              python_DirT << szScriptsFolder << "python/";
+-      m_lua_Dir = szUserDataFolder + "scripts/lua/";
+-      m_dzv_Dir = szUserDataFolder + "scripts/dzVents/runtime/";
++      m_lua_Dir = szScriptsFolder + "lua/";
++      m_dzv_Dir = szScriptsFolder + "dzVents/runtime/";
  #endif
  
-               std::string python_Dir = python_DirT.str();
-@@ -2021,7 +2021,7 @@ bool CEventSystem::parseBlocklyActions(c
+ #ifdef ENABLE_PYTHON
+ #ifdef WIN32
+-      m_python_Dir = szUserDataFolder + "scripts\\python\\";
++      m_python_Dir = szScriptsFolder + "python\\";
+ #else
+-      m_python_Dir = szUserDataFolder + "scripts/python/";
++      m_python_Dir = szScriptsFolder + "python/";
+ #endif
+ #endif
+       m_stoprequested = false;
+@@ -1426,9 +1426,9 @@ void CEventSystem::EvaluateEvent(const s
+               {
+                       std::string dzv_scripts;
+ #ifdef WIN32
+-                      dzv_scripts = szUserDataFolder + "scripts\\dzVents\\scripts\\";
++                      dzv_scripts = szScriptsFolder + "dzVents\\scripts\\";
+ #else
+-                      dzv_scripts = szUserDataFolder + "scripts/dzVents/scripts/";
++                      dzv_scripts = szScriptsFolder + "dzVents/scripts/";
+ #endif
+                       DirectoryListing(FileEntries, dzv_scripts, false, true);
+                       for (itt = FileEntries.begin(); itt != FileEntries.end(); ++itt)
+@@ -2404,7 +2404,7 @@ bool CEventSystem::parseBlocklyActions(c
                        }
  #if !defined WIN32
                        if (sPath.find("/") != 0)
 +                              sPath = szScriptsFolder + sPath;
  #endif
  
-                       m_sql.AddTaskItem(_tTaskItem::ExecuteScript(1, sPath, sParam));
-@@ -2133,9 +2133,9 @@ void CEventSystem::EvaluatePython(const
-       std::stringstream python_DirT;
+                       m_sql.AddTaskItem(_tTaskItem::ExecuteScript(0.2f, sPath, sParam));
+@@ -3508,11 +3508,11 @@ void CEventSystem::EvaluateLua(const std
+               {
+                       std::stringstream lua_DirT;
  
+-                      lua_DirT << szUserDataFolder <<
++                      lua_DirT << szScriptsFolder <<
  #ifdef WIN32
--      python_DirT << szUserDataFolder << "scripts\\python\\";
-+      python_DirT << szScriptsFolder << "python\\";
+-                      "scripts\\dzVents\\";
++                      "dzVents\\";
  #else
--      python_DirT << szUserDataFolder << "scripts/python/";
-+      python_DirT << szScriptsFolder << "python/";
+-                      "scripts/dzVents/";
++                      "dzVents/";
  #endif
-       std::string python_Dir = python_DirT.str();
-       if(!Py_IsInitialized()) {
-@@ -3909,9 +3909,9 @@ namespace http {
+                       lua_pushstring(lua_state, "script_path");
+@@ -4695,9 +4695,9 @@ namespace http {
  
                                std::stringstream template_file;
  #ifdef WIN32
 -extern std::string szUserDataFolder;
 +extern std::string szScriptsFolder;
  
- int CLuaHandler::l_domoticz_applyXPath(lua_State* lua_state)
+ int CLuaHandler::l_domoticz_updateDevice(lua_State* lua_state)
  {
-@@ -319,9 +319,9 @@ bool CLuaHandler::executeLuaScript(const
+@@ -155,9 +155,9 @@ bool CLuaHandler::executeLuaScript(const
  {
        std::stringstream lua_DirT;
  #ifdef WIN32
  
 --- a/main/SQLHelper.cpp
 +++ b/main/SQLHelper.cpp
-@@ -612,6 +612,7 @@ const char *sqlCreateMobileDevices =
+@@ -633,6 +633,7 @@ const char *sqlCreateMobileDevices =
  "[LastUpdate] DATETIME DEFAULT(datetime('now', 'localtime'))"
  ");";
  
  extern std::string szUserDataFolder;
  
  CSQLHelper::CSQLHelper(void)
-@@ -3408,9 +3409,9 @@ unsigned long long CSQLHelper::UpdateVal
+@@ -3683,9 +3684,9 @@ uint64_t CSQLHelper::UpdateValueInt(cons
                                //Execute possible script
                                std::string scriptname;
  #ifdef WIN32
  #endif
                                if (file_exist(scriptname.c_str()))
                                {
-@@ -6460,7 +6461,7 @@ bool CSQLHelper::HandleOnOffAction(const
+@@ -6641,7 +6642,7 @@ bool CSQLHelper::HandleOnOffAction(const
                        std::string scriptname = OnAction.substr(9);
  #if !defined WIN32
                        if (scriptname.find("/") != 0)
  #endif
                        std::string scriptparams="";
                        //Add parameters
-@@ -6492,7 +6493,7 @@ bool CSQLHelper::HandleOnOffAction(const
-                       std::string scriptname = OffAction.substr(9);
+@@ -6675,7 +6676,7 @@ bool CSQLHelper::HandleOnOffAction(const
+               std::string scriptname = OffAction.substr(9);
  #if !defined WIN32
-                       if (scriptname.find("/") != 0)
--                              scriptname = szUserDataFolder + "scripts/" + scriptname;
-+                              scriptname = szScriptsFolder + scriptname;
+               if (scriptname.find("/") != 0)
+-                      scriptname = szUserDataFolder + "scripts/" + scriptname;
++                      scriptname = szScriptsFolder + scriptname;
  #endif
-                       std::string scriptparams="";
-                       int pindex=scriptname.find(' ');
+               std::string scriptparams = "";
+               int pindex = scriptname.find(' ');
 --- a/main/WebServer.cpp
 +++ b/main/WebServer.cpp
-@@ -55,6 +55,7 @@
+@@ -59,6 +59,7 @@
  
  #define round(a) ( int ) ( a + .5 )
  
  extern std::string szUserDataFolder;
  extern std::string szWWWFolder;
  
-@@ -2614,9 +2615,9 @@ namespace http {
+@@ -2987,9 +2988,9 @@ namespace http {
                        if (scriptname.find("..") != std::string::npos)
                                return;
  #ifdef WIN32
                                return;
 --- a/main/domoticz.cpp
 +++ b/main/domoticz.cpp
-@@ -135,6 +135,7 @@ static const _facilities facilities[] =
+@@ -136,6 +136,7 @@ static const _facilities facilities[] =
  }; 
  std::string logfacname = "user";
  #endif
  std::string szStartupFolder;
  std::string szUserDataFolder;
  std::string szWWWFolder;
-@@ -603,6 +604,19 @@ int main(int argc, char**argv)
+@@ -696,6 +697,19 @@ int main(int argc, char**argv)
                        szUserDataFolder = szroot;
        }
  
                if (cmdLine.GetArgumentCount("-startupdelay") != 1)
 --- a/main/mainworker.cpp
 +++ b/main/mainworker.cpp
-@@ -139,6 +139,7 @@
+@@ -159,6 +159,7 @@
  
  #define round(a) ( int ) ( a + .5 )
  
  extern std::string szStartupFolder;
  extern std::string szUserDataFolder;
  extern std::string szWWWFolder;
-@@ -1394,8 +1395,8 @@ void MainWorker::Do_Work()
+@@ -1473,8 +1474,8 @@ void MainWorker::Do_Work()
                        m_sql.GetPreferencesVar("ReleaseChannel", nValue);
                        bool bIsBetaChannel = (nValue != 0);
  
  
  CNotificationHTTP::CNotificationHTTP() : CNotificationBase(std::string("http"), OPTIONS_NONE)
  {
-@@ -97,7 +97,7 @@ bool CNotificationHTTP::SendMessageImple
+@@ -105,7 +105,7 @@ bool CNotificationHTTP::SendMessageImple
                std::string scriptparams = "";
  #if !defined WIN32
                if (scriptname.find("/") != 0)
                uPos = scriptname.find(" ");
 --- a/push/GooglePubSubPush.cpp
 +++ b/push/GooglePubSubPush.cpp
-@@ -20,7 +20,7 @@ extern "C" {
+@@ -22,7 +22,7 @@ extern "C" {
  using namespace boost::python;
  #endif
  
  
  // this should be filled in by the preprocessor
  extern const char * Python_exe;
-@@ -222,11 +222,11 @@ void CGooglePubSubPush::DoGooglePubSubPu
+@@ -231,11 +231,11 @@ void CGooglePubSubPush::DoGooglePubSubPu
  
- #ifdef ENABLE_PYTHON
+ #ifdef ENABLE_PYTHON_DECAP
  #ifdef WIN32
 -                              python_DirT << szUserDataFolder << "scripts\\python\\";
 -                              std::string filename = szUserDataFolder + "scripts\\python\\" + "googlepubsub.py";
 +                              std::string filename = szScriptsFolder + "python/" + "googlepubsub.py";
  #endif
  
-                               char * argv[1];
+                               wchar_t * argv[1];
+--- a/hardware/EvohomeScript.cpp
++++ b/hardware/EvohomeScript.cpp
+@@ -30,7 +30,7 @@
+ #include <string>
+-extern std::string szUserDataFolder;
++extern std::string szScriptsFolder;
+ CEvohomeScript::CEvohomeScript(const int ID)
+@@ -143,7 +143,7 @@ void CEvohomeScript::RunScript(const cha
+                       std::string scriptname = OnAction.substr(9);
+ #if !defined WIN32
+                       if (scriptname.find("/") != 0)
+-                              scriptname = szUserDataFolder + "scripts/" + scriptname;
++                              scriptname = szScriptsFolder + "scripts/" + scriptname;
+ #endif
+                       std::string scriptparams="";
+                       //Add parameters
+--- a/main/EventsPythonModule.cpp
++++ b/main/EventsPythonModule.cpp
+@@ -108,7 +108,7 @@
+         
+         int PythonEventsInitalized = 0;
+-        bool PythonEventsInitialize(std::string szUserDataFolder) {
++        bool PythonEventsInitialize(std::string szScriptsFolder) {
+             
+             if (!Plugins::Py_LoadLibrary())
+             {
+@@ -131,9 +131,9 @@
+             
+             std::string ssPath;
+ #ifdef WIN32
+-            ssPath  = szUserDataFolder + "scripts\\python\\;";
++            ssPath  = szScriptsFolder + "python\\;";
+ #else
+-            ssPath  = szUserDataFolder + "scripts/python/:";
++            ssPath  = szScriptsFolder + "python/:";
+ #endif
+             
+             std::wstring sPath = std::wstring(ssPath.begin(), ssPath.end());
index 4e788f859ded1dc672f55e4f3034da223eaadcfa..f4f03c3dbec13bb4fbee07da223c054d4e2cb12a 100644 (file)
@@ -1,6 +1,6 @@
 --- a/CMakeLists.txt
 +++ b/CMakeLists.txt
-@@ -476,20 +476,23 @@ else()
+@@ -521,20 +521,23 @@ else()
    MESSAGE(FATAL_ERROR "cURL not found on your system, see install.txt how to get them installed. (for example 'sudo apt-get install curl libcurl4-openssl-dev')")
  ENDIF(CURL_FOUND)