From 0efbaa6afb8e5765effe6bee985df306e16a8866 Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Wed, 4 Oct 2023 06:35:20 +0200 Subject: [PATCH] Strip out unnecessary packaging logic --- CMakeLists.txt | 127 +++++++++++-------------------------------------- 1 file changed, 28 insertions(+), 99 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 44ec0771ac..3c60522998 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -302,7 +302,6 @@ endif() # Installation / Packaging if(STANDALONE) - set(STRUCTURE_UNIFIED CACHE BOOL "Install for use in a Plugin Manager") if(D_PLATFORM_LINUX) set(STRUCTURE_PACKAGEMANAGER CACHE BOOL "Install for use in a Package Manager (system-wide installation)") endif() @@ -1533,56 +1532,7 @@ endforeach() ################################################################################ if(STANDALONE) - if(STRUCTURE_UNIFIED) - install( - DIRECTORY "data/" - DESTINATION "data/" - FILE_PERMISSIONS WORLD_EXECUTE;WORLD_READ;OWNER_EXECUTE;OWNER_READ;OWNER_WRITE;GROUP_EXECUTE;GROUP_READ;GROUP_WRITE - DIRECTORY_PERMISSIONS WORLD_EXECUTE;WORLD_READ;OWNER_EXECUTE;OWNER_READ;OWNER_WRITE;GROUP_EXECUTE;GROUP_READ;GROUP_WRITE - ) - - if(D_PLATFORM_WINDOWS) - install( - TARGETS StreamFX - RUNTIME DESTINATION "bin/windows-${D_PLATFORM_INSTR}-${D_PLATFORM_BITS}/" COMPONENT StreamFX - LIBRARY DESTINATION "bin/windows-${D_PLATFORM_INSTR}-${D_PLATFORM_BITS}/" COMPONENT StreamFX - PERMISSIONS WORLD_EXECUTE;WORLD_READ;OWNER_EXECUTE;OWNER_READ;OWNER_WRITE;GROUP_EXECUTE;GROUP_READ;GROUP_WRITE - ) - if(MSVC) - install( - FILES $ - DESTINATION "bin/windows-${D_PLATFORM_INSTR}-${D_PLATFORM_BITS}/" - COMPONENT StreamFX - OPTIONAL - ) - endif() - elseif(D_PLATFORM_LINUX) - install( - TARGETS StreamFX - RUNTIME DESTINATION "bin/linux-${D_PLATFORM_INSTR}-${D_PLATFORM_BITS}/" COMPONENT StreamFX - LIBRARY DESTINATION "bin/linux-${D_PLATFORM_INSTR}-${D_PLATFORM_BITS}/" COMPONENT StreamFX - PERMISSIONS WORLD_EXECUTE;WORLD_READ;OWNER_EXECUTE;OWNER_READ;OWNER_WRITE;GROUP_EXECUTE;GROUP_READ;GROUP_WRITE - ) - elseif(D_PLATFORM_MAC) - install( - TARGETS StreamFX - RUNTIME DESTINATION "bin/mac-${D_PLATFORM_INSTR}-${D_PLATFORM_BITS}/" COMPONENT StreamFX - LIBRARY DESTINATION "bin/mac-${D_PLATFORM_INSTR}-${D_PLATFORM_BITS}/" COMPONENT StreamFX - PERMISSIONS WORLD_EXECUTE;WORLD_READ;OWNER_EXECUTE;OWNER_READ;OWNER_WRITE;GROUP_EXECUTE;GROUP_READ;GROUP_WRITE - ) - endif() - - install( - FILES LICENSE - DESTINATION "LICENSE" - COMPONENT StreamFX - ) - install( - FILES icon.png - DESTINATION "icon.png" - COMPONENT StreamFX - ) - elseif(D_PLATFORM_WINDOWS) + if(D_PLATFORM_WINDOWS) install( TARGETS StreamFX RUNTIME DESTINATION "obs-plugins/${D_PLATFORM_BITS}bit/" COMPONENT StreamFX @@ -1692,59 +1642,38 @@ if(STANDALONE) endif() set(_PACKAGE_FULL_NAME "${PACKAGE_PREFIX}/${PACKAGE_NAME}-${_PACKAGE_SUFFIX_OVERRIDE}") - if(STRUCTURE_UNIFIED) - add_custom_target( - PACKAGE_ZIP - ${CMAKE_COMMAND} -E tar cfv "${_PACKAGE_FULL_NAME}.obs" --format=zip -- - "." - WORKING_DIRECTORY "${CMAKE_INSTALL_PREFIX}" + if(D_PLATFORM_WINDOWS) + ## Installer (InnoSetup) + get_filename_component(ISS_FILES_DIR "${CMAKE_INSTALL_PREFIX}" ABSOLUTE) + file(TO_NATIVE_PATH "${ISS_FILES_DIR}" ISS_FILES_DIR) + + get_filename_component(ISS_PACKAGE_DIR "${PACKAGE_PREFIX}" ABSOLUTE) + file(TO_NATIVE_PATH "${ISS_PACKAGE_DIR}" ISS_PACKAGE_DIR) + + get_filename_component(ISS_SOURCE_DIR "${PROJECT_SOURCE_DIR}" ABSOLUTE) + file(TO_NATIVE_PATH "${ISS_SOURCE_DIR}" ISS_SOURCE_DIR) + + get_filename_component(ISS_MSVCHELPER_PATH "${msvc-redist-helper_BUILD_DIR}" ABSOLUTE) + file(TO_NATIVE_PATH "${ISS_MSVCHELPER_PATH}" ISS_MSVCHELPER_PATH) + + configure_file( + "templates/windows/installer.iss.in" + "installer.iss" ) - else() - add_custom_target( - PACKAGE_7Z - ${CMAKE_COMMAND} -E tar cfv "${_PACKAGE_FULL_NAME}.7z" --format=7zip -- - "." - WORKING_DIRECTORY "${CMAKE_INSTALL_PREFIX}" + elseif(D_PLATFORM_MAC) + # .pkg Installer + set(PACKAGES_PATH_NAME "StreamFX") + set(PACKAGES_PATH_NAME "${PACKAGES_PATH_NAME}.plugin") + configure_file( + "templates/macos/installer.pkgproj.in" + "installer.pkgproj" ) + elseif(D_PLATFORM_LINUX) add_custom_target( - PACKAGE_ZIP - ${CMAKE_COMMAND} -E tar cfv "${_PACKAGE_FULL_NAME}.zip" --format=zip -- + PACKAGE + ${CMAKE_COMMAND} -E tar cfv "${_PACKAGE_FULL_NAME}.7z" --format=7zip -- "." WORKING_DIRECTORY "${CMAKE_INSTALL_PREFIX}" ) - - # Windows - if(D_PLATFORM_WINDOWS) - ## Installer (InnoSetup) - get_filename_component(ISS_FILES_DIR "${CMAKE_INSTALL_PREFIX}" ABSOLUTE) - file(TO_NATIVE_PATH "${ISS_FILES_DIR}" ISS_FILES_DIR) - - get_filename_component(ISS_PACKAGE_DIR "${PACKAGE_PREFIX}" ABSOLUTE) - file(TO_NATIVE_PATH "${ISS_PACKAGE_DIR}" ISS_PACKAGE_DIR) - - get_filename_component(ISS_SOURCE_DIR "${PROJECT_SOURCE_DIR}" ABSOLUTE) - file(TO_NATIVE_PATH "${ISS_SOURCE_DIR}" ISS_SOURCE_DIR) - - get_filename_component(ISS_MSVCHELPER_PATH "${msvc-redist-helper_BUILD_DIR}" ABSOLUTE) - file(TO_NATIVE_PATH "${ISS_MSVCHELPER_PATH}" ISS_MSVCHELPER_PATH) - - configure_file( - "templates/windows/installer.iss.in" - "installer.iss" - ) - endif() - - # Apple MacOS - if(D_PLATFORM_MAC) - # .pkg Installer - set(PACKAGES_PATH_NAME "StreamFX") - if(STRUCTURE_BUNDLE) - set(PACKAGES_PATH_NAME "${PACKAGES_PATH_NAME}.plugin") - endif() - configure_file( - "templates/macos/installer.pkgproj.in" - "installer.pkgproj" - ) - endif() endif() endif()