[CLAM] Segmentation View in Qt Designer
Ryan Brubaker
ryan.brubaker at gmail.com
Tue Apr 28 14:41:47 PDT 2009
> Um... maybe clam dlls should be installed at the PATH. I don't know for
sure.
Bingo. The CLAMWidgets.dll file is dependent on the clam_core.dll file. I
just needed to add my CLAM install path to my PATH variable. Thanks!
> I also guess that you can not see the SegmentationView but neither any
other
> CLAM widget. Is that true or does it happens just with that widget.
Not a problem anymore as I was able to import my personal build of the
CLAMWidgets.dll into my QT installation.
I've attached a file that contains the documentation of the process I went
through to get everything compiled on Windows. I used the Wiki as a resource
but there were a couple of things I had to do differently to get everything
installed/compiled. Please feel free to use it on the wiki if you think it
might help anyone trying to build CLAM on windows.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.clam-project.org/pipermail/clam-users-clam-project.org/attachments/20090428/89e23545/attachment-0003.htm>
-------------- next part --------------
The instructions for building CLAM on Windows can be found within the CLAM wiki:
http://clam-project.org/wiki/Devel/Windows_MinGW_build
I had to do things a little differently than what was specified on that page, although
it's a helpful resource. You probably want to reference both this document and that
wiki page, although I'll try to specify everything I needed to do here.
1. If you don't have an extract tool on Windows that handles gzip or tarred files, you
may want to download 7-zip:
http://www.7-zip.org
2. Download/install python:
http://www.python.org/download
3. Download/install pywin32:
http://sourceforge.net/projects/pywin32
4. Download/install SCONS:
http://www.scons.org/
5. Install MinGW
The wiki page points to the MinGW installer url. However, because of a future
step (replacing gcc 3.x with gcc 4.x), I found it easier to just install MinGW
in pieces. That way you just install gcc 4.x from the beginning and don't have
to worry about installing 4.x over 3.x (gcc kept crashing on me when I did that).
See "Manual Installation" section at:
http://www.mingw.org/wiki/HOWTO_Install_the_MinGW_GCC_Compiler_Suite
5a. Create a folder C:\MinGW
5b. Download and unpackage GNU bintuils into the C:\MinGW folder:
http://sourceforge.net/project/showfiles.php?group_id=2435&package_id=11290
5c. Download and unpackage the 4.2.1-sjlj-2 gcc-core and gcc-g++ packages into the
C:\MinGW folder. I answered "No" when prompted to overwrite any files:
http://sourceforge.net/project/showfiles.php?group_id=2435&package_id=241304
5d. Navigate to c:\MinGW\bin and rename any files that have a "sjlj" suffix by removing
that suffix.
5e. Download and unpackage the MinGW runtime packages (both dev and dll) into the
C:\MinGW folder. I answered "Yes" when prompted to overwrite any files:
http://sourceforge.net/project/showfiles.php?group_id=2435&package_id=11598
5f. Download an upnackage the MinGW Win32 package into the C:\MinGW folder.
http://sourceforge.net/project/showfiles.php?group_id=2435&package_id=11550
5g. The gcc 4.2.1 package is missing a necessary dll that is packaged in the
4.3.0 gcc package. Download the 4.3.0 core package:
http://sourceforge.net/project/showfiles.php?group_id=2435&package_id=241304
and extract the pthreadGC2.dll in the bin folder to C:\MinGW\bin folder.
6. Download/install MSYS:
http://downloads.sourceforge.net/mingw/MSYS-1.0.10.exe
7. Download/instal QT 4.5.0. I ignored the error about the invalid win32 api file.
http://get.qtsoftware.com/qt/source/qt-win-opensource-4.5.0-mingw.exe
8. The CLAM website has binaries for 3rd-party dependencies of the CLAM framework. Download and
unpack this package to c:\MinGW:
http://clam.iua.upf.edu/download/win/clam-3rdparty-mingw-20080128.tar.gz
8a. The libpthread.a file in the 3rd-party binaries is an empty file. Navigate to
c:\MinGW\local\lib and rename libpthread.a to libpthread.a.bak and rename a copy of libpthreadGC2.a
to libpthread.a.
(Not sure if this is a valid thing to do but the SCONS config check fails unless there is a
libpthread.a file to link against).
9. Replace the QT libraries in C:\MinGW\local\bin with those that are installed on the system.
9a. In a DOS prompt, navigate to C:\MinGW\local\bin
9b. Type "dir QT*" at the command line...you should see the following files:
QtCore4.dll
QtGui4.dll
QtOpenGL4.dll
QtSvg4.dll
QtXml4.dll
9c. For each of these files, overwrite it with the corresponding file from your QT installation directory
(e.g copy c:\qt\4.5.0\bin\QtCore4.dll .).
10. Check out the CLAM svn repository:
svn co http://clam-project.org/clam/trunk trunk
11. Donwload/install pkg-config:
http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/pkg-config-0.23-2.zip
I unzipped and installed to c:\MinGW\pgk-config
12. Configure the MSYS environment
12a. Add the following (with appropriate paths) to the c:\MSYS\1.0\etc\profile file:
export PKG_CONFIG_PATH="C:\MinGW\local\lib\pkgconfig"
export QTDIR="C:\Qt\4.5.0"
12b. Create the following folders at c:\msys\1.0:
<trunk> (the path at which you checked out the CLAM svn repository)
Python26 (Probably don't need this one once you update PATH to
include path to Python executable).
13. Update your Windows PATH variable, adding the following directories (with appropriate paths):
C:\Qt\4.5.0\bin
c:\MinGW\local\bin
c:\MinGW\pkg-config\bin
c:\python26\Scripts
c:\python26
14. Start MSYS (installation should have put a Shortcut on your desktop).
15. Navigate to where you checked out the CLAM trunk and navigate to the CLAM subfolder.
16. Issue the following command to configure CLAM (install_path = where you want to install build output):
DEGUG
scons configure prefix='c:\mingw\local' prefix_for_packaging=<install_path> sandbox_path='c:\mingw' verbose=TRUE xmlbackend='xmlpp' audio_backend=portaudio
RELEASE
scons configure prefix='c:\mingw\local' prefix_for_packaging=<install_path> sandbox_path='c:\mingw' verbose=TRUE xmlbackend='xmlpp' audio_backend=portaudio release=yes
17. Issue the following command to build CLAM:
scons
18. Issue the following command to install CLAM:
scons install
19. To use the CLAM widgets in QtDesigner, copy the CLAMWidgets.dll file (located in <install_path>\bin\designer)
to C:\qt\4.5.0\plugins\designer. You must also add <install_path>\lib to your system PATH environment variable
as the CLAMWidgets.dll file is dependent on the clam_core.dll.
More information about the clam-users
mailing list