-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from kolod/windows
Windows
- Loading branch information
Showing
13 changed files
with
110 additions
and
71 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,4 +3,5 @@ | |
/gui/i18n/* | ||
/build-*-Release/ | ||
/build-*-Debug/ | ||
/gui/build/* | ||
/installer/MSVC2017_*bit/* |
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
cmake_minimum_required(VERSION 3.5) | ||
cmake_minimum_required(VERSION 3.22) | ||
|
||
project(ppm-generator VERSION 1.1.0 LANGUAGES CXX) | ||
|
||
|
@@ -7,14 +7,15 @@ set(PROJECT_DESCRIPTION "The GUI for the Arduino Nano sketch that allows you to | |
set(PROJECT_AUTHOR "Oleksandr Kolodkin") | ||
set(PROJECT_URL "https://github.com/kolod/Arduino-PPM-Generator") | ||
|
||
set(CMAKE_INCLUDE_CURRENT_DIR ON) | ||
set(CMAKE_AUTOUIC ON) | ||
set(CMAKE_AUTOMOC ON) | ||
set(CMAKE_AUTORCC ON) | ||
set(CMAKE_CXX_STANDARD_REQUIRED ON) | ||
set(CMAKE_CXX_STANDARD 11) | ||
# set(CMAKE_INCLUDE_CURRENT_DIR ON) | ||
# set(CMAKE_AUTOUIC ON) | ||
# set(CMAKE_AUTOMOC ON) | ||
# set(CMAKE_AUTORCC ON) | ||
# set(CMAKE_CXX_STANDARD_REQUIRED ON) | ||
# set(CMAKE_CXX_STANDARD 17) | ||
|
||
find_package(Qt6 REQUIRED COMPONENTS Widgets Charts SerialBus SerialPort LinguistTools) | ||
qt_standard_project_setup() | ||
|
||
set(TS_FILES | ||
translations/ppm_uk.ts | ||
|
@@ -43,16 +44,15 @@ set(PROJECT_SOURCES | |
ppm.h | ||
${TS_FILES} | ||
${QRC_FILES} | ||
# ${APP_WINDOWS_RESOURCE} | ||
) | ||
|
||
if(WIN32) | ||
list(APPEND PROJECT_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/resources.rc") | ||
endif() | ||
|
||
qt_add_executable(ppm-generator MANUAL_FINALIZATION ${PROJECT_SOURCES}) | ||
qt_add_lupdate(ppm-generator TS_FILES ${TS_FILES} OPTIONS -locations relative -no-obsolete) | ||
qt_add_lrelease(ppm-generator TS_FILES ${TS_FILES} QM_FILES_OUTPUT_VARIABLE QM_FILES OPTIONS -compress -removeidentical) | ||
qt6_add_executable(ppm-generator WIN32 MANUAL_FINALIZATION ${PROJECT_SOURCES}) | ||
qt6_add_lupdate(ppm-generator TS_FILES ${TS_FILES} OPTIONS -locations relative -no-obsolete) | ||
qt6_add_lrelease(ppm-generator TS_FILES ${TS_FILES} QM_FILES_OUTPUT_VARIABLE QM_FILES OPTIONS -compress -removeidentical) | ||
|
||
target_link_libraries(ppm-generator PRIVATE | ||
Qt6::Widgets | ||
|
@@ -67,15 +67,51 @@ set_target_properties(ppm-generator PROPERTIES | |
MACOSX_BUNDLE_SHORT_VERSION_STRING ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR} | ||
) | ||
|
||
if(QT_VERSION_MAJOR EQUAL 6) | ||
qt_finalize_executable(ppm-generator) | ||
endif() | ||
qt6_finalize_target(ppm-generator) | ||
|
||
# Installation | ||
set(CPACK_PACKAGE_CONTACT "[email protected]") | ||
set(CPACK_PACKAGE_HOMEPAGE_URL "https://github.com/kolod/Arduino-PPM-Generator") | ||
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "The GUI for Arduino Nano sketch that allows you to generate a PPM signal.") | ||
set(CPACK_RESOURCE_FILE_LICENSE "${PROJECT_SOURCE_DIR}/../LICENSE") | ||
set(CPACK_RESOURCE_FILE_README "${PROJECT_SOURCE_DIR}/../README.md") | ||
set(CPACK_PACKAGE_CHECKSUM SHA256) | ||
|
||
if (WIN32) | ||
install(TARGETS ppm-generator RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) | ||
install(FILES ${VX_EXTRA_RESOURCE_FILES_RCC} DESTINATION ${CMAKE_INSTALL_BINDIR}) | ||
install(FILES ${QM_FILES} DESTINATION "${CMAKE_INSTALL_BINDIR}/translations" OPTIONAL) | ||
qt_generate_deploy_app_script(TARGET ppm-generator OUTPUT_SCRIPT deploy_script NO_UNSUPPORTED_PLATFORM_ERROR) | ||
|
||
message(${deploy_script}) | ||
|
||
install(SCRIPT ${deploy_script}) | ||
install(TARGETS ppm-generator BUNDLE DESTINATION . RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) | ||
install(FILES ${QM_FILES} DESTINATION ./translations) | ||
|
||
set(CPACK_PACKAGE_NAME ${PROJECT_NAME}) | ||
set(CPACK_PACKAGE_INSTALL_DIRECTORY "ppm-generator") | ||
set(CPACK_PACKAGE_INSTALL_REGISTRY_KEY "ppm-generator") | ||
set(CPACK_PACKAGE_FILE_NAME "ppm-generator-win64") | ||
|
||
set(CPACK_GENERATOR NSIS) | ||
set(CPACK_NSIS_INSTALLED_ICON_NAME ppm-generator.exe) | ||
set(CPACK_NSIS_INSTALL_ROOT "$PROGRAMFILES64") | ||
set(CPACK_NSIS_PACKAGE_NAME "${CPACK_PACKAGE_NAME} ${CPACK_PACKAGE_VERSION} (Win64)") | ||
set(CPACK_NSIS_DISPLAY_NAME "PPM Generator") | ||
set(CPACK_NSIS_ENABLE_UNINSTALL_BEFORE_INSTALL ON) | ||
set(CPACK_NSIS_EXECUTABLES_DIRECTORY ".") | ||
set(CMAKE_CL_64 TRUE) # This gets around a bug in the CPack installer name generation for MinGW 64-bit since 2.8 | ||
|
||
set(CPACK_NSIS_CREATE_ICONS_EXTRA | ||
"CreateShortCut '$SMPROGRAMS\\\\$STARTMENU_FOLDER\\\\PPM Generator.lnk' '$INSTDIR\\\\bin\\\\ppm-generator.exe'" | ||
) | ||
|
||
set(CPACK_NSIS_DELETE_ICONS_EXTRA | ||
"Delete '$SMPROGRAMS\\\\$START_MENU\\\\PPM Generator.lnk'" | ||
) | ||
|
||
message(${PROJECT_BINARY_DIR}/ppm-generator.exe) | ||
message(${CMAKE_CURRENT_BINARY_DIR}/ppm-generator.exe) | ||
|
||
include(CPack) | ||
|
||
else() | ||
include(GNUInstallDirs) | ||
|
@@ -98,12 +134,6 @@ else() | |
|
||
list(JOIN DEBIAN_PACKAGE_DEPENDS ", " CPACK_DEBIAN_PACKAGE_DEPENDS) | ||
|
||
set(CPACK_DEB_COMPONENT_INSTALL ON) | ||
set(CPACK_PACKAGE_HOMEPAGE_URL "https://github.com/kolod/Arduino-PPM-Generator") | ||
|
||
set(CPACK_RESOURCE_FILE_LICENSE "${PROJECT_SOURCE_DIR}/../LICENSE") | ||
set(CPACK_RESOURCE_FILE_README "${PROJECT_SOURCE_DIR}/../README.md") | ||
|
||
set(CPACK_GENERATOR "DEB") | ||
set(CPACK_DEBIAN_PACKAGE_MAINTAINER "Oleksandr Kolodkin <[email protected]>") | ||
set(CPACK_DEBIAN_PACKAGE_SECTION "utils") | ||
|
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 was deleted.
Oops, something went wrong.