From: Werner S. <sm...@ia...> - 2006-12-30 10:44:25
|
Hi, since it's especially for Windows more and more complicated to have all 3rd party libraries included in the plplot library I would propose the following solution. We make an additional 3rd party library package, which contains the source files, header files and a custom CMakeLists.txt of all libraries we want to include (agg, freetype, libharu, cd, qhull,...). The structure would look like this: plplot ----> lib -->agg2.4 ---->CMakeLists.txt ---->src ---->include -->cd1.3 etc. The maintainance of this package would not be much effort, since we wouldn't need to always include the newest version of a library - it's just libraries known to work with plplot. And some libraries (qhull,cd) aren't updated anyway. Than we would need to change the Findxxx.cmake files a little bit: e.g. FindCD.cmake: find_path(CD_INCLUDE_DIR cd.h /usr/local/include /usr/include) if(CD_INCLUDE_DIR) [...] else(CD_INCLUDE_DIR) # library not found, see if user installed 3rd party package find_path(CML_DIR CMakeLists.txt ${CMAKE_SRC_DIR}/lib/cd1.3) if(CML_DIR) # yes?, so we compile it on our own subdirectory(CML_DIR) set(CD_INCLUDE_PATH ...) [...] endif(CML_DIR) endif(CD_INCLUDE_DIR) [...] This script won't work exactly like that, but you get the idea. This would have several advantages: 1) Very easy than for Windows users 2) if the system provides the libraries, we don't compile it on our own 3) if the user provides newer libraries, we don't compile it on our own 4) we have complete control of the library (shared, static, debug etc.) 5) Do get most features of plplot, you have only to untar the 3rd party package and you're ready 6) For users who don't use the 3rd party package there is no change at all disadvantage: 1) Maintain the package, but I think it's really low effort as soon as it is setup. 2) gd and wxwidgets can't be included that way. What do you think? -Werner -- Dipl. Ing. Werner Smekal Institut fuer Allgemeine Physik Technische Universitaet Wien Wiedner Hauptstr 8-10 A-1040 Wien Austria email: sm...@ia... web: http://www.iap.tuwien.ac.at/~smekal phone: +43-(0)1-58801-13463 (office) +43-(0)1-58801-13469 (laboratory) fax: +43-(0)1-58801-13499 |
From: Alan W. I. <ir...@be...> - 2006-12-30 19:30:09
|
On 2006-12-30 11:44+0100 Werner Smekal wrote: > Hi, > > since it's especially for Windows more and more complicated to have all > 3rd party libraries included in the plplot library I would propose the > following solution. > > We make an additional 3rd party library package, which contains the > source files, header files and a custom CMakeLists.txt of all libraries > we want to include (agg, freetype, libharu, cd, qhull,...). The > structure would look like this: > > plplot > ----> lib > -->agg2.4 > ---->CMakeLists.txt > ---->src > ---->include > -->cd1.3 > etc. > > The maintainance of this package would not be much effort, since we > wouldn't need to always include the newest version of a library - it's > just libraries known to work with plplot. And some libraries (qhull,cd) > aren't updated anyway. > > Than we would need to change the Findxxx.cmake files a little bit: > > e.g. FindCD.cmake: > > find_path(CD_INCLUDE_DIR cd.h /usr/local/include /usr/include) > > if(CD_INCLUDE_DIR) > [...] > else(CD_INCLUDE_DIR) > # library not found, see if user installed 3rd party package > find_path(CML_DIR CMakeLists.txt ${CMAKE_SRC_DIR}/lib/cd1.3) > if(CML_DIR) > # yes?, so we compile it on our own > subdirectory(CML_DIR) > set(CD_INCLUDE_PATH ...) > [...] > endif(CML_DIR) > endif(CD_INCLUDE_DIR) > [...] > > This script won't work exactly like that, but you get the idea. This > would have several advantages: > > 1) Very easy than for Windows users > 2) if the system provides the libraries, we don't compile it on our own > 3) if the user provides newer libraries, we don't compile it on our own > 4) we have complete control of the library (shared, static, debug etc.) > 5) Do get most features of plplot, you have only to untar the 3rd party > package and you're ready > 6) For users who don't use the 3rd party package there is no change at all > > disadvantage: > 1) Maintain the package, but I think it's really low effort as soon as > it is setup. > 2) gd and wxwidgets can't be included that way. > > What do you think? If you are willing to take on the responsibility of preparing and maintaining a separate 3rd-party library source package release (presumably a zip file) which you would separately release at our SourceForge file release area and which the the windows user would unzip on top of their PLplot source tree for an integrated 3rd-party and PLplot build, then that would be fine with me. However, I have just been struck with an alternative idea that might be even better; make the 3rd-party build completely independent of PLplot and provide not only a 3rd-party source release but also a binary release (which keeps the 3rd-party libraries out of the PLplot binary release, although they would have a common install location). The reason why I suggest this alternative is I am a strong believer in the Unix philosophy that separate is beautiful and over-integration can cause problems. For example, with the original integrated build proposal, the user can really screw up if they unzip the 3rd-party source package into the wrong location. Note, the idea of a separate 3rd-party build and binary release is only a possibility that I want to draw to your attention, and if you (and Arjen) feel the integrated 3rd-party and PLplot build approach and binary release for windows users will be easier to support, than I am willing to go along with it since you will be the ones doing that support. :-) By the way, when you prepare the 3rd-party source release, I assume you will personally download the 3rd-party source code version that you want to include in the release rather than attempting to maintain that 3rd-party source code as part of our CVS. However, its fine with me if you maintain the CMake infrastructure (CMakeList.txt files, etc.) for the 3rd-party software as part of our CVS (like you do now in cmake/external for some of the 3rd-party libraries). Alan __________________________ Alan W. Irwin Astronomical research affiliation with Department of Physics and Astronomy, University of Victoria (astrowww.phys.uvic.ca). Programming affiliations with the FreeEOS equation-of-state implementation for stellar interiors (freeeos.sf.net); PLplot scientific plotting software package (plplot.org); the Yorick front-end to PLplot (yplot.sf.net); the Loads of Linux Links project (loll.sf.net); and the Linux Brochure Project (lbproject.sf.net). __________________________ Linux-powered Science __________________________ |
From: Werner S. <sm...@ia...> - 2006-12-30 22:21:47
|
Hi, > > If you are willing to take on the responsibility of preparing and [...] > software as part of our CVS (like you do now in cmake/external for some of > the 3rd-party libraries). Ok, I agree with you. What I have done now is assembling agg, cd, gdwin32, freetype, libharu and qhull in one directory and copied the CMakefiles into the corresponding places and wrote a small batch file, which compiles and installs everything in the same directory (include, bin, lib). To let cmake find all 6 libraries you only have to tell cmake to find the include and lib directory. I would only make the source compilation downloadable as a package. I'll also write a small batch file for Visual C++. So it should be than as easy as running a batch file to make all these libraries compile (if you set up our compiler correctly). The 3rd party libraries are now separate from plplot, and at least for mingw and Visual C++ it is very easy to create them. Makes it easier for developers and packagers. When I have finished the batch file for Visual C++ I make this package available for testing. Thanks, Werner -- Dipl. Ing. Werner Smekal Institut fuer Allgemeine Physik Technische Universitaet Wien Wiedner Hauptstr 8-10 A-1040 Wien Austria email: sm...@ia... web: http://www.iap.tuwien.ac.at/~smekal phone: +43-(0)1-58801-13463 (office) +43-(0)1-58801-13469 (laboratory) fax: +43-(0)1-58801-13499 |
From: Werner S. <sm...@ia...> - 2007-01-05 09:46:40
|
Hi Arjen, ok, I uploaded the 3rd party source package to the web. You can download (or others) it from here: http://www.miscdebris.net/stuff/3p_plplot.zip It's a 8Mb download. Just unzip it somewhere, cd into the new directory and run make_all_vc.bat or make_all_mingw.bat This will create and install (into include/bin/lib) agg, cd, freetype, gd, qhull and haru pdf library. At the end the lib directory should contain (for visual c++): agg.lib bgd.lib and bgd.dll cd.lib freetype.lib hpdf.lib libhpdf.lib qhull.lib For Visual C++ 2005 set the variable in make_all_vc.bat accordingly, since freetype doesn't compile out of the box with VC++ 2005. All you need to do then is set the cmake environment vars: rem setup 3rd party libraries set THIRDPARTY=%USER_ROOTDIR%\3p_plplot set PATH=%THIRDPARTY%\lib;%PATH% set CMAKE_INCLUDE_PATH=%THIRDPARTY%\include;%CMAKE_INCLUDE_PATH% set CMAKE_LIBRARY_PATH=%THIRDPARTY%\lib;%CMAKE_LIBRARY_PATH% That's all. So download, unzip, run batch file, set variables. I copied the whole sources for every package into this zip. I could make the download considerably smaller by deleting a lot of unused stuff, but than I don't want to delete too much (licenses and so on) and do something wrong. Since not many will download it anyway (only windows, those you who don't use the binary) I don't think this is a show stopper. So please, Arjen and Jim (Dishaw), please test if it works for you. Thanks, Werner > Hi Werner, > > it looks like a good plan, even though it will put some burden > on the maintainers. > > I will be on holiday this first week of january, but I will think > about your suggestions. > > Regards, > > Arjen > > > -- Dipl. Ing. Werner Smekal Institut fuer Allgemeine Physik Technische Universitaet Wien Wiedner Hauptstr 8-10 A-1040 Wien Austria email: sm...@ia... web: http://www.iap.tuwien.ac.at/~smekal phone: +43-(0)1-58801-13463 (office) +43-(0)1-58801-13469 (laboratory) fax: +43-(0)1-58801-13499 |