diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2008-04-04 20:02:50 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2008-04-04 20:02:50 (GMT) |
commit | 45ce11a0757a1006a235f34637892115ffeae66e (patch) | |
tree | be7370a18622502f98d774b00cd5606f3fa2ff72 /Source/QtDialog/QMacInstallDialog.cxx | |
parent | d1c660d49550af6f174cbfac4ce81bd7d7ce7a75 (diff) | |
download | CMake-45ce11a0757a1006a235f34637892115ffeae66e.zip CMake-45ce11a0757a1006a235f34637892115ffeae66e.tar.gz CMake-45ce11a0757a1006a235f34637892115ffeae66e.tar.bz2 |
ENH: install the mac application bundle into /Applications directly with no enclosing folder
Diffstat (limited to 'Source/QtDialog/QMacInstallDialog.cxx')
-rw-r--r-- | Source/QtDialog/QMacInstallDialog.cxx | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/Source/QtDialog/QMacInstallDialog.cxx b/Source/QtDialog/QMacInstallDialog.cxx index 28c2c1a..70293f8 100644 --- a/Source/QtDialog/QMacInstallDialog.cxx +++ b/Source/QtDialog/QMacInstallDialog.cxx @@ -1,4 +1,5 @@ #include "QMacInstallDialog.h" +#include <QMessageBox> #include "cmSystemTools.h" #include <iostream> #include <QFileDialog> @@ -33,6 +34,22 @@ void QMacInstallDialog::DoInstall() { QDir installDir(this->Internals->InstallPrefix->text()); std::string installTo = installDir.path().toStdString(); + if(!cmSystemTools::FileExists(installTo.c_str())) + { + QString message = tr("Build install does not exist, " + "should I create it?") + + "\n\n" + + tr("Directory: "); + message += installDir.path(); + QString title = tr("Create Directory"); + QMessageBox::StandardButton btn; + btn = QMessageBox::information(this, title, message, + QMessageBox::Yes | QMessageBox::No); + if(btn == QMessageBox::Yes) + { + cmSystemTools::MakeDirectory(installTo.c_str()); + } + } QDir cmExecDir(QApplication::applicationDirPath()); cmExecDir.cd("../bin"); QFileInfoList list = cmExecDir.entryInfoList(); |