From 9df7f65dd591c8ee641f9bd66977b92456be9ed9 Mon Sep 17 00:00:00 2001 From: Adam Ierymenko Date: Thu, 16 Jan 2014 13:53:31 -0800 Subject: Mac installation, and dump pre10.8 stuff because it turns out that 10.6 loads the existing kext fine. --- ZeroTierUI/installdialog.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'ZeroTierUI') diff --git a/ZeroTierUI/installdialog.cpp b/ZeroTierUI/installdialog.cpp index 14ad5b6a..29bc0ec7 100644 --- a/ZeroTierUI/installdialog.cpp +++ b/ZeroTierUI/installdialog.cpp @@ -161,6 +161,14 @@ void InstallDialog::on_networkReply(QNetworkReply *reply) 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 -- cgit v1.2.3