[CMake] Cpack from CMake and NSIS

Alin M Elena alin.elena at qub.ac.uk
Sat Apr 5 04:40:40 EDT 2008


Hi,

 

I try to create a package for windows using NSIS (2.36) generator and
cmake2.6 RC6

This is the error that I get

 

Run CPack packaging tool...

CPack: Create package using NSIS

CPack: Install projects

CPack: - Run preinstall target for: aten

CPack: - Install project: aten

Don't forget to set ATENDATA to c:/aten/share/aten in your profile

CPack: Compress package

CPack Error: Problem running NSIS command: "C:/Program
Files/NSIS/makensis.exe" "C:/Users/Alin M Elena/test/_CPack_Packa

ges/win32/NSIS/project.nsi"

Please check C:/Users/Alin M
Elena/test/_CPack_Packages/win32/NSIS/NSISOutput.log for errors

CPack Error: Problem compressing the directory

CPack Error: Error when generating package: aten

NMAKE : fatal error U1077: '"C:\Program Files\CMake\bin\cpack.exe"' : return
code '0x1'

Stop.

 

The error is:

Error: unterminated string parsing line at C:/Users/Alin M
Elena/test/_CPack_Packages/win32/NSIS/project.nsi:28^M

Error in script "C:/Users/Alin M
Elena/test/_CPack_Packages/win32/NSIS/project.nsi" on line 28 -- aborting
creation proc

ess^M

 

the offending lines (Something seems to be wrong with the end of line too in
the .log file)

 

;Include Modern UI

 

  !include "MUI.nsh"

 

27:  ;Default installation folder

28:   InstallDir "$PROGRAMFILES\aten

30:  ."  

 

;--------------------------------

 

And now my section from CMakeLists.txt that deals with cpack

 

####################

####install target

####################

 

if(NOT ${PREFIX})

MESSAGE("Install folder ${PREFIX}")

set(CMAKE_INSTALL_PREFIX "${PREFIX}")

endif(NOT ${PREFIX})

 

install(TARGETS ${target_name}

      RUNTIME DESTINATION bin

      PERMISSIONS WORLD_EXECUTE)

 

install( DIRECTORY  "${CMAKE_HOME_DIRECTORY}/data/filters" 

     FILE_PERMISSIONS WORLD_READ

     DIRECTORY_PERMISSIONS WORLD_EXECUTE

     DESTINATION share/aten

     REGEX ".svn" EXCLUDE

)

install(CODE

"message(\"Don't forget to set ATENDATA to
${CMAKE_INSTALL_PREFIX}/share/aten in your profile\")"

)

 

#######################

## uninstall target

#######################

 

CONFIGURE_FILE(

  "${CMAKE_CURRENT_SOURCE_DIR}/cmake_uninstall.cmake.in"

  "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"

  IMMEDIATE @ONLY)

ADD_CUSTOM_TARGET(uninstall

  "${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake")

###########################

 

INCLUDE(InstallRequiredSystemLibraries)

SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY ${DESCRIPTION})

SET(CPACK_PACKAGE_VENDOR ${AUTHOR})

SET(CPACK_PACKAGE_CONTACT ${CPACK_PACKAGE_VENDOR})

SET(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/README")

SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/COPYING")

SET(CPACK_PACKAGE_VERSION_MAJOR ${VERSION_MAJOR})

SET(CPACK_PACKAGE_VERSION_MINOR ${VERSION_MINOR})

SET(CPACK_PACKAGE_VERSION_PATCH ${VERSION_PATCH})

SET(CPACK_PACKAGE_INSTALL_DIRECTORY "aten

${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}")

IF(WIN32 AND NOT UNIX)

  # There is a bug in NSI that does not handle full unix paths properly.
Make

  # sure there is at least one set of four (4) backlasshes.

  SET(CPACK_PACKAGE_ICON "${CMake_SOURCE_DIR}/src/gui/icons\\\\aten.png")

  SET(CPACK_NSIS_INSTALLED_ICON_NAME "bin\\\\aten.exe")  

  SET(CPACK_NSIS_DISPLAY_NAME "${CPACK_PACKAGE_INSTALL_DIRECTORY} Aten")

  SET(CPACK_NSIS_HELP_LINK "http:\\\\\\\\www.projectaten.org")

  SET(CPACK_NSIS_URL_INFO_ABOUT "http:\\\\\\\\www.projectaten.org")

  SET(CPACK_NSIS_CONTACT "t.youngs at qub.ac.uk")

  SET(CPACK_NSIS_MODIFY_PATH ON)

ELSE(WIN32 AND NOT UNIX)

SET(CPACK_GENERATOR "TGZ;TBZ2;RPM;DEB")

Endif(WIN32 AND NOT UNIX)

SET(CPACK_PACKAGE_EXECUTABLES "aten.exe" "aten")

SET(CPACK_CMAKE_GENERATOR ${CMAKE_GENERATOR})

INCLUDE(CPack)

 

 

Any thoughts?

Alin

 

____________________________________________________________________

"...if the universities will not study useless subjects, who will?"

                           G. F. Fitzgerald, Nature, 45/46, 392 (1892)

______________________________________________________________________

Mr. Alin M. ELENA

Atomistic Simulation Centre

School of Mathematics and Physics

Queen's University Belfast

Office: +44 (0)28 9097 1428

Fax: +44 (0)28 9097 5359

http://titus.phy.qub.ac.uk/group/Alin/

alin.elena at yahoo.co.uk

alin.elena at qub.ac.uk

______________________________________________________________________

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20080405/7a8212b2/attachment-0001.htm>


More information about the CMake mailing list