diff options
author | Andrew Okin <forkk@forkk.net> | 2013-02-12 12:49:13 -0600 |
---|---|---|
committer | Andrew Okin <forkk@forkk.net> | 2013-02-12 12:49:13 -0600 |
commit | 4c5d19a62a7914a8ce77bde4824708d586334108 (patch) | |
tree | 5f528eeb9127e5b00b14a3481cf516548dead72e | |
parent | 397c0cb5559768e38f15700f1ed155dd06f35bc8 (diff) | |
download | MultiMC-4c5d19a62a7914a8ce77bde4824708d586334108.tar MultiMC-4c5d19a62a7914a8ce77bde4824708d586334108.tar.gz MultiMC-4c5d19a62a7914a8ce77bde4824708d586334108.tar.lz MultiMC-4c5d19a62a7914a8ce77bde4824708d586334108.tar.xz MultiMC-4c5d19a62a7914a8ce77bde4824708d586334108.zip |
Fixed Linux install / package support in CMakeLists. Fixed Linux start script.
-rw-r--r-- | CMakeLists.txt | 24 | ||||
-rwxr-xr-x | package/linux/MultiMC | 3 |
2 files changed, 19 insertions, 8 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 55645e3c..c8b6f95b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -200,9 +200,11 @@ SET(IMAGE_FORMAT_PLUGINS svg ico gif jpeg) INCLUDE(GetPrerequisites) +# Includes DLL dependencies for the given file. Does not include installed system DLLs. Recursive. MACRO(INCLUDE_DLL_DEPS DLL_FILE DEST) GET_PREREQUISITES(${DLL_FILE} DLL_PREREQS 1 1 "" "") +MESSAGE(STATUS "Installing ${DLL_FILE} and its prerequisites.") INSTALL(FILES ${DLL_FILE} DESTINATION ${DEST}) FOREACH(PREREQ ${DLL_PREREQS}) @@ -212,12 +214,19 @@ FOREACH(PREREQ ${DLL_PREREQS}) SET(PREREQ_ACTUAL "${Qt5_DIR}/bin/${PREREQ}") ENDIF() - MESSAGE(STATUS "Adding install prerequisite: ${PREREQ_NAME}") + MESSAGE(STATUS "Adding install prerequisite for ${DLL_FILE}: ${PREREQ_NAME}") INSTALL(FILES ${PREREQ_ACTUAL} RENAME ${PREREQ_NAME} DESTINATION ${LIB_INSTALL_PREFIX}) ENDFOREACH() ENDMACRO() +MACRO(INSTALL_SYMLINK_DEST LINK_FILENAME DEST) +GET_FILENAME_COMPONENT(DEST_NAME "${LINK_FILENAME}" NAME) +GET_FILENAME_COMPONENT(DEST_ACTUAL "${LINK_FILENAME}" REALPATH) + +INSTALL(FILES "${DEST_ACTUAL}" RENAME "${DEST_NAME}" DESTINATION "${DEST}") +ENDMACRO() + IF(WIN32) @@ -261,12 +270,14 @@ FOREACH(IMGFMT_PLUGIN ${IMAGE_FORMAT_PLUGINS}) INCLUDE_DLL_DEPS("${Qt5_DIR}/plugins/imageformats/libq${IMGFMT_PLUGIN}.so" imageformats) ENDFOREACH() -# This stuff *should* be added automatically by the INCLUDE_DLL_DEPS macro. +# This stuff *should* be added automatically by the INCLUDE_ALL_DLL_DEPS macro. Include them manually just in case. # Install ICU libs. -#SET(ICU_LIBS data i18n io le lx test tu uc) -#FOREACH(ICU_LIB ${ICU_LIBS}) -# INSTALL(FILES "/usr/lib/libicu${ICU_LIB}.so.48.1.1" DESTINATION lib) -#ENDFOREACH() +SET(ICU_LIBS data i18n io le lx test tu uc) +FOREACH(ICU_LIB ${ICU_LIBS}) + INSTALL_SYMLINK_DEST("/usr/lib/libicu${ICU_LIB}.so.48" ${LIB_INSTALL_PREFIX}) +ENDFOREACH() + +INSTALL_SYMLINK_DEST("/usr/lib/libxcb-render-util.so.0" ${LIB_INSTALL_PREFIX}) # Install additional libs. #INSTALL(FILES "${Qt5_DIR}/lib/libQt5DBus.so.5.0.1" DESTINATION lib RENAME libQt5DBus.so.5) @@ -299,7 +310,6 @@ ELSEIF(WIN32) ENDIF() SET(CPACK_INCLUDE_TOPLEVEL_DIRECTORY 0) -SET(CPACK_GENERATOR NSIS) SET(CPACK_PACKAGE_NAME "MultiMC 5") SET(CPACK_PACKAGE_VENDOR "") SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "MultiMC - Minecraft launcher and management tool.") diff --git a/package/linux/MultiMC b/package/linux/MultiMC index 20ecb6d1..235d17c5 100755 --- a/package/linux/MultiMC +++ b/package/linux/MultiMC @@ -1,8 +1,9 @@ #!/bin/sh # Basic start script for running MultiMC with the libs packaged with it. -MMC_DIR = $(dirname "$0") +MMC_DIR=$(dirname "$0") cd "${MMC_DIR}" export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:"./lib" +export QT_PLUGIN_PATH=$QT_PLUGIN_PATH:"." exec ./bin/MultiMC |