[Cmake-commits] [cmake-commits] hoffman committed CMakeLists.txt 1.16 1.16.2.1 CMakeSetup.cxx 1.17.2.1 1.17.2.2 CMakeSetupDialog.cxx 1.40.2.2 1.40.2.3 CMakeSetupDialog.h 1.21 1.21.2.1 CMakeSetupDialog.ui 1.16 1.16.2.1 QCMake.cxx 1.21 1.21.2.1 QCMake.h 1.9 1.9.2.1 QCMakeCacheView.cxx 1.26 1.26.2.1 QCMakeCacheView.h 1.17 1.17.2.1 QMacInstallDialog.cxx 1.1 1.1.2.1 postflight.sh.in 1.1 1.1.2.1

cmake-commits at cmake.org cmake-commits at cmake.org
Tue Apr 8 12:22:53 EDT 2008


Update of /cvsroot/CMake/CMake/Source/QtDialog
In directory public:/mounts/ram/cvs-serv23416/Source/QtDialog

Modified Files:
      Tag: CMake-2-6
	CMakeLists.txt CMakeSetup.cxx CMakeSetupDialog.cxx 
	CMakeSetupDialog.h CMakeSetupDialog.ui QCMake.cxx QCMake.h 
	QCMakeCacheView.cxx QCMakeCacheView.h QMacInstallDialog.cxx 
	postflight.sh.in 
Log Message:
ENH: merge in changes from main tree


Index: CMakeSetup.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/QtDialog/CMakeSetup.cxx,v
retrieving revision 1.17.2.1
retrieving revision 1.17.2.2
diff -C 2 -d -r1.17.2.1 -r1.17.2.2
*** CMakeSetup.cxx	18 Mar 2008 14:23:55 -0000	1.17.2.1
--- CMakeSetup.cxx	8 Apr 2008 16:22:51 -0000	1.17.2.2
***************
*** 67,70 ****
--- 67,71 ----
  int main(int argc, char** argv)
  {
+   cmSystemTools::FindExecutableDirectory(argv[0]);
    QApplication app(argc, argv);
    
***************
*** 114,118 ****
      cmake hcm;
      hcm.AddCMakePaths();
!     doc.SetCMakeRoot(hcm.GetCacheDefinition("CMAKE_ROOT"));
      std::vector<cmDocumentationEntry> commands;
      std::vector<cmDocumentationEntry> compatCommands;
--- 115,124 ----
      cmake hcm;
      hcm.AddCMakePaths();
!     // just incase the install is bad avoid a seg fault
!     const char* root = hcm.GetCacheDefinition("CMAKE_ROOT");
!     if(root)
!       {
!       doc.SetCMakeRoot(root);
!       }
      std::vector<cmDocumentationEntry> commands;
      std::vector<cmDocumentationEntry> compatCommands;

Index: QCMakeCacheView.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/QtDialog/QCMakeCacheView.cxx,v
retrieving revision 1.26
retrieving revision 1.26.2.1
diff -C 2 -d -r1.26 -r1.26.2.1
*** QCMakeCacheView.cxx	15 Feb 2008 00:58:31 -0000	1.26
--- QCMakeCacheView.cxx	8 Apr 2008 16:22:51 -0000	1.26.2.1
***************
*** 373,380 ****
  
  QCMakeCacheModelDelegate::QCMakeCacheModelDelegate(QObject* p)
!   : QItemDelegate(p)
  {
  }
  
  QWidget* QCMakeCacheModelDelegate::createEditor(QWidget* p, 
      const QStyleOptionViewItem&, const QModelIndex& idx) const
--- 373,385 ----
  
  QCMakeCacheModelDelegate::QCMakeCacheModelDelegate(QObject* p)
!   : QItemDelegate(p), FileDialogFlag(false)
  {
  }
  
+ void QCMakeCacheModelDelegate::setFileDialogFlag(bool f)
+ {
+   this->FileDialogFlag = f;
+ }
+ 
  QWidget* QCMakeCacheModelDelegate::createEditor(QWidget* p, 
      const QStyleOptionViewItem&, const QModelIndex& idx) const
***************
*** 389,399 ****
    else if(type == QCMakeCacheProperty::PATH)
      {
!     return new QCMakeCachePathEditor(p, 
        var.data(Qt::DisplayRole).toString());
      }
    else if(type == QCMakeCacheProperty::FILEPATH)
      {
!     return new QCMakeCacheFilePathEditor(p, 
        var.data(Qt::DisplayRole).toString());
      }
  
--- 394,412 ----
    else if(type == QCMakeCacheProperty::PATH)
      {
!     QCMakeCachePathEditor* editor =
!       new QCMakeCachePathEditor(p, 
        var.data(Qt::DisplayRole).toString());
+     QObject::connect(editor, SIGNAL(fileDialogExists(bool)), this,
+         SLOT(setFileDialogFlag(bool)));
+     return editor;
      }
    else if(type == QCMakeCacheProperty::FILEPATH)
      {
!     QCMakeCacheFilePathEditor* editor =
!       new QCMakeCacheFilePathEditor(p, 
        var.data(Qt::DisplayRole).toString());
+     QObject::connect(editor, SIGNAL(fileDialogExists(bool)), this,
+         SLOT(setFileDialogFlag(bool)));
+     return editor;
      }
  
***************
*** 444,447 ****
--- 457,471 ----
  }
    
+ bool QCMakeCacheModelDelegate::eventFilter(QObject* object, QEvent* event)
+ {
+   // workaround for what looks like a bug in Qt on Mac OS X
+   if(event->type() == QEvent::FocusOut && this->FileDialogFlag)
+   {
+     return false;
+   }
+   return QItemDelegate::eventFilter(object, event);
+ }
+ 
+   
  QCMakeCacheFileEditor::QCMakeCacheFileEditor(QWidget* p, const QString& var)
    : QLineEdit(p), Variable(var)
***************
*** 493,497 ****
--- 517,523 ----
      title = title.arg(this->Variable);
      }
+   this->fileDialogExists(true);
    path = QFileDialog::getOpenFileName(this, title, info.absolutePath());
+   this->fileDialogExists(false);
    
    if(!path.isEmpty())
***************
*** 515,519 ****
--- 541,547 ----
      title = title.arg(this->Variable);
      }
+   this->fileDialogExists(true);
    path = QFileDialog::getExistingDirectory(this, title, this->text());
+   this->fileDialogExists(false);
    if(!path.isEmpty())
      {

Index: CMakeSetupDialog.ui
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/QtDialog/CMakeSetupDialog.ui,v
retrieving revision 1.16
retrieving revision 1.16.2.1
diff -C 2 -d -r1.16 -r1.16.2.1
*** CMakeSetupDialog.ui	13 Nov 2007 04:54:49 -0000	1.16
--- CMakeSetupDialog.ui	8 Apr 2008 16:22:51 -0000	1.16.2.1
***************
*** 38,42 ****
        <widget class="QPushButton" name="BrowseSourceDirectoryButton" >
         <property name="text" >
!         <string>Browse...</string>
         </property>
        </widget>
--- 38,42 ----
        <widget class="QPushButton" name="BrowseSourceDirectoryButton" >
         <property name="text" >
!         <string>Browse &amp;Source...</string>
         </property>
        </widget>
***************
*** 67,71 ****
        <widget class="QPushButton" name="BrowseBinaryDirectoryButton" >
         <property name="text" >
!         <string>Browse...</string>
         </property>
        </widget>
--- 67,71 ----
        <widget class="QPushButton" name="BrowseBinaryDirectoryButton" >
         <property name="text" >
!         <string>Browse &amp;Build...</string>
         </property>
        </widget>
***************
*** 130,134 ****
            <widget class="QCheckBox" name="Advanced" >
             <property name="text" >
!             <string>Show Advanced Entries</string>
             </property>
            </widget>
--- 130,134 ----
            <widget class="QCheckBox" name="Advanced" >
             <property name="text" >
!             <string>Show Ad&amp;vanced Entries</string>
             </property>
            </widget>
***************
*** 156,160 ****
             </property>
             <property name="text" >
!             <string>Add Entry</string>
             </property>
             <property name="icon" >
--- 156,160 ----
             </property>
             <property name="text" >
!             <string>&amp;Add Entry</string>
             </property>
             <property name="icon" >
***************
*** 172,176 ****
             </property>
             <property name="text" >
!             <string>Remove Entry</string>
             </property>
             <property name="icon" >
--- 172,176 ----
             </property>
             <property name="text" >
!             <string>&amp;Remove Entry</string>
             </property>
             <property name="icon" >
***************
*** 221,225 ****
            <widget class="QPushButton" name="ConfigureButton" >
             <property name="text" >
!             <string>Configure</string>
             </property>
            </widget>
--- 221,225 ----
            <widget class="QPushButton" name="ConfigureButton" >
             <property name="text" >
!             <string>&amp;Configure</string>
             </property>
            </widget>
***************
*** 228,232 ****
            <widget class="QPushButton" name="GenerateButton" >
             <property name="text" >
!             <string>Generate</string>
             </property>
            </widget>
--- 228,232 ----
            <widget class="QPushButton" name="GenerateButton" >
             <property name="text" >
!             <string>&amp;Generate</string>
             </property>
            </widget>

Index: QCMakeCacheView.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/QtDialog/QCMakeCacheView.h,v
retrieving revision 1.17
retrieving revision 1.17.2.1
diff -C 2 -d -r1.17 -r1.17.2.1
*** QCMakeCacheView.h	15 Feb 2008 00:58:31 -0000	1.17
--- QCMakeCacheView.h	8 Apr 2008 16:22:51 -0000	1.17.2.1
***************
*** 109,112 ****
--- 109,117 ----
    bool editorEvent (QEvent* event, QAbstractItemModel* model, 
         const QStyleOptionViewItem& option, const QModelIndex& index);
+   bool eventFilter(QObject* object, QEvent* event);
+ protected slots:
+   void setFileDialogFlag(bool);
+ protected:
+   bool FileDialogFlag;
  };
  
***************
*** 119,122 ****
--- 124,129 ----
  protected slots:
    virtual void chooseFile() = 0;
+ signals:
+   void fileDialogExists(bool);
  protected:
    void resizeEvent(QResizeEvent* e);

Index: CMakeSetupDialog.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/QtDialog/CMakeSetupDialog.cxx,v
retrieving revision 1.40.2.2
retrieving revision 1.40.2.3
diff -C 2 -d -r1.40.2.2 -r1.40.2.3
*** CMakeSetupDialog.cxx	30 Mar 2008 13:09:47 -0000	1.40.2.2
--- CMakeSetupDialog.cxx	8 Apr 2008 16:22:51 -0000	1.40.2.3
***************
*** 32,35 ****
--- 32,36 ----
  #include <QUrl>
  #include <QShortcut>
+ #include <QMacInstallDialog.h>
  
  #include "QCMake.h"
***************
*** 84,88 ****
    QObject::connect(this->DeleteCacheAction, SIGNAL(triggered(bool)), 
                     this, SLOT(doDeleteCache()));
!   this->ExitAction = FileMenu->addAction(tr("&Exit"));
    QObject::connect(this->ExitAction, SIGNAL(triggered(bool)), 
                     this, SLOT(close()));
--- 85,89 ----
    QObject::connect(this->DeleteCacheAction, SIGNAL(triggered(bool)), 
                     this, SLOT(doDeleteCache()));
!   this->ExitAction = FileMenu->addAction(tr("E&xit"));
    QObject::connect(this->ExitAction, SIGNAL(triggered(bool)), 
                     this, SLOT(close()));
***************
*** 97,105 ****
    QObject::connect(this->GenerateAction, SIGNAL(triggered(bool)), 
                     this, SLOT(doGenerate()));
!   this->SuppressDevWarningsAction = ToolsMenu->addAction(tr("&Suppress dev Warnings (-Wno-dev)"));
!   QObject::connect(this->SuppressDevWarningsAction, SIGNAL(triggered(bool)), 
                     this, SLOT(doSuppressDev()));
!   this->SuppressDevWarningsAction->setCheckable(true);
!   
    QMenu* HelpMenu = this->menuBar()->addMenu(tr("&Help"));
    QAction* a = HelpMenu->addAction(tr("About"));
--- 98,118 ----
    QObject::connect(this->GenerateAction, SIGNAL(triggered(bool)), 
                     this, SLOT(doGenerate()));
! #if defined(Q_WS_MAC)
!   this->InstallForCommandLineAction 
!     = ToolsMenu->addAction(tr("&Install For Command Line Use"));
!   QObject::connect(this->InstallForCommandLineAction, SIGNAL(triggered(bool)), 
!                    this, SLOT(doInstallForCommandLine()));
! #endif  
!   QMenu* OptionsMenu = this->menuBar()->addMenu(tr("&Options"));
!   QAction* supressDevWarningsAction = OptionsMenu->addAction(tr("&Suppress dev Warnings (-Wno-dev)"));
!   QObject::connect(supressDevWarningsAction, SIGNAL(triggered(bool)), 
                     this, SLOT(doSuppressDev()));
! 
!   supressDevWarningsAction->setCheckable(true);
!   QAction* debugAction = OptionsMenu->addAction(tr("&Debug Output"));
!   debugAction->setCheckable(true);
!   QObject::connect(debugAction, SIGNAL(toggled(bool)), 
!                    this, SLOT(setDebugOutput(bool)));
! 
    QMenu* HelpMenu = this->menuBar()->addMenu(tr("&Help"));
    QAction* a = HelpMenu->addAction(tr("About"));
***************
*** 169,173 ****
                     SIGNAL(sourceDirChanged(QString)),
                     this, SLOT(updateSourceDirectory(QString)));
!  
    QObject::connect(this->CMakeThread->cmakeInstance(),
                     SIGNAL(progressChanged(QString, float)),
--- 182,189 ----
                     SIGNAL(sourceDirChanged(QString)),
                     this, SLOT(updateSourceDirectory(QString)));
!   QObject::connect(this->CMakeThread->cmakeInstance(),
!                    SIGNAL(binaryDirChanged(QString)),
!                    this, SLOT(updateBinaryDirectory(QString)));
!   
    QObject::connect(this->CMakeThread->cmakeInstance(),
                     SIGNAL(progressChanged(QString, float)),
***************
*** 238,241 ****
--- 254,258 ----
      }
  
+   // make sure build directory exists
    QString bindir = this->CMakeThread->cmakeInstance()->binaryDirectory();
    QDir dir(bindir);
***************
*** 258,265 ****
      }
  
!   // prompt for generator if one doesn't exist
    if(this->CMakeThread->cmakeInstance()->generator().isEmpty())
      {
!     this->promptForGenerator();
      }
  
--- 275,285 ----
      }
  
!   // prompt for generator if it hasn't been set
    if(this->CMakeThread->cmakeInstance()->generator().isEmpty())
      {
!     if(!this->promptForGenerator())
!       {
!       return;
!       }
      }
  
***************
*** 316,319 ****
--- 336,345 ----
  }
  
+ void CMakeSetupDialog::doInstallForCommandLine()
+ {
+   QMacInstallDialog setupdialog(0);
+   setupdialog.exec();
+ }
+ 
  void CMakeSetupDialog::doGenerate()
  {
***************
*** 423,427 ****
    if(!dir.isEmpty())
      {
!     this->setSourceDirectory(QDir::fromNativeSeparators(dir));
      }
  }
--- 449,453 ----
    if(!dir.isEmpty())
      {
!     this->setSourceDirectory(dir);
      }
  }
***************
*** 437,440 ****
--- 463,476 ----
  }
  
+ void CMakeSetupDialog::updateBinaryDirectory(const QString& dir)
+ {
+   if(this->BinaryDirectory->currentText() != dir)
+     {
+     this->BinaryDirectory->blockSignals(true);
+     this->BinaryDirectory->setEditText(dir);
+     this->BinaryDirectory->blockSignals(false);
+     }
+ }
+ 
  void CMakeSetupDialog::doBinaryBrowse()
  {
***************
*** 443,447 ****
    if(!dir.isEmpty() && dir != this->BinaryDirectory->currentText())
      {
!     this->setBinaryDirectory(QDir::fromNativeSeparators(dir));
      }
  }
--- 479,483 ----
    if(!dir.isEmpty() && dir != this->BinaryDirectory->currentText())
      {
!     this->setBinaryDirectory(dir);
      }
  }
***************
*** 521,525 ****
  }
  
! void CMakeSetupDialog::promptForGenerator()
  {
    QSettings settings;
--- 557,561 ----
  }
  
! bool CMakeSetupDialog::promptForGenerator()
  {
    QSettings settings;
***************
*** 541,547 ****
      combo->setCurrentIndex(idx);
      }
!   QDialogButtonBox* btns = new QDialogButtonBox(QDialogButtonBox::Ok,
                                                  Qt::Horizontal, &dialog);
    QObject::connect(btns, SIGNAL(accepted()), &dialog, SLOT(accept()));
    
    QVBoxLayout* l = new QVBoxLayout(&dialog);
--- 577,585 ----
      combo->setCurrentIndex(idx);
      }
!   QDialogButtonBox* btns = new QDialogButtonBox(QDialogButtonBox::Ok |
!                                                 QDialogButtonBox::Cancel,
                                                  Qt::Horizontal, &dialog);
    QObject::connect(btns, SIGNAL(accepted()), &dialog, SLOT(accept()));
+   QObject::connect(btns, SIGNAL(rejected()), &dialog, SLOT(reject()));
    
    QVBoxLayout* l = new QVBoxLayout(&dialog);
***************
*** 549,557 ****
    l->addWidget(combo);
    l->addWidget(btns);
!   dialog.exec();
!   
!   lastGen = combo->currentText();
!   settings.setValue("LastGenerator", lastGen);
!   this->CMakeThread->cmakeInstance()->setGenerator(combo->currentText());
  }
  
--- 587,599 ----
    l->addWidget(combo);
    l->addWidget(btns);
!   if(dialog.exec() == QDialog::Accepted)
!     {
!     lastGen = combo->currentText();
!     settings.setValue("LastGenerator", lastGen);
!     this->CMakeThread->cmakeInstance()->setGenerator(combo->currentText());
!     return true;
!     }
! 
!   return false;
  }
  
***************
*** 779,783 ****
      this->GenerateButton->setEnabled(false);
      this->GenerateAction->setEnabled(false);
!     this->ConfigureButton->setText(tr("Stop"));
      }
    else if(s == Generating)
--- 821,825 ----
      this->GenerateButton->setEnabled(false);
      this->GenerateAction->setEnabled(false);
!     this->ConfigureButton->setText(tr("&Stop"));
      }
    else if(s == Generating)
***************
*** 787,791 ****
      this->ConfigureButton->setEnabled(false);
      this->GenerateAction->setEnabled(false);
!     this->GenerateButton->setText(tr("Stop"));
      }
    else if(s == ReadyConfigure)
--- 829,833 ----
      this->ConfigureButton->setEnabled(false);
      this->GenerateAction->setEnabled(false);
!     this->GenerateButton->setText(tr("&Stop"));
      }
    else if(s == ReadyConfigure)
***************
*** 796,801 ****
      this->GenerateAction->setEnabled(false);
      this->ConfigureButton->setEnabled(true);
!     this->ConfigureButton->setText(tr("Configure"));
!     this->GenerateButton->setText(tr("Generate"));
      }
    else if(s == ReadyGenerate)
--- 838,843 ----
      this->GenerateAction->setEnabled(false);
      this->ConfigureButton->setEnabled(true);
!     this->ConfigureButton->setText(tr("&Configure"));
!     this->GenerateButton->setText(tr("&Generate"));
      }
    else if(s == ReadyGenerate)
***************
*** 806,811 ****
      this->GenerateAction->setEnabled(true);
      this->ConfigureButton->setEnabled(true);
!     this->ConfigureButton->setText(tr("Configure"));
!     this->GenerateButton->setText(tr("Generate"));
      }
  }
--- 848,853 ----
      this->GenerateAction->setEnabled(true);
      this->ConfigureButton->setEnabled(true);
!     this->ConfigureButton->setText(tr("&Configure"));
!     this->GenerateButton->setText(tr("&Generate"));
      }
  }
***************
*** 852,854 ****
--- 894,901 ----
  }
  
+ void CMakeSetupDialog::setDebugOutput(bool flag)
+ {
+   QMetaObject::invokeMethod(this->CMakeThread->cmakeInstance(),
+     "setDebugOutput", Qt::QueuedConnection, Q_ARG(bool, flag));
+ }
  

Index: postflight.sh.in
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/QtDialog/postflight.sh.in,v
retrieving revision 1.1
retrieving revision 1.1.2.1
diff -C 2 -d -r1.1 -r1.1.2.1
*** postflight.sh.in	19 Feb 2008 19:26:20 -0000	1.1
--- postflight.sh.in	8 Apr 2008 16:22:51 -0000	1.1.2.1
***************
*** 1,4 ****
  #!/bin/bash
! echo "$2/@CMAKE_INSTALL_SUBDIR@/cmake-gui.app/Contents/MacOS/cmake-gui" >>/tmp/mylog
! "$2/@CMAKE_INSTALL_SUBDIR@/cmake-gui.app/Contents/MacOS/cmake-gui" --mac-install
  exit 0
--- 1,3 ----
  #!/bin/bash
! "$2 at CMAKE_INSTALL_SUBDIR@/@CMAKE_BUNDLE_NAME at .app/Contents/MacOS/@CMAKE_BUNDLE_NAME@" --mac-install
  exit 0

Index: CMakeSetupDialog.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/QtDialog/CMakeSetupDialog.h,v
retrieving revision 1.21
retrieving revision 1.21.2.1
diff -C 2 -d -r1.21 -r1.21.2.1
*** CMakeSetupDialog.h	12 Mar 2008 02:51:56 -0000	1.21
--- CMakeSetupDialog.h	8 Apr 2008 16:22:51 -0000	1.21.2.1
***************
*** 46,49 ****
--- 46,50 ----
    void doGenerate();
    void doSuppressDev();
+   void doInstallForCommandLine();
    void doHelp();
    void doAbout();
***************
*** 59,65 ****
    void doDeleteCache();
    void updateSourceDirectory(const QString& dir);
    void showProgress(const QString& msg, float percent);
    void setEnabledState(bool);
!   void promptForGenerator();
    void updateGeneratorLabel(const QString& gen);
    void setExitAfterGenerate(bool);
--- 60,67 ----
    void doDeleteCache();
    void updateSourceDirectory(const QString& dir);
+   void updateBinaryDirectory(const QString& dir);
    void showProgress(const QString& msg, float percent);
    void setEnabledState(bool);
!   bool promptForGenerator();
    void updateGeneratorLabel(const QString& gen);
    void setExitAfterGenerate(bool);
***************
*** 74,77 ****
--- 76,80 ----
    void addCacheEntry();
    void startSearch();
+   void setDebugOutput(bool);
  
  protected:
***************
*** 94,97 ****
--- 97,101 ----
    QAction* GenerateAction;
    QAction* SuppressDevWarningsAction;
+   QAction* InstallForCommandLineAction;
    State CurrentState;
  

Index: CMakeLists.txt
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/QtDialog/CMakeLists.txt,v
retrieving revision 1.16
retrieving revision 1.16.2.1
diff -C 2 -d -r1.16 -r1.16.2.1
*** CMakeLists.txt	11 Mar 2008 21:27:41 -0000	1.16
--- CMakeLists.txt	8 Apr 2008 16:22:51 -0000	1.16.2.1
***************
*** 58,61 ****
--- 58,65 ----
    TARGET_LINK_LIBRARIES(cmake-gui CMakeLib ${QT_QTMAIN_LIBRARY} ${QT_LIBRARIES})
    IF(${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.4)
+     IF(APPLE)
+       SET_TARGET_PROPERTIES(cmake-gui PROPERTIES
+        OUTPUT_NAME ${CMAKE_BUNDLE_NAME})
+     ENDIF(APPLE)
      SET(CMAKE_INSTALL_DESTINATION_ARGS 
        BUNDLE DESTINATION "${CMAKE_BUNDLE_LOCATION}")
***************
*** 85,90 ****
      configure_file("${CMake_SOURCE_DIR}/Source/QtDialog/postupgrade.sh.in"
        "${CMake_BINARY_DIR}/Source/QtDialog/postupgrade.sh")
!     INSTALL(CODE "set(input_file 
!        \"\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/MacOS/cmake-gui\")")
      INSTALL(SCRIPT "${CMake_SOURCE_DIR}/Source/QtDialog/CMakeIngestOSXBundleLibraries.cmake")
    ENDIF(APPLE)
--- 89,96 ----
      configure_file("${CMake_SOURCE_DIR}/Source/QtDialog/postupgrade.sh.in"
        "${CMake_BINARY_DIR}/Source/QtDialog/postupgrade.sh")
!     INSTALL(CODE "execute_process(COMMAND ln -s \"../MacOS/${CMAKE_BUNDLE_NAME}\" cmake-gui
!                   WORKING_DIRECTORY \$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/bin)")
!     INSTALL(CODE "set(input_file
!        \"\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/MacOS/${CMAKE_BUNDLE_NAME}\")")
      INSTALL(SCRIPT "${CMake_SOURCE_DIR}/Source/QtDialog/CMakeIngestOSXBundleLibraries.cmake")
    ENDIF(APPLE)

Index: QMacInstallDialog.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/QtDialog/QMacInstallDialog.cxx,v
retrieving revision 1.1
retrieving revision 1.1.2.1
diff -C 2 -d -r1.1 -r1.1.2.1
*** QMacInstallDialog.cxx	19 Feb 2008 19:06:10 -0000	1.1
--- QMacInstallDialog.cxx	8 Apr 2008 16:22:51 -0000	1.1.2.1
***************
*** 1,3 ****
--- 1,4 ----
  #include "QMacInstallDialog.h"
+ #include <QMessageBox>
  #include "cmSystemTools.h"
  #include <iostream>
***************
*** 34,37 ****
--- 35,54 ----
    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");
***************
*** 41,48 ****
--- 58,75 ----
      QFileInfo fileInfo = list.at(i);
      std::string filename = fileInfo.fileName().toStdString();
+     if(filename.size() && filename[0] == '.')
+       {
+       continue;
+       }
      std::string file = fileInfo.absoluteFilePath().toStdString();
      std::string newName = installTo;
      newName += "/";
      newName += filename;
+     // Remove the old files
+     if(cmSystemTools::FileExists(newName.c_str()))
+       {
+       std::cout << "rm [" << newName << "]\n";
+       cmSystemTools::RemoveFile(newName.c_str());
+       }
      std::cout << "ln -s [" << file << "] [";
      std::cout << newName << "]\n";

Index: QCMake.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/QtDialog/QCMake.h,v
retrieving revision 1.9
retrieving revision 1.9.2.1
diff -C 2 -d -r1.9 -r1.9.2.1
*** QCMake.h	12 Mar 2008 02:51:56 -0000	1.9
--- QCMake.h	8 Apr 2008 16:22:51 -0000	1.9.2.1
***************
*** 88,91 ****
--- 88,93 ----
    /// reload the cache in binary directory
    void reloadCache();
+   /// set whether to do debug output
+   void setDebugOutput(bool);
  
  public:
***************
*** 100,103 ****
--- 102,107 ----
    /// get the available generators
    QStringList availableGenerators() const;
+   /// get whether to do debug output
+   bool getDebugOutput() const;
  
  signals:
***************
*** 109,112 ****
--- 113,118 ----
    /// containing a CMakeCache.txt file)
    void sourceDirChanged(const QString& dir);
+   /// signal when the binary directory changes
+   void binaryDirChanged(const QString& dir);
    /// signal for progress events
    void progressChanged(const QString& msg, float percent);
***************
*** 119,122 ****
--- 125,130 ----
    /// signal when there is an error message
    void errorMessage(const QString& msg);
+   /// signal when debug output changes
+   void debugOutputChanged(bool);
  
  protected:

Index: QCMake.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/QtDialog/QCMake.cxx,v
retrieving revision 1.21
retrieving revision 1.21.2.1
diff -C 2 -d -r1.21 -r1.21.2.1
*** QCMake.cxx	12 Mar 2008 02:51:56 -0000	1.21
--- QCMake.cxx	8 Apr 2008 16:22:51 -0000	1.21.2.1
***************
*** 87,92 ****
    if(this->SourceDirectory != dir)
      {
!     this->SourceDirectory = dir;
!     emit this->sourceDirChanged(dir);
      }
  }
--- 87,92 ----
    if(this->SourceDirectory != dir)
      {
!     this->SourceDirectory = QDir::fromNativeSeparators(dir);
!     emit this->sourceDirChanged(this->SourceDirectory);
      }
  }
***************
*** 96,105 ****
    if(this->BinaryDirectory != dir)
      {
      cmCacheManager *cachem = this->CMakeInstance->GetCacheManager();
-     this->BinaryDirectory = dir;
      this->setGenerator(QString());
!     if(!this->CMakeInstance->GetCacheManager()->LoadCache(dir.toLocal8Bit().data()))
        {
!       QDir testDir(dir);
        if(testDir.exists("CMakeCache.txt"))
          {
--- 96,107 ----
    if(this->BinaryDirectory != dir)
      {
+     this->BinaryDirectory = QDir::fromNativeSeparators(dir);
+     emit this->binaryDirChanged(this->BinaryDirectory);
      cmCacheManager *cachem = this->CMakeInstance->GetCacheManager();
      this->setGenerator(QString());
!     if(!this->CMakeInstance->GetCacheManager()->LoadCache(
!       this->BinaryDirectory.toLocal8Bit().data()))
        {
!       QDir testDir(this->BinaryDirectory);
        if(testDir.exists("CMakeCache.txt"))
          {
***************
*** 363,366 ****
--- 365,383 ----
    emit this->propertiesChanged(props);
  }
+   
+ void QCMake::setDebugOutput(bool flag)
+ {
+   if(flag != this->CMakeInstance->GetDebugOutput())
+     {
+     this->CMakeInstance->SetDebugOutputOn(flag);
+     emit this->debugOutputChanged(flag);
+     }
+ }
+ 
+ bool QCMake::getDebugOutput() const
+ {
+   return this->CMakeInstance->GetDebugOutput();
+ }
+ 
  
  void QCMake::SetSuppressDevWarnings(bool value)



More information about the Cmake-commits mailing list