-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refs #93. Updated Windows package for release.
- Loading branch information
Showing
19 changed files
with
46 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,6 +13,9 @@ execute_process( | |
|
||
message(STATUS "Testing package ${_qt6_qmake_location} ${qt6_install_prefix}") | ||
|
||
# Pre-build script, used to clean up unneeded files for example | ||
set(CPACK_PRE_BUILD_SCRIPTS ${CMAKE_CURRENT_SOURCE_DIR}/cpack-prebuild.cmake) | ||
|
||
if (APPLE) | ||
cmake_policy(SET CMP0087 NEW) # Enable generator expressions in INSTALL(CODE | ||
|
||
|
@@ -68,7 +71,7 @@ if (WIN32) | |
add_custom_target(windows_deploy_qt | ||
# Collect and copy required dependencies | ||
COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_INSTALL_PREFIX}/qtdeploy | ||
COMMAND ${qt6_install_prefix}/bin/windeployqt6 "$<TARGET_FILE_DIR:OpenTeraPlus>/OpenTeraPlus.exe" --release --dir "${CMAKE_INSTALL_PREFIX}/qtdeploy" | ||
COMMAND ${qt6_install_prefix}/bin/windeployqt6 "$<TARGET_FILE_DIR:OpenTeraPlus>/OpenTeraPlus.exe" --release --dir "${CMAKE_INSTALL_PREFIX}/qtdeploy" --no-quick-import --no-compiler-runtime | ||
COMMENT "Running windeployqt6 ..." | ||
) | ||
|
||
|
@@ -87,10 +90,10 @@ if (WIN32) | |
set(CPACK_COMPONENT_OPENTERAPLUS_DEPENDS libprotobuf qt_dist_component openssl) | ||
set(CPACK_COMPONENT_OPENTERAPLUS_REQUIRED ON) | ||
|
||
set(CPACK_COMPONENT_QT_DIST_COMPONENT_DISPLAY_NAME "Librairies Qt") | ||
set(CPACK_COMPONENT_QT_DIST_COMPONENT_DISPLAY_NAME "Qt") | ||
set(CPACK_COMPONENT_QT_DIST_COMPONENT_REQUIRED ON) | ||
|
||
set(CPACK_COMPONENT_LIBPROTOBUF_DISPLAY_NAME "Librairies Protobuf") | ||
set(CPACK_COMPONENT_LIBPROTOBUF_DISPLAY_NAME "Protobuf") | ||
set(CPACK_COMPONENT_LIBPROTOBUF_REQUIRED ON) | ||
|
||
set(CPACK_COMPONENT_OPENSSL_DISPLAY_NAME "OpenSSL") | ||
|
@@ -100,34 +103,39 @@ if (WIN32) | |
if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/config/OpenTeraPlus.json") | ||
# The components that will be packaged | ||
set(CPACK_COMPONENTS_ALL ${CPACK_COMPONENTS_ALL} special_configuration) | ||
set(CPACK_COMPONENT_SPECIAL_CONFIGURATION_DISPLAY_NAME "Fichier de configuration") | ||
set(CPACK_COMPONENT_SPECIAL_CONFIGURATION_DISPLAY_NAME "Configuration") | ||
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/config/OpenTeraPlus.json DESTINATION bin/config COMPONENT special_configuration) | ||
endif() | ||
|
||
# Virtual camera driver | ||
# list(APPEND CPACK_NSIS_EXTRA_INSTALL_COMMANDS "ExecWait 'cmd /c $INSTDIR\\\\bin\\\\installDriver.exe'") | ||
# list(APPEND CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS "ExecWait 'cmd /c $INSTDIR\\\\bin\\\\uninstallDriver.exe'") | ||
|
||
|
||
# add SSL librariesOpenSSL\Win_x64\bin | ||
# file(GLOB OPENSSL_LIBRARIES "${qt6_install_prefix}/../../Tools/OpenSSL/Win_x64/bin/*.dll") | ||
file(GLOB OPENSSL_LIBRARIES "${CMAKE_CURRENT_SOURCE_DIR}/openssl/64bits/*.dll") | ||
message(STATUS "******************* ${OPENSSL_LIBRARIES} ${qt6_install_prefix} ${CPACK_PACKAGING_INSTALL_PREFIX}") | ||
install(FILES ${OPENSSL_LIBRARIES} DESTINATION bin COMPONENT openssl) | ||
|
||
|
||
# Uses NSIS packaging system on Windows | ||
SET(CPACK_SOURCE_GENERATOR "NSIS") | ||
|
||
|
||
# SET(CPACK_NSIS_INSTALL_ROOT "C:\\\\INTER") | ||
SET(CPACK_NSIS_INSTALL_ROOT "$PROGRAMFILES64") | ||
SET(CPACK_PACKAGE_INSTALL_DIRECTORY "OpenTeraPlus") | ||
SET(CPACK_NSIS_PACKAGE_NAME "OpenTeraPlus") | ||
SET(CPACK_NSIS_MODIFY_PATH OFF) | ||
SET(CPACK_NSIS_EXECUTABLES_DIRECTORY .) | ||
SET(CPACK_NSIS_ENABLE_UNINSTALL_BEFORE_INSTALL ON) | ||
SET(CPACK_NSIS_MUI_FINISHPAGE_RUN "bin\\\\OpenTeraPlus.exe") | ||
|
||
set(CPACK_NSIS_CREATE_ICONS_EXTRA | ||
"CreateShortCut '$DESKTOP\\\\OpenTeraPlus.lnk' '$INSTDIR\\\\bin\\\\OpenTeraPlus.exe'" | ||
) | ||
set(CPACK_NSIS_DELETE_ICONS_EXTRA | ||
"Delete '$DESKTOP\\\\OpenTeraPlus.lnk'" | ||
) | ||
|
||
# Removed run after install option, as this caused issue with config file (will run as admin!) | ||
# SET(CPACK_NSIS_MUI_FINISHPAGE_RUN "bin\\\\OpenTeraPlus.exe") | ||
|
||
SET(CPACK_NSIS_URL_INFO_ABOUT "https://github.com/introlab/openteraplus") | ||
SET(CPACK_NSIS_CONTACT "[email protected]") | ||
|
@@ -147,11 +155,16 @@ if (WIN32) | |
VIAddVersionKey ProductVersion ${CPACK_PACKAGE_VERSION}") | ||
|
||
|
||
include(CPack REQUIRED) | ||
# Run VC++ redistributable | ||
list(APPEND CPACK_NSIS_EXTRA_INSTALL_COMMANDS "ExecWait '\\\"$INSTDIR\\\\bin\\\\vc_redist.x64.exe\\\" /install /passive /norestart'") | ||
|
||
# The trick is to deploy Qt to a directory and then install the directory in the bin folder | ||
install(DIRECTORY ${CMAKE_INSTALL_PREFIX}/qtdeploy/ DESTINATION bin COMPONENT qt_dist_component) | ||
|
||
# Deploy before packaging | ||
add_custom_target(nsis-package DEPENDS windows_deploy_qt package) | ||
|
||
# Run VC++ redistributable | ||
list(APPEND CPACK_NSIS_EXTRA_INSTALL_COMMANDS "ExecWait 'cmd /c $INSTDIR\\\\bin\\\\VC_redist.x64.exe /install /passive /norestart'") | ||
include(CPack REQUIRED) | ||
|
||
# Set files to install - everything in deploy folder | ||
#install( | ||
|
@@ -163,11 +176,6 @@ if (WIN32) | |
|
||
# install(CODE " ") | ||
|
||
# The trick is to deploy Qt to a directory and then install the directory in the bin folder | ||
install(DIRECTORY ${CMAKE_INSTALL_PREFIX}/qtdeploy/ DESTINATION bin COMPONENT qt_dist_component) | ||
|
||
# Deploy before packaging | ||
add_custom_target(nsis-package DEPENDS windows_deploy_qt package) | ||
|
||
|
||
endif (WIN32) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
if(WIN32) | ||
message("Cleaning unneeded files for package...") | ||
file(REMOVE_RECURSE ${CPACK_TEMPORARY_INSTALL_DIRECTORY}/libprotobuf/lib) | ||
file(REMOVE_RECURSE ${CPACK_TEMPORARY_INSTALL_DIRECTORY}/openteraplus/lib) | ||
file(REMOVE_RECURSE ${CPACK_TEMPORARY_INSTALL_DIRECTORY}/openteraplus/include) | ||
endif(WIN32) |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters