diff --git a/src/mtsgui/mainwindow.cpp b/src/mtsgui/mainwindow.cpp index 794eded3..b26404e0 100644 --- a/src/mtsgui/mainwindow.cpp +++ b/src/mtsgui/mainwindow.cpp @@ -85,6 +85,12 @@ MainWindow::MainWindow(QWidget *parent) : ui->actionUpdateCheck->setMenuRole(QAction::ApplicationSpecificRole); ui->actionFeedback->setMenuRole(QAction::ApplicationSpecificRole); ui->actionReportBug->setMenuRole(QAction::ApplicationSpecificRole); + ui->actionEnableCommandLine->setMenuRole(QAction::ApplicationSpecificRole); + +#if !defined(__OSX__) + ui->actionEnableCommandLine->setVisible(false); +#endif + m_progressWidget = new QWidget(centralWidget()); m_progressLabel = new QLabel(m_progressWidget); m_progress = new QProgressBar(m_progressWidget); @@ -194,7 +200,7 @@ MainWindow::MainWindow(QWidget *parent) : m_networkManager = new QNetworkAccessManager(this); -#if defined(__OSX__) +#if defined(__OSX__) && 0 // Disable crash reports for now /* Submit crash reports on OSX */ QDir crashDir = QDir::home(); crashDir.cd("Library/Logs/CrashReporter"); @@ -1517,6 +1523,16 @@ void MainWindow::on_actionStartServer_triggered() { connect(m_serverWidget, SIGNAL(closed()), this, SLOT(onServerClosed())); m_serverWidget->show(); } + +void MainWindow::on_actionEnableCommandLine_triggered() { + if (QMessageBox::question(this, tr("Enable command line access"), + tr("
If you proceed, Mitsuba will create symbolic links in /usr/bin and /Library/Python/2.6/site-packages " + "that make it possible to use the renderer via the command line and Python. Any old symlinks will simply be overwritten.
"), + QMessageBox::Yes | QMessageBox::No) == QMessageBox::Yes) { + + } + } +} void MainWindow::on_actionReportBug_triggered() { QDesktopServices::openUrl(QUrl("https://www.mitsuba-renderer.org/bugtracker/projects/mitsuba")); diff --git a/src/mtsgui/mainwindow.h b/src/mtsgui/mainwindow.h index a467b5fd..bfd1c7a0 100644 --- a/src/mtsgui/mainwindow.h +++ b/src/mtsgui/mainwindow.h @@ -127,6 +127,7 @@ private slots: void on_actionFeedback_triggered(); void on_actionShowKDTree_triggered(); void on_actionSceneDescription_triggered(); + void on_actionEnableCommandLine_triggered(); void on_tabBar_currentChanged(int index); bool on_tabBar_tabCloseRequested(int index); void on_tabBar_tabMoved(int from, int to); diff --git a/src/mtsgui/mainwindow.ui b/src/mtsgui/mainwindow.ui index 07b7326f..55d08f36 100644 --- a/src/mtsgui/mainwindow.ui +++ b/src/mtsgui/mainwindow.ui @@ -100,7 +100,7 @@