[CMake] CPack : Embedding other installer (*.msi, *.exe)

ycollette.nospam at free.fr ycollette.nospam at free.fr
Wed Jan 11 07:15:37 EST 2012


Hello,

With your cmake: embed the installers in your project, install them in a tmp dir

....

  install(PROGRAMS ${CMAKE_CURRENT_SOURCE_DIR}/redistributable/win64/vcredist_2005_sp1_x64.exe
          DESTINATION tmp)

....

Now, add the following specific NSIS commands:


      list(APPEND CPACK_NSIS_EXTRA_INSTALL_COMMANDS " 
               ExecWait '$INSTDIR\\\\tmp\\\\vcredist_2005_sp1_x64.exe'
               ")

For a msi installer:

    list(APPEND CPACK_NSIS_EXTRA_INSTALL_COMMANDS " 
             ExecWait 'msiexec /i $INSTDIR\\\\tmp\\\\mpich2-1.2.1p1-win.msi'
             ")


I hope this helps,

YC

----- Mail original -----
De: "Nicholas Yue" <yue.nicholas at gmail.com>
À: cmake at cmake.org
Envoyé: Mercredi 11 Janvier 2012 12:43:17
Objet: [CMake] CPack : Embedding other installer (*.msi, *.exe)

Hi,

     I have a packaging/installation scenario where my files are 
dependent on another MSI/EXE to be executed/install

     I tried googling "NSIS cpack embed installer" but didn't find the 
answer.

     Is somewhere I can read up on this way of packaging up and 
installer on Windows ?

     I am currently using a related macro (provided by CMake) to install 
the Visual Studio redistributable so I guess it is possible.

Regards

-- 
Nicholas Yue
Graphics - RenderMan, Houdini, Visualization, OpenGL, HDF5
Custom Dev - C++ porting, OSX, Linux, Windows
http://au.linkedin.com/in/nicholasyue

--

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 CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


More information about the CMake mailing list