From 7dc75cf73f863582a715ff677511245a778690e9 Mon Sep 17 00:00:00 2001 From: Damjan Adamic Date: Sun, 21 Aug 2016 20:47:05 +0200 Subject: [PATCH] Debian package generation fixes for simulators (lib files were in the wrong directory, bunch of empty directories were included in package) --- companion/src/CMakeLists.txt | 8 +++++++- companion/src/simulation/simulatorinterface.cpp | 6 +++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/companion/src/CMakeLists.txt b/companion/src/CMakeLists.txt index 5df499c4d..8c3e7f202 100644 --- a/companion/src/CMakeLists.txt +++ b/companion/src/CMakeLists.txt @@ -267,7 +267,13 @@ message(STATUS ${CMAKE_BINARY_DIR} ${CMAKE_INSTALL_PREFIX}/bin) if(${CMAKE_SYSTEM_NAME} MATCHES "Linux") install(TARGETS ${COMPANION_NAME} DESTINATION ${CMAKE_INSTALL_PREFIX}/bin) install(TARGETS ${SIMULATOR_NAME} DESTINATION ${CMAKE_INSTALL_PREFIX}/bin) - install(DIRECTORY ${CMAKE_BINARY_DIR}/ DESTINATION ${CMAKE_INSTALL_PREFIX}/bin/ USE_SOURCE_PERMISSIONS FILES_MATCHING PATTERN "*.so" PATTERN REGEX "_CPack_Packages" EXCLUDE) + install(DIRECTORY ${CMAKE_BINARY_DIR}/ DESTINATION ${SIMULATOR_LIB_PATH} USE_SOURCE_PERMISSIONS + FILES_MATCHING PATTERN "libopentx-*.so" + PATTERN "CMakeFiles" EXCLUDE + PATTERN "_CPack_Packages" EXCLUDE + PATTERN "companion" EXCLUDE + PATTERN "radio" EXCLUDE + ) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/companion.desktop DESTINATION share/applications RENAME companion${C9X_NAME_SUFFIX}.desktop) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/simulator.desktop DESTINATION share/applications RENAME simulator${C9X_NAME_SUFFIX}.desktop) if(${CMAKE_INSTALL_PREFIX} MATCHES "/usr/local") diff --git a/companion/src/simulation/simulatorinterface.cpp b/companion/src/simulation/simulatorinterface.cpp index 146c153d9..5a93650fc 100644 --- a/companion/src/simulation/simulatorinterface.cpp +++ b/companion/src/simulation/simulatorinterface.cpp @@ -56,9 +56,9 @@ void registerSimulators() #elif (!defined __GNUC__) char name[MAX_PATH]; GetModuleFileName(NULL, name, MAX_PATH); - QString path(name); - path.truncate(path.lastIndexOf('\\')); - dir.setPath(path); + QString path(name); + path.truncate(path.lastIndexOf('\\')); + dir.setPath(path); #else dir = SIMULATOR_LIB_SEARCH_PATH; #endif