summaryrefslogtreecommitdiffstats
path: root/Source/QtDialog/QMacInstallDialog.cxx
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2008-04-04 20:02:50 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2008-04-04 20:02:50 (GMT)
commit45ce11a0757a1006a235f34637892115ffeae66e (patch)
treebe7370a18622502f98d774b00cd5606f3fa2ff72 /Source/QtDialog/QMacInstallDialog.cxx
parentd1c660d49550af6f174cbfac4ce81bd7d7ce7a75 (diff)
downloadCMake-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.cxx17
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();