Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Binaries installed in odd directory under linux #1710

Closed
bunnybot opened this issue Sep 9, 2019 · 3 comments · Fixed by #5359
Closed

Binaries installed in odd directory under linux #1710

bunnybot opened this issue Sep 9, 2019 · 3 comments · Fixed by #5359
Assignees
Labels
building & packaging Building, packaging, continuous integration, appdata, cmake urgent Needs to be fixed before the next release.
Milestone

Comments

@bunnybot
Copy link

bunnybot commented Sep 9, 2019

Revision 7224.1.5 removed WL_INSTALL_BINDIR, instead opting to use CMAKE_INSTALL_PREFIX. However, binary files by default are now installed into CMAKE_INSTALL_PREFIX directly. I believe this is expected for Windows and MacOS, but under Linux the expectation is that binary files go into CMAKE_INSTALL_PREFIX/bin. In particular, a relatively default install prefix is /usr, but would result in the widelands executable being placed as "/usr/widelands". One option might be something like

IF(ARGS_WIN32)
install(TARGETS ${NAME} DESTINATION "." COMPONENT ExecutableFiles)
ELSE(ARGS_WIN32)
install(TARGETS ${NAME} DESTINATION "bin/" COMPONENT ExecutableFiles)
ENDIF(ARGS_WIN32)

in cmake/WlFunctions.cmake. There are potentially other ways around this, another one I know is to have a "BINDIR" type variable that is set in some OS-specific setup function, but that's basically just bringing back WL_INSTALL_BINDIR, and I assume this was removed for some specific reason.


Imported from Launchpad using lp2gh.

@bunnybot bunnybot added building & packaging Building, packaging, continuous integration, appdata, cmake Confirmed labels Sep 9, 2019
@bunnybot
Copy link
Author

bunnybot commented Sep 9, 2019

(by gunchleoc)
There are some additional settings in widelands.h, with a not for packagers to take care of it. The PPA will install the application into usr/share/applications and the data into usr/share/games/widelands

@bunnybot
Copy link
Author

bunnybot commented Sep 9, 2019

(by uilliam)
There are extra settings in CMakeLists.txt with notes for packagers, I assume that's the file you meant and not widelands.h. These include WL_INSTALL_BASEDIR and WL_INSTALL_DATADIR. The DATADIR is respected properly as best I can tell, and WL_INSTALL_BASEDIR will set the location of the installation of files such as COPYING, CREDITS, ChangeLog as well as the doc folder for documentation. However, the binaries widelands, wl_map_info, wl_map_object_info and wl_render_richtext do not get installed in WL_INSTALL_BASEDIR. This is because the function "wl_binary", as defined in cmake/WlFunctions.cmake, makes no reference to WL_INSTALL_BASEDIR, and instead says "install into CMAKE_INSTALL_PREFIX".

@andy5995 andy5995 self-assigned this Apr 9, 2022
@andy5995 andy5995 added this to the v1.1 milestone Apr 9, 2022
@Noordfrees Noordfrees added the urgent Needs to be fixed before the next release. label Apr 22, 2022
@Noordfrees
Copy link
Member

Marking as urgent for v1.1 because an open PR is linked.

matthiakl pushed a commit that referenced this issue Apr 28, 2022
* CMakeLists.txt:put binaries in correct locations when installing

(closes #1710)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
building & packaging Building, packaging, continuous integration, appdata, cmake urgent Needs to be fixed before the next release.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants