[Paraview] Packaging branded binary

Utkarsh Ayachit utkarsh.ayachit at kitware.com
Fri Jan 15 11:27:44 EST 2010


Eric,

If your application wants to install Qt libs, use the following:

#-------------------------------------------------------------------
SET (qtliblist QTCORE QTGUI QTNETWORK QTXML QTSQL QTHELP QTWEBKIT
QTCLUCENE PHONON QTXMLPATTERNS)
# QTDBUS is Unix only
IF(NOT WIN32)
  LIST(APPEND qtliblist QTDBUS)
ENDIF(NOT WIN32)

IF (NOT WIN32)
  SET (PV_INSTALL_LIB_DIR
"lib/paraview-${PARAVIEW_VERSION_MAJOR}.${PARAVIEW_VERSION_MINOR}")
ELSE (NOT WIN32)
  SET (PV_INSTALL_LIB_DIR "bin")
ENDIF (NOT WIN32)

# You can set PV_INSTALL_LIB_DIR to "lib/yourapp-version" if you want
to put the qt libraries there.

install_qt_libs("${qtliblist}" BrandedRuntime)
#-------------------------------------------------------------------

I think I may change install_qt_libs to take the location where to
install them so that you don't have set the PV_INSTALL_LIB_DIR
variable.

Don't copy the install rule for .plugins since that doesn't make sense
for custom applications.

I am pondering creating a new install component "ThirdPartyRuntimes"
that the custom app can pick to install and then Qt and FFMPEG (if
applicable) will get installed automatically.

Utkarsh


On Fri, Jan 15, 2010 at 11:11 AM, Eric E. Monson <emonson at cs.duke.edu> wrote:
> Hey Utkarsh,
>
> We're getting closer... Your new instructions got me past a lot of the problems, but I was still missing the Qt libraries. I copied the "Add install rules..." section from Applications/ParaView/CMakeLists.txt so I would have an example for the install_qt_libs() macro, and it sort of worked, but in my binary package it put all of the Qt libraries in the package root rather than in {package_root}/lib/paraview-3.7/. After I moved the Qt libraries to that spot, all it was missing was libaudio.so.2 (which is a link to libaudio.so.2.4 on my system). If I also copy that to the correct package lib directory it runs on a clean Ubuntu system!
>
> So, if you know how to get the Qt libraries to end up in the correct spot, and how to get libaudio to show up, too, let me know.
>
> Oh, and when I copied the whole "Add install rules" section, cmake complained when it ran into the "Install the .plugins configuration file" section, saying "install FILES given no DESTINATION!". I guess maybe it doesn't know the ${PV_INSTALL_LIB_DIR} variable, but I'm not sure if I'll need that, or what to replace it with in my script.
>
> Next I need to see if I can get my plugins to compile and install along with my branded app. As you can tell, I'm not exactly a CMake master! :)
>
> Thanks again for all the help,
> -Eric
>
>
> On Jan 14, 2010, at 5:08 PM, Utkarsh Ayachit wrote:
>
>> Eric,
>>
>> I've updated the Wiki:
>>
>> http://www.paraview.org/Wiki/Writing_Custom_Applications#Packaging
>>
>> Here are the highlights:
>> * Build ParaView with VTK_USE_RPATH:OFF and BUILD_SHARED: ON
>> * Build your app with CMAKE_SKIP_RPATH:ON and BUILD_SHARED: ON
>>
>> Utkarsh
>>
>> On Thu, Jan 14, 2010 at 5:06 PM, Eric E. Monson <emonson at cs.duke.edu> wrote:
>>> Hey Utkarsh,
>>>
>>> Thanks for the quick response -- that worked perfectly for generating the package.
>>>
>>> The problem I'm running into now, on Ubuntu at least (which is probably a generic install/package problem, not specific to the branding) is that the executable can't find the proper libraries. I can run from the {package}/build directory if I make a source package, but that seems to be because it's still finding the libraries in my original ParaView build -- ldd on the executable lists the original library build location, not the new {package}/lib/paraview-3.7 library location. I tried building ParaView with VTK_USE_RPATH turned OFF, too, but that didn't seem to solve it.
>>>
>>> Sorry for the ignorance on this part -- I usually just build and run in place rather than doing an "install".
>>>
>>> Thanks again,
>>> -Eric
>>>
>>>
>>> On Jan 14, 2010, at 4:25 PM, Utkarsh Ayachit wrote:
>>>
>>>> Eric,
>>>>
>>>> That's something that needs to be fixed. For now, you can do this:
>>>>
>>>> cpack -G TGZ --config CPack{PackageName}Config.cmake
>>>>
>>>> You can change the generator (-G) suitable for your platform. Look at
>>>> cpack --help for details.
>>>>
>>>> Note: this is still under development. I committed this code just
>>>> yesterday :), so there may be issues. But we'd love any feedback that
>>>> we can get.
>>>>
>>>> Utkarsh
>>>>
>>>> On Thu, Jan 14, 2010 at 4:16 PM, Eric E. Monson <emonson at cs.duke.edu> wrote:
>>>>> Hello,
>>>>>
>>>>> I've never tried to package PV binaries before, but I've been enjoying exploring the new branding capabilities and started trying to see if I could package my custom PV to supply for my users. I added the appropriate lines to my CMakeList.txt file by looking at the one for the Spreadsheet app. I'm building out of the PV source tree, and the build goes fine.
>>>>>
>>>>> Even though there were cpack options when configuring in ccmake for both binary and source packaging, I can run "make package_source" after my build but there is no target for "make package". Is there some other configuration I can do to package the binaries without all of the source files?
>>>>>
>>>>> (I'm building 64-bit versions with CVS CMake and ParaView, and Qt 4.6.0 on both Mac OS X 10.6.2 and Ubuntu 9.10)
>>>>>
>>>>> Thanks for the help,
>>>>> -Eric
>>>>>
>>>>> ------------------------------------------------------
>>>>> Eric E Monson
>>>>> Duke Visualization Technology Group
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> 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
>>>>>
>>>
>>>
>
>


More information about the ParaView mailing list