Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More cpack fixes #410

Merged
merged 2 commits into from
Oct 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions avogadro/lastinstall/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -72,4 +72,11 @@ if((APPLE OR WIN32) AND NOT ${CMAKE_VERSION} VERSION_LESS 2.8.8)
include(InstallRequiredSystemLibraries)
include(DeployQt5)
install_qt5_executable(${exe} "${plugins}" "${ob_plugins}" "${dirs}" "")
if (INSTALL_BUNDLE_FILES)
# Fixup the bundle
install(CODE "
include(BundleUtilities)
fixup_bundle(\"${exe}/..\" \"${plugins}\" \"${dirs}\")
" COMPONENT Runtime)
endif()
endif()
4 changes: 2 additions & 2 deletions avogadro/tdxcontroller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
#include <avogadro/rendering/camera.h>
#include <avogadro/rendering/glrenderer.h>

#include <QtCore/QBuffer>

Check warning

Code scanning / Cppcheck (reported by Codacy)

Include file: <QtCore/QBuffer> not found. Please note: Cppcheck does not need standard library headers to get proper results.

Include file: <QtCore/QBuffer> not found. Please note: Cppcheck does not need standard library headers to get proper results.
#include <QtCore/QBytearray>

Check warning

Code scanning / Cppcheck (reported by Codacy)

Include file: <QtCore/QBytearray> not found. Please note: Cppcheck does not need standard library headers to get proper results.

Include file: <QtCore/QBytearray> not found. Please note: Cppcheck does not need standard library headers to get proper results.
#include <QtCore/QCoreApplication>
#include <QtWidgets/QAction>
#include <qbuffer.h>
#include <qbytearray.h>>

#include <filesystem>

Expand Down
18 changes: 3 additions & 15 deletions cmake/AvogadroCPack.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -58,33 +58,21 @@ if(INSTALL_BUNDLE_FILES)
find_program(GENXRD_EXE genXrdPattern)
if (GENXRD_EXE)
list(APPEND BUNDLE_EXE_LIST ${GENXRD_EXE})
install(FILES ${GENXRD_EXE} DESTINATION ${INSTALL_RUNTIME_DIR}
PERMISSIONS
OWNER_READ OWNER_WRITE OWNER_EXECUTE
GROUP_READ GROUP_EXECUTE
WORLD_READ WORLD_EXECUTE)
install(PROGRAMS ${GENXRD_EXE} DESTINATION ${INSTALL_RUNTIME_DIR})
endif()

# look for yaehmop (eht_bind)
find_program(EHT_BIND_EXE eht_bind)
if(EHT_BIND_EXE)
list(APPEND BUNDLE_EXE_LIST ${EHT_BIND_EXE})
install(FILES ${EHT_BIND_EXE} DESTINATION ${INSTALL_RUNTIME_DIR}
PERMISSIONS
OWNER_READ OWNER_WRITE OWNER_EXECUTE
GROUP_READ GROUP_EXECUTE
WORLD_READ WORLD_EXECUTE)
install(PROGRAMS ${EHT_BIND_EXE} DESTINATION ${INSTALL_RUNTIME_DIR})
endif()

find_program(OBABEL_EXE obabel)
if(OBABEL_EXE)
find_program(OBMM_EXE obmm)
list(APPEND BUNDLE_EXE_LIST ${OBABEL_EXE} ${OBMM_EXE})
install(FILES ${OBABEL_EXE} ${OBMM_EXE} DESTINATION ${INSTALL_RUNTIME_DIR}
PERMISSIONS
OWNER_READ OWNER_WRITE OWNER_EXECUTE
GROUP_READ GROUP_EXECUTE
WORLD_READ WORLD_EXECUTE)
install(PROGRAMS ${OBABEL_EXE} ${OBMM_EXE} DESTINATION ${INSTALL_RUNTIME_DIR})
get_filename_component(BABEL_DIR "${OBABEL_EXE}" PATH)
if(WIN32)
file(GLOB BABEL_PLUGINS ${BABEL_DIR}/*.obf)
Expand Down
17 changes: 3 additions & 14 deletions cmake/deploy-osx.cmake.in
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
set(APP_BUNDLE_PATH "${CPACK_TEMPORARY_INSTALL_DIRECTORY}/Avogadro2.app")
set(APP_ZIP_PATH "${CPACK_TEMPORARY_INSTALL_DIRECTORY}/Avogadro2.zip")

include(BundleUtilities)
fixup_bundle("${CPACK_TEMPORARY_INSTALL_DIRECTORY}/Avogadro2.app" "" "")

if (DEFINED ENV{CODESIGN_IDENTITY})
# sign the Open Babel SO files
file(GLOB OB_PLUGINS ${APP_BUNDLE_PATH}/Contents/lib/openbabel/*.so)
Expand Down Expand Up @@ -35,18 +38,4 @@ if (DEFINED ENV{CODESIGN_IDENTITY})
message(FATAL_ERROR
\"Running ${COMMAND_ARGS} failed with exit code \${EXIT_CODE}.\")
endif()
set(COMMAND_ARGS
ditto
-c
-k
--keepParent
${APP_BUNDLE_PATH}
${APP_ZIP_PATH}
)
execute_process(COMMAND ${COMMAND_ARGS} RESULT_VARIABLE EXIT_CODE)
if(NOT EXIT_CODE EQUAL 0)
message(FATAL_ERROR
\"Running ${COMMAND_ARGS} failed with exit code \${EXIT_CODE}.\")
endif()

endif()