aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorToni Uhlig <Toni.Uhlig@tq-group.com>2017-12-09 18:55:37 +0100
committerToni Uhlig <Toni.Uhlig@tq-group.com>2017-12-09 18:57:59 +0100
commitb79ded84b55e46e79f9df6265fdb204dd33ef186 (patch)
tree21b87b603a69b179490b6c892034d0a77072b88f
parent727b7ea4d42233ab2fa321ebca36f7a48febda58 (diff)
GUI support for License Agreement/Display
-rw-r--r--src/UpdateGUI.cpp158
-rw-r--r--src/UpdateGUI.hpp29
-rw-r--r--src/license.h450
3 files changed, 411 insertions, 226 deletions
diff --git a/src/UpdateGUI.cpp b/src/UpdateGUI.cpp
index 93791be..20dee20 100644
--- a/src/UpdateGUI.cpp
+++ b/src/UpdateGUI.cpp
@@ -3,12 +3,14 @@
#endif
#include "UpdateGUI.hpp"
#include "JobQueue.hpp"
+#include "license.h"
#include <iostream>
#include <iomanip>
#include <tuple>
#include <chrono>
#include <ctime>
+
#include <wx/aboutdlg.h>
#include <wx/msgdlg.h>
@@ -18,6 +20,7 @@ wxBEGIN_EVENT_TABLE(UpdateGUIFrame, wxFrame)
EVT_MENU(wxID_EXIT, UpdateGUIFrame::OnExit)
EVT_MENU(wxID_ABOUT, UpdateGUIFrame::OnAbout)
+ EVT_MENU(wxID_LICENSE, UpdateGUIFrame::OnLicense)
EVT_MENU(wxID_EDITOR, UpdateGUIFrame::OnEditor)
EVT_MENU(wxID_UPDATEFILE, UpdateGUIFrame::OnUpdateFile)
EVT_MENU(wxID_IMPORTCSV, UpdateGUIFrame::OnImportCSV)
@@ -32,12 +35,25 @@ wxBEGIN_EVENT_TABLE(UpdateGUIFrame, wxFrame)
EVT_COMMAND(wxID_ANY, wxEVT_THREAD, UpdateGUIFrame::OnThread)
wxEND_EVENT_TABLE()
+wxBEGIN_EVENT_TABLE(UpdateGUILicense, wxFrame)
+ EVT_CLOSE(UpdateGUILicense::OnClose)
+
+ EVT_BUTTON(wxID_ACCEPT, UpdateGUILicense::OnAccept)
+ EVT_BUTTON(wxID_DECLINE, UpdateGUILicense::OnDecline)
+wxEND_EVENT_TABLE()
+
bool UpdateGUI::OnInit()
{
- UpdateGUIFrame *frame = new UpdateGUIFrame("UpdateTool",
- wxPoint(50, 50), wxSize(450, 340));
- frame->Show(true);
+ if (isLicenseAlreadyAccepted()) {
+ UpdateGUIFrame *frame = new UpdateGUIFrame("UpdateTool",
+ wxPoint(50, 50), wxSize(450, 340));
+ frame->Show(true);
+ } else {
+ UpdateGUILicense *frame = new UpdateGUILicense(nullptr, "UpdateTool - LICENSE",
+ wxPoint(50, 50), wxSize(450, 340), true);
+ frame->Show(true);
+ }
return true;
}
@@ -69,6 +85,9 @@ UpdateGUIFrame::UpdateGUIFrame(const wxString& title, const wxPoint& pos, const
wxMenu *menuHelp = new wxMenu;
menuHelp->Append(wxID_ABOUT);
+ menuHelp->Append(wxID_LICENSE,
+ "&License ...\tCtrl-L",
+ "Show the corresponding Software License");
wxMenuBar *menuBar = new wxMenuBar;
menuBar->Append(menuFile, "&File");
@@ -108,6 +127,9 @@ UpdateGUIFrame::UpdateGUIFrame(const wxString& title, const wxPoint& pos, const
this, wxID_EDITOR, wxEmptyString, wxDefaultPosition,
wxDefaultSize, wxTE_MULTILINE | wxTE_READONLY | wxTE_RICH2
);
+#ifdef WIN32
+ logText->HideNativeCaret();
+#endif
logBox->Add(logText, 1, wxEXPAND|wxALL, 5);
mainVSizer->Add(ipBox, 0, wxEXPAND|wxALL|wxTOP, 5);
@@ -179,11 +201,6 @@ void UpdateGUIFrame::OnClose(wxCloseEvent& event)
}
if (!threads.empty()) return;
- for (auto *p : {ipEntry,pwEntry,imgEntry,logText}) { p->Destroy(); }
- imgButton->Destroy();
- subButton->Destroy();
- for (auto *p : {ipBox,pwBox,imgBox,subBox,logBox}) { p->Clear(); }
- mainVSizer->Clear();
Destroy();
}
@@ -209,6 +226,14 @@ void UpdateGUIFrame::OnAbout(wxCommandEvent& event)
wxAboutBox(aboutInfo, this);
}
+void UpdateGUIFrame::OnLicense(wxCommandEvent& event)
+{
+ UpdateGUILicense *frame = new UpdateGUILicense(this, "UpdateTool - LICENSE",
+ wxPoint(50, 50), wxSize(450, 340),
+ false);
+ frame->Show(true);
+}
+
void UpdateGUIFrame::OnEditor(wxCommandEvent& event)
{
/* StatusLog Events: not used atm */
@@ -404,3 +429,120 @@ void UpdateGUIFrame::OnThread(wxCommandEvent& event)
jobTimings.clear();
}
}
+
+#define LICENSE_FILENAME "utool_license_accepted"
+static const std::wstring licenses(ALL_LICENSES);
+
+#ifdef WIN32
+static DWORD buildLicensePathWin(TCHAR *pathBuf, DWORD pathLen)
+{
+ DWORD len;
+
+ memset(pathBuf, 0, sizeof(TCHAR) * pathLen);
+ len = GetTempPath(pathLen, pathBuf);
+ if (len > 0) {
+ wcsncat(pathBuf, _T(LICENSE_FILENAME), pathLen - len);
+ }
+ return len;
+}
+#endif
+
+bool isLicenseAlreadyAccepted()
+{
+#ifdef WIN32
+ TCHAR path[MAX_PATH];
+
+ if (buildLicensePathWin(&path[0], MAX_PATH) > 0) {
+ if (_waccess(path, R_OK) == 0) {
+ std::wcerr << std::wstring(&path[0])
+ << ": License already accepted!" << std::endl;
+ return true;
+ } else {
+ std::wcerr << std::wstring(&path[0])
+ << ": License NOT accepted!" << std::endl;
+ }
+ }
+ return false;
+#else
+ return false;
+#endif
+}
+
+static void setLicenseAccepted()
+{
+#ifdef WIN32
+ FILE *lf;
+ TCHAR path[MAX_PATH];
+
+ if (buildLicensePathWin(&path[0], MAX_PATH) > 0) {
+ lf = _wfopen(path, _T("w+t"));
+ if (lf)
+ fclose(lf);
+ }
+#endif
+}
+
+UpdateGUILicense::UpdateGUILicense(wxWindow *parent, const wxString& title,
+ const wxPoint& pos, const wxSize& size,
+ bool showButtons)
+ : wxFrame(parent, wxID_ANY, title, pos, size)
+{
+ SetBackgroundColour(wxColour(220, 220, 220));
+#ifdef WIN32
+ SetIcon(wxICON(APPICON));
+#endif
+ mainVSizer = new wxBoxSizer(wxVERTICAL);
+ licBox = new wxStaticBoxSizer(wxHORIZONTAL, this, "License");
+ if (showButtons)
+ btnBox = new wxStaticBoxSizer(wxHORIZONTAL, this);
+
+ licText = new wxTextCtrl(this, -1, wxEmptyString, wxDefaultPosition,
+ wxDefaultSize,
+ wxEXPAND | wxTE_MULTILINE | wxTE_READONLY | wxTE_RICH2);
+ if (showButtons) {
+ acceptButton = new wxButton(this, wxID_ACCEPT, wxT("Accept"));
+ declineButton = new wxButton(this, wxID_DECLINE, wxT("Decline"));
+ }
+
+ licBox->Add(licText, 1, wxEXPAND|wxALL, 5);
+ if (showButtons) {
+ btnBox->AddStretchSpacer();
+ btnBox->Add(acceptButton, 0, wxALL, 5);
+ btnBox->Add(declineButton, 0, wxALL, 5);
+ btnBox->AddStretchSpacer();
+ }
+
+ mainVSizer->Add(licBox, 1, wxEXPAND|wxALL, 5);
+ if (showButtons)
+ mainVSizer->Add(btnBox, 0, wxEXPAND|wxALL|wxBOTTOM, 5);
+
+ SetSizerAndFit(mainVSizer);
+ SetInitialSize(wxSize(600, 800));
+ Centre();
+
+ licText->AppendText(licenses);
+ licText->ShowPosition(0);
+ licText->SetSelection(0, 0);
+#ifdef WIN32
+ licText->HideNativeCaret();
+#endif
+}
+
+void UpdateGUILicense::OnClose(wxCloseEvent& event)
+{
+ Destroy();
+}
+
+void UpdateGUILicense::OnAccept(wxCommandEvent& event)
+{
+ setLicenseAccepted();
+ UpdateGUIFrame *frame = new UpdateGUIFrame("UpdateTool",
+ wxPoint(50, 50), wxSize(450, 340));
+ frame->Show(true);
+ Destroy();
+}
+
+void UpdateGUILicense::OnDecline(wxCommandEvent& event)
+{
+ _exit(0);
+}
diff --git a/src/UpdateGUI.hpp b/src/UpdateGUI.hpp
index 6f34bbf..ab369af 100644
--- a/src/UpdateGUI.hpp
+++ b/src/UpdateGUI.hpp
@@ -16,9 +16,13 @@
enum LogType { RTL_DEFAULT, RTL_GREEN, RTL_RED };
enum {
+ /* UpdateGUIFrame */
wxID_EDITOR = wxID_HIGHEST + 1,
wxID_IP, wxID_PW, wxID_IMG,
- wxID_UPDATEFILE, wxID_IMPORTCSV, wxID_DOUPDATE
+ wxID_UPDATEFILE, wxID_IMPORTCSV, wxID_DOUPDATE,
+ wxID_LICENSE,
+ /* UpdateGUILicense */
+ wxID_ACCEPT, wxID_DECLINE
};
class UpdateGUI : public wxApp
@@ -43,6 +47,7 @@ private:
void OnClose(wxCloseEvent& event);
void OnExit(wxCommandEvent& event);
void OnAbout(wxCommandEvent& event);
+ void OnLicense(wxCommandEvent& event);
void OnEditor(wxCommandEvent& event);
void OnUpdateFile(wxCommandEvent& event);
void OnImportCSV(wxCommandEvent& event);
@@ -64,4 +69,26 @@ private:
std::list<int> threads;
};
+bool isLicenseAlreadyAccepted();
+
+class UpdateGUILicense: public wxFrame
+{
+public:
+ UpdateGUILicense(wxWindow *parent, const wxString& title,
+ const wxPoint& pos, const wxSize& size,
+ bool showButtons = true);
+ ~UpdateGUILicense() {}
+private:
+ void OnClose(wxCloseEvent& event);
+ void OnAccept(wxCommandEvent& event);
+ void OnDecline(wxCommandEvent& event);
+
+ wxDECLARE_EVENT_TABLE();
+
+ wxBoxSizer *mainVSizer;
+ wxStaticBoxSizer *licBox, *btnBox;
+ wxButton *acceptButton, *declineButton;
+ wxTextCtrl *licText;
+};
+
#endif
diff --git a/src/license.h b/src/license.h
index a1b3db4..6734daa 100644
--- a/src/license.h
+++ b/src/license.h
@@ -1,225 +1,241 @@
+/*
+ * File: ./src/license.h
+ * Generated by: gen_license_include.sh [user: toni]
+ *
+ * Autogenerated license pre-processor macro from ./COPYING
+ * Remember to use std::wstring instead of std::string
+ * for ALL_LICENSES (contains non-ASCII characters).
+ */
#ifndef LICENSE_H
#define LICENSE_H 1
#define ALL_LICENSES \
-"TQ-Systems Software License Agreement Version 1.0.1\n" \
-"\n" \
-"Copyright 2017 The TQ-Systems GmbH (TQ), D-82229 Seefeld. All Rights Reserved.\n" \
-"Permission to copy and distribute verbatim copies of this document is granted.\n" \
-"\n" \
-"The software license is bound to the usage of the TQ-Systems hardware.\n" \
-"The software is classified as product-specific software.\n" \
-"The software is provided exclusively in machine-readable form (object code)\n" \
-"\n" \
-"§1 Scope of Use and Usage Period\n" \
-"1. The rights to the TQ software – particularly the copyright as well as other\n" \
-"additional industrial property rights – remain exclusively with TQ and TQ is\n" \
-"entitled to them even in the event that the software was modified by you or\n" \
-"your company.\n" \
-"Apart from any expressly allowed duplication or transmission of the software\n" \
-"you are prohibited from using this software in a manner not in line with\n" \
-"this agreement.\n" \
-"2. The usage right only applies to the use of the software in direct\n" \
-"conjunction with the TQ-Systems hardware (product).\n" \
-"You are prohibited from using the software developed by us even without the\n" \
-"product in conjunction with other products.\n" \
-"Any transfer to third parties shall be bound by the provisions of this\n" \
-"agreement.\n" \
-"3. You are obligated to report any action which does not require approval in\n" \
-"terms of German Copyright Law (UrhG) to TQ in writing.\n" \
-"Outside of the scope of the cases indicated in German Copyright Law (UrhG),\n" \
-"you are not entitled to modify, reverse engineer or translate the software\n" \
-"or to remove components from it.\n" \
-"4. Each use of the software which goes beyond the scope of the previous\n" \
-"provision requires our written approval.\n" \
-"5. The right to assert damage claims is still reserved.\n" \
-"6. You are only authorized to sub-license the software in direct conjunction\n" \
-"with the TQ-Systems hardware (product).\n" \
-"7. You must also ensure that no more additional rights to the software are\n" \
-"granted to the third party than those to which you are entitled based on\n" \
-"this agreement.\n" \
-"8. In the event of a transfer of rights, you are obligated to transfer the\n" \
-"software and to destroy not transferred copies.\n" \
-"\n" \
-"§2 Warranty; Liability\n" \
-"1. We make explicit reference to the fact that it is not possible with the\n" \
-"current state of the art to develop more complex software in such a way\n" \
-"that error-free function is guaranteed under all application conditions.\n" \
-"We therefore only assume liability in ensuring that the supplied software\n" \
-"is suitable based on the description created or accepted by TQ on proper\n" \
-"usage under the terms of this agreement.\n" \
-"2. In the event of major and reproducible deviations of the software\n" \
-"functionality from the product description or specification, we are\n" \
-"entitled to choose to either refund the purchase price paid by you or\n" \
-"to provide a subsequent performance in the form of a repair within a\n" \
-"reasonable period of time or to provide a replacement shipment of the\n" \
-"product.\n" \
-"If, as part of the subsequent performance we have chosen by providing\n" \
-"an error-free update or upgrade of the software, we do not succeed in\n" \
-"remedying the major deviations in the software functionality which have\n" \
-"occurred or to find a work-around in a reasonable period of time which\n" \
-"allows you to properly use the software under the terms of this agreement,\n" \
-"you can request a discount for the stipulated compensation or to withdraw\n" \
-"from the agreement.\n" \
-"Claims of you which go beyond this scope are excluded, if permitted by law.\n" \
-"3. We do not assume any liability for minor deviations in the functionality of\n" \
-"the software from the product description or specification.\n" \
-"4. The warranty is for one year in so far as no longer warranty period is\n" \
-"required by law and begins with the acceptance of the software by you or\n" \
-"- if a formal acceptance is not planned or does not occur –\n" \
-"after two weeks following the transfer at the latest.\n" \
-"5. We provide no warranty and assume no liability beyond the scope of usage as\n" \
-"mentioned §1 for the correct selection, application and use of the software.\n" \
-"6. This particularly applies in the event of culpable use of unsuitable, in\n" \
-"particular non-compatible hardware or data processing programs,\n" \
-"modifications or enhancements of the software performed by you or by your\n" \
-"request, culpable failure to perform regular data back-up and to other cases\n" \
-"of culpable or negligent handling by you. If you should use the software\n" \
-"outside of the stipulated scope of application, all warranty obligations and\n" \
-"other liability are rendered invalid.\n" \
-"7. The afore mentioned warranty or liability restrictions do not apply\n" \
-"in instances of injuries affecting life, limb and health, liability covered\n" \
-"under the scope of the Product Liability Law (Produkthaftungsgesetz),\n" \
-"if a promised characteristic or guaranteed composition is lacking in the\n" \
-"software or we assume culpability in the form of malicious intent or gross\n" \
-"negligence.\n" \
-"\n" \
-"§3. Additional conditions\n" \
-"1. Redistributions must contain a verbatim copy of this document.\n" \
-"2. The TQ-Systems may revise this license from time to time.\n" \
-"Each revision is distinguished by a version number.\n" \
-"You may use this Software under terms of this license revision or\n" \
-"under the terms of any subsequent revision of the license.\n" \
-"\n" \
-"\n" \
-" wxWindows Library Licence, Version 3.1\n" \
-" ======================================\n" \
-"\n" \
-" Copyright (c) 1998-2005 Julian Smart, Robert Roebling et al\n" \
-"\n" \
-" Everyone is permitted to copy and distribute verbatim copies\n" \
-" of this licence document, but changing it is not allowed.\n" \
-"\n" \
-" WXWINDOWS LIBRARY LICENCE\n" \
-" TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION\n" \
-"\n" \
-" This library is free software; you can redistribute it and/or modify it\n" \
-" under the terms of the GNU Library General Public Licence as published by\n" \
-" the Free Software Foundation; either version 2 of the Licence, or (at\n" \
-" your option) any later version.\n" \
-"\n" \
-" This library is distributed in the hope that it will be useful, but\n" \
-" WITHOUT ANY WARRANTY; without even the implied warranty of\n" \
-" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library\n" \
-" General Public Licence for more details.\n" \
-"\n" \
-" You should have received a copy of the GNU Library General Public Licence\n" \
-" along with this software, usually in a file named COPYING.LIB. If not,\n" \
-" write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n" \
-" Boston, MA 02110-1301 USA.\n" \
-"\n" \
-" EXCEPTION NOTICE\n" \
-"\n" \
-" 1. As a special exception, the copyright holders of this library give\n" \
-" permission for additional uses of the text contained in this release of\n" \
-" the library as licenced under the wxWindows Library Licence, applying\n" \
-" either version 3.1 of the Licence, or (at your option) any later version of\n" \
-" the Licence as published by the copyright holders of version\n" \
-" 3.1 of the Licence document.\n" \
-"\n" \
-" 2. The exception is that you may use, copy, link, modify and distribute\n" \
-" under your own terms, binary object code versions of works based\n" \
-" on the Library.\n" \
-"\n" \
-" 3. If you copy code from files distributed under the terms of the GNU\n" \
-" General Public Licence or the GNU Library General Public Licence into a\n" \
-" copy of this library, as this licence permits, the exception does not\n" \
-" apply to the code that you add in this way. To avoid misleading anyone as\n" \
-" to the status of such modified files, you must delete this exception\n" \
-" notice from such code and/or adjust the licensing conditions notice\n" \
-" accordingly.\n" \
-"\n" \
-" 4. If you write modifications of your own for this library, it is your\n" \
-" choice whether to permit this exception to apply to your modifications.\n" \
-" If you do not wish that, you must delete the exception notice from such\n" \
-" code and/or adjust the licensing conditions notice accordingly.\n" \
-"\n" \
-"\n" \
-"Copyright (c) 2015, ben-strasser\n" \
-"All rights reserved.\n" \
-"\n" \
-"Redistribution and use in source and binary forms, with or without\n" \
-"modification, are permitted provided that the following conditions are met:\n" \
-"\n" \
-"* Redistributions of source code must retain the above copyright notice, this\n" \
-" list of conditions and the following disclaimer.\n" \
-"\n" \
-"* Redistributions in binary form must reproduce the above copyright notice,\n" \
-" this list of conditions and the following disclaimer in the documentation\n" \
-" and/or other materials provided with the distribution.\n" \
-"\n" \
-"* Neither the name of fast-cpp-csv-parser nor the names of its\n" \
-" contributors may be used to endorse or promote products derived from\n" \
-" this software without specific prior written permission.\n" \
-"\n" \
-"THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n" \
-"AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n" \
-"IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n" \
-"DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE\n" \
-"FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n" \
-"DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\n" \
-"SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\n" \
-"CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\n" \
-"OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n" \
-"OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n" \
-"\n" \
-"\n" \
-"Boost Software License - Version 1.0 - August 17th, 2003\n" \
-"\n" \
-"Permission is hereby granted, free of charge, to any person or organization\n" \
-"obtaining a copy of the software and accompanying documentation covered by\n" \
-"this license (the \"Software\") to use, reproduce, display, distribute,\n" \
-"execute, and transmit the Software, and to prepare derivative works of the\n" \
-"Software, and to permit third-parties to whom the Software is furnished to\n" \
-"do so, all subject to the following:\n" \
-"\n" \
-"The copyright notices in the Software and this entire statement, including\n" \
-"the above license grant, this restriction and the following disclaimer,\n" \
-"must be included in all copies of the Software, in whole or in part, and\n" \
-"all derivative works of the Software, unless such copies or derivative\n" \
-"works are solely in the form of machine-executable object code generated by\n" \
-"a source language processor.\n" \
-"\n" \
-"THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n" \
-"IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n" \
-"FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT\n" \
-"SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE\n" \
-"FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,\n" \
-"ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\n" \
-"DEALINGS IN THE SOFTWARE.\n" \
-"\n" \
-"\n" \
-"Copyright (c) 2013 Dropbox, Inc.\n" \
-"\n" \
-"Permission is hereby granted, free of charge, to any person obtaining a copy\n" \
-"of this software and associated documentation files (the \"Software\"), to deal\n" \
-"in the Software without restriction, including without limitation the rights\n" \
-"to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n" \
-"copies of the Software, and to permit persons to whom the Software is\n" \
-"furnished to do so, subject to the following conditions:\n" \
-"\n" \
-"The above copyright notice and this permission notice shall be included in\n" \
-"all copies or substantial portions of the Software.\n" \
-"\n" \
-"THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n" \
-"IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n" \
-"FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n" \
-"AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n" \
-"LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n" \
-"OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n" \
-"THE SOFTWARE.\n" \
-""
+L"Preamble to TQ-Systems Software License Agreement\n" \
+L"This software \"EM Update Tool\" must be used only when updating\n" \
+L"TQ-Systems Energy Managers Devices\n" \
+L"product-specific: B-control Energy Manager, Siemens Datamanager\n" \
+L"\n" \
+L"*****************************************************************************\n" \
+L"\n" \
+L"\n" \
+L"TQ-Systems Software License Agreement Version 1.0.1\n" \
+L"\n" \
+L"Copyright 2017 The TQ-Systems GmbH (TQ), D-82229 Seefeld. All Rights Reserved.\n" \
+L"Permission to copy and distribute verbatim copies of this document is granted.\n" \
+L"\n" \
+L"The software license is bound to the usage of the TQ-Systems hardware.\n" \
+L"The software is classified as product-specific software.\n" \
+L"The software is provided exclusively in machine-readable form (object code)\n" \
+L"\n" \
+L"§1 Scope of Use and Usage Period\n" \
+L"1. The rights to the TQ software – particularly the copyright as well as other\n" \
+L"additional industrial property rights – remain exclusively with TQ and TQ is\n" \
+L"entitled to them even in the event that the software was modified by you or\n" \
+L"your company.\n" \
+L"Apart from any expressly allowed duplication or transmission of the software\n" \
+L"you are prohibited from using this software in a manner not in line with\n" \
+L"this agreement.\n" \
+L"2. The usage right only applies to the use of the software in direct\n" \
+L"conjunction with the TQ-Systems hardware (product).\n" \
+L"You are prohibited from using the software developed by us even without the\n" \
+L"product in conjunction with other products.\n" \
+L"Any transfer to third parties shall be bound by the provisions of this\n" \
+L"agreement.\n" \
+L"3. You are obligated to report any action which does not require approval in\n" \
+L"terms of German Copyright Law (UrhG) to TQ in writing.\n" \
+L"Outside of the scope of the cases indicated in German Copyright Law (UrhG),\n" \
+L"you are not entitled to modify, reverse engineer or translate the software\n" \
+L"or to remove components from it.\n" \
+L"4. Each use of the software which goes beyond the scope of the previous\n" \
+L"provision requires our written approval.\n" \
+L"5. The right to assert damage claims is still reserved.\n" \
+L"6. You are only authorized to sub-license the software in direct conjunction\n" \
+L"with the TQ-Systems hardware (product).\n" \
+L"7. You must also ensure that no more additional rights to the software are\n" \
+L"granted to the third party than those to which you are entitled based on\n" \
+L"this agreement.\n" \
+L"8. In the event of a transfer of rights, you are obligated to transfer the\n" \
+L"software and to destroy not transferred copies.\n" \
+L"\n" \
+L"§2 Warranty; Liability\n" \
+L"1. We make explicit reference to the fact that it is not possible with the\n" \
+L"current state of the art to develop more complex software in such a way\n" \
+L"that error-free function is guaranteed under all application conditions.\n" \
+L"We therefore only assume liability in ensuring that the supplied software\n" \
+L"is suitable based on the description created or accepted by TQ on proper\n" \
+L"usage under the terms of this agreement.\n" \
+L"2. In the event of major and reproducible deviations of the software\n" \
+L"functionality from the product description or specification, we are\n" \
+L"entitled to choose to either refund the purchase price paid by you or\n" \
+L"to provide a subsequent performance in the form of a repair within a\n" \
+L"reasonable period of time or to provide a replacement shipment of the\n" \
+L"product.\n" \
+L"If, as part of the subsequent performance we have chosen by providing\n" \
+L"an error-free update or upgrade of the software, we do not succeed in\n" \
+L"remedying the major deviations in the software functionality which have\n" \
+L"occurred or to find a work-around in a reasonable period of time which\n" \
+L"allows you to properly use the software under the terms of this agreement,\n" \
+L"you can request a discount for the stipulated compensation or to withdraw\n" \
+L"from the agreement.\n" \
+L"Claims of you which go beyond this scope are excluded, if permitted by law.\n" \
+L"3. We do not assume any liability for minor deviations in the functionality of\n" \
+L"the software from the product description or specification.\n" \
+L"4. The warranty is for one year in so far as no longer warranty period is\n" \
+L"required by law and begins with the acceptance of the software by you or\n" \
+L"- if a formal acceptance is not planned or does not occur –\n" \
+L"after two weeks following the transfer at the latest.\n" \
+L"5. We provide no warranty and assume no liability beyond the scope of usage as\n" \
+L"mentioned §1 for the correct selection, application and use of the software.\n" \
+L"6. This particularly applies in the event of culpable use of unsuitable, in\n" \
+L"particular non-compatible hardware or data processing programs,\n" \
+L"modifications or enhancements of the software performed by you or by your\n" \
+L"request, culpable failure to perform regular data back-up and to other cases\n" \
+L"of culpable or negligent handling by you. If you should use the software\n" \
+L"outside of the stipulated scope of application, all warranty obligations and\n" \
+L"other liability are rendered invalid.\n" \
+L"7. The afore mentioned warranty or liability restrictions do not apply\n" \
+L"in instances of injuries affecting life, limb and health, liability covered\n" \
+L"under the scope of the Product Liability Law (Produkthaftungsgesetz),\n" \
+L"if a promised characteristic or guaranteed composition is lacking in the\n" \
+L"software or we assume culpability in the form of malicious intent or gross\n" \
+L"negligence.\n" \
+L"\n" \
+L"§3. Additional conditions\n" \
+L"1. Redistributions must contain a verbatim copy of this document.\n" \
+L"2. The TQ-Systems may revise this license from time to time.\n" \
+L"Each revision is distinguished by a version number.\n" \
+L"You may use this Software under terms of this license revision or\n" \
+L"under the terms of any subsequent revision of the license.\n" \
+L"\n" \
+L"\n" \
+L" wxWindows Library Licence, Version 3.1\n" \
+L" ======================================\n" \
+L"\n" \
+L" Copyright (c) 1998-2005 Julian Smart, Robert Roebling et al\n" \
+L"\n" \
+L" Everyone is permitted to copy and distribute verbatim copies\n" \
+L" of this licence document, but changing it is not allowed.\n" \
+L"\n" \
+L" WXWINDOWS LIBRARY LICENCE\n" \
+L" TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION\n" \
+L"\n" \
+L" This library is free software; you can redistribute it and/or modify it\n" \
+L" under the terms of the GNU Library General Public Licence as published by\n" \
+L" the Free Software Foundation; either version 2 of the Licence, or (at\n" \
+L" your option) any later version.\n" \
+L"\n" \
+L" This library is distributed in the hope that it will be useful, but\n" \
+L" WITHOUT ANY WARRANTY; without even the implied warranty of\n" \
+L" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library\n" \
+L" General Public Licence for more details.\n" \
+L"\n" \
+L" You should have received a copy of the GNU Library General Public Licence\n" \
+L" along with this software, usually in a file named COPYING.LIB. If not,\n" \
+L" write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n" \
+L" Boston, MA 02110-1301 USA.\n" \
+L"\n" \
+L" EXCEPTION NOTICE\n" \
+L"\n" \
+L" 1. As a special exception, the copyright holders of this library give\n" \
+L" permission for additional uses of the text contained in this release of\n" \
+L" the library as licenced under the wxWindows Library Licence, applying\n" \
+L" either version 3.1 of the Licence, or (at your option) any later version of\n" \
+L" the Licence as published by the copyright holders of version\n" \
+L" 3.1 of the Licence document.\n" \
+L"\n" \
+L" 2. The exception is that you may use, copy, link, modify and distribute\n" \
+L" under your own terms, binary object code versions of works based\n" \
+L" on the Library.\n" \
+L"\n" \
+L" 3. If you copy code from files distributed under the terms of the GNU\n" \
+L" General Public Licence or the GNU Library General Public Licence into a\n" \
+L" copy of this library, as this licence permits, the exception does not\n" \
+L" apply to the code that you add in this way. To avoid misleading anyone as\n" \
+L" to the status of such modified files, you must delete this exception\n" \
+L" notice from such code and/or adjust the licensing conditions notice\n" \
+L" accordingly.\n" \
+L"\n" \
+L" 4. If you write modifications of your own for this library, it is your\n" \
+L" choice whether to permit this exception to apply to your modifications.\n" \
+L" If you do not wish that, you must delete the exception notice from such\n" \
+L" code and/or adjust the licensing conditions notice accordingly.\n" \
+L"\n" \
+L"\n" \
+L"Copyright (c) 2015, ben-strasser\n" \
+L"All rights reserved.\n" \
+L"\n" \
+L"Redistribution and use in source and binary forms, with or without\n" \
+L"modification, are permitted provided that the following conditions are met:\n" \
+L"\n" \
+L"* Redistributions of source code must retain the above copyright notice, this\n" \
+L" list of conditions and the following disclaimer.\n" \
+L"\n" \
+L"* Redistributions in binary form must reproduce the above copyright notice,\n" \
+L" this list of conditions and the following disclaimer in the documentation\n" \
+L" and/or other materials provided with the distribution.\n" \
+L"\n" \
+L"* Neither the name of fast-cpp-csv-parser nor the names of its\n" \
+L" contributors may be used to endorse or promote products derived from\n" \
+L" this software without specific prior written permission.\n" \
+L"\n" \
+L"THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n" \
+L"AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n" \
+L"IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n" \
+L"DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE\n" \
+L"FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n" \
+L"DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\n" \
+L"SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\n" \
+L"CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\n" \
+L"OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n" \
+L"OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n" \
+L"\n" \
+L"\n" \
+L"Boost Software License - Version 1.0 - August 17th, 2003\n" \
+L"\n" \
+L"Permission is hereby granted, free of charge, to any person or organization\n" \
+L"obtaining a copy of the software and accompanying documentation covered by\n" \
+L"this license (the \"Software\") to use, reproduce, display, distribute,\n" \
+L"execute, and transmit the Software, and to prepare derivative works of the\n" \
+L"Software, and to permit third-parties to whom the Software is furnished to\n" \
+L"do so, all subject to the following:\n" \
+L"\n" \
+L"The copyright notices in the Software and this entire statement, including\n" \
+L"the above license grant, this restriction and the following disclaimer,\n" \
+L"must be included in all copies of the Software, in whole or in part, and\n" \
+L"all derivative works of the Software, unless such copies or derivative\n" \
+L"works are solely in the form of machine-executable object code generated by\n" \
+L"a source language processor.\n" \
+L"\n" \
+L"THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n" \
+L"IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n" \
+L"FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT\n" \
+L"SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE\n" \
+L"FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,\n" \
+L"ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\n" \
+L"DEALINGS IN THE SOFTWARE.\n" \
+L"\n" \
+L"\n" \
+L"Copyright (c) 2013 Dropbox, Inc.\n" \
+L"\n" \
+L"Permission is hereby granted, free of charge, to any person obtaining a copy\n" \
+L"of this software and associated documentation files (the \"Software\"), to deal\n" \
+L"in the Software without restriction, including without limitation the rights\n" \
+L"to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n" \
+L"copies of the Software, and to permit persons to whom the Software is\n" \
+L"furnished to do so, subject to the following conditions:\n" \
+L"\n" \
+L"The above copyright notice and this permission notice shall be included in\n" \
+L"all copies or substantial portions of the Software.\n" \
+L"\n" \
+L"THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n" \
+L"IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n" \
+L"FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n" \
+L"AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n" \
+L"LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n" \
+L"OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n" \
+L"THE SOFTWARE.\n" \
+L""
#endif