View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0007828CMakeCPackpublic2008-10-19 02:132011-06-06 18:25
ReporterSam Baker 
Assigned ToDavid Cole 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product VersionCMake-2-6 
Target VersionCMake 2.8.4Fixed in VersionCMake 2.8.4 
Summary0007828: Impossible to create a Nullsoft installer without referencing bin folder
DescriptionAs reported to the mailing list, my project has an install that doesn't include a bin folder. An exe and its dlls go in the root directory.

The lack of bin folder means that I can't use CPACK_PACKAGE_EXECUTABLES for my executable. However if I don't include CPACK_PACKAGE_EXECUTABLES, then CPACK_NSIS_MENU_LINKS doesn't work. If I add a dummy entry for CPACK_PACKAGE_EXECUTABLES then my menu links show up so that is the workaround that I'm using now. It causes a bogus entry in my start menu folder though. The example install and cpack is below.

I'm building with CMake 2.6.2 on Win XP using Visual Studio 2008.

#
# Configure the install
#
INSTALL(TARGETS MyApp
    RUNTIME DESTINATION .
    LIBRARY DESTINATION .
    ARCHIVE DESTINATION .)

INSTALL(FILES ${MYAPP_ROOT_DIR}/plugins.cfg ${MYAPP_ROOT_DIR}/plugins_debug.cfg DESTINATION .)
INSTALL(DIRECTORY ${MYAPP_ROOT_DIR}/assets DESTINATION .)
# Add Microsoft runtime
set(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP TRUE)
INCLUDE(InstallRequiredSystemLibraries)
INSTALL(PROGRAMS ${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS} DESTINATION .)

#
# Configure the installer
#
set(CPACK_PACKAGE_NAME "My application")
set(CPACK_PACKAGE_VERSION_MAJOR 0)
set(CPACK_PACKAGE_VERSION_MINOR 0)
set(CPACK_PACKAGE_VERSION_PATCH 1)
set(CPACK_PACKAGE_DESCRIPTION_FILE ${MYAPP_ROOT_DIR}/installer/packagedescription.txt)
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "My App")
set(CPACK_PACKAGE_INSTALL_DIRECTORY "My App")
set(InstallerPath ${MYAPP_ROOT_DIR}/installer/)
set(CPACK_RESOURCE_FILE_LICENSE ${InstallerPath}license.txt)
set(CPACK_RESOURCE_FILE_WELCOME ${InstallerPath}welcome.txt)
set(CPACK_NSIS_MENU_LINKS "./MyApp.exe" "Run the application")
set(CPACK_PACKAGE_EXECUTABLES "I AM CONFUSED" "I DO NOTHING")
set(CPACK_NSIS_DISPLAY_NAME "Install Application!")
set(CPACK_NSIS_CONTACT "sam.baker@bigfishgames.com")
SET(CPACK_NSIS_MUI_ICON "${InstallerPath}\\\\logo.ico")
SET(CPACK_NSIS_MUI_UNIICON "${InstallerPath}\\\\logored.ico")
SET(CPACK_PACKAGE_ICON "${InstallerPath}\\\\logo.bmp")
include(CPack)
Additional InformationFrom David Cole:

It appears to be a bug... We'll have to keep supporting the "bin" folder for backwards compatibility, but I think it would be a great feature request to use CPACK_PACKAGE_EXECUTABLES without requiring a "bin" folder.


And the CPACK_NSIS_MENU_LINKS should work regardless of use of CPACK_PACKAGE_EXECUTABLES.


Would you be willing to submit a bug and a feature request to the bug tracker on these two issues? If you have time, great, do it and assign them to me. Otherwise, I will try to put these into the bug tracker and/or fix them in the CMake code base.


Thanks for the report,
David Cole
TagsNo tags attached.
Attached Files

 Relationships
related to 0010644closedDavid Cole problem using CPACK_NSIS_MENU_LINKS with non-http urls 
has duplicate 0010591closedDavid Cole For NSIS, CPack erroneously enforces a ..\bin\ folder 
related to 0007829closedDavid Cole CPACK_PACKAGE_EXECUTABLES should allow executables from anywhere 

  Notes
(0014552)
daedalusfall (reporter)
2009-01-14 06:30

Came across the same problem, and googling led me here... (cmake variables are surprisingly hard to get docs on it seem, maybe I'm just looking in the wrong places... but I digress)

your stop-gap solution:
set(CPACK_PACKAGE_EXECUTABLES "I AM CONFUSED" "I DO NOTHING")

which creates a dummy shortcut that points to nothing can be changed to
set(CPACK_PACKAGE_EXECUTABLES "" "")

And then NO extra shortcuts are made in the start menu. I haven't had any problems using this work around (though its still not ideal).

Just thought I'd post here for anyone else who is having this problem.
(0014581)
Sam Baker (reporter)
2009-01-16 00:23

Thanks for the fix daedalusfall. That makes the workaround much more practical for me.

David, I've confirmed that the change also works for me and gets rid of the useless link in my app's start menu folder.
(0015219)
David Cole (manager)
2009-02-19 11:05

Setting Severity to "minor" since there is a workaround.
(0024455)
Mike McQuaid (reporter)
2011-01-06 09:07

Pull request created at https://github.com/Kitware/CMake/pull/2 [^]
(0024499)
David Cole (manager)
2011-01-06 17:05

The hard-coded "bin" referred to in this issue was replaced by a CPack variable expansion in this commit:
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=702c8f8ba79591744449244ed47a5181fdf68a63 [^]

This commit should appear in the CMake 2.8.4 release.

I am still leaving this issue open, though, until I look at the CPACK_NSIS_MENU_LINKS portion of the complaint. Should be soon...
(0024510)
David Cole (manager)
2011-01-07 14:48

The remainder of this issue is fixed (using CPACK_NSIS_MENU_LINKS without having to use CPACK_PACKAGE_EXECUTABLES) by:

Fixed in this git commit, just pushed to 'next':
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1bbe4e69171f3155f262bb12f15437db4b71c207 [^]

Should make it into 2.8.4...
(0026702)
David Cole (manager)
2011-06-06 18:25

Closing resolved issues that have not been updated in more than 3 months.

 Issue History
Date Modified Username Field Change
2008-10-19 02:13 Sam Baker New Issue
2008-10-20 10:25 David Cole Status new => assigned
2008-10-20 10:25 David Cole Assigned To => David Cole
2009-01-14 06:30 daedalusfall Note Added: 0014552
2009-01-16 00:23 Sam Baker Note Added: 0014581
2009-02-19 11:05 David Cole Note Added: 0015219
2009-02-19 11:05 David Cole Severity major => minor
2010-11-10 21:09 David Cole Target Version => CMake 2.8.4
2010-12-14 18:59 David Cole Relationship added has duplicate 0010591
2011-01-06 09:07 Mike McQuaid Note Added: 0024455
2011-01-06 17:05 David Cole Note Added: 0024499
2011-01-07 14:34 David Cole Relationship added related to 0010644
2011-01-07 14:48 David Cole Note Added: 0024510
2011-01-07 14:48 David Cole Status assigned => resolved
2011-01-07 14:48 David Cole Fixed in Version => CMake 2.8.4
2011-01-07 14:48 David Cole Resolution open => fixed
2011-01-07 17:38 David Cole Relationship added related to 0007829
2011-06-06 18:25 David Cole Status resolved => closed
2011-06-06 18:25 David Cole Note Added: 0026702


Copyright © 2000 - 2018 MantisBT Team