From c76217c2d461f0405ece7df405e1ed8fd6cf25a4 Mon Sep 17 00:00:00 2001 From: Adam Ierymenko Date: Sun, 17 May 2015 19:50:19 -0700 Subject: Delete old UI code -- officially dead. --- attic/ZeroTierUI/Info.plist | 20 -- attic/ZeroTierUI/README.md | 6 - attic/ZeroTierUI/WindowsBuildOfficial.bat | 9 - attic/ZeroTierUI/ZT1GUI.png | Bin 53611 -> 0 bytes attic/ZeroTierUI/ZT1GUI.xcf | Bin 259875 -> 0 bytes attic/ZeroTierUI/ZeroTierUI.pro | 128 ------- attic/ZeroTierUI/ZeroTierUI.rc | 1 - attic/ZeroTierUI/aboutwindow.cpp | 60 ---- attic/ZeroTierUI/aboutwindow.h | 49 --- attic/ZeroTierUI/aboutwindow.ui | 254 ------------- attic/ZeroTierUI/installdialog.cpp | 219 ------------ attic/ZeroTierUI/installdialog.h | 73 ---- attic/ZeroTierUI/installdialog.ui | 124 ------- attic/ZeroTierUI/licensedialog.cpp | 43 --- attic/ZeroTierUI/licensedialog.h | 27 -- attic/ZeroTierUI/licensedialog.ui | 256 ------------- attic/ZeroTierUI/mac_doprivileged.h | 12 - attic/ZeroTierUI/mac_doprivileged.mm | 24 -- attic/ZeroTierUI/main.cpp | 194 ---------- attic/ZeroTierUI/main.h | 9 - attic/ZeroTierUI/mainwindow.cpp | 424 ---------------------- attic/ZeroTierUI/mainwindow.h | 101 ------ attic/ZeroTierUI/mainwindow.ui | 306 ---------------- attic/ZeroTierUI/networkwidget.cpp | 181 ---------- attic/ZeroTierUI/networkwidget.h | 69 ---- attic/ZeroTierUI/networkwidget.ui | 574 ------------------------------ attic/ZeroTierUI/onetimedialog.cpp | 37 -- attic/ZeroTierUI/onetimedialog.h | 26 -- attic/ZeroTierUI/onetimedialog.ui | 99 ------ attic/ZeroTierUI/quickstartdialog.ui | 170 --------- attic/ZeroTierUI/resources.qrc | 9 - attic/ZeroTierUI/stylesheet.css | 106 ------ attic/ZeroTierUI/zt1icon.icns | Bin 188489 -> 0 bytes attic/ZeroTierUI/zt1icon.ico | Bin 370070 -> 0 bytes attic/ZeroTierUI/zt1icon.png | Bin 44700 -> 0 bytes 35 files changed, 3610 deletions(-) delete mode 100644 attic/ZeroTierUI/Info.plist delete mode 100644 attic/ZeroTierUI/README.md delete mode 100644 attic/ZeroTierUI/WindowsBuildOfficial.bat delete mode 100644 attic/ZeroTierUI/ZT1GUI.png delete mode 100644 attic/ZeroTierUI/ZT1GUI.xcf delete mode 100644 attic/ZeroTierUI/ZeroTierUI.pro delete mode 100644 attic/ZeroTierUI/ZeroTierUI.rc delete mode 100644 attic/ZeroTierUI/aboutwindow.cpp delete mode 100644 attic/ZeroTierUI/aboutwindow.h delete mode 100644 attic/ZeroTierUI/aboutwindow.ui delete mode 100644 attic/ZeroTierUI/installdialog.cpp delete mode 100644 attic/ZeroTierUI/installdialog.h delete mode 100644 attic/ZeroTierUI/installdialog.ui delete mode 100644 attic/ZeroTierUI/licensedialog.cpp delete mode 100644 attic/ZeroTierUI/licensedialog.h delete mode 100644 attic/ZeroTierUI/licensedialog.ui delete mode 100644 attic/ZeroTierUI/mac_doprivileged.h delete mode 100644 attic/ZeroTierUI/mac_doprivileged.mm delete mode 100644 attic/ZeroTierUI/main.cpp delete mode 100644 attic/ZeroTierUI/main.h delete mode 100644 attic/ZeroTierUI/mainwindow.cpp delete mode 100644 attic/ZeroTierUI/mainwindow.h delete mode 100644 attic/ZeroTierUI/mainwindow.ui delete mode 100644 attic/ZeroTierUI/networkwidget.cpp delete mode 100644 attic/ZeroTierUI/networkwidget.h delete mode 100644 attic/ZeroTierUI/networkwidget.ui delete mode 100644 attic/ZeroTierUI/onetimedialog.cpp delete mode 100644 attic/ZeroTierUI/onetimedialog.h delete mode 100644 attic/ZeroTierUI/onetimedialog.ui delete mode 100644 attic/ZeroTierUI/quickstartdialog.ui delete mode 100644 attic/ZeroTierUI/resources.qrc delete mode 100644 attic/ZeroTierUI/stylesheet.css delete mode 100644 attic/ZeroTierUI/zt1icon.icns delete mode 100644 attic/ZeroTierUI/zt1icon.ico delete mode 100644 attic/ZeroTierUI/zt1icon.png diff --git a/attic/ZeroTierUI/Info.plist b/attic/ZeroTierUI/Info.plist deleted file mode 100644 index 06f680c6..00000000 --- a/attic/ZeroTierUI/Info.plist +++ /dev/null @@ -1,20 +0,0 @@ - - - - - NSPrincipalClass - NSApplication - CFBundleIconFile - zt1icon.icns - CFBundlePackageType - APPL - CFBundleGetInfoString - ZeroTier One (Mac GUI) - CFBundleSignature - ???? - CFBundleExecutable - ZeroTier One - CFBundleIdentifier - com.zerotier.ZeroTierOne - - diff --git a/attic/ZeroTierUI/README.md b/attic/ZeroTierUI/README.md deleted file mode 100644 index 49f25d29..00000000 --- a/attic/ZeroTierUI/README.md +++ /dev/null @@ -1,6 +0,0 @@ -Qt GUI -====== - -This is the Qt GUI distributed for Mac and Windows. It should build on Linux too if you've got Qt installed. - -It's a bit ugly and limited and will probably eventually be replaced. diff --git a/attic/ZeroTierUI/WindowsBuildOfficial.bat b/attic/ZeroTierUI/WindowsBuildOfficial.bat deleted file mode 100644 index 06cad543..00000000 --- a/attic/ZeroTierUI/WindowsBuildOfficial.bat +++ /dev/null @@ -1,9 +0,0 @@ -REM If you're an OSS user and want to run this batch file, edit to change the path to Qt. -REM Start Visual Studio command prompt and run this from within the ZeroTierUI subfolder. - -CD .. -MKDIR build-ZeroTierUI-win32-release -CD build-ZeroTierUI-win32-release -C:\Qt\5.2.1\Src\qtbase\bin\qmake.exe ..\ZeroTierUI\ZeroTierUI.pro -nmake clean -nmake diff --git a/attic/ZeroTierUI/ZT1GUI.png b/attic/ZeroTierUI/ZT1GUI.png deleted file mode 100644 index d31c8bcf..00000000 Binary files a/attic/ZeroTierUI/ZT1GUI.png and /dev/null differ diff --git a/attic/ZeroTierUI/ZT1GUI.xcf b/attic/ZeroTierUI/ZT1GUI.xcf deleted file mode 100644 index 7d21a641..00000000 Binary files a/attic/ZeroTierUI/ZT1GUI.xcf and /dev/null differ diff --git a/attic/ZeroTierUI/ZeroTierUI.pro b/attic/ZeroTierUI/ZeroTierUI.pro deleted file mode 100644 index 98e306b5..00000000 --- a/attic/ZeroTierUI/ZeroTierUI.pro +++ /dev/null @@ -1,128 +0,0 @@ -QT += core gui widgets network -TARGET = "ZeroTier One" -TEMPLATE = app - -win32:RC_FILE = ZeroTierUI.rc -win32:LIBS += winhttp.lib Iphlpapi.lib ws2_32.lib advapi32.lib Shell32.lib Rpcrt4.lib -win32:QMAKE_LFLAGS += /MANIFESTUAC:\"level=\'requireAdministrator\' uiAccess=\'false\'\" - -mac:ICON = zt1icon.icns -mac:QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.6 -mac:QMAKE_INFO_PLIST = Info.plist -mac:LIBS += -framework Cocoa - -SOURCES += main.cpp \ - mainwindow.cpp \ - aboutwindow.cpp \ - networkwidget.cpp \ - installdialog.cpp \ - licensedialog.cpp \ - onetimedialog.cpp \ - ../control/IpcConnection.cpp \ - ../control/IpcListener.cpp \ - ../control/NodeControlClient.cpp \ - ../control/NodeControlService.cpp \ - ../node/C25519.cpp \ - ../node/CertificateOfMembership.cpp \ - ../node/Defaults.cpp \ - ../node/Dictionary.cpp \ - ../node/HttpClient.cpp \ - ../node/Identity.cpp \ - ../node/IncomingPacket.cpp \ - ../node/InetAddress.cpp \ - ../node/Logger.cpp \ - ../node/Multicaster.cpp \ - ../node/Network.cpp \ - ../node/NetworkConfig.cpp \ - ../node/Node.cpp \ - ../node/NodeConfig.cpp \ - ../node/OutboundMulticast.cpp \ - ../node/Packet.cpp \ - ../node/Peer.cpp \ - ../node/Poly1305.cpp \ - ../node/RoutingTable.cpp \ - ../node/Salsa20.cpp \ - ../node/Service.cpp \ - ../node/SHA512.cpp \ - ../node/SoftwareUpdater.cpp \ - ../node/Switch.cpp \ - ../node/Topology.cpp \ - ../node/Utils.cpp \ - ../ext/lz4/lz4.c - -HEADERS += mainwindow.h \ - aboutwindow.h \ - networkwidget.h \ - installdialog.h \ - mac_doprivileged.h \ - licensedialog.h \ - main.h \ - onetimedialog.h \ - ../control/IpcConnection.hpp \ - ../control/IpcListener.hpp \ - ../control/NodeControlClient.hpp \ - ../control/NodeControlService.hpp \ - ../node/Address.hpp \ - ../node/AntiRecursion.hpp \ - ../node/Array.hpp \ - ../node/AtomicCounter.hpp \ - ../node/BandwidthAccount.hpp \ - ../node/Buffer.hpp \ - ../node/C25519.hpp \ - ../node/CertificateOfMembership.hpp \ - ../node/CMWC4096.hpp \ - ../node/Constants.hpp \ - ../node/Defaults.hpp \ - ../node/Dictionary.hpp \ - ../node/EthernetTap.hpp \ - ../node/EthernetTapFactory.hpp \ - ../node/HttpClient.hpp \ - ../node/Identity.hpp \ - ../node/IncomingPacket.hpp \ - ../node/InetAddress.hpp \ - ../node/Logger.hpp \ - ../node/MAC.hpp \ - ../node/Multicaster.hpp \ - ../node/MulticastGroup.hpp \ - ../node/Mutex.hpp \ - ../node/Network.hpp \ - ../node/NetworkConfig.hpp \ - ../node/Node.hpp \ - ../node/NodeConfig.hpp \ - ../node/NonCopyable.hpp \ - ../node/OutboundMulticast.hpp \ - ../node/Packet.hpp \ - ../node/Path.hpp \ - ../node/Peer.hpp \ - ../node/Poly1305.hpp \ - ../node/RoutingTable.hpp \ - ../node/RuntimeEnvironment.hpp \ - ../node/Salsa20.hpp \ - ../node/Service.hpp \ - ../node/SHA512.hpp \ - ../node/SharedPtr.hpp \ - ../node/Socket.hpp \ - ../node/SocketManager.hpp \ - ../node/SoftwareUpdater.hpp \ - ../node/Switch.hpp \ - ../node/Thread.hpp \ - ../node/Topology.hpp \ - ../node/Utils.hpp \ - ../ext/lz4/lz4.h - -FORMS += mainwindow.ui \ - aboutwindow.ui \ - networkwidget.ui \ - installdialog.ui \ - licensedialog.ui \ - quickstartdialog.ui \ - onetimedialog.ui - -RESOURCES += \ - resources.qrc - -mac:OBJECTIVE_SOURCES += \ - mac_doprivileged.mm - -OTHER_FILES += \ - stylesheet.css diff --git a/attic/ZeroTierUI/ZeroTierUI.rc b/attic/ZeroTierUI/ZeroTierUI.rc deleted file mode 100644 index 2c5365c0..00000000 --- a/attic/ZeroTierUI/ZeroTierUI.rc +++ /dev/null @@ -1 +0,0 @@ -IDI_ICON1 ICON DISCARDABLE "zt1icon.ico" diff --git a/attic/ZeroTierUI/aboutwindow.cpp b/attic/ZeroTierUI/aboutwindow.cpp deleted file mode 100644 index 0d35e1e6..00000000 --- a/attic/ZeroTierUI/aboutwindow.cpp +++ /dev/null @@ -1,60 +0,0 @@ -/* - * ZeroTier One - Network Virtualization Everywhere - * Copyright (C) 2011-2015 ZeroTier, Inc. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - * -- - * - * ZeroTier may be used and distributed under the terms of the GPLv3, which - * are available at: http://www.gnu.org/licenses/gpl-3.0.html - * - * If you would like to embed ZeroTier into a commercial application or - * redistribute it in a modified binary form, please contact ZeroTier Networks - * LLC. Start here: http://www.zerotier.com/ - */ - -#include "aboutwindow.h" -#include "ui_aboutwindow.h" - -#include -#include - -#include "../node/Constants.hpp" -#include "../node/Node.hpp" - -AboutWindow::AboutWindow(QWidget *parent) : - QDialog(parent), - ui(new Ui::AboutWindow) -{ - ui->setupUi(this); - ui->aboutTextLabel->setText(QString("ZeroTier One\nVersion ")+ZeroTier::Node::versionString()+"\nDesktop Graphical User Interface\n\n(c)2011-2014 ZeroTier Networks LLC\n\nReleased under the terms of the GNU\nGeneral Public License v3.0, see: http://gplv3.fsf.org for terms.\n\nAuthor(s): Adam Ierymenko"); - -#ifdef __WINDOWS__ - /* - QWidgetList widgets = this->findChildren(); - foreach(QWidget *widget, widgets) { - QFont font(widget->font()); - font.setPointSizeF(font.pointSizeF() * 0.75); - widget->setFont(font); - } - */ - this->raise(); -#endif -} - -AboutWindow::~AboutWindow() -{ - delete ui; -} diff --git a/attic/ZeroTierUI/aboutwindow.h b/attic/ZeroTierUI/aboutwindow.h deleted file mode 100644 index 836954b2..00000000 --- a/attic/ZeroTierUI/aboutwindow.h +++ /dev/null @@ -1,49 +0,0 @@ -/* - * ZeroTier One - Network Virtualization Everywhere - * Copyright (C) 2011-2015 ZeroTier, Inc. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - * -- - * - * ZeroTier may be used and distributed under the terms of the GPLv3, which - * are available at: http://www.gnu.org/licenses/gpl-3.0.html - * - * If you would like to embed ZeroTier into a commercial application or - * redistribute it in a modified binary form, please contact ZeroTier Networks - * LLC. Start here: http://www.zerotier.com/ - */ - -#ifndef AboutWindow_H -#define AboutWindow_H - -#include - -namespace Ui { -class AboutWindow; -} - -class AboutWindow : public QDialog -{ - Q_OBJECT - -public: - explicit AboutWindow(QWidget *parent = 0); - virtual ~AboutWindow(); - -private: - Ui::AboutWindow *ui; -}; - -#endif // AboutWindow_H diff --git a/attic/ZeroTierUI/aboutwindow.ui b/attic/ZeroTierUI/aboutwindow.ui deleted file mode 100644 index 568082af..00000000 --- a/attic/ZeroTierUI/aboutwindow.ui +++ /dev/null @@ -1,254 +0,0 @@ - - - AboutWindow - - - - 0 - 0 - 508 - 261 - - - - About ZeroTier One - - - - :/img/zt1icon.png:/img/zt1icon.png - - - true - - - - 6 - - - 6 - - - 6 - - - 6 - - - - - QFrame::StyledPanel - - - QFrame::Raised - - - - 6 - - - 6 - - - 6 - - - 6 - - - - - - 0 - - - 0 - - - 0 - - - 0 - - - - - - 0 - 0 - - - - - 128 - 128 - - - - - 128 - 128 - - - - - - - Qt::PlainText - - - :/img/zt1icon.png - - - true - - - Qt::NoTextInteraction - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - - - - 0 - 0 - - - - QFrame::StyledPanel - - - QFrame::Sunken - - - - - - - 0 - 0 - - - - - 50 - false - - - - Qt::PlainText - - - Qt::AlignHCenter|Qt::AlignTop - - - Qt::NoTextInteraction - - - - - - - - 0 - - - 0 - - - 0 - - - 0 - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - - - - - - - - Qt::Horizontal - - - QDialogButtonBox::Ok - - - true - - - - - - - - - - - buttonBox - accepted() - AboutWindow - accept() - - - 248 - 254 - - - 157 - 274 - - - - - buttonBox - rejected() - AboutWindow - reject() - - - 316 - 260 - - - 286 - 274 - - - - - diff --git a/attic/ZeroTierUI/installdialog.cpp b/attic/ZeroTierUI/installdialog.cpp deleted file mode 100644 index 41dffe48..00000000 --- a/attic/ZeroTierUI/installdialog.cpp +++ /dev/null @@ -1,219 +0,0 @@ -/* - * ZeroTier One - Network Virtualization Everywhere - * Copyright (C) 2011-2015 ZeroTier, Inc. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - * -- - * - * ZeroTier may be used and distributed under the terms of the GPLv3, which - * are available at: http://www.gnu.org/licenses/gpl-3.0.html - * - * If you would like to embed ZeroTier into a commercial application or - * redistribute it in a modified binary form, please contact ZeroTier Networks - * LLC. Start here: http://www.zerotier.com/ - */ - -#include "installdialog.h" -#include "mainwindow.h" -#include "ui_installdialog.h" - -#include "../node/Constants.hpp" -#include "../node/Defaults.hpp" -#include "../node/SoftwareUpdater.hpp" - -#ifdef __UNIX_LIKE__ -#include -#include -#include -#include -#include -#include -#endif - -#ifdef __APPLE__ -#include "mac_doprivileged.h" -#endif - -#include -#include -#include -#include -#include -#include -#include - -InstallDialog::InstallDialog(QWidget *parent) : - QMainWindow(parent), - ui(new Ui::InstallDialog), - nam(new QNetworkAccessManager(this)), - phase(FETCHING_NFO) -{ - ui->setupUi(this); - QObject::connect(nam,SIGNAL(finished(QNetworkReply*)),this,SLOT(on_networkReply(QNetworkReply*))); - - const char *nfoUrl = ZeroTier::ZT_DEFAULTS.updateLatestNfoURL.c_str(); - if (!*nfoUrl) { - QMessageBox::critical(this,"Download Failed","Download failed: internal error: no update URL configured in build!",QMessageBox::Ok,QMessageBox::NoButton); - QApplication::exit(1); - return; - } - - QNetworkReply *reply = nam->get(QNetworkRequest(QUrl(nfoUrl))); - QObject::connect(reply,SIGNAL(downloadProgress(qint64,qint64)),this,SLOT(on_downloadProgress(qint64,qint64))); -} - -InstallDialog::~InstallDialog() -{ - delete ui; -} - -void InstallDialog::on_networkReply(QNetworkReply *reply) -{ - reply->deleteLater(); - - if (reply->error() != QNetworkReply::NoError) { - QMessageBox::critical(this,"Download Failed",QString("Download failed: ") + reply->errorString() + "\n\nAre you connected to the Internet?",QMessageBox::Ok,QMessageBox::NoButton); - QApplication::exit(1); - } else { - if (reply->attribute(QNetworkRequest::HttpStatusCodeAttribute) == 200) { - QByteArray installerData(reply->readAll()); - - switch(phase) { - case FETCHING_NFO: { - unsigned int vMajor = 0,vMinor = 0,vRevision = 0; - installerData.append((char)0); - const char *err = ZeroTier::SoftwareUpdater::parseNfo(installerData.data(),vMajor,vMinor,vRevision,signedBy,signature,url); - - if (err) { - QMessageBox::critical(this,"Download Failed","Download failed: there is a problem with the software update web site.\nTry agian later. (invalid .nfo file)",QMessageBox::Ok,QMessageBox::NoButton); - QApplication::exit(1); - return; - } - - phase = FETCHING_INSTALLER; - reply = nam->get(QNetworkRequest(QUrl(url.c_str()))); - QObject::connect(reply,SIGNAL(downloadProgress(qint64,qint64)),this,SLOT(on_downloadProgress(qint64,qint64))); - } break; - case FETCHING_INSTALLER: { - if (!ZeroTier::SoftwareUpdater::validateUpdate(installerData.data(),installerData.length(),signedBy,signature)) { - QMessageBox::critical(this,"Download Failed","Download failed: there is a problem with the software update web site. Try agian later. (downloaded data failed signature check)",QMessageBox::Ok,QMessageBox::NoButton); - QApplication::exit(1); - return; - } - -#ifdef __APPLE__ - { - std::string homePath(QDir::homePath().toStdString()); - QString zt1Caches(QDir::homePath() + "/Library/Caches/ZeroTier/One"); - QDir::root().mkpath(zt1Caches); - std::string instPath((zt1Caches + "/ZeroTierOneInstaller").toStdString()); - std::string tmpPath((zt1Caches + "/inst.sh").toStdString()); - - int outfd = ::open(instPath.c_str(),O_CREAT|O_TRUNC|O_WRONLY,0755); - if (outfd <= 0) { - QMessageBox::critical(this,"Download Failed",QString("Installation failed: unable to write to ")+instPath.c_str(),QMessageBox::Ok,QMessageBox::NoButton); - QApplication::exit(1); - return; - } - if (::write(outfd,installerData.data(),installerData.length()) != installerData.length()) { - QMessageBox::critical(this,"Installation Failed",QString("Installation failed: unable to write to ")+instPath.c_str(),QMessageBox::Ok,QMessageBox::NoButton); - QApplication::exit(1); - return; - } - ::close(outfd); - chmod(instPath.c_str(),0755); - - FILE *scr = fopen(tmpPath.c_str(),"w"); - if (!scr) { - QMessageBox::critical(this,"Installation Failed","Cannot write script to temporary Library/Caches/ZeroTier/One folder.",QMessageBox::Ok,QMessageBox::NoButton); - QApplication::exit(1); - return; - } - - fprintf(scr,"#!/bin/bash\n"); - fprintf(scr,"export PATH=\"/bin:/usr/bin:/sbin:/usr/sbin\"\n"); - fprintf(scr,"'%s'\n",instPath.c_str()); - fprintf(scr,"if [ -f '/Library/Application Support/ZeroTier/One/authtoken.secret' ]; then\n"); - fprintf(scr," mkdir -p '%s/Library/Application Support/ZeroTier/One'\n",homePath.c_str()); - fprintf(scr," chown %d '%s/Library/Application Support/ZeroTier'\n",(int)getuid(),homePath.c_str()); - fprintf(scr," chgrp %d '%s/Library/Application Support/ZeroTier'\n",(int)getgid(),homePath.c_str()); - fprintf(scr," chmod 0700 '%s/Library/Application Support/ZeroTier'\n",homePath.c_str()); - fprintf(scr," chown %d '%s/Library/Application Support/ZeroTier/One'\n",(int)getuid(),homePath.c_str()); - fprintf(scr," chgrp %d '%s/Library/Application Support/ZeroTier/One'\n",(int)getgid(),homePath.c_str()); - fprintf(scr," chmod 0700 '%s/Library/Application Support/ZeroTier/One'\n",homePath.c_str()); - fprintf(scr," cp -f '/Library/Application Support/ZeroTier/One/authtoken.secret' '%s/Library/Application Support/ZeroTier/One/authtoken.secret'\n",homePath.c_str()); - fprintf(scr," chown %d '%s/Library/Application Support/ZeroTier/One/authtoken.secret'\n",(int)getuid(),homePath.c_str()); - fprintf(scr," chgrp %d '%s/Library/Application Support/ZeroTier/One/authtoken.secret'\n",(int)getgid(),homePath.c_str()); - fprintf(scr," chmod 0600 '%s/Library/Application Support/ZeroTier/One/authtoken.secret'\n",homePath.c_str()); - fprintf(scr,"fi\n"); - fprintf(scr,"exit 0\n"); - - fclose(scr); - chmod(tmpPath.c_str(),0755); - - macExecutePrivilegedShellCommand((std::string("'")+tmpPath+"' >>/dev/null 2>&1").c_str()); - - unlink(tmpPath.c_str()); - unlink(instPath.c_str()); - - // Restart the binary with whatever updates may have occurred - std::string appPath(QCoreApplication::applicationFilePath().toStdString()); - execl(appPath.c_str(),appPath.c_str(),(const char *)0); - - // We only make it here if execl() fails - QMessageBox::critical(this,"Re-Launch Failed","An error occurred re-launching ZeroTier One.app. Try launching it manually.",QMessageBox::Ok,QMessageBox::NoButton); - QApplication::exit(1); - - return; - } -#endif - } break; - } - - ui->progressBar->setMinimum(0); - ui->progressBar->setMaximum(100); - ui->progressBar->setValue(0); - } else { - QMessageBox::critical(this,"Download Failed",QString("Download failed: HTTP status code ") + reply->attribute(QNetworkRequest::HttpStatusCodeAttribute).toString(),QMessageBox::Ok,QMessageBox::NoButton); - QApplication::exit(1); - } - } -} - -void InstallDialog::on_InstallDialog_rejected() -{ - QApplication::exit(); -} - -void InstallDialog::on_cancelButton_clicked() -{ - QApplication::exit(); -} - -void InstallDialog::on_downloadProgress(qint64 bytesReceived,qint64 bytesTotal) -{ - if (bytesTotal <= 0) { - ui->progressBar->setValue(0); - ui->progressBar->setMinimum(0); - ui->progressBar->setMaximum(0); - } else { - double pct = ((double)bytesReceived / (double)bytesTotal) * 100.0; - if (pct > 100.0) - pct = 100.0; - ui->progressBar->setMinimum(0); - ui->progressBar->setMaximum(100); - ui->progressBar->setValue((int)pct); - } -} diff --git a/attic/ZeroTierUI/installdialog.h b/attic/ZeroTierUI/installdialog.h deleted file mode 100644 index b54e4690..00000000 --- a/attic/ZeroTierUI/installdialog.h +++ /dev/null @@ -1,73 +0,0 @@ -/* - * ZeroTier One - Network Virtualization Everywhere - * Copyright (C) 2011-2015 ZeroTier, Inc. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - * -- - * - * ZeroTier may be used and distributed under the terms of the GPLv3, which - * are available at: http://www.gnu.org/licenses/gpl-3.0.html - * - * If you would like to embed ZeroTier into a commercial application or - * redistribute it in a modified binary form, please contact ZeroTier Networks - * LLC. Start here: http://www.zerotier.com/ - */ - -#ifndef INSTALLDIALOG_H -#define INSTALLDIALOG_H - -#include -#include -#include -#include -#include - -#include - -#include "../node/Address.hpp" - -// Right now InstallDialog is only used on Mac - -namespace Ui { -class InstallDialog; -} - -class InstallDialog : public QMainWindow -{ - Q_OBJECT - -public: - explicit InstallDialog(QWidget *parent = 0); - ~InstallDialog(); - -private slots: - void on_networkReply(QNetworkReply *reply); - void on_InstallDialog_rejected(); - void on_cancelButton_clicked(); - void on_downloadProgress(qint64 bytesReceived,qint64 bytesTotal); - -private: - Ui::InstallDialog *ui; - QNetworkAccessManager *nam; - enum { - FETCHING_NFO, - FETCHING_INSTALLER - } phase; - - ZeroTier::Address signedBy; - std::string url,signature; -}; - -#endif // INSTALLDIALOG_H diff --git a/attic/ZeroTierUI/installdialog.ui b/attic/ZeroTierUI/installdialog.ui deleted file mode 100644 index 71b2d0f1..00000000 --- a/attic/ZeroTierUI/installdialog.ui +++ /dev/null @@ -1,124 +0,0 @@ - - - InstallDialog - - - - 0 - 0 - 547 - 231 - - - - Install ZeroTier One Service - - - - :/img/zt1icon.png:/img/zt1icon.png - - - - - 6 - - - 6 - - - 6 - - - 6 - - - - - - 0 - 0 - - - - - 14 - - - - Since this is your first time running ZeroTier One on this computer, the virtual Ethernet service must be downloaded and installed. - -Please wait while the service downloads, then you will be prompted to enter an administrator password to install it. - - - Qt::PlainText - - - Qt::AlignCenter - - - true - - - 10 - - - Qt::NoTextInteraction - - - - - - - 0 - - - 0 - - - - - - - - 0 - - - 0 - - - 0 - - - 0 - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - Cancel and Exit - - - - - - - - - - - - - - diff --git a/attic/ZeroTierUI/licensedialog.cpp b/attic/ZeroTierUI/licensedialog.cpp deleted file mode 100644 index 4baebb72..00000000 --- a/attic/ZeroTierUI/licensedialog.cpp +++ /dev/null @@ -1,43 +0,0 @@ -#include -#include - -#include "main.h" -#include "licensedialog.h" -#include "ui_licensedialog.h" - -#include "../node/Constants.hpp" - -LicenseDialog::LicenseDialog(QWidget *parent) : - QDialog(parent), - ui(new Ui::LicenseDialog) -{ - ui->setupUi(this); - -#ifdef __WINDOWS__ - QWidgetList widgets = this->findChildren(); - foreach(QWidget *widget, widgets) { - QFont font(widget->font()); - font.setPointSizeF(font.pointSizeF() * 0.75); - widget->setFont(font); - } - this->raise(); -#endif -} - -LicenseDialog::~LicenseDialog() -{ - delete ui; -} - -void LicenseDialog::on_buttonBox_accepted() -{ - settings->setValue("acceptedLicenseV1",true); - settings->sync(); - - this->setResult(QDialog::Accepted); -} - -void LicenseDialog::on_buttonBox_rejected() -{ - ::exit(0); -} diff --git a/attic/ZeroTierUI/licensedialog.h b/attic/ZeroTierUI/licensedialog.h deleted file mode 100644 index 9a13be9c..00000000 --- a/attic/ZeroTierUI/licensedialog.h +++ /dev/null @@ -1,27 +0,0 @@ -#ifndef LICENSEDIALOG_H -#define LICENSEDIALOG_H - -#include - -namespace Ui { -class LicenseDialog; -} - -class LicenseDialog : public QDialog -{ - Q_OBJECT - -public: - explicit LicenseDialog(QWidget *parent = 0); - ~LicenseDialog(); - -private slots: - void on_buttonBox_accepted(); - - void on_buttonBox_rejected(); - -private: - Ui::LicenseDialog *ui; -}; - -#endif // LICENSEDIALOG_H diff --git a/attic/ZeroTierUI/licensedialog.ui b/attic/ZeroTierUI/licensedialog.ui deleted file mode 100644 index 495ef562..00000000 --- a/attic/ZeroTierUI/licensedialog.ui +++ /dev/null @@ -1,256 +0,0 @@ - - - LicenseDialog - - - - 0 - 0 - 534 - 333 - - - - ZeroTier One - - - - :/img/zt1icon.png:/img/zt1icon.png - - - - 6 - - - 6 - - - 6 - - - 6 - - - 6 - - - - - - 14 - 75 - true - - - - Do you agree to the terms of the license agreement? - - - - - - - false - - - true - - - <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> -<html><head><meta name="qrichtext" content="1" /><title>GNU General Public License v3.0 - GNU Project - Free Software Foundation (FSF)</title><style type="text/css"> -p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'.Lucida Grande UI'; font-size:13pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:14px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:large; font-weight:600;">GNU GENERAL PUBLIC LICENSE</span></p> -<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Version 3, 29 June 2007 </p> -<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Copyright © 2007 Free Software Foundation, Inc. &lt;<a href="http://fsf.org/"><span style=" text-decoration: underline; color:#0000ff;">http://fsf.org/</span></a>&gt;</p> -<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. </p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a name="preamble"></a><span style=" font-size:large; font-weight:600;">P</span><span style=" font-size:large; font-weight:600;">reamble</span> </p> -<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">The GNU General Public License is a free, copyleft license for software and other kinds of works. </p> -<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too. </p> -<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. </p> -<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others. </p> -<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. </p> -<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it. </p> -<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions. </p> -<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users. </p> -<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free. </p> -<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">The precise terms and conditions for copying, distribution and modification follow. </p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a name="terms"></a><span style=" font-size:large; font-weight:600;">T</span><span style=" font-size:large; font-weight:600;">ERMS AND CONDITIONS</span> </p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a name="section0"></a><span style=" font-size:medium; font-weight:600;">0</span><span style=" font-size:medium; font-weight:600;">. Definitions.</span> </p> -<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">“This License” refers to version 3 of the GNU General Public License. </p> -<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">“Copyright” also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. </p> -<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">“The Program” refers to any copyrightable work licensed under this License. Each licensee is addressed as “you”. “Licensees” and “recipients” may be individuals or organizations. </p> -<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">To “modify” a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a “modified version” of the earlier work or a work “based on” the earlier work. </p> -<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">A “covered work” means either the unmodified Program or a work based on the Program. </p> -<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">To “propagate” a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. </p> -<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">To “convey” a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. </p> -<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">An interactive user interface displays “Appropriate Legal Notices” to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. </p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a name="section1"></a><span style=" font-size:medium; font-weight:600;">1</span><span style=" font-size:medium; font-weight:600;">. Source Code.</span> </p> -<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">The “source code” for a work means the preferred form of the work for making modifications to it. “Object code” means any non-source form of a work. </p> -<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">A “Standard Interface” means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. </p> -<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">The “System Libraries” of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A “Major Component”, in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. </p> -<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">The “Corresponding Source” for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. </p> -<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. </p> -<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">The Corresponding Source for a work in source code form is that same work. </p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a name="section2"></a><span style=" font-size:medium; font-weight:600;">2</span><span style=" font-size:medium; font-weight:600;">. Basic Permissions.</span> </p> -<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. </p> -<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. </p> -<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. </p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a name="section3"></a><span style=" font-size:medium; font-weight:600;">3</span><span style=" font-size:medium; font-weight:600;">. Protecting Users' Legal Rights From Anti-Circumvention Law.</span> </p> -<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. </p> -<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. </p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a name="section4"></a><span style=" font-size:medium; font-weight:600;">4</span><span style=" font-size:medium; font-weight:600;">. Conveying Verbatim Copies.</span> </p> -<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. </p> -<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. </p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a name="section5"></a><span style=" font-size:medium; font-weight:600;">5</span><span style=" font-size:medium; font-weight:600;">. Conveying Modified Source Versions.</span> </p> -<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: </p> -<ul style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 1;"><li style=" margin-top:12px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">a) The work must carry prominent notices stating that you modified it, and giving a relevant date. </li> -<li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to “keep intact all notices”. </li> -<li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. </li> -<li style=" margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. </li></ul> -<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an “aggregate” if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. </p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a name="section6"></a><span style=" font-size:medium; font-weight:600;">6</span><span style=" font-size:medium; font-weight:600;">. Conveying Non-Source Forms.</span> </p> -<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: </p> -<ul style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 1;"><li style=" margin-top:12px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. </li> -<li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. </li> -<li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. </li> -<li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. </li> -<li style=" margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. </li></ul> -<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. </p> -<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">A “User Product” is either (1) a “consumer product”, which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, “normally used” refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. </p> -<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">“Installation Information” for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. </p> -<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). </p> -<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. </p> -<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. </p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a name="section7"></a><span style=" font-size:medium; font-weight:600;">7</span><span style=" font-size:medium; font-weight:600;">. Additional Terms.</span> </p> -<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">“Additional permissions” are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. </p> -<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. </p> -<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: </p> -<ul style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 1;"><li style=" margin-top:12px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or </li> -<li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or </li> -<li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or </li> -<li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">d) Limiting the use for publicity purposes of names of licensors or authors of the material; or </li> -<li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or </li> -<li style=" margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. </li></ul> -<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">All other non-permissive additional terms are considered “further restrictions” within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. </p> -<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. </p> -<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. </p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a name="section8"></a><span style=" font-size:medium; font-weight:600;">8</span><span style=" font-size:medium; font-weight:600;">. Termination.</span> </p> -<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). </p> -<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. </p> -<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. </p> -<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. </p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a name="section9"></a><span style=" font-size:medium; font-weight:600;">9</span><span style=" font-size:medium; font-weight:600;">. Acceptance Not Required for Having Copies.</span> </p> -<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. </p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a name="section10"></a><span style=" font-size:medium; font-weight:600;">1</span><span style=" font-size:medium; font-weight:600;">0. Automatic Licensing of Downstream Recipients.</span> </p> -<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. </p> -<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">An “entity transaction” is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. </p> -<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. </p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a name="section11"></a><span style=" font-size:medium; font-weight:600;">1</span><span style=" font-size:medium; font-weight:600;">1. Patents.</span> </p> -<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">A “contributor” is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's “contributor version”. </p> -<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">A contributor's “essential patent claims” are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, “control” includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. </p> -<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. </p> -<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">In the following three paragraphs, a “patent license” is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To “grant” such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. </p> -<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. “Knowingly relying” means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. </p> -<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. </p> -<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">A patent license is “discriminatory” if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. </p> -<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. </p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a name="section12"></a><span style=" font-size:medium; font-weight:600;">1</span><span style=" font-size:medium; font-weight:600;">2. No Surrender of Others' Freedom.</span> </p> -<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. </p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a name="section13"></a><span style=" font-size:medium; font-weight:600;">1</span><span style=" font-size:medium; font-weight:600;">3. Use with the GNU Affero General Public License.</span> </p> -<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such. </p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a name="section14"></a><span style=" font-size:medium; font-weight:600;">1</span><span style=" font-size:medium; font-weight:600;">4. Revised Versions of this License.</span> </p> -<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. </p> -<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License “or any later version” applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation. </p> -<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. </p> -<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. </p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a name="section15"></a><span style=" font-size:medium; font-weight:600;">1</span><span style=" font-size:medium; font-weight:600;">5. Disclaimer of Warranty.</span> </p> -<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. </p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a name="section16"></a><span style=" font-size:medium; font-weight:600;">1</span><span style=" font-size:medium; font-weight:600;">6. Limitation of Liability.</span> </p> -<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. </p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a name="section17"></a><span style=" font-size:medium; font-weight:600;">1</span><span style=" font-size:medium; font-weight:600;">7. Interpretation of Sections 15 and 16.</span> </p> -<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. </p> -<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">END OF TERMS AND CONDITIONS </p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a name="howto"></a><span style=" font-size:large; font-weight:600;">H</span><span style=" font-size:large; font-weight:600;">ow to Apply These Terms to Your New Programs</span> </p> -<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. </p> -<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the “copyright” line and a pointer to where the full notice is found. </p> -<p style=" margin-top:12px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Courier New,courier';"> &lt;one line to give the program's name and a brief idea of what it does.&gt;</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Courier New,courier';"> Copyright (C) &lt;year&gt; &lt;name of author&gt;</span></p> -<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Courier New,courier';"><br /></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Courier New,courier';"> This program is free software: you can redistribute it and/or modify</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Courier New,courier';"> it under the terms of the GNU General Public License as published by</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Courier New,courier';"> the Free Software Foundation, either version 3 of the License, or</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Courier New,courier';"> (at your option) any later version.</span></p> -<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Courier New,courier';"><br /></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Courier New,courier';"> This program is distributed in the hope that it will be useful,</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Courier New,courier';"> but WITHOUT ANY WARRANTY; without even the implied warranty of</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Courier New,courier';"> MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Courier New,courier';"> GNU General Public License for more details.</span></p> -<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Courier New,courier';"><br /></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Courier New,courier';"> You should have received a copy of the GNU General Public License</span></p> -<p style=" margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Courier New,courier';"> along with this program. If not, see &lt;http://www.gnu.org/licenses/&gt;. </span></p> -<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Also add information on how to contact you by electronic and paper mail. </p> -<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: </p> -<p style=" margin-top:12px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Courier New,courier';"> &lt;program&gt; Copyright (C) &lt;year&gt; &lt;name of author&gt;</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Courier New,courier';"> This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Courier New,courier';"> This is free software, and you are welcome to redistribute it</span></p> -<p style=" margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Courier New,courier';"> under certain conditions; type `show c' for details. </span></p> -<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an “about box”. </p> -<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">You should also get your employer (if you work as a programmer) or school, if any, to sign a “copyright disclaimer” for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see &lt;<a href="http://www.gnu.org/licenses/"><span style=" text-decoration: underline; color:#0000ff;">http://www.gnu.org/licenses/</span></a>&gt;. </p> -<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read &lt;<a href="http://www.gnu.org/philosophy/why-not-lgpl.html"><span style=" text-decoration: underline; color:#0000ff;">http://www.gnu.org/philosophy/why-not-lgpl.html</span></a>&gt;. </p></body></html> - - - Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse - - - - - - - Qt::Horizontal - - - QDialogButtonBox::No|QDialogButtonBox::Yes - - - - - - - - - - - buttonBox - accepted() - LicenseDialog - accept() - - - 248 - 254 - - - 157 - 274 - - - - - buttonBox - rejected() - LicenseDialog - reject() - - - 316 - 260 - - - 286 - 274 - - - - - diff --git a/attic/ZeroTierUI/mac_doprivileged.h b/attic/ZeroTierUI/mac_doprivileged.h deleted file mode 100644 index 52fba922..00000000 --- a/attic/ZeroTierUI/mac_doprivileged.h +++ /dev/null @@ -1,12 +0,0 @@ -#ifndef mac_doprivileged_h -#define mac_doprivileged_h - -#ifdef __APPLE__ - -// commandAndArgs can contain only single-tic quotes and should redirect its -// stdout and stderr somewhere... -bool macExecutePrivilegedShellCommand(const char *commandAndArgs); - -#endif - -#endif diff --git a/attic/ZeroTierUI/mac_doprivileged.mm b/attic/ZeroTierUI/mac_doprivileged.mm deleted file mode 100644 index 5bd6a7a6..00000000 --- a/attic/ZeroTierUI/mac_doprivileged.mm +++ /dev/null @@ -1,24 +0,0 @@ -#include -#include - -#include "mac_doprivileged.h" - -#undef slots -#include - -bool macExecutePrivilegedShellCommand(const char *commandAndArgs) -{ - char tmp[32768]; - - snprintf(tmp,sizeof(tmp),"do shell script \"%s\" with administrator privileges\n",commandAndArgs); - tmp[32767] = (char)0; - - NSString *scriptApple = [[NSString alloc] initWithUTF8String:tmp]; - NSAppleScript *as = [[NSAppleScript alloc] initWithSource:scriptApple]; - NSDictionary *err = nil; - [as executeAndReturnError:&err]; - [as release]; - [scriptApple release]; - - return (err == nil); -} diff --git a/attic/ZeroTierUI/main.cpp b/attic/ZeroTierUI/main.cpp deleted file mode 100644 index e3d24939..00000000 --- a/attic/ZeroTierUI/main.cpp +++ /dev/null @@ -1,194 +0,0 @@ -/* - * ZeroTier One - Network Virtualization Everywhere - * Copyright (C) 2011-2015 ZeroTier, Inc. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - * -- - * - * ZeroTier may be used and distributed under the terms of the GPLv3, which - * are available at: http://www.gnu.org/licenses/gpl-3.0.html - * - * If you would like to embed ZeroTier into a commercial application or - * redistribute it in a modified binary form, please contact ZeroTier Networks - * LLC. Start here: http://www.zerotier.com/ - */ - -#include -#include -#include - -#include "mainwindow.h" -#include "installdialog.h" -#include "licensedialog.h" - -#include -#include -#include -#include -#include - -#include "../node/Constants.hpp" -#include "../node/Defaults.hpp" - -// Uncomment for testing to disable making sure Windows service is running -#define DISABLE_WINDOWS_SERVICE_MANAGEMENT - -#ifdef __WINDOWS__ -#include -#include -#include "../windows/ZeroTierOne/ZeroTierOneService.h" - -#ifndef DISABLE_WINDOWS_SERVICE_MANAGEMENT -// Returns true if started or already running, false if failed or not installed -static bool startWindowsService() -{ - SERVICE_STATUS ssSvcStatus; - SC_HANDLE schSCManager = NULL; - SC_HANDLE schService = NULL; - - schSCManager = OpenSCManager(NULL, NULL, SC_MANAGER_CONNECT); - if (schSCManager == NULL) - return false; - - schService = OpenServiceA(schSCManager, ZT_SERVICE_NAME, SERVICE_QUERY_STATUS | SERVICE_START); - if (schService == NULL) { - CloseServiceHandle(schSCManager); - return false; - } - - int tries = 0; - bool running = true; - - for(;;) { - memset(&ssSvcStatus,0,sizeof(ssSvcStatus)); - if ((++tries > 20)||(!QueryServiceStatus(schService,&ssSvcStatus))) { - running = false; - break; - } - - if (ssSvcStatus.dwCurrentState == SERVICE_RUNNING) { - break; - } else if (ssSvcStatus.dwCurrentState == SERVICE_START_PENDING) { - Sleep(500); - continue; - } - - StartService(schService,0,NULL); - Sleep(500); - } - - CloseServiceHandle(schService); - CloseServiceHandle(schSCManager); - return running; -} -#endif // !DISABLE_WINDOWS_SERVICE_MANAGEMENT -#endif // __WINDOWS__ - -// Globally visible settings for the app -QSettings *settings = (QSettings *)0; - -int main(int argc, char *argv[]) -{ - QApplication a(argc, argv); - -#ifdef __WINDOWS__ - // Start up Winsock2 - { - WSADATA wsaData; - WSAStartup(MAKEWORD(2,2),&wsaData); - } -#endif - - { - QFile qss(":css/stylesheet.css"); - qss.open(QFile::ReadOnly); - QString style(qss.readAll()); - a.setStyleSheet(style); - } - -#ifdef __APPLE__ - // If service isn't installed, download and install it - if (!QFile::exists("/Library/Application Support/ZeroTier/One/zerotier-one")) { - // InstallDialog is an alternative main window. It will re-launch the app - // when done. - InstallDialog id; - id.setStyleSheet(a.styleSheet()); - id.show(); - return a.exec(); - } - - { - // Put QSettings here because this is one of the writable directories allowed - // in Apple's app store sandbox specs. We might end up in app store someday. - QString zt1AppSupport(QDir::homePath() + "/Library/Application Support/ZeroTier/One"); - QDir::root().mkpath(zt1AppSupport); - settings = new QSettings(zt1AppSupport + "/ui.ini",QSettings::IniFormat); - } -#else // on non-Apple boxen put it in the standard place using the default format - settings = new QSettings("ZeroTier Networks","ZeroTier One"); -#endif - - if (!settings->value("acceptedLicenseV1",false).toBool()) { - LicenseDialog ld; - ld.setStyleSheet(a.styleSheet()); - ld.exec(); - } - -#if defined(__WINDOWS__) && !defined(DISABLE_WINDOWS_SERVICE_MANAGEMENT) - { - bool winSvcInstalled = false; - while (!startWindowsService()) { - if (winSvcInstalled) { - // Service was installed and subsequently failed to start again, so - // something is wrong! - QMessageBox::critical((QWidget *)0,"Service Not Available","Unable to locate or start ZeroTier One service. There may be a problem with the installation. Try installing from the .msi file again or e-mail contact@zerotier.com if you cannot install. (Error: service failed to start)",QMessageBox::Ok); - return 1; - } - -#ifdef _WIN64 - BOOL is64Bit = TRUE; -#else - BOOL is64Bit = FALSE; - IsWow64Process(GetCurrentProcess(),&is64Bit); -#endif - std::string exe(ZeroTier::ZT_DEFAULTS.defaultHomePath + "\\zerotier-one_"); - exe.append((is64Bit == TRUE) ? "x64.exe" : "x86.exe"); - - if (QFile::exists(exe.c_str())) { - STARTUPINFOA si; - PROCESS_INFORMATION pi; - memset(&si,0,sizeof(si)); - memset(&pi,0,sizeof(pi)); - if (CreateProcessA(NULL,const_cast ((exe + " -I").c_str()),NULL,NULL,FALSE,CREATE_NO_WINDOW|CREATE_NEW_PROCESS_GROUP,NULL,NULL,&si,&pi)) { - WaitForSingleObject(pi.hProcess,INFINITE); - CloseHandle(pi.hProcess); - CloseHandle(pi.hThread); - winSvcInstalled = true; - } - } - - if (!winSvcInstalled) { - // Service failed to install -- installation problem like missing .exe - QMessageBox::critical((QWidget *)0,"Service Not Available","Unable to locate or start ZeroTier One service. There may be a problem with the installation. Try installing from the .msi file again or e-mail contact@zerotier.com if you cannot install. (Error: service not installed)",QMessageBox::Ok); - return 1; - } - } - } -#endif - - MainWindow w; - w.show(); - return a.exec(); -} diff --git a/attic/ZeroTierUI/main.h b/attic/ZeroTierUI/main.h deleted file mode 100644 index bee0e51b..00000000 --- a/attic/ZeroTierUI/main.h +++ /dev/null @@ -1,9 +0,0 @@ -#ifndef MAIN_H -#define MAIN_H - -#include -#include - -extern QSettings *settings; - -#endif // MAIN_H diff --git a/attic/ZeroTierUI/mainwindow.cpp b/attic/ZeroTierUI/mainwindow.cpp deleted file mode 100644 index c7cf2b60..00000000 --- a/attic/ZeroTierUI/mainwindow.cpp +++ /dev/null @@ -1,424 +0,0 @@ -/* - * ZeroTier One - Network Virtualization Everywhere - * Copyright (C) 2011-2015 ZeroTier, Inc. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - * -- - * - * ZeroTier may be used and distributed under the terms of the GPLv3, which - * are available at: http://www.gnu.org/licenses/gpl-3.0.html - * - * If you would like to embed ZeroTier into a commercial application or - * redistribute it in a modified binary form, please contact ZeroTier Networks - * LLC. Start here: http://www.zerotier.com/ - */ - -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "main.h" -#include "mainwindow.h" -#include "aboutwindow.h" -#include "networkwidget.h" -#include "ui_mainwindow.h" -#include "ui_quickstartdialog.h" - -#ifdef __APPLE__ -#include -#include -#include -#include -#include -#include "mac_doprivileged.h" -#endif - -#include "../node/Utils.hpp" -#include "../node/Identity.hpp" -#include "../node/Defaults.hpp" - -// Globally visible -ZeroTier::NodeControlClient *zeroTierClient = (ZeroTier::NodeControlClient *)0; - -// Main window instance for app -QMainWindow *mainWindow = (MainWindow *)0; - -// Handles message from ZeroTier One service -static void handleZTMessage(void *arg,const char *line) -{ - static std::vector ztReplies; - static QMutex ztReplies_m; - - ztReplies_m.lock(); - - if (line) { - //printf("%s\n",line); - if ((line[0] == '.')&&(line[1] == (char)0)) { - // The message is packed into an event and sent to the main window where - // the actual parsing code lives. - MainWindow::ZTMessageEvent *event = new MainWindow::ZTMessageEvent(ztReplies); - ztReplies.clear(); - QCoreApplication::postEvent(mainWindow,event); // must post since this may be another thread - } else if (line[0]) { - ztReplies.push_back(std::string(line)); - } - } - - ztReplies_m.unlock(); -} - -MainWindow::MainWindow(QWidget *parent) : - QMainWindow(parent), - ui(new Ui::MainWindow), - pollServiceTimerId(-1) -{ - mainWindow = this; - - ui->setupUi(this); - if (ui->networkListWidget->verticalScrollBar()) - ui->networkListWidget->verticalScrollBar()->setSingleStep(8); - -#ifdef __APPLE__ - QWidgetList widgets = this->findChildren(); - foreach(QWidget *widget, widgets) - widget->setAttribute(Qt::WA_MacShowFocusRect,false); -#endif - -#ifdef __WINDOWS__ - // Windows operates at a different DPI, so we have to rescale the default Qt - // font sizes so everything isn't huge. Yeah. - QWidgetList widgets = this->findChildren(); - foreach(QWidget *widget, widgets) { - if (typeid(*widget) != typeid(*ui->menuFile)) { // menus don't need the DPI shift apparently - QFont font(widget->font()); - font.setPointSizeF(font.pointSizeF() * 0.75); - widget->setFont(font); - } - } - this->raise(); -#endif - - ui->noNetworksLabel->setVisible(true); - ui->noNetworksLabel->setText("Connecting to Service..."); - ui->bottomContainerWidget->setVisible(false); - ui->networkListWidget->setVisible(false); - - this->firstTimerTick = true; - this->pollServiceTimerId = this->startTimer(200); - this->cyclesSinceResponseFromService = 0; -} - -MainWindow::~MainWindow() -{ - delete ui; - delete zeroTierClient; - zeroTierClient = (ZeroTier::NodeControlClient *)0; - mainWindow = (MainWindow *)0; -} - -void MainWindow::timerEvent(QTimerEvent *event) // event can be null since code also calls this directly -{ - if (this->isHidden()) - return; - if (this->pollServiceTimerId < 0) - return; - - // Show quick start dialog on first launch, then reset timer to normal rate - if (this->firstTimerTick) { - this->firstTimerTick = false; - this->killTimer(this->pollServiceTimerId); - if (!settings->value("shown_quickStart",false).toBool()) { - on_actionQuick_Start_triggered(); - settings->setValue("shown_quickStart",true); - settings->sync(); - } - this->pollServiceTimerId = this->startTimer(2000); - } - - if (!zeroTierClient) { -#ifdef __APPLE__ - if ((!QFile::exists(ZeroTier::NodeControlClient::authTokenDefaultUserPath()))&&(QFile::exists("/Library/Application Support/ZeroTier/One/zerotier-one"))) { - // Authorize user by copying auth token into local home directory - QMessageBox::information(this,"Authorization Needed","Administrator privileges are required to allow the current user to control ZeroTier One on this computer. (You only have to do this once.)",QMessageBox::Ok,QMessageBox::NoButton); - - std::string homePath(QDir::homePath().toStdString()); - QString zt1Caches(QDir::homePath() + "/Library/Caches/ZeroTier/One"); - QDir::root().mkpath(zt1Caches); - std::string tmpPath((zt1Caches + "/auth.sh").toStdString()); - - FILE *scr = fopen(tmpPath.c_str(),"w"); - if (!scr) { - QMessageBox::critical(this,"Cannot Authorize","Unable to authorize this user to administrate ZeroTier One. (Cannot write to temporary Library/Caches/ZeroTier/One folder.)",QMessageBox::Ok,QMessageBox::NoButton); - QApplication::exit(1); - return; - } - - fprintf(scr,"#!/bin/bash\n"); - fprintf(scr,"export PATH=\"/bin:/usr/bin:/sbin:/usr/sbin\"\n"); - fprintf(scr,"if [ -f '/Library/Application Support/ZeroTier/One/authtoken.secret' ]; then\n"); - fprintf(scr," mkdir -p '%s/Library/Application Support/ZeroTier/One'\n",homePath.c_str()); - fprintf(scr," chown %d '%s/Library/Application Support/ZeroTier'\n",(int)getuid(),homePath.c_str()); - fprintf(scr," chgrp %d '%s/Library/Application Support/ZeroTier'\n",(int)getgid(),homePath.c_str()); - fprintf(scr," chmod 0700 '%s/Library/Application Support/ZeroTier'\n",homePath.c_str()); - fprintf(scr," chown %d '%s/Library/Application Support/ZeroTier/One'\n",(int)getuid(),homePath.c_str()); - fprintf(scr," chgrp %d '%s/Library/Application Support/ZeroTier/One'\n",(int)getgid(),homePath.c_str()); - fprintf(scr," chmod 0700 '%s/Library/Application Support/ZeroTier/One'\n",homePath.c_str()); - fprintf(scr," cp -f '/Library/Application Support/ZeroTier/One/authtoken.secret' '%s/Library/Application Support/ZeroTier/One/authtoken.secret'\n",homePath.c_str()); - fprintf(scr," chown %d '%s/Library/Application Support/ZeroTier/One/authtoken.secret'\n",(int)getuid(),homePath.c_str()); - fprintf(scr," chgrp %d '%s/Library/Application Support/ZeroTier/One/authtoken.secret'\n",(int)getgid(),homePath.c_str()); - fprintf(scr," chmod 0600 '%s/Library/Application Support/ZeroTier/One/authtoken.secret'\n",homePath.c_str()); - fprintf(scr,"fi\n"); - fprintf(scr,"exit 0\n"); - - fclose(scr); - chmod(tmpPath.c_str(),0755); - - macExecutePrivilegedShellCommand((std::string("'")+tmpPath+"' >>/dev/null 2>&1").c_str()); - - unlink(tmpPath.c_str()); - } -#endif // __APPLE__ - - try { - std::string buf; - if (ZeroTier::Utils::readFile((ZeroTier::ZT_DEFAULTS.defaultHomePath + ZT_PATH_SEPARATOR_S + "identity.public").c_str(),buf)) { - ZeroTier::Identity id; - if (id.fromString(buf)) { - std::string authToken(ZeroTier::NodeControlClient::getAuthToken(ZeroTier::NodeControlClient::authTokenDefaultUserPath(),false)); - if (!authToken.length()) - authToken = ZeroTier::NodeControlClient::getAuthToken((ZeroTier::ZT_DEFAULTS.defaultHomePath + ZT_PATH_SEPARATOR_S + "authtoken.secret").c_str(),false); - zeroTierClient = new ZeroTier::NodeControlClient((std::string(ZT_IPC_ENDPOINT_BASE) + id.address().toString()).c_str(),authToken.c_str(),&handleZTMessage,this); - const char *err = zeroTierClient->error(); - if (err) { - delete zeroTierClient; - zeroTierClient = (ZeroTier::NodeControlClient *)0; - } - } - } - } catch ( ... ) { - zeroTierClient = (ZeroTier::NodeControlClient *)0; - } - } - - if (++this->cyclesSinceResponseFromService >= 3) { - if (this->cyclesSinceResponseFromService == 3) { - QMessageBox::warning(this,"Service Not Running","Can't connect to the ZeroTier One service. Is it running?",QMessageBox::Ok); - } - ui->noNetworksLabel->setVisible(true); - ui->noNetworksLabel->setText("Connecting to Service..."); - ui->bottomContainerWidget->setVisible(false); - ui->networkListWidget->setVisible(false); - } - - if (zeroTierClient) { - zeroTierClient->send("info"); - zeroTierClient->send("listnetworks"); - zeroTierClient->send("listpeers"); - } -} - -void MainWindow::customEvent(QEvent *event) -{ - ZTMessageEvent *m = (ZTMessageEvent *)event; // only one custom event type so far - if (m->ztMessage.size() == 0) - return; - std::vector hdr(ZeroTier::NodeControlClient::splitLine(m->ztMessage[0])); - if (hdr.size() < 2) - return; - if (hdr[0] != "200") - return; - - this->cyclesSinceResponseFromService = 0; - - if (hdr[1] == "info") { - if (hdr.size() >= 3) - this->myAddress = hdr[2].c_str(); - if (hdr.size() >= 4) - this->myStatus = hdr[3].c_str(); - if (hdr.size() >= 5) - this->myVersion = hdr[4].c_str(); - } else if (hdr[1] == "listnetworks") { - std::map< std::string,std::vector > newNetworks; - for(unsigned long i=1;iztMessage.size();++i) { - std::vector l(ZeroTier::NodeControlClient::splitLine(m->ztMessage[i])); - // 200 listnetworks - if ((l.size() == 10)&&(l[2].length() == 16)) - newNetworks[l[2]] = l; - } - - if (newNetworks != networks) { - networks = newNetworks; - - for (bool removed=true;removed;) { - removed = false; - for(int r=0;rnetworkListWidget->count();++r) { - NetworkWidget *nw = (NetworkWidget *)ui->networkListWidget->itemWidget(ui->networkListWidget->item(r)); - if (!networks.count(nw->networkId())) { - ui->networkListWidget->setVisible(false); // HACK to prevent an occasional crash here, discovered through hours of shotgun debugging... :P - delete ui->networkListWidget->takeItem(r); - removed = true; - break; - } - } - } - ui->networkListWidget->setVisible(true); - std::set alreadyDisplayed; - for(int r=0;rnetworkListWidget->count();++r) { - NetworkWidget *nw = (NetworkWidget *)ui->networkListWidget->itemWidget(ui->networkListWidget->item(r)); - if (networks.count(nw->networkId()) > 0) { - alreadyDisplayed.insert(nw->networkId()); - std::vector &l = networks[nw->networkId()]; - nw->setNetworkName(l[3]); - nw->setMAC(l[4]); - nw->setStatus(l[5],l[6]); - nw->setNetworkType(l[7]); - nw->setNetworkDeviceName(l[8]); - nw->setIps(l[9]); - } - } - for(std::map< std::string,std::vector >::iterator nwdata(networks.begin());nwdata!=networks.end();++nwdata) { - if (alreadyDisplayed.count(nwdata->first) == 0) { - std::vector &l = nwdata->second; - NetworkWidget *nw = new NetworkWidget((QWidget *)0,nwdata->first); - nw->setNetworkName(l[3]); - nw->setMAC(l[4]); - nw->setStatus(l[5],l[6]); - nw->setNetworkType(l[7]); - nw->setNetworkDeviceName(l[8]); - nw->setIps(l[9]); - QListWidgetItem *item = new QListWidgetItem(); - item->setSizeHint(nw->sizeHint()); - ui->networkListWidget->addItem(item); - ui->networkListWidget->setItemWidget(item,nw); - } - } - } - } else if (hdr[1] == "listpeers") { - this->numPeers = 0; - for(unsigned long i=1;iztMessage.size();++i) - ++this->numPeers; - } else - return; - - if (!ui->networkListWidget->count()) { - ui->noNetworksLabel->setText("You Have Not Joined Any Networks"); - ui->noNetworksLabel->setVisible(true); - } else ui->noNetworksLabel->setVisible(false); - - if (!ui->bottomContainerWidget->isVisible()) - ui->bottomContainerWidget->setVisible(true); - if (!ui->networkListWidget->isVisible()) - ui->networkListWidget->setVisible(true); - - if (this->myAddress.size()) - ui->addressButton->setText(this->myAddress); - else ui->addressButton->setText(" "); - - QString st(this->myStatus); - st += ", v"; - st += this->myVersion; - st += ", "; - st += QString::number(this->numPeers); - st += " peers"; - ui->statusLabel->setText(st); -} - -void MainWindow::on_joinNetworkButton_clicked() -{ - QString toJoin(ui->networkIdLineEdit->text()); - ui->networkIdLineEdit->setText(QString()); - - if (!zeroTierClient) // sanity check - return; - - if (toJoin.size() != 16) { - QMessageBox::information(this,"Invalid Network ID","The network ID you entered was not valid. Enter a 16-digit hexadecimal network ID, like '8056c2e21c000001'.",QMessageBox::Ok,QMessageBox::NoButton); - return; - } - - zeroTierClient->send((QString("join ") + toJoin).toStdString()); -} - -void MainWindow::on_actionAbout_triggered() -{ - AboutWindow *about = new AboutWindow(this); - about->show(); -} - -void MainWindow::on_networkIdLineEdit_textChanged(const QString &text) -{ - QString newText; - for(QString::const_iterator i(text.begin());i!=text.end();++i) { - switch(i->toLatin1()) { - case '0': newText.append('0'); break; - case '1': newText.append('1'); break; - case '2': newText.append('2'); break; - case '3': newText.append('3'); break; - case '4': newText.append('4'); break; - case '5': newText.append('5'); break; - case '6': newText.append('6'); break; - case '7': newText.append('7'); break; - case '8': newText.append('8'); break; - case '9': newText.append('9'); break; - case 'a': newText.append('a'); break; - case 'b': newText.append('b'); break; - case 'c': newText.append('c'); break; - case 'd': newText.append('d'); break; - case 'e': newText.append('e'); break; - case 'f': newText.append('f'); break; - case 'A': newText.append('a'); break; - case 'B': newText.append('b'); break; - case 'C': newText.append('c'); break; - case 'D': newText.append('d'); break; - case 'E': newText.append('e'); break; - case 'F': newText.append('f'); break; - default: break; - } - } - if (newText.size() > 16) - newText.truncate(16); - ui->networkIdLineEdit->setText(newText); -} - -void MainWindow::on_addressButton_clicked() -{ - QApplication::clipboard()->setText(this->myAddress); -} - -void MainWindow::on_actionQuick_Start_triggered() -{ - Ui::QuickstartDialog qd; - QDialog *qdd = new QDialog(this); - qd.setupUi(qdd); - qdd->setModal(false); - qdd->show(); -} diff --git a/attic/ZeroTierUI/mainwindow.h b/attic/ZeroTierUI/mainwindow.h deleted file mode 100644 index 581cff1d..00000000 --- a/attic/ZeroTierUI/mainwindow.h +++ /dev/null @@ -1,101 +0,0 @@ -/* - * ZeroTier One - Network Virtualization Everywhere - * Copyright (C) 2011-2015 ZeroTier, Inc. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - * -- - * - * ZeroTier may be used and distributed under the terms of the GPLv3, which - * are available at: http://www.gnu.org/licenses/gpl-3.0.html - * - * If you would like to embed ZeroTier into a commercial application or - * redistribute it in a modified binary form, please contact ZeroTier Networks - * LLC. Start here: http://www.zerotier.com/ - */ - -#ifndef MAINWINDOW_H -#define MAINWINDOW_H - -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -#include "../node/Constants.hpp" -#include "../node/Node.hpp" -#include "../node/Utils.hpp" -#include "../control/NodeControlClient.hpp" - -namespace Ui { -class MainWindow; -} - -// Globally visible instance of local client for communicating with ZT1 -// Can be null if not connected, or will point to current -extern ZeroTier::NodeControlClient *zeroTierClient; - -// Globally visible pointer to main app window -extern QMainWindow *mainWindow; - -class MainWindow : public QMainWindow -{ - Q_OBJECT - -public: - // Event used to pass messages from the Node::LocalClient thread to the - // main window to update network lists and stats. - class ZTMessageEvent : public QEvent - { - public: - ZTMessageEvent(const std::vector &m) : - QEvent(QEvent::User), - ztMessage(m) {} - std::vector ztMessage; - }; - - explicit MainWindow(QWidget *parent = 0); - virtual ~MainWindow(); - -protected: - virtual void timerEvent(QTimerEvent *event); - virtual void customEvent(QEvent *event); - -private slots: - void on_joinNetworkButton_clicked(); - void on_actionAbout_triggered(); - void on_networkIdLineEdit_textChanged(const QString &text); - void on_addressButton_clicked(); - void on_actionQuick_Start_triggered(); - -private: - Ui::MainWindow *ui; - - QString myAddress; - QString myStatus; - QString myVersion; - bool firstTimerTick; - int pollServiceTimerId; - unsigned int numPeers; - unsigned int cyclesSinceResponseFromService; - std::map< std::string,std::vector > networks; -}; - -#endif // MAINWINDOW_H diff --git a/attic/ZeroTierUI/mainwindow.ui b/attic/ZeroTierUI/mainwindow.ui deleted file mode 100644 index 0cedce31..00000000 --- a/attic/ZeroTierUI/mainwindow.ui +++ /dev/null @@ -1,306 +0,0 @@ - - - MainWindow - - - - 0 - 0 - 850 - 400 - - - - ZeroTier One - - - - :/img/zt1icon.png:/img/zt1icon.png - - - - - 0 - - - 0 - - - 0 - - - 0 - - - 0 - - - - - - 16 - - - - QFrame::NoFrame - - - You Have Not Joined Any Networks - - - Qt::PlainText - - - Qt::AlignCenter - - - true - - - 25 - - - Qt::NoTextInteraction - - - - - - - Qt::NoFocus - - - QFrame::NoFrame - - - Qt::ScrollBarAlwaysOff - - - false - - - QAbstractItemView::NoEditTriggers - - - QAbstractItemView::NoSelection - - - QAbstractItemView::ScrollPerPixel - - - 0 - - - true - - - - - - - - 0 - - - 0 - - - 0 - - - 0 - - - 0 - - - - - - 0 - 0 - - - - - Courier - 12 - 75 - true - - - - Your 10-digit ZeroTier address; click to copy to clipboard. - - - ---------- - - - Qt::ToolButtonTextOnly - - - clickToCopy - - - - - - - - 0 - 0 - - - - - 10 - - - - Your network connection status. - - - - - - Qt::PlainText - - - - - - - - 0 - 0 - - - - - Courier - 12 - - - - Enter a hexadecimal network ID to join a network. - - - 16 - - - true - - - (Network ID) - - - - - - - - 0 - 0 - - - - - Courier - 16 - 75 - true - - - - Join this network. - - - + - - - - - - - - - - - - 0 - 0 - 850 - 34 - - - - - 12 - - - - Qt::LeftToRight - - - - Help - - - - - - - File - - - - - - - - - - - 10 - - - - - - About - - - - - Exit - - - - - Quick Start - - - - - - - - - - actionExit - triggered() - MainWindow - close() - - - -1 - -1 - - - 333 - 149 - - - - - diff --git a/attic/ZeroTierUI/networkwidget.cpp b/attic/ZeroTierUI/networkwidget.cpp deleted file mode 100644 index ff127c71..00000000 --- a/attic/ZeroTierUI/networkwidget.cpp +++ /dev/null @@ -1,181 +0,0 @@ -/* - * ZeroTier One - Network Virtualization Everywhere - * Copyright (C) 2011-2015 ZeroTier, Inc. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - * -- - * - * ZeroTier may be used and distributed under the terms of the GPLv3, which - * are available at: http://www.gnu.org/licenses/gpl-3.0.html - * - * If you would like to embed ZeroTier into a commercial application or - * redistribute it in a modified binary form, please contact ZeroTier Networks - * LLC. Start here: http://www.zerotier.com/ - */ - -#include "networkwidget.h" -#include "mainwindow.h" -#include "ui_networkwidget.h" -#include "onetimedialog.h" -#include "main.h" - -#include -#include -#include -#include -#include -#include -#include -#include - -#include "../node/Constants.hpp" - -NetworkWidget::NetworkWidget(QWidget *parent,const std::string &nwid) : - QWidget(parent), - ui(new Ui::NetworkWidget), - networkIdStr(nwid), - publicWarningShown(false) -{ - ui->setupUi(this); - ui->networkIdButton->setText(QString(nwid.c_str())); - - QFontMetrics fm(ui->ipListWidget->font()); - int lineHeight = ui->ipListWidget->spacing() + fm.height(); - ui->ipListWidget->setMinimumHeight(lineHeight * 6); - ui->ipListWidget->setMaximumHeight(lineHeight * 6); - -#ifdef __APPLE__ - QWidgetList widgets = this->findChildren(); - foreach(QWidget* widget, widgets) - widget->setAttribute(Qt::WA_MacShowFocusRect,false); -#endif - -#ifdef __WINDOWS__ - QWidgetList widgets = this->findChildren(); - foreach(QWidget *widget, widgets) { - QFont font(widget->font()); - font.setPointSizeF(font.pointSizeF() * 0.75); - widget->setFont(font); - } -#endif -} - -NetworkWidget::~NetworkWidget() -{ - delete ui; -} - -void NetworkWidget::setStatus(const std::string &status,const std::string &age) -{ - ui->statusLabel->setText(QString(status.c_str())); -} - -void NetworkWidget::setNetworkName(const std::string &name) -{ - if (name == "?") { - ui->nameLabel->setText("... waiting ..."); - ui->nameLabel->setEnabled(false); - } else { - ui->nameLabel->setText(QString(name.c_str())); - ui->nameLabel->setEnabled(true); - } -} - -void NetworkWidget::setNetworkType(const std::string &type) -{ - ui->networkTypeLabel->setText(QString(type.c_str())); - if (type == "?") - ui->networkTypeLabel->setStatusTip("Waiting for configuration..."); - else if (type == "public") { - if ((!publicWarningShown)&&(!settings->value("shown_publicWarning",false).toBool())) { - publicWarningShown = true; - OneTimeDialog *d = new OneTimeDialog(mainWindow,"shown_publicWarning","Security Notice","Security Notice:"ZT_EOL_S""ZT_EOL_S"You have joined a public network. Anyone can join these. We recommend making sure that your system's automatic software updates are enabled and turning off any shared network services that you do not want people to access."); - d->setModal(false); - d->show(); - } - ui->networkTypeLabel->setStatusTip("This network can be joined by anyone in the world."); - } else if (type == "private") - ui->networkTypeLabel->setStatusTip("This network is private; only authorized peers can join."); - else ui->networkTypeLabel->setStatusTip("Unknown network type."); -} - -void NetworkWidget::setNetworkDeviceName(const std::string &dev) -{ - ui->deviceLabel->setText(QString(dev.c_str())); -} - -void NetworkWidget::setIps(const std::string &commaSeparatedList) -{ - QStringList ips(QString(commaSeparatedList.c_str()).split(QChar(','),QString::SkipEmptyParts)); - if (commaSeparatedList == "-") - ips.clear(); - - QStringList tmp; - ips.sort(); - for(QStringList::iterator i(ips.begin());i!=ips.end();++i) { - QString ipOnly(*i); - int slashIdx = ipOnly.indexOf('/'); - if (slashIdx > 0) - ipOnly.truncate(slashIdx); - tmp.append(ipOnly); - } - ips = tmp; - - for(QStringList::iterator i(ips.begin());i!=ips.end();++i) { - if (ui->ipListWidget->findItems(*i,Qt::MatchCaseSensitive).size() == 0) - ui->ipListWidget->addItem(*i); - } - - for(int i=0;iipListWidget->count();++i) { - QListWidgetItem *item = ui->ipListWidget->item(i); - if (!ips.contains(item->text())) - ui->ipListWidget->removeItemWidget(item); - } -} - -void NetworkWidget::setMAC(const std::string &mac) -{ - ui->macLabel->setText(QString(mac.c_str())); -} - -const std::string &NetworkWidget::networkId() -{ - return networkIdStr; -} - -void NetworkWidget::on_leaveNetworkButton_clicked() -{ - if (QMessageBox::question(this,"Leave Network?",QString("Are you sure you want to leave network '") + networkIdStr.c_str() + "'?",QMessageBox::No,QMessageBox::Yes) == QMessageBox::Yes) { - this->setEnabled(false); - zeroTierClient->send((QString("leave ") + networkIdStr.c_str()).toStdString()); - } -} - -void NetworkWidget::on_networkIdButton_clicked() -{ - QApplication::clipboard()->setText(ui->networkIdButton->text()); -} - -void NetworkWidget::on_ipListWidget_itemActivated(QListWidgetItem *item) -{ - if (item) - QApplication::clipboard()->setText(item->text()); -} - -void NetworkWidget::on_ipListWidget_currentItemChanged(QListWidgetItem *current, QListWidgetItem *previous) -{ - if (current) - QApplication::clipboard()->setText(current->text()); -} diff --git a/attic/ZeroTierUI/networkwidget.h b/attic/ZeroTierUI/networkwidget.h deleted file mode 100644 index 72115c6f..00000000 --- a/attic/ZeroTierUI/networkwidget.h +++ /dev/null @@ -1,69 +0,0 @@ -/* - * ZeroTier One - Network Virtualization Everywhere - * Copyright (C) 2011-2015 ZeroTier, Inc. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - * -- - * - * ZeroTier may be used and distributed under the terms of the GPLv3, which - * are available at: http://www.gnu.org/licenses/gpl-3.0.html - * - * If you would like to embed ZeroTier into a commercial application or - * redistribute it in a modified binary form, please contact ZeroTier Networks - * LLC. Start here: http://www.zerotier.com/ - */ - -#ifndef NETWORK_H -#define NETWORK_H - -#include - -#include -#include - -namespace Ui { -class NetworkWidget; -} - -class NetworkWidget : public QWidget -{ - Q_OBJECT - -public: - explicit NetworkWidget(QWidget *parent = 0,const std::string &nwid = std::string()); - virtual ~NetworkWidget(); - - void setStatus(const std::string &status,const std::string &age); - void setNetworkName(const std::string &name); - void setNetworkType(const std::string &type); - void setNetworkDeviceName(const std::string &dev); - void setIps(const std::string &commaSeparatedList); - void setMAC(const std::string &mac); - - const std::string &networkId(); - -private slots: - void on_leaveNetworkButton_clicked(); - void on_networkIdButton_clicked(); - void on_ipListWidget_itemActivated(QListWidgetItem *item); - void on_ipListWidget_currentItemChanged(QListWidgetItem *current, QListWidgetItem *previous); - -private: - Ui::NetworkWidget *ui; - std::string networkIdStr; - bool publicWarningShown; -}; - -#endif // NETWORK_H diff --git a/attic/ZeroTierUI/networkwidget.ui b/attic/ZeroTierUI/networkwidget.ui deleted file mode 100644 index af025d5d..00000000 --- a/attic/ZeroTierUI/networkwidget.ui +++ /dev/null @@ -1,574 +0,0 @@ - - - NetworkWidget - - - - 0 - 0 - 689 - 253 - - - - - 0 - 0 - - - - Network - - - networkListItem - - - - 0 - - - 2 - - - 0 - - - 2 - - - 0 - - - - - - 0 - 0 - - - - - 2 - - - 0 - - - 0 - - - 0 - - - 0 - - - - - - 0 - 0 - - - - - 0 - - - 4 - - - 0 - - - 0 - - - - - - Courier - 13 - 75 - true - - - - Hexadecimal network ID; click to copy to clipboard. - - - ---------------- - - - Qt::ToolButtonTextOnly - - - clickToCopy - - - - - - - - 14 - - - - [ - - - Qt::PlainText - - - Qt::NoTextInteraction - - - - - - - - 13 - 75 - true - - - - This network's short name. - - - networkname - - - Qt::PlainText - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter - - - Qt::NoTextInteraction - - - networkName - - - - - - - - 14 - - - - ] - - - Qt::PlainText - - - Qt::NoTextInteraction - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - - - 0 - 0 - - - - - QFormLayout::ExpandingFieldsGrow - - - QFormLayout::DontWrapRows - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - Qt::AlignHCenter|Qt::AlignTop - - - 4 - - - 2 - - - 4 - - - 4 - - - 0 - - - 4 - - - - - - 12 - - - - Type: - - - Qt::PlainText - - - - - - - - 0 - 0 - - - - - 12 - 75 - true - - - - What kind of network? Public or private? - - - ? - - - Qt::PlainText - - - - - - - - 12 - - - - Status: - - - Qt::PlainText - - - - - - - - 0 - 0 - - - - - 12 - 75 - true - - - - Status of this network. - - - ? - - - Qt::PlainText - - - - - - - - 12 - - - - Device: - - - Qt::PlainText - - - - - - - - 0 - 0 - - - - - 12 - 75 - true - - - - The name of the network device on your system. - - - ? - - - Qt::PlainText - - - - - - - - 12 - - - - MAC: - - - Qt::PlainText - - - - - - - - 0 - 0 - - - - - 12 - 75 - true - - - - Your system's Ethernet MAC address. - - - ? - - - Qt::PlainText - - - - - - - - - - Qt::Vertical - - - QSizePolicy::Expanding - - - - 20 - 40 - - - - - - - - - - - - 0 - 0 - - - - - 0 - - - 0 - - - 0 - - - 0 - - - 0 - - - - - - 0 - 0 - - - - - 12 - false - - - - padding: 0.1em 0 0.1em 0; - - - IP Addresses - - - Qt::PlainText - - - - - - - - 0 - 0 - - - - - 0 - 0 - - - - - Courier - 12 - - - - IP addresses assigned to this interface; click to copy to clipboard. - - - QFrame::NoFrame - - - QAbstractItemView::NoEditTriggers - - - false - - - QAbstractItemView::SingleSelection - - - QAbstractItemView::ScrollPerPixel - - - true - - - ipAddressList - - - - - - - - 0 - - - 0 - - - 0 - - - 0 - - - 0 - - - - - Qt::Horizontal - - - - 40 - 1 - - - - - - - - - 0 - 0 - - - - Leave this network. - - - Leave Network - - - leaveNetworkButton - - - - - - - - - - - - - ipListWidget - - - - diff --git a/attic/ZeroTierUI/onetimedialog.cpp b/attic/ZeroTierUI/onetimedialog.cpp deleted file mode 100644 index 1c1d983b..00000000 --- a/attic/ZeroTierUI/onetimedialog.cpp +++ /dev/null @@ -1,37 +0,0 @@ -#include "onetimedialog.h" -#include "ui_onetimedialog.h" -#include "main.h" - -OneTimeDialog::OneTimeDialog(QWidget *parent,const char *propName,const QString &title,const QString &message) : - QDialog(parent), - ui(new Ui::OneTimeDialog) -{ - ui->setupUi(this); - - ui->label->setText(message); - this->setWindowTitle(title); - _propName = propName; - -#ifdef __WINDOWS__ - QWidgetList widgets = this->findChildren(); - foreach(QWidget *widget, widgets) { - QFont font(widget->font()); - font.setPointSizeF(font.pointSizeF() * 0.75); - widget->setFont(font); - } -#endif -} - -OneTimeDialog::~OneTimeDialog() -{ - delete ui; -} - -void OneTimeDialog::on_pushButton_clicked() -{ - if (_propName) { - settings->setValue(_propName,ui->checkBox->isChecked()); - settings->sync(); - } - this->close(); -} diff --git a/attic/ZeroTierUI/onetimedialog.h b/attic/ZeroTierUI/onetimedialog.h deleted file mode 100644 index 3e76cd05..00000000 --- a/attic/ZeroTierUI/onetimedialog.h +++ /dev/null @@ -1,26 +0,0 @@ -#ifndef ONETIMEDIALOG_H -#define ONETIMEDIALOG_H - -#include - -namespace Ui { -class OneTimeDialog; -} - -class OneTimeDialog : public QDialog -{ - Q_OBJECT - -public: - explicit OneTimeDialog(QWidget *parent = 0,const char *propName = (const char *)0,const QString &title = QString(),const QString &message = QString()); - ~OneTimeDialog(); - -private slots: - void on_pushButton_clicked(); - -private: - Ui::OneTimeDialog *ui; - const char *_propName; -}; - -#endif // ONETIMEDIALOG_H diff --git a/attic/ZeroTierUI/onetimedialog.ui b/attic/ZeroTierUI/onetimedialog.ui deleted file mode 100644 index 227cdc38..00000000 --- a/attic/ZeroTierUI/onetimedialog.ui +++ /dev/null @@ -1,99 +0,0 @@ - - - OneTimeDialog - - - - 0 - 0 - 496 - 197 - - - - Dialog - - - - 0 - - - 0 - - - 0 - - - 0 - - - - - - 0 - 0 - - - - - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop - - - true - - - 12 - - - Qt::NoTextInteraction - - - - - - - - 12 - - - 0 - - - 12 - - - 5 - - - - - - 0 - 0 - - - - Don't Show This Message Again - - - true - - - - - - - OK - - - - - - - - - - - diff --git a/attic/ZeroTierUI/quickstartdialog.ui b/attic/ZeroTierUI/quickstartdialog.ui deleted file mode 100644 index 411f89e3..00000000 --- a/attic/ZeroTierUI/quickstartdialog.ui +++ /dev/null @@ -1,170 +0,0 @@ - - - QuickstartDialog - - - - 0 - 0 - 800 - 480 - - - - Quick Start - - - - 0 - - - 0 - - - 0 - - - 0 - - - 0 - - - - - QFrame::NoFrame - - - true - - - Qt::AlignCenter - - - - - 0 - 0 - 785 - 800 - - - - - 0 - - - 0 - - - 0 - - - 0 - - - - - background: #000000; - - - - - - Qt::PlainText - - - :/img/ZT1GUI.png - - - false - - - Qt::AlignCenter - - - - - - - - - - - - 6 - - - 6 - - - 6 - - - 6 - - - - - - 10 - - - - Select Help -> Quick Start to see this screen again. - - - Qt::PlainText - - - Qt::NoTextInteraction - - - - - - - Qt::Horizontal - - - - 702 - 20 - - - - - - - - OK - - - - - - - - - - - - - - okButton - clicked() - QuickstartDialog - accept() - - - 753 - 457 - - - 399 - 239 - - - - - diff --git a/attic/ZeroTierUI/resources.qrc b/attic/ZeroTierUI/resources.qrc deleted file mode 100644 index 32f7c346..00000000 --- a/attic/ZeroTierUI/resources.qrc +++ /dev/null @@ -1,9 +0,0 @@ - - - zt1icon.png - ZT1GUI.png - - - stylesheet.css - - diff --git a/attic/ZeroTierUI/stylesheet.css b/attic/ZeroTierUI/stylesheet.css deleted file mode 100644 index 31904df5..00000000 --- a/attic/ZeroTierUI/stylesheet.css +++ /dev/null @@ -1,106 +0,0 @@ -QToolButton { - margin: 0; - padding: 2px; - text-align: center; - background: palette(button); - color: palette(button-text); - border: 1px solid transparent; -} -QToolButton:focus { - border: 1px solid #000000; -} -QToolButton:hover { - background: palette(highlight); - color: palette(highlight-text); -} -QToolButton:pressed { - border: 1px solid #000000; -} - -QToolButton.clickToCopy { - padding: 0; - margin: 0; - border: 0; - background: transparent; - color: palette(link); -} -QToolButton.clickToCopy:focus { - text-decoration: underline; -} -QToolButton.clickToCopy:hover { - text-decoration: underline; -} -QToolButton.clickToCopy:pressed { - background: transparent; -} - -QToolButton.leaveNetworkButton { - margin: 0 4px 3px 0; -} - -QMainWindow { - background: palette(dark); -} - -QListWidget { - background: transparent; - padding: 0; - margin: 0; - border: 0; -} -QListWidget::item { - background: palette(base); - margin: 1px 0 1px 0; -} - -QListWidget.ipAddressList { - background: palette(button); - margin: 0 4px 4px 0; -} -QListWidget.ipAddressList::item { - background: transparent; - color: palette(link); - border-bottom: 1px solid transparent; -} -QListWidget.ipAddressList::item:selected { - background: transparent; - border-top: 0; - border-left: 0; - border-right: 0; - border-bottom: 1px solid transparent; -} -QListWidget.ipAddressList::item:hover { - border-bottom: 1px solid palette(link); -} - -QStatusBar { - background: palette(button); -} - -QLabel.networkName { - padding: 0; - margin: 0; -} - -#networkIdButton { - padding: 0.2em 0 0 0; -} - -#joinNetworkButton { - margin: 1px; - padding: 0; -} - -#noNetworksLabel { - background: transparent; - color: #ffffff; -} - -#networkListWidget { - background: palette(dark); - margin: 0 0 2px 0; -} - -#bottomContainerWidget { - background: palette(base); -} diff --git a/attic/ZeroTierUI/zt1icon.icns b/attic/ZeroTierUI/zt1icon.icns deleted file mode 100644 index ce07eb9e..00000000 Binary files a/attic/ZeroTierUI/zt1icon.icns and /dev/null differ diff --git a/attic/ZeroTierUI/zt1icon.ico b/attic/ZeroTierUI/zt1icon.ico deleted file mode 100644 index eb29c09b..00000000 Binary files a/attic/ZeroTierUI/zt1icon.ico and /dev/null differ diff --git a/attic/ZeroTierUI/zt1icon.png b/attic/ZeroTierUI/zt1icon.png deleted file mode 100644 index bc265167..00000000 Binary files a/attic/ZeroTierUI/zt1icon.png and /dev/null differ -- cgit v1.2.3