[Paraview] 64Bit Experiment

Michael Jackson mike.jackson at bluequartz.net
Wed Mar 4 10:18:54 EST 2009


Thanks, I'll try to take a look at it.

Also reported issue http://public.kitware.com/Bug/view.php?id=8671  
against the FindQt4.cmake file. Patch is attached to the bug.

Synopsis: The Carbon framework is being added to the link line when it  
should not when Qt4.5 built with Cocoa is found.

Thanks
_________________________________________________________
Mike Jackson                  mike.jackson at bluequartz.net
             www.bluequartz.net

On Mar 4, 2009, at 9:51 AM, Clinton Stimpson wrote:

>
> Attached is a patch if you wanted to build it too.
> It also needs cmake 2.6.3 if you want to build with Qt/Cocoa.
> And when you configure Qt 4.5, add the "-cocoa" and "-arch x86_64"  
> flags to configure.
> The progress bar code in the patch isn't perfect yet.  I didn't have  
> any more time to debug it.
> Other than that, I didn't see any other issues.
>
> Clint
>
> Michael Jackson wrote:
>> <said with a _lot_ of jest>
>>   Who wants to try out the just released Qt 4.5 with Cocoa 64 bit  
>> and ParaView 64 bit? Or maybe some already are trying it out? Any  
>> complaints or other issues building ParaView CVS against Qt 4.5?
>>
>> _________________________________________________________
>> Mike Jackson                  mike.jackson at bluequartz.net
>> BlueQuartz Software                    www.bluequartz.net
>> Principal Software Engineer                  Dayton, Ohio
>>
>>
>>
>> _______________________________________________
>> Powered by www.kitware.com
>>
>> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>>
>> Please keep messages on-topic and check the ParaView Wiki at: http://paraview.org/Wiki/ParaView
>>
>> Follow this link to subscribe/unsubscribe:
>> http://www.paraview.org/mailman/listinfo/paraview
>
> Index: CMakeLists.txt
> ===================================================================
> RCS file: /cvsroot/ParaView3/ParaView3/CMakeLists.txt,v
> retrieving revision 1.93
> diff -u -r1.93 CMakeLists.txt
> --- CMakeLists.txt	23 Jan 2009 20:51:04 -0000	1.93
> +++ CMakeLists.txt	6 Feb 2009 21:25:22 -0000
> @@ -99,17 +99,20 @@
>     STRING(REGEX MATCH "^4\\.3\\.[0-9]+" qt_version_tmp "$ 
> {QTVERSION}")
>     IF (NOT qt_version_tmp)
>       STRING(REGEX MATCH "^4\\.4\\.[0-9]+" qt_version4_4_tmp "$ 
> {QTVERSION}")
> -      IF (NOT qt_version4_4_tmp)
> +      IF (NOT qt_version4_4_tmp AND NOT QT_MAC_USE_COCOA)
>         MESSAGE(SEND_ERROR "Qt ${QTVERSION} not supported.  Please  
> use Qt 4.3 (you may need to clean your dirtied cache).")
> -      ELSE (NOT qt_version4_4_tmp)
> +      ELSE (NOT qt_version4_4_tmp AND NOT QT_MAC_USE_COCOA)
>         MESSAGE("WARNING: You are using Qt ${QTVERSION}. Officially  
> supported version is Qt 4.3")
> -      ENDIF (NOT qt_version4_4_tmp)
> +      ENDIF (NOT qt_version4_4_tmp AND NOT QT_MAC_USE_COCOA)
>     ENDIF (NOT qt_version_tmp)
>     # enforce Carbon in VTK for Qt/Mac
> -    IF(Q_WS_MAC)
> +    IF(Q_WS_MAC AND QT_MAC_USE_COCOA)
> +      SET(VTK_USE_CARBON OFF CACHE BOOL "Build VTK with Carbon"  
> FORCE)
> +      SET(VTK_USE_COCOA ON CACHE BOOL "Build VTK with Cocoa" FORCE)
> +    ELSE(Q_WS_MAC AND QT_MAC_USE_COCOA)
>       SET(VTK_USE_CARBON ON CACHE BOOL "Build VTK with Carbon" FORCE)
>       SET(VTK_USE_COCOA OFF CACHE BOOL "Build VTK with Cocoa" FORCE)
> -    ENDIF(Q_WS_MAC)
> +    ENDIF(Q_WS_MAC AND QT_MAC_USE_COCOA)
>     # Mark these Qt variables as advanced. Users don't really have  
> to set them.
>     MARK_AS_ADVANCED(DESIRED_QT_VERSION VTK_USE_QVTK  
> VTK_USE_GUISUPPORT)
>     MARK_AS_ADVANCED(QT_MKSPECS_DIR QT_PLUGINS_DIR  
> QT_X11_X11_LIBRARY QT_X11_Xext_LIBRARY QT_X11_m_LIBRARY)
> Index: Qt/Widgets/CMakeLists.txt
> ===================================================================
> RCS file: /cvsroot/ParaView3/ParaView3/Qt/Widgets/CMakeLists.txt,v
> retrieving revision 1.38
> diff -u -r1.38 CMakeLists.txt
> --- Qt/Widgets/CMakeLists.txt	20 Dec 2008 02:14:57 -0000	1.38
> +++ Qt/Widgets/CMakeLists.txt	6 Feb 2009 21:25:23 -0000
> @@ -58,6 +58,7 @@
>   pqLookmarkToolbar.h
>   pqProgressBar.cxx
>   pqProgressBar.h
> +  pqProgressBarHelper.h
>   pqProgressWidget.cxx
>   pqProgressWidget.h
>   pqQuickLaunchDialog.cxx
> @@ -95,6 +96,12 @@
>   QtWidgetsPlugin.h
> )
>
> +IF(Q_WS_MAC)
> +  SET(QtWidgets_SRCS ${QtWidgets_SRCS} pqProgressBarHelper.mm)
> +ELSE(Q_WS_MAC)
> +  SET(QtWidgets_SRCS ${QtWidgets_SRCS} pqProgressBarHelper.cxx)
> +ENDIF(Q_WS_MAC)
> +
> ##########################################################################
> ## Add the header files that need to moc processed.
>
> Index: Qt/Widgets/pqProgressBar.cxx
> ===================================================================
> RCS file: /cvsroot/ParaView3/ParaView3/Qt/Widgets/pqProgressBar.cxx,v
> retrieving revision 1.10
> diff -u -r1.10 pqProgressBar.cxx
> --- Qt/Widgets/pqProgressBar.cxx	4 Apr 2008 13:33:00 -0000	1.10
> +++ Qt/Widgets/pqProgressBar.cxx	6 Feb 2009 21:25:23 -0000
> @@ -30,114 +30,10 @@
>
> = 
> = 
> = 
> = 
> = 
> ====================================================================*/
> #include "pqProgressBar.h"
> +#include "pqProgressBarHelper.h"
> #include <QTimer>
> #include <QHBoxLayout>
>
> -#ifdef Q_WS_MAC
> -#include <Carbon/Carbon.h>
> -
> -// helper class for the mac
> -// we can't call QCoreApplication::processEvents to update the  
> progress bar
> -// so we'll do some extra work to make the progress bar update
> -class pqProgressBarHelper : public QWidget
> -{
> -public:
> -  pqProgressBarHelper(pqProgressBar* p)
> -    : QWidget(p, Qt::Tool | Qt::FramelessWindowHint),  
> ParentProgress(p)
> -    {
> -    this->Progress = new QProgressBar(this);
> -    QHBoxLayout* l = new QHBoxLayout(this);
> -    l->setMargin(0);
> -    l->addWidget(this->Progress);
> -    }
> -
> -  void setFormat(const QString& fmt)
> -    {
> -    this->Progress->setFormat(fmt);
> -    }
> -
> -  void setProgress(int num)
> -    {
> -    this->Progress->setValue(num);
> -
> -    // update the progress bar on the Mac
> -    // Qt only posts a request to update the window
> -    // we really want it to happen now
> -    HIViewRef thisView = HIViewRef(this->Progress->winId());
> -    HIViewSetNeedsDisplay(thisView, true);
> -    HIWindowFlush(HIViewGetWindow(thisView));
> -    }
> -
> -  void enableProgress(bool e)
> -    {
> -    if(e)
> -      {
> -      QSize sz = this->ParentProgress->size();
> -      QRect r(this->ParentProgress->mapToGlobal(QPoint(0,0)), sz);
> -      this->setGeometry(r);
> -      this->Progress->setAlignment(this->ParentProgress- 
> >alignment());
> -      this->Progress->setMaximum(this->ParentProgress->maximum());
> -      this->Progress->setMinimum(this->ParentProgress->minimum());
> -      this->Progress->setOrientation(this->ParentProgress- 
> >orientation());
> -      this->Progress->reset();
> -      this->show();
> -      }
> -    else
> -      {
> -      this->hide();
> -      }
> -    }
> -
> -  bool progressEnabled() const
> -    {
> -    return this->isVisible();
> -    }
> -
> -  QProgressBar* Progress;
> -  pqProgressBar* ParentProgress;
> -};
> -
> -#else
> -
> -// helper class for other platforms
> -class pqProgressBarHelper : public QObject
> -{
> -public:
> -  pqProgressBarHelper(pqProgressBar* p)
> -    : QObject(p), Progress(p)
> -    {
> -    }
> -
> -  void setFormat(const QString& fmt)
> -    {
> -    this->Progress->setFormat(fmt);
> -    }
> -
> -  void setProgress(int num)
> -    {
> -    this->Progress->setValue(num);
> -    }
> -
> -  void enableProgress(bool e)
> -    {
> -    this->Progress->setEnabled(e);
> -    this->Progress->setTextVisible(e);
> -    if(!e)
> -      {
> -      this->Progress->reset();
> -      }
> -    }
> -
> -  bool progressEnabled() const
> -    {
> -    return this->Progress->isEnabled();
> -    }
> -
> -  pqProgressBar* Progress;
> -};
> -
> -#endif
> -
> //-----------------------------------------------------------------------------
> pqProgressBar::pqProgressBar(QWidget* _p) : QProgressBar(_p)
> {
> Index: Qt/Widgets/pqProgressBarHelper.cxx
> ===================================================================
> RCS file: Qt/Widgets/pqProgressBarHelper.cxx
> diff -N Qt/Widgets/pqProgressBarHelper.cxx
> --- /dev/null	1 Jan 1970 00:00:00 -0000
> +++ Qt/Widgets/pqProgressBarHelper.cxx	6 Feb 2009 21:25:23 -0000
> @@ -0,0 +1,70 @@
> +/ 
> *= 
> = 
> = 
> ======================================================================
> +
> +   Program: ParaView
> +   Module:    $RCSfile: pqProgressBar.cxx,v $
> +
> +   Copyright (c) 2005-2008 Sandia Corporation, Kitware Inc.
> +   All rights reserved.
> +
> +   ParaView is a free software; you can redistribute it and/or  
> modify it
> +   under the terms of the ParaView license version 1.2.
> +
> +   See License_v1.2.txt for the full ParaView license.
> +   A copy of this license can be obtained by contacting
> +   Kitware Inc.
> +   28 Corporate Drive
> +   Clifton Park, NY 12065
> +   USA
> +
> +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
> +``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
> +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
> +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR
> +CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
> +EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
> +PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
> +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY  
> OF
> +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
> +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
> +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
> +
> + 
> = 
> = 
> = 
> = 
> = 
> ====================================================================*/
> +
> +#include "pqProgressBarHelper.h"
> +#include "pqProgressBar.h"
> +
> +pqProgressBarHelper::pqProgressBarHelper(pqProgressBar* p)
> +#ifdef Q_WS_MAC
> +    : QWidget(p), Progress(p)
> +#else
> +    : QObject(p), Progress(p)
> +#endif
> +{
> +}
> +
> +void pqProgressBarHelper::setFormat(const QString& fmt)
> +{
> +  this->Progress->setFormat(fmt);
> +}
> +
> +void pqProgressBarHelper::setProgress(int num)
> +{
> +  this->Progress->setValue(num);
> +}
> +
> +void pqProgressBarHelper::enableProgress(bool e)
> +{
> +  this->Progress->setEnabled(e);
> +  this->Progress->setTextVisible(e);
> +  if(!e)
> +    {
> +    this->Progress->reset();
> +    }
> +}
> +
> +bool pqProgressBarHelper::progressEnabled() const
> +{
> +  return this->Progress->isEnabled();
> +}
> +
> +
> Index: Qt/Widgets/pqProgressBarHelper.h
> ===================================================================
> RCS file: Qt/Widgets/pqProgressBarHelper.h
> diff -N Qt/Widgets/pqProgressBarHelper.h
> --- /dev/null	1 Jan 1970 00:00:00 -0000
> +++ Qt/Widgets/pqProgressBarHelper.h	6 Feb 2009 21:25:23 -0000
> @@ -0,0 +1,68 @@
> +/ 
> *= 
> = 
> = 
> ======================================================================
> +
> +   Program: ParaView
> +   Module:    $RCSfile: pqProgressBar.cxx,v $
> +
> +   Copyright (c) 2005-2008 Sandia Corporation, Kitware Inc.
> +   All rights reserved.
> +
> +   ParaView is a free software; you can redistribute it and/or  
> modify it
> +   under the terms of the ParaView license version 1.2.
> +
> +   See License_v1.2.txt for the full ParaView license.
> +   A copy of this license can be obtained by contacting
> +   Kitware Inc.
> +   28 Corporate Drive
> +   Clifton Park, NY 12065
> +   USA
> +
> +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
> +``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
> +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
> +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR
> +CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
> +EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
> +PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
> +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY  
> OF
> +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
> +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
> +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
> +
> + 
> = 
> = 
> = 
> = 
> = 
> ====================================================================*/
> +
> +#ifndef PQ_PROGESS_BAR_HELPER_HPP
> +#define PQ_PROGESS_BAR_HELPER_HPP
> +
> +#include <QWidget>
> +class pqProgressBar;
> +class QProgressBar;
> +
> +// progress bar helper class
> +// we can't call QCoreApplication::processEvents to update the  
> progress bar
> +// so we'll do some extra work to make the progress bar update
> +#ifdef Q_WS_MAC
> +class pqProgressBarHelper : public QWidget
> +#else
> +class pqProgressBarHelper : public QObject
> +#endif
> +{
> +public:
> +  pqProgressBarHelper(pqProgressBar* p);
> +
> +  void setFormat(const QString& fmt);
> +
> +  void setProgress(int num);
> +
> +  void enableProgress(bool e);
> +
> +  bool progressEnabled() const;
> +
> +  pqProgressBar* ParentProgress;
> +#ifdef Q_WS_MAC
> +  QProgressBar* Progress;
> +#endif
> +};
> +
> +#endif
> +
> +
> Index: Qt/Widgets/pqProgressBarHelper.mm
> ===================================================================
> RCS file: Qt/Widgets/pqProgressBarHelper.mm
> diff -N Qt/Widgets/pqProgressBarHelper.mm
> --- /dev/null	1 Jan 1970 00:00:00 -0000
> +++ Qt/Widgets/pqProgressBarHelper.mm	6 Feb 2009 21:25:23 -0000
> @@ -0,0 +1,98 @@
> +/ 
> *= 
> = 
> = 
> ======================================================================
> +
> +   Program: ParaView
> +   Module:    $RCSfile: pqProgressBar.cxx,v $
> +
> +   Copyright (c) 2005-2008 Sandia Corporation, Kitware Inc.
> +   All rights reserved.
> +
> +   ParaView is a free software; you can redistribute it and/or  
> modify it
> +   under the terms of the ParaView license version 1.2.
> +
> +   See License_v1.2.txt for the full ParaView license.
> +   A copy of this license can be obtained by contacting
> +   Kitware Inc.
> +   28 Corporate Drive
> +   Clifton Park, NY 12065
> +   USA
> +
> +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
> +``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
> +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
> +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR
> +CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
> +EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
> +PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
> +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY  
> OF
> +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
> +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
> +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
> +
> + 
> = 
> = 
> = 
> = 
> = 
> ====================================================================*/
> +
> +#include "pqProgressBarHelper.h"
> +#include "pqProgressBar.h"
> +#include <QHBoxLayout>
> +
> +#ifndef QT_MAC_USE_COCOA
> +#include <Carbon/Carbon.h>
> +#endif
> +
> +pqProgressBarHelper::pqProgressBarHelper(pqProgressBar* p)
> +    : QWidget(p, Qt::Tool | Qt::FramelessWindowHint),  
> ParentProgress(p)
> +{
> +  this->Progress = new QProgressBar(this);
> +  QHBoxLayout* l = new QHBoxLayout(this);
> +  l->setMargin(0);
> +  l->addWidget(this->Progress);
> +}
> +
> +void pqProgressBarHelper::setFormat(const QString& fmt)
> +{
> +  this->Progress->setFormat(fmt);
> +}
> +
> +void pqProgressBarHelper::setProgress(int num)
> +{
> +  this->Progress->setValue(num);
> +
> +  // update the progress bar on the Mac
> +  // Qt only posts a request to update the window
> +  // we really want it to happen now
> +#ifndef QT_MAC_USE_COCOA
> +  HIViewRef thisView = HIViewRef(this->Progress->winId());
> +  HIViewSetNeedsDisplay(thisView, true);
> +  HIWindowFlush(HIViewGetWindow(thisView));
> +#else
> +  OSViewRef view = reinterpret_cast<OSViewRef>(this->Progress- 
> >winId());
> +  [view setNeedsDisplay:YES];
> +  OSWindowRef wnd = [view window];
> +  [wnd flushWindowIfNeeded];
> +#endif
> +}
> +
> +void pqProgressBarHelper::enableProgress(bool e)
> +{
> +  if(e)
> +    {
> +    QSize sz = this->ParentProgress->size();
> +    QRect r(this->ParentProgress->mapToGlobal(QPoint(0,0)), sz);
> +    this->setGeometry(r);
> +    this->Progress->setAlignment(this->ParentProgress->alignment());
> +    this->Progress->setMaximum(this->ParentProgress->maximum());
> +    this->Progress->setMinimum(this->ParentProgress->minimum());
> +    this->Progress->setOrientation(this->ParentProgress- 
> >orientation());
> +    this->Progress->reset();
> +    this->show();
> +    }
> +  else
> +    {
> +    this->hide();
> +    }
> +}
> +
> +bool pqProgressBarHelper::progressEnabled() const
> +{
> +  return this->isVisible();
> +}
> +



More information about the ParaView mailing list