添加NSIS打包安装包

This commit is contained in:
HEYAHONG 2023-01-12 11:45:15 +08:00
parent 4824e7a4ad
commit 951df4b78d
No known key found for this signature in database
GPG Key ID: 45495019025D566D
4 changed files with 59 additions and 0 deletions

View File

@ -104,3 +104,38 @@ include(CPack)
endif()
endif()
endif()
if(CMAKE_SYSTEM_NAME MATCHES "Windows")
#NSIS
message(STATUS "this is a windows system")
set(CPACK_PACKAGE_NAME "${PROJECT_NAME}")
set(CPACK_PACKAGE_VERSION "${PROJECT_VERSION_STR}")
set(CPACK_PACKAGE_VENDOR "HEYAHONG")
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "SimpleBLETool By HYH")
set(CPACK_PACKAGE_DESCRIPTION "SimpleBLETool By HYH")
set(CPACK_PACKAGE_CONTACT "2229388563@qq.com")
#
set(CPACK_PACKAGE_ICON_PATH_STRING "${CMAKE_CURRENT_SOURCE_DIR}/win32/window_resources.ico")
string(REPLACE "/" "\\\\" CPACK_PACKAGE_ICON ${CPACK_PACKAGE_ICON_PATH_STRING})
set(CPACK_NSIS_MUI_ICON ${CPACK_PACKAGE_ICON})
set(CPACK_NSIS_MUI_UNIICON ${CPACK_PACKAGE_ICON})
#
set(CPACK_NSIS_ENABLE_UNINSTALL_BEFORE_INSTALL ON)
#
set(CPACK_NSIS_DISPLAY_NAME ${CPACK_PACKAGE_NAME})
#
set(CPACK_PACKAGE_EXECUTABLES ${PROJECT_NAME};${PROJECT_NAME} )
#LICENSE
set(CPACK_RESOURCE_FILE_LICENSE ${CMAKE_CURRENT_SOURCE_DIR}/win32/nsis/LICENSE.txt)
#Welcome
set(CPACK_RESOURCE_FILE_WELCOME ${CMAKE_CURRENT_SOURCE_DIR}/win32/nsis/WELCOME.txt)
#readme
set(CPACK_RESOURCE_FILE_README ${CMAKE_CURRENT_SOURCE_DIR}/win32/nsis/README.txt)
set(CPACK_GENERATOR "NSIS")
include(CPack)
endif()

22
win32/nsis/LICENSE.txt Normal file
View File

@ -0,0 +1,22 @@
MIT License
Copyright (c) 2022 ºÎÑǺì
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

1
win32/nsis/README.txt Normal file
View File

@ -0,0 +1 @@
SimpleBLETool是一个利用SimpleBLE查看BLE信息的工具.

1
win32/nsis/WELCOME.txt Normal file
View File

@ -0,0 +1 @@
欢迎使用SimpleBLETool安装程序。