From cbbecdb78e2ef9eff573bf53a5f1280562e06429 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 3 Aug 2022 20:06:43 -0400 Subject: [PATCH] update package target for mingw-cross builds to handle updated file locations --- USER-AEAM/CMakeLists.txt | 11 ++++++----- USER-AEAM/aeamplugin.nsis | 12 ++++++------ USER-REBOMOS/CMakeLists.txt | 9 +++++---- USER-REBOMOS/rebomosplugin.nsis | 12 ++++++------ USER-VCSGC/CMakeLists.txt | 11 ++++++----- 5 files changed, 29 insertions(+), 26 deletions(-) diff --git a/USER-AEAM/CMakeLists.txt b/USER-AEAM/CMakeLists.txt index 601db79..3026a53 100644 --- a/USER-AEAM/CMakeLists.txt +++ b/USER-AEAM/CMakeLists.txt @@ -49,13 +49,14 @@ elseif(CMAKE_SYSTEM_NAME STREQUAL "Windows") endif() if(BUILD_MPI) add_custom_target(${mytarget} ${MAKENSIS_PATH} -V1 -DVERSION=${LAMMPS_VERSION}-MPI aeamplugin.nsis - DEPENDS aeamplugin - BYPRODUCTS LAMMPS-USER-AEAM-plugin-${LAMMPS_VERSION}-MPI.exe) + WORKING_DIRECTORY ${CMAKE_BINARY_DIR} + DEPENDS aeamplugin ${CMAKE_BINARY_DIR}/lammps.ico ${CMAKE_BINARY_DIR}/lammps-text-logo-wide.bmp ${CMAKE_BINARY_DIR}/aeamplugin.nsis + BYPRODUCTS ${CMAKE_BINARY_DIR}/LAMMPS-USER-AEAM-plugin-${LAMMPS_VERSION}-MPI.exe) else() add_custom_target(${mytarget} ${MAKENSIS_PATH} -V1 -DVERSION=${LAMMPS_VERSION} aeamplugin.nsis - COMMAND ${CMAKE_COMMAND} -E echo ${PWD} - DEPENDS aeamplugin lammps.ico lammps-text-logo-wide.bmp aeamplugin.nsis - BYPRODUCTS LAMMPS-USER-AEAM-plugin-${LAMMPS_VERSION}.exe) + WORKING_DIRECTORY ${CMAKE_BINARY_DIR} + DEPENDS aeamplugin ${CMAKE_BINARY_DIR}/lammps.ico ${CMAKE_BINARY_DIR}/lammps-text-logo-wide.bmp ${CMAKE_BINARY_DIR}/aeamplugin.nsis + BYPRODUCTS ${CMAKE_BINARY_DIR}/LAMMPS-USER-AEAM-plugin-${LAMMPS_VERSION}.exe) endif() endif() else() diff --git a/USER-AEAM/aeamplugin.nsis b/USER-AEAM/aeamplugin.nsis index c7622c0..3435e60 100644 --- a/USER-AEAM/aeamplugin.nsis +++ b/USER-AEAM/aeamplugin.nsis @@ -31,11 +31,11 @@ ${If} $0 != "admin" ${EndIf} !macroend -!define PACEPLUGIN "LAMMPS USER-AEAM Plugin ${VERSION}" +!define AEAMPLUGIN "LAMMPS USER-AEAM Plugin ${VERSION}" OutFile "LAMMPS-USER-AEAM-plugin-${VERSION}.exe" -Name "${PACEPLUGIN}" -InstallDir "$LOCALAPPDATA\${PACEPLUGIN}" +Name "${AEAMPLUGIN}" +InstallDir "$LOCALAPPDATA\${AEAMPLUGIN}" ShowInstDetails show ShowUninstDetails show @@ -80,7 +80,7 @@ function .onInit setShellVarContext all functionEnd -Section "${PACEPLUGIN}" SecPaceplugin +Section "${AEAMPLUGIN}" SecPaceplugin SectionIn RO # Write LAMMPS installation bitness marker. Always use 32-bit registry view SetRegView 32 @@ -97,9 +97,9 @@ Section "${PACEPLUGIN}" SecPaceplugin # Register Application and its uninstaller WriteRegStr HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\LAMMPS-USER-AEAM" \ - "DisplayName" "${PACEPLUGIN}" + "DisplayName" "${AEAMPLUGIN}" WriteRegStr HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\LAMMPS-USER-AEAM" \ - "Publisher" "The LAMMPS and PACE Developers" + "Publisher" "The LAMMPS and USER-AEAM Developers" WriteRegStr HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\LAMMPS-USER-AEAM" \ "URLInfoAbout" "lammps.org" WriteRegStr HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\LAMMPS-USER-AEAM" \ diff --git a/USER-REBOMOS/CMakeLists.txt b/USER-REBOMOS/CMakeLists.txt index 5263317..c1bc5d5 100644 --- a/USER-REBOMOS/CMakeLists.txt +++ b/USER-REBOMOS/CMakeLists.txt @@ -49,12 +49,13 @@ elseif(CMAKE_SYSTEM_NAME STREQUAL "Windows") endif() if(BUILD_MPI) add_custom_target(${mytarget} ${MAKENSIS_PATH} -V1 -DVERSION=${LAMMPS_VERSION}-MPI rebomosplugin.nsis - DEPENDS rebomosplugin - BYPRODUCTS LAMMPS-USER-REBOMOS-plugin-${LAMMPS_VERSION}-MPI.exe) + WORKING_DIRECTORY ${CMAKE_BINARY_DIR} + DEPENDS rebomosplugin ${CMAKE_BINARY_DIR}/lammps.ico ${CMAKE_BINARY_DIR}/lammps-text-logo-wide.bmp ${CMAKE_BINARY_DIR}/aeamplugin.nsis + BYPRODUCTS ${CMAKE_BINARY_DIR}/LAMMPS-USER-REBOMOS-plugin-${LAMMPS_VERSION}-MPI.exe) else() add_custom_target(${mytarget} ${MAKENSIS_PATH} -V1 -DVERSION=${LAMMPS_VERSION} rebomosplugin.nsis - COMMAND ${CMAKE_COMMAND} -E echo ${PWD} - DEPENDS rebomosplugin lammps.ico lammps-text-logo-wide.bmp rebomosplugin.nsis + WORKING_DIRECTORY ${CMAKE_BINARY_DIR} + DEPENDS rebomosplugin ${CMAKE_BINARY_DIR}/lammps.ico ${CMAKE_BINARY_DIR}/lammps-text-logo-wide.bmp ${CMAKE_BINARY_DIR}/rebomosplugin.nsis BYPRODUCTS LAMMPS-USER-REBOMOS-plugin-${LAMMPS_VERSION}.exe) endif() endif() diff --git a/USER-REBOMOS/rebomosplugin.nsis b/USER-REBOMOS/rebomosplugin.nsis index cee9f96..f682846 100644 --- a/USER-REBOMOS/rebomosplugin.nsis +++ b/USER-REBOMOS/rebomosplugin.nsis @@ -31,11 +31,11 @@ ${If} $0 != "admin" ${EndIf} !macroend -!define PACEPLUGIN "LAMMPS USER-REBOMOS Plugin ${VERSION}" +!define REBOMOSPLUGIN "LAMMPS USER-REBOMOS Plugin ${VERSION}" OutFile "LAMMPS-USER-REBOMOS-plugin-${VERSION}.exe" -Name "${PACEPLUGIN}" -InstallDir "$LOCALAPPDATA\${PACEPLUGIN}" +Name "${REBOMOSPLUGIN}" +InstallDir "$LOCALAPPDATA\${REBOMOSPLUGIN}" ShowInstDetails show ShowUninstDetails show @@ -80,7 +80,7 @@ function .onInit setShellVarContext all functionEnd -Section "${PACEPLUGIN}" SecPaceplugin +Section "${REBOMOSPLUGIN}" SecPaceplugin SectionIn RO # Write LAMMPS installation bitness marker. Always use 32-bit registry view SetRegView 32 @@ -97,9 +97,9 @@ Section "${PACEPLUGIN}" SecPaceplugin # Register Application and its uninstaller WriteRegStr HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\LAMMPS-USER-REBOMOS" \ - "DisplayName" "${PACEPLUGIN}" + "DisplayName" "${REBOMOSPLUGIN}" WriteRegStr HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\LAMMPS-USER-REBOMOS" \ - "Publisher" "The LAMMPS and PACE Developers" + "Publisher" "The LAMMPS and USER-REBOMOS Developers" WriteRegStr HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\LAMMPS-USER-REBOMOS" \ "URLInfoAbout" "lammps.org" WriteRegStr HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\LAMMPS-USER-REBOMOS" \ diff --git a/USER-VCSGC/CMakeLists.txt b/USER-VCSGC/CMakeLists.txt index 3d2ea42..044791c 100644 --- a/USER-VCSGC/CMakeLists.txt +++ b/USER-VCSGC/CMakeLists.txt @@ -51,13 +51,14 @@ elseif(CMAKE_SYSTEM_NAME STREQUAL "Windows") endif() if(BUILD_MPI) add_custom_target(${mytarget} ${MAKENSIS_PATH} -V1 -DVERSION=${LAMMPS_VERSION}-MPI vcsgcplugin.nsis - DEPENDS vcsgcplugin - BYPRODUCTS LAMMPS-USER-VCSGC-plugin-${LAMMPS_VERSION}-MPI.exe) + WORKING_DIRECTORY ${CMAKE_BINARY_DIR} + DEPENDS vcsgcplugin ${CMAKE_BINARY_DIR}/lammps.ico ${CMAKE_BINARY_DIR}/lammps-text-logo-wide.bmp ${CMAKE_BINARY_DIR}/aeamplugin.nsis + BYPRODUCTS ${CMAKE_BINARY_DIR}/LAMMPS-USER-VCSGC-plugin-${LAMMPS_VERSION}-MPI.exe) else() add_custom_target(${mytarget} ${MAKENSIS_PATH} -V1 -DVERSION=${LAMMPS_VERSION} vcsgcplugin.nsis - COMMAND ${CMAKE_COMMAND} -E echo ${PWD} - DEPENDS vcsgcplugin lammps.ico lammps-text-logo-wide.bmp vcsgcplugin.nsis - BYPRODUCTS LAMMPS-USER-VCSGC-plugin-${LAMMPS_VERSION}.exe) + WORKING_DIRECTORY ${CMAKE_BINARY_DIR} + DEPENDS vcsgcplugin ${CMAKE_BINARY_DIR}/lammps.ico ${CMAKE_BINARY_DIR}/lammps-text-logo-wide.bmp ${CMAKE_BINARY_DIR}/vcsgcplugin.nsis + BYPRODUCTS ${CMAKE_BINARY_DIR}/LAMMPS-USER-VCSGC-plugin-${LAMMPS_VERSION}.exe) endif() endif() else()