From 7c4c578669f1f557d3af5c4d2d4e096cddfa25ab Mon Sep 17 00:00:00 2001 From: Tres Finocchiaro Date: Sat, 1 Mar 2025 18:10:31 -0500 Subject: [PATCH] Try to fix nsis again --- cmake/apple/MacDeployQt.cmake | 7 ++++-- cmake/linux/LinuxDeploy.cmake | 7 ++++-- .../modules/branding/CPackBrandingSteps.cmake | 22 ------------------- cmake/nsis/CMakeLists.txt | 4 ++-- 4 files changed, 12 insertions(+), 28 deletions(-) delete mode 100644 cmake/modules/branding/CPackBrandingSteps.cmake diff --git a/cmake/apple/MacDeployQt.cmake b/cmake/apple/MacDeployQt.cmake index 287d7ac5485..a8db3a44129 100644 --- a/cmake/apple/MacDeployQt.cmake +++ b/cmake/apple/MacDeployQt.cmake @@ -69,8 +69,11 @@ configure_file("${CPACK_CURRENT_SOURCE_DIR}/lmms.plist.in" "${APP}/Contents/Info file(COPY "${CPACK_CURRENT_SOURCE_DIR}/project.icns" DESTINATION "${APP}/Contents/Resources") file(COPY "${CPACK_CURRENT_SOURCE_DIR}/${lmms}.icns" DESTINATION "${APP}/Contents/Resources") -# Copy optional branded files -include(CPackBrandingSteps) +# Overwrite any branded files +file(GLOB branded_items "${CPACK_BRANDED_OUTPUT}/*") +foreach(item "${branded_items}") + file(COPY "${item}" DESTINATION "${APP}") +endforeach() # Copy Suil modules if(CPACK_SUIL_MODULES) diff --git a/cmake/linux/LinuxDeploy.cmake b/cmake/linux/LinuxDeploy.cmake index 3683cc757ee..cc1b0c94c1c 100644 --- a/cmake/linux/LinuxDeploy.cmake +++ b/cmake/linux/LinuxDeploy.cmake @@ -125,8 +125,11 @@ file(COPY "${APP}/usr/share/icons/hicolor/256x256/apps/${lmms}.png" DESTINATION file(RENAME "${APP}/${lmms}.png" "${APP}/.DirIcon") file(COPY "${APP}/usr/share/icons/hicolor/256x256/apps/${lmms}.png" DESTINATION "${APP}") -# Copy optional branded files -include(CPackBrandingSteps) +# Overwrite any branded files +file(GLOB branded_items "${CPACK_BRANDED_OUTPUT}/*") +foreach(item "${branded_items}") + file(COPY "${item}" DESTINATION "${APP}") +endforeach() # Build list of libraries to inform linuxdeploy about # e.g. --library=foo.so --library=bar.so diff --git a/cmake/modules/branding/CPackBrandingSteps.cmake b/cmake/modules/branding/CPackBrandingSteps.cmake deleted file mode 100644 index 50f665b58f5..00000000000 --- a/cmake/modules/branding/CPackBrandingSteps.cmake +++ /dev/null @@ -1,22 +0,0 @@ -if(NOT EXISTS "${CPACK_BRANDED_OUTPUT}") - return() -endif() - -# Windows -if(WIN32) - # See also src/CMakeLists.txt for winrc steps - set(CPACK_NSIS_MUI_ICON "${CPACK_BRANDED_OUTPUT}/lmms.ico") - # set(CPACK_PACKAGE_ICON "${CMAKE_SOURCE_DIR}/cmake/nsis\\\\nsis_branding.bmp") - return() -endif() - -# macOS, Linux -if(NOT APP) - message(FATAL_ERROR "\${APP} is not defined, aborting") -endif() - -# Overwrite any branded files -file(GLOB branded_items "${CPACK_BRANDED_OUTPUT}/*") -foreach(item "${branded_items}") - file(COPY "${item}" DESTINATION "${APP}") -endforeach() diff --git a/cmake/nsis/CMakeLists.txt b/cmake/nsis/CMakeLists.txt index 9fdcddaaffe..baf0ef82774 100644 --- a/cmake/nsis/CMakeLists.txt +++ b/cmake/nsis/CMakeLists.txt @@ -64,8 +64,8 @@ endif() # Handle optional branding if(LMMS_DYNAMIC_BRANDING) - set(CPACK_INSTALL_COMMANDS "set(CPACK_BRANDED_OUTPUT \"${CPACK_BRANDED_OUTPUT}\")") - set(CPACK_INSTALL_SCRIPTS "${CMAKE_SOURCE_DIR}/cmake/modules/branding/CPackBrandingSteps.cmake") + # See also src/CMakeLists.txt for winrc steps + set(CPACK_NSIS_MUI_ICON "${CPACK_BRANDED_OUTPUT}/lmms.ico") endif() # Windows resource compilers