mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-03-27 23:37:05 -05:00
Properly pack all dependencies into nightlies on all platforms (#153)
* Properly bundle all files in linux install step * Run make install on linux build * Use correct default magic database * Set default magic db permissions correctly * Fixed magic file detection issues * Don't install default magic file if none was found * Try fix windows packing issues
This commit is contained in:
@@ -187,17 +187,39 @@ macro(createPackage)
|
||||
]])
|
||||
endif()
|
||||
|
||||
if (UNIX AND NOT APPLE)
|
||||
install(TARGETS libimhex DESTINATION ${CMAKE_INSTALL_PREFIX})
|
||||
|
||||
string(REPLACE ":" ";" EXTRA_MAGICDBS "${EXTRA_MAGICDBS}")
|
||||
|
||||
endif ()
|
||||
|
||||
if (NOT EXTRA_MAGICDBS STREQUAL "")
|
||||
list(GET EXTRA_MAGICDBS -1 EXTRA_MAGICDBS)
|
||||
|
||||
if (NOT EXTRA_MAGICDBS STREQUAL "NOTFOUND")
|
||||
if (EXTRA_MAGICDBS MATCHES ".*\\.mgc")
|
||||
install(FILES "${EXTRA_MAGICDBS}" DESTINATION magic/)
|
||||
else ()
|
||||
install(FILES "${EXTRA_MAGICDBS}.mgc" DESTINATION magic/)
|
||||
endif ()
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
# Compile the imhex-specific magicdb
|
||||
add_custom_target(magic_dbs ALL
|
||||
SOURCES magic_dbs/nintendo_magic
|
||||
SOURCES ${MAGICDBS}
|
||||
)
|
||||
add_custom_command(TARGET magic_dbs
|
||||
COMMAND file -C -m ${CMAKE_SOURCE_DIR}/magic_dbs
|
||||
)
|
||||
|
||||
foreach (plugin IN LISTS PLUGINS)
|
||||
install(FILES "$<TARGET_FILE:${plugin}>" DESTINATION plugins/)
|
||||
endforeach ()
|
||||
|
||||
# Install the magicdb files.
|
||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/magic_dbs.mgc DESTINATION magic/ RENAME imhex.mgc)
|
||||
install(FILES ${EXTRA_MAGICDBS} DESTINATION magic/)
|
||||
|
||||
if (CREATE_BUNDLE)
|
||||
include(PostprocessBundle)
|
||||
@@ -216,7 +238,11 @@ macro(createPackage)
|
||||
|
||||
install(TARGETS imhex BUNDLE DESTINATION .)
|
||||
else()
|
||||
install(TARGETS imhex RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
|
||||
if (WIN32)
|
||||
install(TARGETS imhex RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
|
||||
else ()
|
||||
install(TARGETS imhex RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX})
|
||||
endif ()
|
||||
endif()
|
||||
|
||||
|
||||
@@ -236,18 +262,6 @@ function(JOIN OUTPUT GLUE)
|
||||
set(${OUTPUT} "${_TMP_RESULT}" PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
macro(createMagicDbList)
|
||||
if (DEFINED MAGICDBS)
|
||||
if (WIN32)
|
||||
join(EXTRA_MAGICDBS "\;" ${MAGICDBS})
|
||||
else()
|
||||
join(EXTRA_MAGICDBS ":" ${MAGICDBS})
|
||||
endif()
|
||||
else()
|
||||
set(EXTRA_MAGICDBS "")
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
macro(setDefaultBuiltTypeIfUnset)
|
||||
if (NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
|
||||
set(CMAKE_BUILD_TYPE "Release" CACHE STRING "Using Release build type as it was left unset" FORCE)
|
||||
|
||||
Reference in New Issue
Block a user