Skip to content

Commit

Permalink
Revert "Merge branch 'release/Version-4.45' of https://github.com/cop…
Browse files Browse the repository at this point in the history
…asi/COPASI into release/Version-4.45"

This reverts commit 667039f, reversing
changes made to cd582a7.
  • Loading branch information
sahle committed Dec 12, 2024
1 parent 667039f commit f841edf
Show file tree
Hide file tree
Showing 139 changed files with 5,238 additions and 6,795 deletions.
1 change: 0 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -938,7 +938,6 @@ message(STATUS "-----------------------------------------------------------
Vendor = ${BLA_VENDOR}
LAPACK Libs = ${CLAPACK_LIBRARIES}
LAPACK LDFLAGS = ${CLAPACK_LINKER_FLAGS}
LAPACK include = ${CLAPACK_INCLUDE_DIR}
crossguid Libs = ${CROSSGUID_LIBRARY}
cross include = ${CROSSGUID_INCLUDE_DIR}
Expand Down
37 changes: 12 additions & 25 deletions CMakeModules/FindCLAPACK.cmake
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (C) 2019 - 2024 by Pedro Mendes, Rector and Visitors of the
# Copyright (C) 2019 - 2022 by Pedro Mendes, Rector and Visitors of the
# University of Virginia, University of Heidelberg, and University
# of Connecticut School of Medicine.
# All rights reserved.
Expand Down Expand Up @@ -109,37 +109,24 @@ endif ()
if (NOT LAPACK_FOUND)
# cmake MKL Detection does only support MKL version 10 and older
if (DEFINED ENV{MKLROOT})
message(STATUS "MKLROOT is: $ENV{MKLROOT}")
set(MKLROOT $ENV{MKLROOT} CACHE PATH "MKLROOT" FORCE)
endif()
if (DEFINED MKLROOT)
set(BLA_VENDOR "Intel (MKL)")

if (UNIX)
if ((COPASI_BUILD_TYPE EQUAL "32bit") AND EXISTS ${MKLROOT}/lib/ia32)
set(LAPACK_LIBRARIES "-Wl,--start-group ${MKLROOT}/lib/ia32/libmkl_intel.a ${MKLROOT}/lib/ia32/libmkl_core.a ${MKLROOT}/lib/ia32/libmkl_sequential.a -Wl,--end-group -lpthread -lm -ldl")
elseif (COPASI_BUILD_TYPE EQUAL "64bit" AND EXISTS ${MKLROOT}/lib/intel64)
set(LAPACK_LIBRARIES "-Wl,--start-group ${MKLROOT}/lib/intel64/libmkl_intel_lp64.a ${MKLROOT}/lib/intel64/libmkl_core.a ${MKLROOT}/lib/intel64/libmkl_sequential.a -Wl,--end-group -lpthread -lm -ldl")
elseif(EXISTS "${MKLROOT}/lib" AND EXISTS "${MKLROOT}/lib/libmkl_intel_lp64.a")
set(LAPACK_LIBRARIES "-Wl,--start-group ${MKLROOT}/lib/libmkl_intel_lp64.a ${MKLROOT}/lib/libmkl_core.a ${MKLROOT}/lib/libmkl_sequential.a -Wl,--end-group -lpthread -lm -ldl")
elseif(EXISTS ${MKLROOT}/lib AND EXISTS ${MKLROOT}/lib/libmkl_intel.a)
set(LAPACK_LIBRARIES "-Wl,--start-group ${MKLROOT}/lib/libmkl_intel.a ${MKLROOT}/lib/libmkl_core.a ${MKLROOT}/lib/libmkl_sequential.a -Wl,--end-group -lpthread -lm -ldl")
if (COPASI_BUILD_TYPE EQUAL "32bit")
set(LAPACK_LIBRARIES "-Wl,--start-group $ENV{MKLROOT}/lib/ia32/libmkl_intel.a $ENV{MKLROOT}/lib/ia32/libmkl_core.a $ENV{MKLROOT}/lib/ia32/libmkl_sequential.a -Wl,--end-group -lpthread -lm -ldl")
elseif (COPASI_BUILD_TYPE EQUAL "64bit")
set(LAPACK_LIBRARIES "-Wl,--start-group $ENV{MKLROOT}/lib/intel64/libmkl_intel_lp64.a $ENV{MKLROOT}/lib/intel64/libmkl_core.a $ENV{MKLROOT}/lib/intel64/libmkl_sequential.a -Wl,--end-group -lpthread -lm -ldl")
endif ()
else ()
if (COPASI_BUILD_TYPE EQUAL "32bit" AND EXISTS "${MKLROOT}/lib/ia32/")
set(LAPACK_LIBRARIES "${MKLROOT}/lib/ia32/mkl_intel_c.lib" "${MKLROOT}/lib/ia32/mkl_core.lib" "${MKLROOT}/lib/ia32/mkl_sequential.lib")
elseif (COPASI_BUILD_TYPE EQUAL "64bit" AND EXISTS "${MKLROOT}/lib/intel64/" )
set(LAPACK_LIBRARIES "${MKLROOT}/lib/intel64/mkl_intel_lp64.lib" "${MKLROOT}/lib/intel64/mkl_core.lib" "${MKLROOT}/lib/intel64/mkl_sequential.lib")
elseif (EXISTS "${MKLROOT}/lib/mkl_intel_lp64.lib")
set(LAPACK_LIBRARIES "${MKLROOT}/lib/mkl_intel_lp64.lib" "${MKLROOT}/lib/mkl_core.lib" "${MKLROOT}/lib/mkl_sequential.lib")
if (COPASI_BUILD_TYPE EQUAL "32bit")
set(LAPACK_LIBRARIES "$ENV{MKLROOT}/lib/ia32/mkl_intel_c.lib" "$ENV{MKLROOT}/lib/ia32/mkl_core.lib" "$ENV{MKLROOT}/lib/ia32/mkl_sequential.lib")
elseif (COPASI_BUILD_TYPE EQUAL "64bit")
set(LAPACK_LIBRARIES "$ENV{MKLROOT}/lib/intel64/mkl_intel_lp64.lib" "$ENV{MKLROOT}/lib/intel64/mkl_core.lib" "$ENV{MKLROOT}/lib/intel64/mkl_sequential.lib")
endif ()
endif ()

set(CLAPACK_INCLUDE_DIR ${MKLROOT}/include)
add_definitions(-DHAVE_MKL)
set(LAPACK_FOUND "Yes")
set(USE_MKL 1)

endif ()
endif ()

Expand Down Expand Up @@ -301,9 +288,9 @@ find_path(CLAPACK_INCLUDE_DIR clapack.h
endif(NOT CLAPACK_INCLUDE_DIR)


if (CLAPACK_INCLUDE_DIR AND NOT DEFINED MKLROOT)
if (CLAPACK_INCLUDE_DIR)
add_definitions(-DHAVE_CLAPACK_H)
endif (CLAPACK_INCLUDE_DIR AND NOT DEFINED MKLROOT)
endif (CLAPACK_INCLUDE_DIR)

if (NOT CLAPACK_INCLUDE_DIR)
find_path(CLAPACK_INCLUDE_DIR lapack.h
Expand All @@ -326,7 +313,7 @@ if (NOT CLAPACK_INCLUDE_DIR)
endif (NOT CLAPACK_INCLUDE_DIR)

if (NOT CLAPACK_INCLUDE_DIR)
set(CLAPACK_INCLUDE_DIR "${COPASI_SOURCE_DIR}/copasi/lapack")
set(CLAPACK_INCLUDE_DIR "${COPASI_SOURCE_DIR}")
endif (NOT CLAPACK_INCLUDE_DIR)


Expand Down
169 changes: 67 additions & 102 deletions InnoSetup/COPASI.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
# Copyright (C) 2019 - 2024 by Pedro Mendes, Rector and Visitors of the
# Copyright (C) 2019 - 2022 by Pedro Mendes, Rector and Visitors of the
# University of Virginia, University of Heidelberg, and University
# of Connecticut School of Medicine.
# All rights reserved.
Expand All @@ -14,15 +14,6 @@
# of Manchester.
# All rights reserved.










# Echo all bash commands to ease debugging
set -x

Expand All @@ -41,98 +32,72 @@ EOF
GUID=$(echo $GUID | sed 'y/abcdef/ABCDEF/')
productcode=${GUID:0:8}-${GUID:8:4}-${GUID:12:4}-${GUID:16:4}-${GUID:20:12}

# if NO_COPY environment variable is set, skip the copy step
if [ -n "${NO_COPY}" ]; then
echo "Skipping copy step"
cd ${SOURCE}/InnoSetup

workdir=${SOURCE}/InnoSetup
workdir=$(echo "$workdir" | sed 's/\//\\/g')
workdir=$(echo "$workdir" | sed 's/^\\c\\/C:\\/')
workdir=$(echo "$workdir" | sed 's/^\\d\\/D:\\/')
workdir=$(echo "$workdir" | sed 's/^\\e\\/E:\\/')
workdir=${workdir//\\/\\\\}

stagedir=${SETUP_DIR}/package
stagedir=$(echo "$stagedir" | sed 's/\//\\/g')
stagedir=$(echo "$stagedir" | sed 's/^\\c\\/C:\\/')
stagedir=$(echo "$stagedir" | sed 's/^\\d\\/D:\\/')
stagedir=$(echo "$stagedir" | sed 's/^\\e\\/E:\\/')

stagedir=${stagedir//\\/\\\\}

else

[ -e ${SETUP_DIR}/package ] && rm -rf ${SETUP_DIR}/package
mkdir ${SETUP_DIR}/package
pushd ${SETUP_DIR}/package

# Create directory structure
tar -xvf ${BUILD_ROOT}/src/windows.tgz

# Copy README
cp ${SOURCE}/README.Win32 README.txt
chmod 644 README.txt

# Copy license
cp ${SOURCE}/copasi/ArtisticLicense.txt LICENSE.txt
chmod 644 LICENSE.txt

# Copy configuration resources
mkdir -p share/copasi/config
cp ${SOURCE}/copasi/MIRIAM/MIRIAMResources.xml share/copasi/config
chmod 444 share/copasi/config/*

# Copy examples
mkdir -p share/copasi/examples
cp ${SOURCE}/TestSuite/distribution/* share/copasi/examples
chmod 444 share/copasi/examples/*
chmod 777 share/copasi/examples

# Copy icons
mkdir -p share/copasi/icons
cp ${SOURCE}/copasi/UI/icons/Copasi.ico share/copasi/icons
cp ${SOURCE}/copasi/UI/icons/CopasiDoc.ico share/copasi/icons
chmod 644 share/copasi/icons/*

# Copy wizard resource
mkdir -p share/copasi/doc/html
cp ${SOURCE}/copasi/wizard/help_html/*.html share/copasi/doc/html
chmod 644 share/copasi/doc/html/*.html

mkdir -p share/copasi/doc/html/figures
cp ${SOURCE}/copasi/wizard/help_html/figures/*.png \
share/copasi/doc/html/figures
chmod 644 share/copasi/doc/html/figures/*.png

# 32 bit files
cp "${BUILD_32_MD}/build/COPASI.${DIR_SUFFIX}/copasi/CopasiUI/CopasiUI.exe" bin/32
chmod 755 bin/32/CopasiUI.exe
cp "${BUILD_32_MT}/build/COPASI.${DIR_SUFFIX}/copasi/CopasiSE/CopasiSE.exe" bin/32
chmod 755 bin/32/CopasiSE.exe
cp ${SOURCE}/InnoSetup/qt.conf bin/32
chmod 644 bin/32/qt.conf

# 64 bit files
cp "${BUILD_64_MD}/build/COPASI.${DIR_SUFFIX}/copasi/CopasiUI/CopasiUI.exe" bin/64
chmod 755 bin/64/CopasiUI.exe
cp "${BUILD_64_MT}/build/COPASI.${DIR_SUFFIX}/copasi/CopasiSE/CopasiSE.exe" bin/64
chmod 755 bin/64/CopasiSE.exe
cp ${SOURCE}/InnoSetup/qt.conf bin/64
chmod 644 bin/64/qt.conf

# Execute InnoSetup to create Installation package
cd ${SOURCE}/InnoSetup

workdir=$(cygpath -wa .)
workdir=${workdir//\\/\\\\}

stagedir=$(cygpath -wa "${SETUP_DIR}/package")
stagedir=${stagedir//\\/\\\\}

fi


[ -e ${SETUP_DIR}/package ] && rm -rf ${SETUP_DIR}/package
mkdir ${SETUP_DIR}/package
pushd ${SETUP_DIR}/package

# Create directory structure
tar -xvf ${BUILD_ROOT}/src/windows.tgz

# Copy README
cp ${SOURCE}/README.Win32 README.txt
chmod 644 README.txt

# Copy license
cp ${SOURCE}/copasi/ArtisticLicense.txt LICENSE.txt
chmod 644 LICENSE.txt

# Copy configuration resources
mkdir -p share/copasi/config
cp ${SOURCE}/copasi/MIRIAM/MIRIAMResources.xml share/copasi/config
chmod 444 share/copasi/config/*

# Copy examples
mkdir -p share/copasi/examples
cp ${SOURCE}/TestSuite/distribution/* share/copasi/examples
chmod 444 share/copasi/examples/*
chmod 777 share/copasi/examples

# Copy icons
mkdir -p share/copasi/icons
cp ${SOURCE}/copasi/UI/icons/Copasi.ico share/copasi/icons
cp ${SOURCE}/copasi/UI/icons/CopasiDoc.ico share/copasi/icons
chmod 644 share/copasi/icons/*

# Copy wizard resource
mkdir -p share/copasi/doc/html
cp ${SOURCE}/copasi/wizard/help_html/*.html share/copasi/doc/html
chmod 644 share/copasi/doc/html/*.html

mkdir -p share/copasi/doc/html/figures
cp ${SOURCE}/copasi/wizard/help_html/figures/*.png \
share/copasi/doc/html/figures
chmod 644 share/copasi/doc/html/figures/*.png

# 32 bit files
cp "${BUILD_32_MD}/build/COPASI.${DIR_SUFFIX}/copasi/CopasiUI/CopasiUI.exe" bin/32
chmod 755 bin/32/CopasiUI.exe
cp "${BUILD_32_MT}/build/COPASI.${DIR_SUFFIX}/copasi/CopasiSE/CopasiSE.exe" bin/32
chmod 755 bin/32/CopasiSE.exe
cp ${SOURCE}/InnoSetup/qt.conf bin/32
chmod 644 bin/32/qt.conf

# 64 bit files
cp "${BUILD_64_MD}/build/COPASI.${DIR_SUFFIX}/copasi/CopasiUI/CopasiUI.exe" bin/64
chmod 755 bin/64/CopasiUI.exe
cp "${BUILD_64_MT}/build/COPASI.${DIR_SUFFIX}/copasi/CopasiSE/CopasiSE.exe" bin/64
chmod 755 bin/64/CopasiSE.exe
cp ${SOURCE}/InnoSetup/qt.conf bin/64
chmod 644 bin/64/qt.conf

# Execute InnoSetup to create Installation package
cd ${SOURCE}/InnoSetup

workdir=$(cygpath -wa .)
workdir=${workdir//\\/\\\\}

stagedir=$(cygpath -wa "${SETUP_DIR}/package")
stagedir=${stagedir//\\/\\\\}

# modify product code, product version, and package name
sed -e '/#define MyAppVersion/s/".*"/"'${MyAppVersion}'"/' \
Expand Down
4 changes: 2 additions & 2 deletions cmake-set-dependencies.cmake
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (C) 2019 - 2024 by Pedro Mendes, Rector and Visitors of the
# Copyright (C) 2019 - 2022 by Pedro Mendes, Rector and Visitors of the
# University of Virginia, University of Heidelberg, and University
# of Connecticut School of Medicine.
# All rights reserved.
Expand Down Expand Up @@ -68,7 +68,7 @@ if (NOT EXISTS ${RAPTOR_LIBRARY})
set (RAPTOR_LIBRARY ${COPASI_DEPENDENCY_DIR}/lib/raptor.lib CACHE FILEPATH "raptor library" FORCE)
endif()

if (NOT DEFINED MKLROOT AND (NOT BLA_VENDOR OR "${BLA_VENDOR}" STREQUAL "COPASI Dependencies"))
if (NOT BLA_VENDOR OR "${BLA_VENDOR}" STREQUAL "COPASI Dependencies")
# clapack
set (CLAPACK_INCLUDE_DIR ${COPASI_DEPENDENCY_DIR}/include CACHE PATH "clapack include directory" FORCE)

Expand Down
4 changes: 1 addition & 3 deletions copasi/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ endif(EXTRA_MOC_OPTIONS)
set(QWT_VERSION 0x0${QWT_VERSION_NUMERIC})
set(COPASI_UI_MOC_OPTIONS ${COPASI_UI_MOC_OPTIONS} -DQWT_VERSION=0x0${QWT_VERSION_NUMERIC})

if (CLAPACK_FOUND AND NOT USE_MKL)
if (CLAPACK_FOUND)
set(USE_CLAPACK 1)
elseif (USE_MKL)
set(USE_MKL 1)
Expand Down Expand Up @@ -509,14 +509,12 @@ if(BUILD_GUI)
DOC "Path to the uic executable"
PATHS ${Qt6Widgets_DIR}/../../../bin/
${Qt6Widgets_DIR}/../../../share/qt/libexec/
${Qt6Widgets_DIR}/../../../libexec/qt6/
)

if (NOT EXISTS "${Qt6Widgets_UIC_EXECUTABLE}")
message(FATAL_ERROR "Need UIC executable to compile GUI, it should be in:
${Qt6Widgets_DIR}/../../../bin
${Qt6Widgets_DIR}/../../../share/qt/libexec
${Qt6Widgets_DIR}/../../../libexec/qt6/
")
endif()
endif()
Expand Down
Loading

0 comments on commit f841edf

Please sign in to comment.