Bug 383883 - Broken development bundle installation under Windows and macOS
Summary: Broken development bundle installation under Windows and macOS
Status: RESOLVED WORKSFORME
Alias: None
Product: marble
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Microsoft Windows
: NOR major
Target Milestone: ---
Assignee: marble-bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-08-23 07:11 UTC by facitol
Modified: 2022-12-08 05:14 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
Patch for astro and marble CMakeLists.txt that fixes the bug (2.37 KB, patch)
2017-08-23 07:11 UTC, facitol
Details

Note You need to log in before you can comment on or make changes to this bug.
Description facitol 2017-08-23 07:11:47 UTC
Created attachment 107460 [details]
Patch for astro and marble CMakeLists.txt that fixes the bug

I am using master branch and current commit is 81bdc81. When Marble is built under Windows and macOS in order to be used as a library, the installation is broken. The installation folder does not contain any include files, libraries, and a .pri file.

The problem can be tracked down to CMakeLists.txt in src/lib/astro and src/lib/marble. See that line '# TODO: find how to install & deploy library, headers and config files as bundle for development'. Basically, under Windows and macOS no deployment is happening.

However, at least with CMake 3.8.2 it is easy to fix (or work around it). One need:
1. Do not return under Windows and macOS
2. Modify installation targets and add export symbols.

Attached is a patch file, which fixes the bug.
Comment 1 facitol 2017-08-23 13:16:09 UTC
In addition to having libraries in ${CMAKE_INSTALL_PREFIX}, one can also copy them to ${CMAKE_INSTALL_LIBDIR}. Otherwise .pri file knows nothing about ${CMAKE_INSTALL_PREFIX} location and it is hard to locate the actual libraries automatically. When information about actual libraries is available through .pri file, one can automate the deployment through QMake. Otherwise a dependent application will compile and link OK, but user will need to manually copy all dynamic libraries to executable (or modify the path).

So, install rules for marblewidget can be:
if(WIN32)
  install(TARGETS marblewidget
    EXPORT MarbleTargets
    RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}
    ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
  install(TARGETS marblewidget RUNTIME DESTINATION ${CMAKE_INSTALL_LIBDIR})
elseif(APPLE)
  install(TARGETS marblewidget
    EXPORT MarbleTargets
    LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/Marble.app/Contents/MacOS/lib)
  install(TARGETS marblewidget LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
else()
  install(TARGETS marblewidget
    EXPORT MarbleTargets
    LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
endif()

Another option will be to include more information in .pri file:
set(PRI_DATA_DIR "${MARBLE_DATA_INSTALL_PATH}")
if(NOT IS_ABSOLUTE "${PRI_DATA_DIR}")
    set(PRI_DATA_DIR "${CMAKE_INSTALL_PREFIX}/${PRI_DATA_DIR}")
endif()

set(PRI_PLUGIN_DIR "${MARBLE_PLUGIN_INSTALL_PATH}")
if(NOT IS_ABSOLUTE "${PRI_PLUGIN_DIR}")
    set(PRI_PLUGIN_DIR "${CMAKE_INSTALL_PREFIX}/${PRI_PLUGIN_DIR}")
endif()

...

QT.Marble.depends = ${PRI_DEPS}
QT.Marble.data = ${PRI_DATA_DIR}
QT.Marble.plugins = ${PRI_PLUGIN_DIR}
Comment 2 Justin Zobel 2022-11-08 06:50:20 UTC
Thank you for reporting this issue in KDE software. As it has been a while since this issue was reported, can we please ask you to see if you can reproduce the issue with a recent software version?

If you can reproduce the issue, please change the status to "REPORTED" when replying. Thank you!
Comment 3 Bug Janitor Service 2022-11-23 05:14:59 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 4 Bug Janitor Service 2022-12-08 05:14:33 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!