chore(cpn): update to Qt 5.15.2 and rework application packaging (#4270)
Co-authored-by: raphaelcoeffic <raphael.coeffic@frafos.com> Co-authored-by: philmoz <phil.a.mitchell@gmail.com>
This commit is contained in:
co-authored by
raphaelcoeffic
philmoz
parent
9d5c6e62cb
commit
a3faf7e9df
@@ -30,7 +30,7 @@ on:
|
||||
env:
|
||||
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
|
||||
BUILD_TYPE: Release
|
||||
QT_VERSION: "5.12.9"
|
||||
QT_VERSION: "5.15.2"
|
||||
|
||||
jobs:
|
||||
build:
|
||||
@@ -71,27 +71,27 @@ jobs:
|
||||
run: python3 -m pip install --upgrade pip Pillow lz4 clang jinja2
|
||||
|
||||
- name: Patch GitHub macOS build
|
||||
run: brew install pkg-config
|
||||
run: brew install pkg-config
|
||||
|
||||
- name: Install libusb
|
||||
run: wget https://github.com/libusb/libusb/releases/download/v1.0.20/libusb-1.0.20.tar.bz2 &&
|
||||
export MACOSX_DEPLOYMENT_TARGET=10.9 &&
|
||||
tar xfv libusb-1.0.20.tar.bz2 &&
|
||||
cd libusb-1.0.20 &&
|
||||
./configure &&
|
||||
make install &&
|
||||
cd ..
|
||||
run: brew install libusb
|
||||
|
||||
- name: Install dfu-util
|
||||
run: wget https://downloads.sourceforge.net/project/dfu-util/dfu-util-0.9.tar.gz &&
|
||||
tar xfv dfu-util-0.9.tar.gz &&
|
||||
cd dfu-util-0.9 &&
|
||||
./configure &&
|
||||
make install
|
||||
run: brew install dfu-util
|
||||
|
||||
- name: Select XCode version
|
||||
uses: maxim-lobanov/setup-xcode@v1
|
||||
with:
|
||||
xcode-version: '13.2.1'
|
||||
|
||||
- name: Install SDL2
|
||||
run: brew install SDL2
|
||||
|
||||
- name: Select XCode version
|
||||
uses: maxim-lobanov/setup-xcode@v1
|
||||
with:
|
||||
xcode-version: '11.7'
|
||||
|
||||
- name: Build
|
||||
working-directory: ${{github.workspace}}
|
||||
shell: bash
|
||||
|
||||
@@ -17,9 +17,9 @@ env:
|
||||
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
|
||||
BUILD_TYPE: Release
|
||||
CMAKE_GENERATOR: "MSYS Makefiles"
|
||||
QT_VERSION: "5.12.9"
|
||||
MINGW_VERSION: "win32_mingw73"
|
||||
MINGW_PATH: "mingw73_32"
|
||||
QT_VERSION: "5.15.2"
|
||||
MINGW_VERSION: "win32_mingw81"
|
||||
MINGW_PATH: "mingw81_32"
|
||||
|
||||
jobs:
|
||||
build:
|
||||
@@ -56,7 +56,9 @@ jobs:
|
||||
mingw-w64-i686-libraqm \
|
||||
mingw-w64-i686-SDL2 \
|
||||
mingw-w64-i686-clang \
|
||||
mingw-w64-i686-nsis
|
||||
mingw-w64-i686-nsis \
|
||||
mingw-w64-i686-dfu-util \
|
||||
mingw-w64-i686-openssl
|
||||
python -m pip install clang jinja2
|
||||
|
||||
- name: Install Qt
|
||||
@@ -66,7 +68,6 @@ jobs:
|
||||
cache-key-prefix: 'install-qt-action-win32'
|
||||
version: ${{ env.QT_VERSION }}
|
||||
arch: ${{ env.MINGW_VERSION }}
|
||||
tools: 'tools_openssl_x86'
|
||||
|
||||
- name: Check out the repo
|
||||
uses: actions/checkout@v3
|
||||
@@ -79,7 +80,6 @@ jobs:
|
||||
run: |
|
||||
mkdir output && \
|
||||
CMAKE_PREFIX_PATH=$RUNNER_WORKSPACE/Qt/$QT_VERSION/$MINGW_PATH \
|
||||
QT_TOOLS_OPENSSL_ROOT_PATH=$RUNNER_WORKSPACE/Qt/Tools/OpenSSL/Win_x86 \
|
||||
tools/build-companion.sh "$(pwd)" "$(pwd)/output/"
|
||||
- name: Compose release filename
|
||||
# https://stackoverflow.com/questions/58033366/how-to-get-current-branch-within-github-actions
|
||||
|
||||
@@ -31,9 +31,9 @@ env:
|
||||
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
|
||||
BUILD_TYPE: Release
|
||||
CMAKE_GENERATOR: "MSYS Makefiles"
|
||||
QT_VERSION: "5.12.9"
|
||||
MINGW_VERSION: "win64_mingw73"
|
||||
MINGW_PATH: "mingw73_64"
|
||||
QT_VERSION: "5.15.2"
|
||||
MINGW_VERSION: "win64_mingw81"
|
||||
MINGW_PATH: "mingw81_64"
|
||||
|
||||
jobs:
|
||||
build:
|
||||
@@ -70,7 +70,9 @@ jobs:
|
||||
mingw-w64-x86_64-libraqm \
|
||||
mingw-w64-x86_64-SDL2 \
|
||||
mingw-w64-x86_64-clang \
|
||||
mingw-w64-x86_64-nsis
|
||||
mingw-w64-x86_64-nsis \
|
||||
mingw-w64-x86_64-dfu-util \
|
||||
mingw-w64-x86_64-openssl
|
||||
python -m pip install clang jinja2
|
||||
|
||||
- name: Install Qt
|
||||
@@ -80,7 +82,6 @@ jobs:
|
||||
cache-key-prefix: 'install-qt-action-win64'
|
||||
version: ${{ env.QT_VERSION }}
|
||||
arch: ${{ env.MINGW_VERSION }}
|
||||
tools: 'tools_openssl_x64'
|
||||
|
||||
- name: Check out the repo
|
||||
uses: actions/checkout@v3
|
||||
@@ -93,7 +94,6 @@ jobs:
|
||||
run: |
|
||||
mkdir output && \
|
||||
CMAKE_PREFIX_PATH=$RUNNER_WORKSPACE/Qt/$QT_VERSION/$MINGW_PATH \
|
||||
QT_TOOLS_OPENSSL_ROOT_PATH=$RUNNER_WORKSPACE/Qt/Tools/OpenSSL/Win_x64 \
|
||||
tools/build-companion.sh "$(pwd)" "$(pwd)/output/"
|
||||
|
||||
- name: Compose release filename
|
||||
|
||||
+2
-2
@@ -47,7 +47,7 @@ if(EdgeTX_SUPERBUILD)
|
||||
|
||||
# Add explicit targets for triggering cmake in the external projects
|
||||
set_property(DIRECTORY PROPERTY EP_STEP_TARGETS configure clean)
|
||||
|
||||
|
||||
# Native targets
|
||||
ExternalProject_Add(native
|
||||
SOURCE_DIR ${CMAKE_SOURCE_DIR}
|
||||
@@ -136,7 +136,7 @@ if(NATIVE_BUILD)
|
||||
include(NativeTargets)
|
||||
else()
|
||||
# Prevent CMake warnings
|
||||
set(IGNORE "${SDL2_LIBRARY_PATH}")
|
||||
set(IGNORE "${SDL2_LIBRARY_PATH}" "${LIBSSL1_ROOT_DIR}" "${OPENSSL_ROOT_DIR}")
|
||||
endif()
|
||||
|
||||
add_subdirectory(${RADIO_SRC_DIR})
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
# - try to find program dfu-util
|
||||
|
||||
set(DFU_UTIL_ROOT_DIR
|
||||
"${DFU_UTIL_ROOT_DIR}"
|
||||
CACHE
|
||||
PATH
|
||||
"Root directory to search for dfu-util")
|
||||
|
||||
find_program(DFU_UTIL_PROGRAM
|
||||
NAMES
|
||||
dfu-util
|
||||
HINTS
|
||||
"${DFU_UTIL_ROOT_DIR}")
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(DFU_UTIL
|
||||
DEFAULT_MSG
|
||||
DFU_UTIL_PROGRAM)
|
||||
|
||||
if(DFU_UTIL_FOUND)
|
||||
set(DFU_UTIL_PATH "${DFU_UTIL_PROGRAM}")
|
||||
mark_as_advanced(DFU_UTIL_ROOT_DIR)
|
||||
endif()
|
||||
|
||||
mark_as_advanced(DFU_UTIL_PROGRAM)
|
||||
@@ -0,0 +1,27 @@
|
||||
# - try to find libssl-1 library
|
||||
|
||||
if (DEFINED ENV{LIBSSL1_ROOT_DIR})
|
||||
set(LIBSSL1_ROOT_DIR "$ENV{LIBSSL1_ROOT_DIR}")
|
||||
endif()
|
||||
|
||||
find_library(LIBSSL1_LIBRARY
|
||||
NAMES
|
||||
libssl.so.1.1
|
||||
libssl-1_1.dll
|
||||
libssl-1_1.dylib
|
||||
HINTS
|
||||
"${LIBSSL1_ROOT_DIR}")
|
||||
|
||||
get_filename_component(LIBSSL1_LIBRARY_PATH ${LIBSSL1_LIBRARY} PATH)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(LIBSSL1
|
||||
DEFAULT_MSG
|
||||
LIBSSL1_LIBRARY_PATH)
|
||||
|
||||
if(LIBSSL1_FOUND)
|
||||
set(LIBSSL1_LIBRARY_DIR "${LIBSSL1_LIBRARY_PATH}")
|
||||
mark_as_advanced(LIBSSL1_ROOT_DIR)
|
||||
endif()
|
||||
|
||||
mark_as_advanced(LIBSSL1_LIBRARY_PATH)
|
||||
@@ -0,0 +1,31 @@
|
||||
# - try to find libusb-1 library
|
||||
|
||||
set(LIBUSB1_ROOT_DIR
|
||||
"${LIBUSB1_ROOT_DIR}"
|
||||
CACHE
|
||||
PATH
|
||||
"Root directory to search for libusb-1")
|
||||
|
||||
find_library(LIBUSB1_LIBRARY
|
||||
NAMES
|
||||
libusb-1.0
|
||||
libusb-1.0.so
|
||||
libusb-1.0.so.0
|
||||
libusb-1.0.dll
|
||||
libusb-1.0.dylib
|
||||
HINTS
|
||||
"${LIBUSB1_ROOT_DIR}")
|
||||
|
||||
get_filename_component(LIBUSB1_LIBRARY_PATH ${LIBUSB1_LIBRARY} PATH)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(LIBUSB1
|
||||
DEFAULT_MSG
|
||||
LIBUSB1_LIBRARY_PATH)
|
||||
|
||||
if(LIBUSB1_FOUND)
|
||||
set(LIBUSB1_LIBRARY_DIR "${LIBUSB1_LIBRARY_PATH}")
|
||||
mark_as_advanced(LIBUSB1_ROOT_DIR)
|
||||
endif()
|
||||
|
||||
mark_as_advanced(LIBUSB1_LIBRARY_PATH)
|
||||
@@ -23,12 +23,40 @@ if(Qt5Core_FOUND OR FOX_FOUND)
|
||||
set(SDL2_BUILDING_LIBRARY YES) # this prevents FindSDL from appending SDLmain lib to the results, which we don't want
|
||||
find_package("SDL2")
|
||||
if(SDL2_FOUND)
|
||||
message(STATUS "SDL2 Lib: ${SDL2_LIBRARIES}; Headers: ${SDL2_INCLUDE_DIRS}")
|
||||
# find_package("SDL2") does not set a variable holding the path to the location of the SDL2 shared library
|
||||
find_file(SDL2_LIB_PATH
|
||||
NAMES
|
||||
libSDL2.so
|
||||
SDL2.dll
|
||||
SDL2.dylib
|
||||
HINTS
|
||||
"/usr/lib/x86_64-linux-gnu"
|
||||
${SDL2_LIBRARY_PATH})
|
||||
message(STATUS "SDL2 Lib: ${SDL2_LIB_PATH} Libs: ${SDL2_LIBRARIES}; Headers: ${SDL2_INCLUDE_DIRS}")
|
||||
else()
|
||||
message(STATUS "SDL not found! Simulator audio, and joystick inputs, will not work.")
|
||||
message(STATUS "SDL2 not found! Simulator audio, and joystick inputs, will not work.")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(Qt5Core_FOUND AND NOT DISABLE_COMPANION)
|
||||
find_package(Libusb1)
|
||||
if(LIBUSB1_FOUND)
|
||||
find_package(Dfuutil)
|
||||
endif()
|
||||
|
||||
if(LINUX)
|
||||
find_package(Libssl1)
|
||||
endif()
|
||||
|
||||
# OpenSSL
|
||||
# environment variable set in github workflows and build-edgetx Dockerfile
|
||||
if (DEFINED ENV{OPENSSL_ROOT_DIR})
|
||||
set(OPENSSL_ROOT_DIR "$ENV{OPENSSL_ROOT_DIR}")
|
||||
endif()
|
||||
|
||||
find_package(OpenSSL)
|
||||
endif()
|
||||
|
||||
# Windows-specific includes and libs shared by sub-projects
|
||||
if(WIN32)
|
||||
list(APPEND WIN_INCLUDE_DIRS "${RADIO_SRC_DIR}/thirdparty/windows/dirent")
|
||||
|
||||
+131
-88
@@ -1,16 +1,19 @@
|
||||
set(SIMULATOR_INSTALL_PREFIX "" CACHE STRING "Alternative simulator library search path")
|
||||
|
||||
if(${CMAKE_SYSTEM_NAME} MATCHES "(Linux|FreeBSD)")
|
||||
set(C9X_NAME_SUFFIX ${VERSION_MAJOR}${VERSION_MINOR})
|
||||
set(COMPANION_NAME "companion${C9X_NAME_SUFFIX}")
|
||||
set(SIMULATOR_NAME "simulator${C9X_NAME_SUFFIX}")
|
||||
set(APP_NAME_SUFFIX ${VERSION_MAJOR}${VERSION_MINOR})
|
||||
set(COMPANION_NAME "companion${APP_NAME_SUFFIX}")
|
||||
set(SIMULATOR_NAME "simulator${APP_NAME_SUFFIX}")
|
||||
# by default cmake sets CMAKE_INSTALL_PREFIX to /usr/local however linuxdeploy works best with '/usr' as base directory
|
||||
if (${CMAKE_INSTALL_PREFIX} MATCHES "/usr/local")
|
||||
set(CMAKE_INSTALL_PREFIX "/usr")
|
||||
endif()
|
||||
if (NOT ${SIMULATOR_INSTALL_PREFIX} STREQUAL "")
|
||||
set(SIMULATOR_LIB_PATH ${SIMULATOR_INSTALL_PREFIX}/lib/${COMPANION_NAME})
|
||||
else()
|
||||
set(SIMULATOR_LIB_PATH "../lib/${COMPANION_NAME}")
|
||||
endif()
|
||||
message(STATUS "Simulators library search path: " ${SIMULATOR_LIB_PATH})
|
||||
set(SIMULATOR_LIB_INSTALL_PATH ${CMAKE_INSTALL_PREFIX}/lib/${COMPANION_NAME})
|
||||
else()
|
||||
set(COMPANION_NAME "companion")
|
||||
set(SIMULATOR_NAME "simulator")
|
||||
@@ -21,10 +24,6 @@ endif()
|
||||
# different versions for different eeproms easier, i.e. without manually renaming
|
||||
set(COMPANION_OSX_APP_BUNDLE_NAME "EdgeTX Companion ${VERSION_MAJOR}.${VERSION_MINOR}")
|
||||
|
||||
# On OS X we copy dfu-util to the application bundle. This the path from which we copy
|
||||
# the binary (default homebrew path)
|
||||
set(DFU_UTIL_PATH "/usr/local/bin/dfu-util")
|
||||
|
||||
option(DEBUG_STORAGE_IMPORT "Turn on debug output for storage import") # Disabled by default
|
||||
if(DEBUG_STORAGE_IMPORT)
|
||||
add_definitions(-DDEBUG_STORAGE_IMPORT)
|
||||
@@ -326,43 +325,38 @@ if(POLICY CMP0026)
|
||||
cmake_policy(SET CMP0026 OLD) # https://cmake.org/cmake/help/v3.0/policy/CMP0026.html
|
||||
endif()
|
||||
|
||||
# OpenSSL
|
||||
# environment variable set in github workflows and build-edgetx Dockerfile
|
||||
if (DEFINED ENV{QT_TOOLS_OPENSSL_ROOT_PATH})
|
||||
set(OPENSSL_ROOT_DIR "$ENV{QT_TOOLS_OPENSSL_ROOT_PATH}")
|
||||
else()
|
||||
message(STATUS "Environment variable QT_TOOLS_OPENSSL_ROOT_PATH not defined. Performing default OpenSSL library search.")
|
||||
endif()
|
||||
include(FindDfuutil)
|
||||
include(FindLibusb1)
|
||||
include(FindOpenSSL)
|
||||
|
||||
find_package(OpenSSL)
|
||||
|
||||
if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
||||
message(STATUS "install " ${CMAKE_BINARY_DIR} " to " ${CMAKE_INSTALL_PREFIX}/bin)
|
||||
if(LINUX)
|
||||
message(STATUS "install " ${CMAKE_BINARY_DIR} " to " ${CMAKE_INSTALL_PREFIX})
|
||||
install(TARGETS ${COMPANION_NAME} DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
|
||||
install(TARGETS ${SIMULATOR_NAME} DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
|
||||
install(DIRECTORY ${CMAKE_BINARY_DIR}/plugins/ DESTINATION ${SIMULATOR_LIB_INSTALL_PATH})
|
||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/companion.desktop DESTINATION share/applications RENAME companion${C9X_NAME_SUFFIX}.desktop)
|
||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/simulator.desktop DESTINATION share/applications RENAME simulator${C9X_NAME_SUFFIX}.desktop)
|
||||
if(${CMAKE_INSTALL_PREFIX} MATCHES "/usr/local")
|
||||
set(INSTALL_TEMP_SHR_PFX "/usr/")
|
||||
set(INSTALL_TEMP_LIB_PFX "/")
|
||||
endif()
|
||||
install(FILES images/linuxicons/16x16/companion.png DESTINATION ${INSTALL_TEMP_SHR_PFX}share/icons/hicolor/16x16/apps RENAME companion${C9X_NAME_SUFFIX}.png)
|
||||
install(FILES images/linuxicons/22x22/companion.png DESTINATION ${INSTALL_TEMP_SHR_PFX}share/icons/hicolor/22x22/apps RENAME companion${C9X_NAME_SUFFIX}.png)
|
||||
install(FILES images/linuxicons/24x24/companion.png DESTINATION ${INSTALL_TEMP_SHR_PFX}share/icons/hicolor/24x24/apps RENAME companion${C9X_NAME_SUFFIX}.png)
|
||||
install(FILES images/linuxicons/32x32/companion.png DESTINATION ${INSTALL_TEMP_SHR_PFX}share/icons/hicolor/32x32/apps RENAME companion${C9X_NAME_SUFFIX}.png)
|
||||
install(FILES images/linuxicons/48x48/companion.png DESTINATION ${INSTALL_TEMP_SHR_PFX}share/icons/hicolor/48x48/apps RENAME companion${C9X_NAME_SUFFIX}.png)
|
||||
install(FILES images/linuxicons/128x128/companion.png DESTINATION ${INSTALL_TEMP_SHR_PFX}share/icons/hicolor/128x128/apps RENAME companion${C9X_NAME_SUFFIX}.png)
|
||||
install(FILES images/linuxicons/256x256/companion.png DESTINATION ${INSTALL_TEMP_SHR_PFX}share/icons/hicolor/256x256/apps RENAME companion${C9X_NAME_SUFFIX}.png)
|
||||
install(FILES images/linuxicons/512x512/companion.png DESTINATION ${INSTALL_TEMP_SHR_PFX}share/icons/hicolor/512x512/apps RENAME companion${C9X_NAME_SUFFIX}.png)
|
||||
install(FILES images/linuxicons/scalable/companion.svg DESTINATION ${INSTALL_TEMP_SHR_PFX}share/icons/hicolor/scalable/apps RENAME companion${C9X_NAME_SUFFIX}.svg)
|
||||
install(FILES ../targets/linux/45-companion-taranis.rules DESTINATION ${INSTALL_TEMP_LIB_PFX}lib/udev/rules.d RENAME 45-companion${C9X_NAME_SUFFIX}-taranis.rules)
|
||||
install(FILES ../targets/linux/45-usbasp.rules DESTINATION ${INSTALL_TEMP_LIB_PFX}lib/udev/rules.d RENAME 45-companion${C9X_NAME_SUFFIX}-usbasp.rules)
|
||||
install(DIRECTORY ${CMAKE_BINARY_DIR}/plugins/ DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/${COMPANION_NAME})
|
||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/companion.desktop DESTINATION ${CMAKE_INSTALL_PREFIX}/share/applications RENAME companion${APP_NAME_SUFFIX}.desktop)
|
||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/simulator.desktop DESTINATION ${CMAKE_INSTALL_PREFIX}/share/applications RENAME simulator${APP_NAME_SUFFIX}.desktop)
|
||||
install(FILES images/linuxicons/16x16/companion.png DESTINATION ${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/16x16/apps RENAME companion${APP_NAME_SUFFIX}.png)
|
||||
install(FILES images/linuxicons/22x22/companion.png DESTINATION ${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/22x22/apps RENAME companion${APP_NAME_SUFFIX}.png)
|
||||
install(FILES images/linuxicons/24x24/companion.png DESTINATION ${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/24x24/apps RENAME companion${APP_NAME_SUFFIX}.png)
|
||||
install(FILES images/linuxicons/32x32/companion.png DESTINATION ${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/32x32/apps RENAME companion${APP_NAME_SUFFIX}.png)
|
||||
install(FILES images/linuxicons/48x48/companion.png DESTINATION ${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/48x48/apps RENAME companion${APP_NAME_SUFFIX}.png)
|
||||
install(FILES images/linuxicons/128x128/companion.png DESTINATION ${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/128x128/apps RENAME companion${APP_NAME_SUFFIX}.png)
|
||||
install(FILES images/linuxicons/256x256/companion.png DESTINATION ${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/256x256/apps RENAME companion${APP_NAME_SUFFIX}.png)
|
||||
install(FILES images/linuxicons/512x512/companion.png DESTINATION ${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/512x512/apps RENAME companion${APP_NAME_SUFFIX}.png)
|
||||
install(FILES images/linuxicons/scalable/companion.svg DESTINATION ${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/scalable/apps RENAME companion${APP_NAME_SUFFIX}.svg)
|
||||
install(FILES ../targets/linux/45-companion-taranis.rules DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/udev/rules.d RENAME 45-companion${APP_NAME_SUFFIX}-taranis.rules)
|
||||
install(FILES ../targets/linux/45-usbasp.rules DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/udev/rules.d RENAME 45-companion${APP_NAME_SUFFIX}-usbasp.rules)
|
||||
|
||||
if (OPENSSL_FOUND)
|
||||
get_filename_component(OPENSSL_SSL_LIBRARY_DIR ${OPENSSL_SSL_LIBRARY} DIRECTORY)
|
||||
# install only files Qt networking requires
|
||||
install(DIRECTORY ${OPENSSL_SSL_LIBRARY_DIR}/ DESTINATION ${CMAKE_INSTALL_PREFIX}/lib FILES_MATCHING PATTERN "engines*" EXCLUDE PATTERN "pkg*" EXCLUDE PATTERN "*.so*")
|
||||
if(LIBSSL1_FOUND)
|
||||
install(DIRECTORY ${LIBSSL1_LIBRARY_DIR}/ DESTINATION ${CMAKE_INSTALL_PREFIX}/lib FILES_MATCHING PATTERN "libcrypto.so.*" PATTERN "libssl.so.*")
|
||||
endif()
|
||||
|
||||
if(LIBUSB1_FOUND)
|
||||
install(DIRECTORY ${LIBUSB1_LIBRARY_DIR}/ DESTINATION ${CMAKE_INSTALL_PREFIX}/lib FILES_MATCHING PATTERN "libusb-1.0.so*")
|
||||
if(DFU_UTIL_FOUND)
|
||||
install(FILES "${DFU_UTIL_PATH}" DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Linux specific code
|
||||
@@ -377,42 +371,67 @@ elseif(WIN32)
|
||||
install(TARGETS ${COMPANION_NAME} DESTINATION ${INSTALL_DESTINATION})
|
||||
install(TARGETS ${SIMULATOR_NAME} DESTINATION ${INSTALL_DESTINATION})
|
||||
install(DIRECTORY ${CMAKE_BINARY_DIR}/plugins/ DESTINATION ${INSTALL_DESTINATION})
|
||||
|
||||
# supporting utilities
|
||||
set(INSTALL_TEMP_FILES dfu-util.exe libusb0.dll libusb-1.0.dll license.txt)
|
||||
foreach(tmpfile ${INSTALL_TEMP_FILES})
|
||||
install(FILES "${COMPANION_SRC_DIRECTORY}/../targets/windows/${tmpfile}" DESTINATION ${INSTALL_DESTINATION})
|
||||
endforeach()
|
||||
if(LIBUSB1_FOUND)
|
||||
if(MINGW)
|
||||
set(LIBUSB1_LIBRARY_DIR "${LIBUSB1_LIBRARY_DIR}/../bin")
|
||||
endif()
|
||||
|
||||
set(LIBUSB1_LIBRARY_FILE "${LIBUSB1_LIBRARY_DIR}/libusb-1.0.dll")
|
||||
|
||||
if(EXISTS "${LIBUSB1_LIBRARY_FILE}")
|
||||
install(FILES "${LIBUSB1_LIBRARY_FILE}" DESTINATION ${INSTALL_DESTINATION})
|
||||
endif()
|
||||
|
||||
if(DFU_UTIL_FOUND)
|
||||
install(FILES "${DFU_UTIL_PATH}" DESTINATION ${INSTALL_DESTINATION})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(OPENSSL_FOUND)
|
||||
if ((OPENSSL_VERSION VERSION_LESS "1.2.0" AND Qt5Core_VERSION VERSION_LESS "6.0.0") OR (OPENSSL_VERSION VERSION_GREATER "3.0.0" AND Qt5Core_VERSION VERSION_GREATER_EQUAL "6.0.0"))
|
||||
get_filename_component(OPENSSL_SSL_LIBRARY_DIR ${OPENSSL_SSL_LIBRARY} DIRECTORY)
|
||||
if(MINGW)
|
||||
# the dlls are stored in the bin directory
|
||||
set(OPENSSL_SSL_LIBRARY_DIR "${OPENSSL_SSL_LIBRARY_DIR}/../bin")
|
||||
endif()
|
||||
if(EXISTS "${OPENSSL_SSL_LIBRARY_DIR}")
|
||||
# install only files Qt networking requires
|
||||
install(DIRECTORY ${OPENSSL_SSL_LIBRARY_DIR}/ DESTINATION ${INSTALL_DESTINATION} FILES_MATCHING PATTERN "libcrypto-*.dll" PATTERN "libssl-*.dll")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(NOT OPENSSL_FOUND OR Qt5Core_VERSION VERSION_LESS "6.0.0")
|
||||
if(MINGW AND $ENV{MSYSTEM} STREQUAL "MINGW32")
|
||||
install(FILES "${COMPANION_SRC_DIRECTORY}/../targets/windows/libcrypto-1_1.dll" DESTINATION ${INSTALL_DESTINATION})
|
||||
install(FILES "${COMPANION_SRC_DIRECTORY}/../targets/windows/libssl-1_1.dll" DESTINATION ${INSTALL_DESTINATION})
|
||||
else()
|
||||
# MINGW64 or assume 64 bit native
|
||||
install(FILES "${COMPANION_SRC_DIRECTORY}/../targets/windows/libcrypto-1_1-x64.dll" DESTINATION ${INSTALL_DESTINATION})
|
||||
install(FILES "${COMPANION_SRC_DIRECTORY}/../targets/windows/libssl-1_1-x64.dll" DESTINATION ${INSTALL_DESTINATION})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
install(FILES "${COMPANION_SRC_DIRECTORY}/../targets/windows/license.txt" DESTINATION ${INSTALL_DESTINATION})
|
||||
|
||||
if(SDL2_FOUND AND DEFINED SDL2_LIB_PATH)
|
||||
install(FILES "${SDL2_LIB_PATH}" DESTINATION ${INSTALL_DESTINATION})
|
||||
endif()
|
||||
|
||||
# Qt dlls (using windeployqt)
|
||||
## Qt translations are already packaged into our custom qrc. Also don't need software rendering engines.
|
||||
set(wdqtopts --no-translations --no-opengl-sw --no-system-d3d-compiler --no-angle)
|
||||
if(CMAKE_BUILD_TYPE STREQUAL "Release")
|
||||
set(wdqtopts ${wdqtopts} --release) # release builds aren't always properly detected with mingw
|
||||
#set(wdqtopts ${wdqtopts} --release) # release builds aren't always properly detected with mingw
|
||||
set(wdqtopts ${wdqtopts} --debug) # workaround for bug in Qt 5.15 windeployqt.exe
|
||||
endif()
|
||||
set(wdqtopts ${wdqtopts} -dir "\"${INSTALL_DESTINATION}\"" "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${COMPANION_NAME}.exe" "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${SIMULATOR_NAME}.exe")
|
||||
list(JOIN wdqtopts " " wdqtopts)
|
||||
|
||||
# Add installer command to execute windeployqt
|
||||
message(STATUS "windeployqt command: ${QT_BIN_DIR}/windeployqt.exe ${wdqtopts}")
|
||||
|
||||
# SDL2 dll
|
||||
if(SDL2_FOUND AND EXISTS "${SDL2_LIBRARY_PATH}/SDL2.dll")
|
||||
set(SDL2_DIR ${SDL2_LIBRARY_PATH}) # this is also used by NSIS installer script
|
||||
install(FILES ${SDL2_DIR}/SDL2.dll DESTINATION ${INSTALL_DESTINATION})
|
||||
elseif(SDL2_FOUND)
|
||||
message(WARNING "Installer: SDL2.dll not found, set SDL2_LIBRARY_PATH manually.")
|
||||
endif()
|
||||
|
||||
if (OPENSSL_FOUND)
|
||||
get_filename_component(OPENSSL_SSL_LIBRARY_DIR ${OPENSSL_SSL_LIBRARY} DIRECTORY)
|
||||
set(OPENSSL_BIN_DIR "${OPENSSL_SSL_LIBRARY_DIR}/../bin")
|
||||
if (EXISTS "${OPENSSL_BIN_DIR}")
|
||||
# install only files Qt networking requires
|
||||
install(DIRECTORY ${OPENSSL_BIN_DIR}/ DESTINATION ${INSTALL_DESTINATION} FILES_MATCHING PATTERN "*.dll")
|
||||
else()
|
||||
message(STATUS "Installer: OpenSSL bin directory not found, dlls not bundled.")
|
||||
endif()
|
||||
endif()
|
||||
endif() # WIN32 install
|
||||
|
||||
############# Packaging ####################
|
||||
@@ -442,7 +461,7 @@ if(WIN32)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set(CPACK_PACKAGE_NAME "companion${C9X_NAME_SUFFIX}")
|
||||
set(CPACK_PACKAGE_NAME "companion${APP_NAME_SUFFIX}")
|
||||
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Models and settings editor for the EdgeTX open source firmware")
|
||||
string(TOLOWER "${CPACK_PACKAGE_NAME}" CPACK_PACKAGE_NAME_LOWERCASE)
|
||||
|
||||
@@ -505,11 +524,18 @@ IF(APPLE)
|
||||
install(FILES ${MAC_ICON_FILE} DESTINATION ${companion_res_dir} COMPONENT Runtime)
|
||||
|
||||
# Copy dfu-util, resolve symlink first
|
||||
get_filename_component(DFU_UTIL_ABSOLUTE_PATH ${DFU_UTIL_PATH} REALPATH)
|
||||
install(PROGRAMS ${DFU_UTIL_ABSOLUTE_PATH} DESTINATION ${companion_res_dir} COMPONENT Runtime)
|
||||
if(DFU_UTIL_FOUND)
|
||||
get_filename_component(DFU_UTIL_ABSOLUTE_PATH ${DFU_UTIL_PATH} REALPATH)
|
||||
install(PROGRAMS ${DFU_UTIL_ABSOLUTE_PATH} DESTINATION ${companion_res_dir} COMPONENT Runtime)
|
||||
|
||||
set(bundle_tools_path "\${CMAKE_INSTALL_PREFIX}/${companion_res_dir}/dfu-util;")
|
||||
set(bundle_tools_path "\${CMAKE_INSTALL_PREFIX}/${companion_res_dir}/dfu-util;")
|
||||
endif()
|
||||
|
||||
if(OPENSSL_FOUND)
|
||||
# Copy openssl, resolve symlink first
|
||||
#get_filename_component(OPENSSL_ABSOLUTE_PATH ${OPENSSL_SSL_LIBRARY} REALPATH)
|
||||
#install(FILES ${OPENSSL_ABSOLUTE_PATH} DESTINATION ${companion_res_dir} COMPONENT Runtime)
|
||||
endif()
|
||||
|
||||
# Include depencies (adding frameworks, fixing the embbeded libraries)
|
||||
# I get write errors without setting BU_CHMOD_BUNDLE_ITEMS even though it is
|
||||
@@ -533,38 +559,55 @@ if(APPLE)
|
||||
set(CPACK_PACKAGE_FILE_NAME "edgetx-${CPACK_PACKAGE_NAME_LOWERCASE}-${VERSION}")
|
||||
endif(APPLE)
|
||||
|
||||
if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
||||
get_filename_component(_qt_bin_dir "${QT_QMAKE_EXECUTABLE}" DIRECTORY)
|
||||
find_program(LINUXDEPLOY_EXECUTABLE linuxdeployqt HINTS "${_qt_bin_dir}")
|
||||
if(LINUX)
|
||||
set(LINUXDEPLOY_APPIMAGE "linuxdeploy-x86_64.AppImage")
|
||||
set(LINUXDEPLOY_PLUGIN_QT "linuxdeploy-plugin-qt-x86_64.AppImage")
|
||||
set(LINUXDEPLOY_URL "https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous")
|
||||
set(LINUXDEPLOY_PLUGIN_QT_URL "https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/continuous")
|
||||
set(LINUXDEPLOY_DIRECTORY "${CMAKE_BINARY_DIR}/linuxdeploy")
|
||||
set(LINUXDEPLOY_APP "${LINUXDEPLOY_DIRECTORY}/usr/bin/linuxdeploy")
|
||||
|
||||
if(NOT LINUXDEPLOY_EXECUTABLE)
|
||||
message(STATUS "linuxdeployqt will be downloaded")
|
||||
if (NOT EXISTS "${LINUXDEPLOY_DIRECTORY}")
|
||||
message(STATUS "Downloading linuxdeploy and plugins...")
|
||||
|
||||
set(LINUXDEPLOY_EXECUTABLE "${CMAKE_BINARY_DIR}/deployqt/AppRun")
|
||||
set(LINUXDEPLOY_URL "https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-x86_64.AppImage")
|
||||
set(LINUXDEPLOY_BUNDLE "${CMAKE_BINARY_DIR}/linuxdeployqt.AppImage")
|
||||
file(DOWNLOAD "${LINUXDEPLOY_URL}/${LINUXDEPLOY_APPIMAGE}" "${CMAKE_BINARY_DIR}/${LINUXDEPLOY_APPIMAGE}")
|
||||
file(DOWNLOAD "${LINUXDEPLOY_PLUGIN_QT_URL}/${LINUXDEPLOY_PLUGIN_QT}" "${CMAKE_BINARY_DIR}/${LINUXDEPLOY_PLUGIN_QT}")
|
||||
|
||||
if (NOT EXISTS "${LINUXDEPLOY_EXECUTABLE}")
|
||||
file(DOWNLOAD "${LINUXDEPLOY_URL}" "${LINUXDEPLOY_BUNDLE}")
|
||||
message(STATUS "Downloading linuxdeploy and plugins finished")
|
||||
|
||||
# for security reasons by default AppImages are prohibited from running in Docker containers
|
||||
# so extract Appimage contents and run as normal apps
|
||||
|
||||
file(GLOB linuxdeployfiles ${CMAKE_BINARY_DIR}/linuxdeploy*.AppImage)
|
||||
|
||||
foreach(file ${linuxdeployfiles})
|
||||
execute_process(
|
||||
COMMAND chmod +x "${LINUXDEPLOY_BUNDLE}"
|
||||
WORKING_DIRECTORY "${CMAKE_BINARY_DIR}")
|
||||
execute_process(
|
||||
COMMAND "${LINUXDEPLOY_BUNDLE}" --appimage-extract
|
||||
COMMAND chmod +x "${file}"
|
||||
WORKING_DIRECTORY "${CMAKE_BINARY_DIR}")
|
||||
|
||||
file(REMOVE_RECURSE "${CMAKE_BINARY_DIR}/deployqt")
|
||||
execute_process(
|
||||
COMMAND mv "${CMAKE_BINARY_DIR}/squashfs-root" deployqt
|
||||
COMMAND "${file}" --appimage-extract
|
||||
WORKING_DIRECTORY "${CMAKE_BINARY_DIR}")
|
||||
file(REMOVE "${LINUXDEPLOY_BUNDLE}")
|
||||
endif()
|
||||
|
||||
file(REMOVE "${file}")
|
||||
endforeach()
|
||||
|
||||
file(REMOVE_RECURSE "${LINUXDEPLOY_DIRECTORY}")
|
||||
|
||||
execute_process(
|
||||
COMMAND mv "${CMAKE_BINARY_DIR}/squashfs-root" "${LINUXDEPLOY_DIRECTORY}"
|
||||
WORKING_DIRECTORY "${CMAKE_BINARY_DIR}")
|
||||
|
||||
# test installation
|
||||
#execute_process(
|
||||
# COMMAND ${LINUXDEPLOY_APP} --list-plugins
|
||||
# WORKING_DIRECTORY "${CMAKE_BINARY_DIR}")
|
||||
endif()
|
||||
|
||||
set(CPACK_PACKAGE_DIRECTORY "${CMAKE_BINARY_DIR}")
|
||||
set(CPACK_GENERATOR "External")
|
||||
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/CPackLinuxDeployQt.cmake.in "${CMAKE_BINARY_DIR}/CPackExternal.cmake" @ONLY)
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/CPackLinuxDeploy.cmake.in "${CMAKE_BINARY_DIR}/CPackExternal.cmake" @ONLY)
|
||||
set(CPACK_EXTERNAL_PACKAGE_SCRIPT "${CMAKE_BINARY_DIR}/CPackExternal.cmake")
|
||||
endif()
|
||||
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
set(APP_DIR "@CPACK_PACKAGE_DIRECTORY@/_CPack_Packages/Linux/External/AppImage")
|
||||
|
||||
execute_process(COMMAND @CMAKE_MAKE_PROGRAM@ DESTDIR=${APP_DIR} install
|
||||
WORKING_DIRECTORY @CMAKE_BINARY_DIR@)
|
||||
|
||||
set(cpn_desktop_file ${APP_DIR}@CMAKE_INSTALL_PREFIX@/share/applications/@COMPANION_NAME@.desktop)
|
||||
#set(icon_file ${APP_DIR}@CMAKE_INSTALL_PREFIX@/share/applications/@COMPANION_NAME@.desktop)
|
||||
|
||||
# This is done by cmake install target
|
||||
# setup Companion application
|
||||
# add -v0 to linuxdeploy for debug info
|
||||
execute_process(COMMAND env NO_APPSTREAM=1 @LINUXDEPLOY_APP@ --appdir ${APP_DIR} -e @COMPANION_NAME@ -d ${cpn_desktop_file} --plugin qt --output appimage
|
||||
WORKING_DIRECTORY @CMAKE_BINARY_DIR@)
|
||||
@@ -1,17 +0,0 @@
|
||||
set(APP_DIR "@CPACK_PACKAGE_DIRECTORY@/_CPack_Packages/Linux/External/AppImage")
|
||||
|
||||
execute_process(COMMAND @CMAKE_MAKE_PROGRAM@ DESTDIR=${APP_DIR} install
|
||||
WORKING_DIRECTORY @CMAKE_BINARY_DIR@)
|
||||
|
||||
file(GLOB simulator_plugins "${APP_DIR}@CMAKE_INSTALL_PREFIX@/lib/@COMPANION_NAME@/*@CMAKE_SHARED_LIBRARY_SUFFIX@")
|
||||
message("Simulator plugins: ${simulator_plugins}")
|
||||
|
||||
if(simulator_plugins)
|
||||
list(TRANSFORM simulator_plugins PREPEND "-executable="
|
||||
OUTPUT_VARIABLE exe_list_cmd)
|
||||
endif()
|
||||
|
||||
message("exe_list_cmd = ${exe_list_cmd}")
|
||||
set(desktop_file ${APP_DIR}@CMAKE_INSTALL_PREFIX@/share/applications/@COMPANION_NAME@.desktop)
|
||||
execute_process(COMMAND env QMAKE=@QT_QMAKE_EXECUTABLE@ @LINUXDEPLOY_EXECUTABLE@ ${desktop_file} -appimage ${exe_list_cmd}
|
||||
WORKING_DIRECTORY @CMAKE_BINARY_DIR@)
|
||||
@@ -93,7 +93,7 @@ void burnConfigDialog::getSettings()
|
||||
dfuLoc = QFileInfo("/usr/bin/dfu-util").absoluteFilePath();
|
||||
#endif
|
||||
|
||||
dfuArgs = g.dfuArguments().split(" ", QString::SkipEmptyParts);
|
||||
dfuArgs = g.dfuArguments().split(" ", Qt::SkipEmptyParts);
|
||||
armMCU = g.armMcu();
|
||||
sambaPort = g.sambaPort();
|
||||
|
||||
@@ -160,7 +160,7 @@ void burnConfigDialog::on_dfu_location_editingFinished()
|
||||
|
||||
void burnConfigDialog::on_dfuArgs_editingFinished()
|
||||
{
|
||||
dfuArgs = ui->dfuArgs->text().split(" ", QString::SkipEmptyParts);
|
||||
dfuArgs = ui->dfuArgs->text().split(" ", Qt::SkipEmptyParts);
|
||||
}
|
||||
|
||||
void burnConfigDialog::on_advCtrChkB_toggled(bool checked)
|
||||
|
||||
@@ -7,4 +7,4 @@ Icon=@COMPANION_NAME@
|
||||
Exec=@COMPANION_NAME@
|
||||
Terminal=false
|
||||
StartupNotify=false
|
||||
Categories=Application;
|
||||
Categories=Utility;
|
||||
|
||||
@@ -155,7 +155,7 @@ void CompareDialog::removeModelBtnClicked()
|
||||
void CompareDialog::on_printButton_clicked()
|
||||
{
|
||||
QPrinter printer;
|
||||
printer.setPageMargins(10.0, 10.0, 10.0, 10.0, printer.Millimeter);
|
||||
printer.setPageMargins(QMarginsF(10.0, 10.0, 10.0, 10.0), QPageLayout::Millimeter);
|
||||
QPrintDialog * dialog = new QPrintDialog(&printer, this);
|
||||
dialog->setWindowTitle(tr("Print Document"));
|
||||
if (dialog->exec() != QDialog::Accepted)
|
||||
@@ -167,9 +167,9 @@ void CompareDialog::on_printFileButton_clicked()
|
||||
{
|
||||
QPrinter printer;
|
||||
QString filename = QFileDialog::getSaveFileName(this, tr("Select PDF output file"), QString(), "Pdf File(*.pdf)");
|
||||
printer.setPageMargins(10.0, 10.0, 10.0, 10.0, printer.Millimeter);
|
||||
printer.setPageMargins(QMarginsF(10.0, 10.0, 10.0, 10.0), QPageLayout::Millimeter);
|
||||
printer.setOutputFormat(QPrinter::PdfFormat);
|
||||
printer.setOrientation(QPrinter::Landscape);
|
||||
printer.setPageOrientation(QPageLayout::Portrait);
|
||||
printer.setColorMode(QPrinter::Color);
|
||||
if (!filename.isEmpty()) {
|
||||
if (QFileInfo(filename).suffix().isEmpty())
|
||||
|
||||
@@ -54,7 +54,7 @@ void Side::markSourceButton()
|
||||
void Side::copyImage( Side side )
|
||||
{
|
||||
if ((*source!=UNDEFINED) && (*side.source!=UNDEFINED))
|
||||
imageLabel->setPixmap(*side.imageLabel->pixmap());
|
||||
imageLabel->setPixmap(side.imageLabel->pixmap(Qt::ReturnByValue));
|
||||
}
|
||||
|
||||
bool Side::displayImage(QString fileName, Source pictSource)
|
||||
@@ -128,7 +128,7 @@ bool Side::saveImage()
|
||||
if (!firmware.hasSplash()) {
|
||||
return false;
|
||||
}
|
||||
QImage image = imageLabel->pixmap()->toImage().scaled(firmware.getSplashWidth(), firmware.getSplashHeight());
|
||||
QImage image = imageLabel->pixmap(Qt::ReturnByValue).toImage().scaled(firmware.getSplashWidth(), firmware.getSplashHeight());
|
||||
if (firmware.setSplash(image) && (firmware.save(*saveToFileName) > 0)) {
|
||||
g.flashDir( QFileInfo(*saveToFileName).dir().absolutePath() );
|
||||
}
|
||||
@@ -137,7 +137,7 @@ bool Side::saveImage()
|
||||
}
|
||||
}
|
||||
else if (*source == PICT) {
|
||||
QImage image = imageLabel->pixmap()->toImage().scaled(imageLabel->width()/2, imageLabel->height()/2).convertToFormat(QImage::Format_Indexed8);
|
||||
QImage image = imageLabel->pixmap(Qt::ReturnByValue).toImage().scaled(imageLabel->width()/2, imageLabel->height()/2).convertToFormat(QImage::Format_Indexed8);
|
||||
if (image.save(*saveToFileName)) {
|
||||
g.imagesDir( QFileInfo(*saveToFileName).dir().absolutePath() );
|
||||
}
|
||||
@@ -146,7 +146,7 @@ bool Side::saveImage()
|
||||
}
|
||||
}
|
||||
else if (*source == PROFILE) {
|
||||
QImage image = imageLabel->pixmap()->toImage().scaled(imageLabel->width()/2, imageLabel->height()/2).convertToFormat(QImage::Format_Indexed8);
|
||||
QImage image = imageLabel->pixmap(Qt::ReturnByValue).toImage().scaled(imageLabel->width()/2, imageLabel->height()/2).convertToFormat(QImage::Format_Indexed8);
|
||||
if (!image.save(*saveToFileName)) {
|
||||
return false;
|
||||
}
|
||||
@@ -280,7 +280,7 @@ void CustomizeSplashDialog::on_leftInvertButton_clicked(){invertButton_clicked(l
|
||||
void CustomizeSplashDialog::on_rightInvertButton_clicked(){invertButton_clicked(right);}
|
||||
void CustomizeSplashDialog::invertButton_clicked(Side side)
|
||||
{
|
||||
QImage image = side.imageLabel->pixmap()->toImage();
|
||||
QImage image = side.imageLabel->pixmap(Qt::ReturnByValue).toImage();
|
||||
image.invertPixels();
|
||||
side.imageLabel->setPixmap(QPixmap::fromImage(image));
|
||||
}
|
||||
|
||||
@@ -104,7 +104,7 @@ static QWidget * folderSelectorWidget(QLineEdit * le, QWidget * parent)
|
||||
l->addWidget(btn);
|
||||
|
||||
QObject::connect(btn, &QToolButton::clicked, [=]() {
|
||||
QString dir = QFileDialog::getExistingDirectory(parent, fsw->property("fileDialogTitle").toString(), le->text(), 0);
|
||||
QString dir = QFileDialog::getExistingDirectory(parent, fsw->property("fileDialogTitle").toString(), le->text());
|
||||
if (!dir.isEmpty()) {
|
||||
le->setText(QDir::toNativeSeparators(dir));
|
||||
le->setFocus();
|
||||
|
||||
@@ -141,7 +141,7 @@ unsigned int Firmware::getVariantNumber()
|
||||
{
|
||||
unsigned int result = 0;
|
||||
const Firmware * base = getFirmwareBase();
|
||||
QStringList options = id.mid(base->getId().length()+1).split("-", QString::SkipEmptyParts);
|
||||
QStringList options = id.mid(base->getId().length()+1).split("-", Qt::SkipEmptyParts);
|
||||
foreach(QString option, options) {
|
||||
foreach(OptionsGroup group, base->opts) {
|
||||
foreach(Option opt, group) {
|
||||
|
||||
@@ -202,14 +202,14 @@ bool OpenTxEepromInterface::loadFromByteArray(T & dest, const QByteArray & data)
|
||||
uint32_t fourcc = *((uint32_t*)&data.data()[0]);
|
||||
if (Boards::getFourCC(board) != fourcc) {
|
||||
if (IS_FAMILY_HORUS_OR_T16(board) && fourcc == 0x3178396F) {
|
||||
qDebug() << QString().sprintf("%s: Deprecated fourcc used %x vs %x", getName(), fourcc, Boards::getFourCC(board));
|
||||
qDebug() << QString("%1: Deprecated fourcc used %2 vs %3").arg(getName()).arg(fourcc).arg(Boards::getFourCC(board));
|
||||
}
|
||||
else {
|
||||
qDebug() << QString().sprintf("%s: Wrong fourcc %x vs %x", getName(), fourcc, Boards::getFourCC(board));
|
||||
qDebug() << QString("%1: Wrong fourcc %2 vs %3").arg(getName()).arg(fourcc).arg(Boards::getFourCC(board));
|
||||
return false;
|
||||
}
|
||||
}
|
||||
qDebug() << QString().sprintf("%s: OK", getName());
|
||||
qDebug() << QString("%1: OK").arg(getName());
|
||||
uint8_t version = data[4];
|
||||
QByteArray raw = data.right(data.size() - 8);
|
||||
return loadFromByteArray<T, M>(dest, raw, version);
|
||||
|
||||
@@ -181,7 +181,7 @@ bool RadioData::renameLabel(QString from, QString to)
|
||||
}
|
||||
if (success) {
|
||||
for(auto& model : models) {
|
||||
QStringList modelLabels = QString(model.labels).split(',',QString::SkipEmptyParts);
|
||||
QStringList modelLabels = QString(model.labels).split(',', Qt::SkipEmptyParts);
|
||||
int ind = modelLabels.indexOf(csvFrom);
|
||||
if (ind != -1) {
|
||||
modelLabels.replace(ind, csvTo);
|
||||
@@ -231,7 +231,7 @@ bool RadioData::addLabelToModel(int index, QString label)
|
||||
char *modelLabelCsv = models[index].labels;
|
||||
// Make sure it will fit
|
||||
if (strlen(modelLabelCsv) + label.size() + 1 < sizeof(models[index].labels)-1) {
|
||||
QStringList modelLabels = QString::fromUtf8(modelLabelCsv).split(',',QString::SkipEmptyParts);
|
||||
QStringList modelLabels = QString::fromUtf8(modelLabelCsv).split(',', Qt::SkipEmptyParts);
|
||||
if (modelLabels.indexOf(label) == -1) {
|
||||
modelLabels.append(label);
|
||||
strcpy(models[index].labels, QString(modelLabels.join(',')).toUtf8().data());
|
||||
@@ -258,7 +258,7 @@ bool RadioData::removeLabelFromModel(int index, QString label)
|
||||
void RadioData::addLabelsFromModels()
|
||||
{
|
||||
for(const auto &model: models) {
|
||||
QStringList labels = QString(model.labels).split(',',QString::SkipEmptyParts);
|
||||
QStringList labels = QString(model.labels).split(',', Qt::SkipEmptyParts);
|
||||
foreach(QString label, labels) {
|
||||
addLabel(label);
|
||||
}
|
||||
@@ -281,7 +281,7 @@ int RadioData::indexOfLabel(QString & label) const
|
||||
|
||||
QStringList RadioData::fromCSV(const QString &csv)
|
||||
{
|
||||
QStringList lbls = QString(csv).split(',',QString::SkipEmptyParts);
|
||||
QStringList lbls = QString(csv).split(',', Qt::SkipEmptyParts);
|
||||
for(QString &label: lbls) {
|
||||
label = unEscapeCSV(label);
|
||||
}
|
||||
|
||||
@@ -227,11 +227,9 @@ void FlashFirmwareDialog::on_burnButton_clicked()
|
||||
|
||||
if (imageSource != FIRMWARE) {
|
||||
// load the splash image
|
||||
const QPixmap * pixmap = ui->splash->pixmap();
|
||||
const QPixmap pixmap = ui->splash->pixmap(Qt::ReturnByValue);
|
||||
QImage image;
|
||||
if (pixmap) {
|
||||
image = pixmap->toImage().scaled(ui->splash->width(), ui->splash->height());
|
||||
}
|
||||
image = pixmap.toImage().scaled(ui->splash->width(), ui->splash->height());
|
||||
if (image.isNull()) {
|
||||
QMessageBox::critical(this, CPN_STR_TTL_WARNING, tr("Splash image not found"));
|
||||
return;
|
||||
|
||||
@@ -264,7 +264,7 @@ void Helpers::populateFileComboBox(QComboBox * b, const QSet<QString> & set, con
|
||||
|
||||
bool added = false;
|
||||
// Convert set into list and sort it alphabetically case insensitive
|
||||
QStringList list = QStringList::fromSet(set);
|
||||
QStringList list(set.begin(), set.end());
|
||||
std::sort(list.begin(), list.end(), caseInsensitiveLessThan);
|
||||
foreach (QString entry, list) {
|
||||
b->addItem(entry);
|
||||
|
||||
@@ -107,7 +107,7 @@ QVariant LabelsModel::data(const QModelIndex &index, int role) const
|
||||
} else if (role == Qt::CheckStateRole) {
|
||||
if (index.column() == 0 && selectedModel >= 0 &&
|
||||
selectedModel < (int)radioData->models.size()) {
|
||||
QStringList modelLabels = QString(radioData->models.at(selectedModel).labels).split(',',QString::SkipEmptyParts);
|
||||
QStringList modelLabels = QString(radioData->models.at(selectedModel).labels).split(',',Qt::SkipEmptyParts);
|
||||
label = RadioData::escapeCSV(label);
|
||||
return modelLabels.indexOf(label)==-1?Qt::Unchecked:Qt::Checked;
|
||||
} else if (index.column() == 0 && selectedModel == -1) {
|
||||
|
||||
@@ -650,7 +650,7 @@ void LogsDialog::saveSession()
|
||||
// save the filtered records to a new file
|
||||
QString newFilename = logFilename;
|
||||
newFilename.append(QString("-Session%1.csv").arg(index));
|
||||
QString filename = QFileDialog::getSaveFileName(this, "Save log", newFilename, "CSV files (.csv);", 0, 0); // getting the filename (full path)
|
||||
QString filename = QFileDialog::getSaveFileName(this, "Save log", newFilename, "CSV files (.csv);"); // getting the filename (full path)
|
||||
QFile data(filename);
|
||||
if(data.open(QFile::WriteOnly |QFile::Truncate)) {
|
||||
QTextStream output(&data);
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
Edge::Edge(Node *sourceNode, Node *destNode)
|
||||
: arrowSize(10)
|
||||
{
|
||||
setAcceptedMouseButtons(0);
|
||||
setAcceptedMouseButtons(Qt::NoButton);
|
||||
source = sourceNode;
|
||||
dest = destNode;
|
||||
source->addEdge(this);
|
||||
@@ -80,7 +80,7 @@ void Edge::adjust()
|
||||
}
|
||||
}
|
||||
|
||||
QRectF Edge::boundingRect() const
|
||||
QRectF Edge::boundingRect() const
|
||||
{
|
||||
if (!source || !dest)
|
||||
return QRectF();
|
||||
|
||||
@@ -275,7 +275,7 @@ void MixerItemViewProxyStyle::drawPrimitive(QStyle::PrimitiveElement element, co
|
||||
{
|
||||
painter->save();
|
||||
if (element == QStyle::PE_IndicatorItemViewItemDrop) {
|
||||
painter->setRenderHint(QPainter::HighQualityAntialiasing, true);
|
||||
painter->setRenderHint(QPainter::Antialiasing, true);
|
||||
// set a wider stroke for the drop indicator
|
||||
QPen pen(painter->pen());
|
||||
pen.setWidthF(2.25f);
|
||||
|
||||
@@ -317,7 +317,7 @@ ModulePanel::ModulePanel(QWidget * parent, ModelData & model, ModuleData & modul
|
||||
connect(ui->multiSubType, static_cast<void(QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this, &ModulePanel::onSubTypeChanged);
|
||||
connect(ui->multiProtocol, static_cast<void(QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this, &ModulePanel::onMultiProtocolChanged);
|
||||
connect(this, &ModulePanel::channelsRangeChanged, this, &ModulePanel::setupFailsafes);
|
||||
connect(ui->btnGrpValueType, static_cast<void(QButtonGroup::*)(int)>(&QButtonGroup::buttonClicked), this, &ModulePanel::onFailsafesDisplayValueTypeChanged);
|
||||
connect(ui->btnGrpValueType, static_cast<void(QButtonGroup::*)(int)>(&QButtonGroup::idClicked), this, &ModulePanel::onFailsafesDisplayValueTypeChanged);
|
||||
connect(ui->rxFreq, static_cast<void(QSpinBox::*)(int)>(&QSpinBox::valueChanged), this, &ModulePanel::onRfFreqChanged);
|
||||
connect(ui->clearRx1, SIGNAL(clicked()), this, SLOT(onClearAccessRxClicked()));
|
||||
connect(ui->clearRx2, SIGNAL(clicked()), this, SLOT(onClearAccessRxClicked()));
|
||||
|
||||
@@ -621,7 +621,7 @@ void ModelsListModel::refresh()
|
||||
}
|
||||
else {
|
||||
current = rootItem->appendChild(i);
|
||||
current->setData(currentColumn++, QString().sprintf("%02d", i + 1));
|
||||
current->setData(currentColumn++, QString().arg(i + 1, 2, 10, QChar('0')));
|
||||
}
|
||||
|
||||
if (!model.isEmpty() && current) {
|
||||
|
||||
@@ -57,7 +57,7 @@ PrintDialog::~PrintDialog()
|
||||
void PrintDialog::on_printButton_clicked()
|
||||
{
|
||||
QPrinter printer;
|
||||
printer.setPageMargins(10.0,10.0,10.0,10.0,printer.Millimeter);
|
||||
printer.setPageMargins(QMarginsF(10.0, 10.0, 10.0, 10.0), QPageLayout::Millimeter);
|
||||
QPrintDialog *dialog = new QPrintDialog(&printer, this);
|
||||
dialog->setWindowTitle(tr("Print Document"));
|
||||
if (dialog->exec() != QDialog::Accepted)
|
||||
@@ -74,7 +74,7 @@ void PrintDialog::on_printFileButton_clicked()
|
||||
fn += ".pdf"; // default
|
||||
if (fn.endsWith(".pdf", Qt::CaseInsensitive)) {
|
||||
QPrinter printer;
|
||||
printer.setPageMargins(10.0,10.0,10.0,10.0,printer.Millimeter);
|
||||
printer.setPageMargins(QMarginsF(10.0, 10.0, 10.0, 10.0), QPageLayout::Millimeter);
|
||||
printer.setOutputFormat(QPrinter::PdfFormat);
|
||||
printer.setColorMode(QPrinter::Color);
|
||||
printer.setOutputFileName(fn);
|
||||
@@ -94,7 +94,7 @@ void PrintDialog::printToFile()
|
||||
printfilename += ".pdf"; // default
|
||||
if (printfilename.endsWith(".pdf", Qt::CaseInsensitive)) {
|
||||
QPrinter printer;
|
||||
printer.setPageMargins(10.0,10.0,10.0,10.0,printer.Millimeter);
|
||||
printer.setPageMargins(QMarginsF(10.0, 10.0, 10.0, 10.0), QPageLayout::Millimeter);
|
||||
printer.setOutputFormat(QPrinter::PdfFormat);
|
||||
printer.setColorMode(QPrinter::Color);
|
||||
printer.setOutputFileName(printfilename);
|
||||
|
||||
@@ -67,10 +67,10 @@ SyncProcess::SyncProcess(const SyncProcess::SyncOptions & options) :
|
||||
m_dirFilters &= ~(QDir::AllDirs);
|
||||
|
||||
if (!m_options.includeFilter.isEmpty() && m_options.includeFilter != "*")
|
||||
m_dirIteratorFilters = m_options.includeFilter.split(',', QString::SkipEmptyParts);
|
||||
m_dirIteratorFilters = m_options.includeFilter.split(',', Qt::SkipEmptyParts);
|
||||
|
||||
if (!m_options.excludeFilter.isEmpty()) {
|
||||
for (const QString & f : m_options.excludeFilter.split(',', QString::SkipEmptyParts))
|
||||
for (const QString & f : m_options.excludeFilter.split(',', Qt::SkipEmptyParts))
|
||||
m_excludeFilters.append(QRegExp(f, ((m_dirFilters & QDir::CaseSensitive) ? Qt::CaseSensitive : Qt::CaseInsensitive), FILTER_RE_SYNTX));
|
||||
}
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>555</width>
|
||||
<width>726</width>
|
||||
<height>733</height>
|
||||
</rect>
|
||||
</property>
|
||||
@@ -121,7 +121,7 @@ To <b>remove a remembered entry</b> from the filter list, first cho
|
||||
<enum>QComboBox::InsertAtTop</enum>
|
||||
</property>
|
||||
<property name="sizeAdjustPolicy">
|
||||
<enum>QComboBox::AdjustToMinimumContentsLength</enum>
|
||||
<enum>QComboBox::AdjustToContents</enum>
|
||||
</property>
|
||||
<property name="minimumContentsLength">
|
||||
<number>1</number>
|
||||
|
||||
@@ -230,7 +230,7 @@ void RadioOutputsWidget::setupGVarsDisplay()
|
||||
}
|
||||
QHash<int, QLabel *> fmMap;
|
||||
for (int gv=0; gv < gvars; gv++) {
|
||||
bgrole = ((gv % 2) ? QPalette::Background : QPalette::AlternateBase);
|
||||
bgrole = ((gv % 2) ? QPalette::Window : QPalette::AlternateBase);
|
||||
QLabel * label = new QLabel(gvarsWidget);
|
||||
label->setText(QString(tr("GV%1")).arg(gv+1));
|
||||
label->setAutoFillBackground(true);
|
||||
@@ -335,7 +335,7 @@ void RadioOutputsWidget::onVirtSwValueChange(quint8 index, qint32 value)
|
||||
return;
|
||||
|
||||
QLabel * ls = m_logicSwitchMap.value(index);
|
||||
ls->setBackgroundRole(value ? QPalette::Dark : QPalette::Background);
|
||||
ls->setBackgroundRole(value ? QPalette::Dark : QPalette::Window);
|
||||
ls->setForegroundRole(value ? QPalette::BrightText : QPalette::WindowText);
|
||||
ls->setFrameShadow(value ? QFrame::Sunken : QFrame::Raised);
|
||||
QFont font = ls->font();
|
||||
@@ -381,7 +381,7 @@ void RadioOutputsWidget::onPhaseChanged(qint32 phase, const QString &)
|
||||
}
|
||||
else {
|
||||
fgrole = QPalette::WindowText;
|
||||
bgrole = ((gv.key() % 2) ? QPalette::Background : QPalette::AlternateBase);
|
||||
bgrole = ((gv.key() % 2) ? QPalette::Window : QPalette::AlternateBase);
|
||||
font.setBold(false);
|
||||
}
|
||||
lbl->setForegroundRole(fgrole);
|
||||
|
||||
@@ -148,7 +148,7 @@ void SimulatedUIWidget::captureScreenshot()
|
||||
path = "./";
|
||||
QDir dir(path);
|
||||
if (dir.exists() && dir.isReadable()) {
|
||||
QStringList fwid = getCurrentFirmware()->getId().split("-", QString::SkipEmptyParts);
|
||||
QStringList fwid = getCurrentFirmware()->getId().split("-", Qt::SkipEmptyParts);
|
||||
QString flavor = fwid.at(qMin(1, fwid.size()));
|
||||
QString fnpfx = tr("screenshot", "Simulator LCD screenshot file name prefix");
|
||||
fileName = "%1/%2_%3_%4.png";
|
||||
@@ -173,7 +173,7 @@ void SimulatedUIWidget::wheelEvent(QWheelEvent * event)
|
||||
|
||||
void SimulatedUIWidget::mousePressEvent(QMouseEvent * event)
|
||||
{
|
||||
if (event->button() == Qt::MidButton && m_mouseMidClickAction)
|
||||
if (event->button() == Qt::MiddleButton && m_mouseMidClickAction)
|
||||
m_mouseMidClickAction->trigger(true);
|
||||
else
|
||||
event->ignore();
|
||||
@@ -181,7 +181,7 @@ void SimulatedUIWidget::mousePressEvent(QMouseEvent * event)
|
||||
|
||||
void SimulatedUIWidget::mouseReleaseEvent(QMouseEvent * event)
|
||||
{
|
||||
if (event->button() == Qt::MidButton && m_mouseMidClickAction)
|
||||
if (event->button() == Qt::MiddleButton && m_mouseMidClickAction)
|
||||
m_mouseMidClickAction->trigger(false);
|
||||
else
|
||||
event->ignore();
|
||||
|
||||
@@ -72,7 +72,7 @@ class ButtonsWidget : public QWidget
|
||||
|
||||
void onMouseButtonEvent(bool press, QMouseEvent * event)
|
||||
{
|
||||
if (!(event->button() & (Qt::LeftButton | Qt::MidButton))) {
|
||||
if (!(event->button() & (Qt::LeftButton | Qt::MiddleButton))) {
|
||||
event->ignore();
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -237,6 +237,6 @@ QDebug operator << (QDebug d, const RadioWidget::RadioWidgetState & o)
|
||||
{
|
||||
QDebugStateSaver saver(d);
|
||||
d << "RadioWidget::RadioWidgetState: type=" << o.type << "; index=" << o.index
|
||||
<< "; value=" << o.value << "; flags=0x" << hex << o.flags;
|
||||
<< "; value=" << o.value << "; flags=0x" << Qt::hex << o.flags;
|
||||
return d;
|
||||
}
|
||||
|
||||
@@ -51,9 +51,9 @@ void showMessage(const QString & message, enum QMessageBox::Icon icon = QMessage
|
||||
{
|
||||
if (useConsole) {
|
||||
if (icon < QMessageBox::Warning)
|
||||
QTextStream(stdout) << message << endl;
|
||||
QTextStream(stdout) << message << Qt::endl;
|
||||
else
|
||||
QTextStream(stderr) << message << endl;
|
||||
QTextStream(stderr) << message << Qt::endl;
|
||||
|
||||
return;
|
||||
}
|
||||
@@ -70,16 +70,16 @@ const QString sharedHelpText()
|
||||
QString ret;
|
||||
QTextStream stream(&ret);
|
||||
// list all available profiles
|
||||
stream << endl << QApplication::translate("SimulatorMain", "Available profiles:") << endl;
|
||||
stream << Qt::endl << QApplication::translate("SimulatorMain", "Available profiles:") << Qt::endl;
|
||||
QMapIterator<int, QString> pi(g.getActiveProfiles());
|
||||
while (pi.hasNext()) {
|
||||
pi.next();
|
||||
stream << "\t" << QApplication::translate("SimulatorMain", "ID: ") << pi.key() << "; " << QApplication::translate("SimulatorMain", "Name: ") << pi.value() << endl;
|
||||
stream << "\t" << QApplication::translate("SimulatorMain", "ID: ") << pi.key() << "; " << QApplication::translate("SimulatorMain", "Name: ") << pi.value() << Qt::endl;
|
||||
}
|
||||
// list all available radios
|
||||
stream << endl << QApplication::translate("SimulatorMain", "Available radios:") << endl;
|
||||
stream << Qt::endl << QApplication::translate("SimulatorMain", "Available radios:") << Qt::endl;
|
||||
foreach(QString name, SimulatorLoader::getAvailableSimulators()) {
|
||||
stream << "\t" << name << endl;
|
||||
stream << "\t" << name << Qt::endl;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -7,4 +7,4 @@ Icon=@COMPANION_NAME@
|
||||
Exec=@SIMULATOR_NAME@
|
||||
Terminal=false
|
||||
StartupNotify=false
|
||||
Categories=Application;
|
||||
Categories=Utility;
|
||||
|
||||
@@ -213,7 +213,7 @@ QString FirmwareInterface::seekString(const QString & string)
|
||||
{
|
||||
QString result = "";
|
||||
|
||||
int start = flash.indexOf(string);
|
||||
int start = flash.indexOf(string.toUtf8());
|
||||
if (start > 0) {
|
||||
start += string.length();
|
||||
int end = -1;
|
||||
|
||||
@@ -92,7 +92,7 @@ bool LabelsStorageFormat::loadBin(RadioData & radioData)
|
||||
}
|
||||
|
||||
// determine if we have a model number
|
||||
QStringList parts = line.split(QRegExp("\\s+"), QString::SkipEmptyParts);
|
||||
QStringList parts = line.split(QRegExp("\\s+"), Qt::SkipEmptyParts);
|
||||
if (parts.size() == 2) {
|
||||
// parse model number
|
||||
int modelNumber = parts[0].toInt();
|
||||
|
||||
@@ -142,7 +142,7 @@ bool UpdateCompanion::asyncInstall()
|
||||
}
|
||||
|
||||
if (QMessageBox::question(status()->progress(), CPN_STR_APP_NAME, "Restart Companion?", QMessageBox::Yes | QMessageBox::No) == QMessageBox::Yes) {
|
||||
QProcess::startDetached(fileName);
|
||||
QProcess::startDetached(fileName, QStringList());
|
||||
qApp->exit();
|
||||
}
|
||||
|
||||
|
||||
@@ -154,7 +154,7 @@ void UpdateNetwork::download(const DownloadDataType type, const QString & urlStr
|
||||
|
||||
m_reply = m_manager.get(m_request);
|
||||
|
||||
connect(m_reply, QOverload<QNetworkReply::NetworkError>::of(&QNetworkReply::error), [=] (QNetworkReply::NetworkError code) {
|
||||
connect(m_reply, QOverload<QNetworkReply::NetworkError>::of(&QNetworkReply::errorOccurred), [=] (QNetworkReply::NetworkError code) {
|
||||
// leave it to the finished slot to deal with error condition
|
||||
m_status->criticalMsg(tr("Network error has occurred. Error code: %1").arg(code));
|
||||
});
|
||||
|
||||
@@ -128,7 +128,7 @@ Section "EdgeTX Companion @VERSION_FAMILY@" SecDummy
|
||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\EdgeTX Companion @VERSION_FAMILY@" "UninstallString" "$\"$INSTDIR\Uninstall.exe$\""
|
||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\EdgeTX Companion @VERSION_FAMILY@" "DisplayIcon" "$\"$INSTDIR\companion.exe$\""
|
||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\EdgeTX Companion @VERSION_FAMILY@" "Publisher" "EdgeTX"
|
||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\EdgeTX Companion @VERSION_FAMILY@" "URLInfoAbout" "https://www.open-tx.org"
|
||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\EdgeTX Companion @VERSION_FAMILY@" "URLInfoAbout" "https://www.edgetx.org"
|
||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\EdgeTX Companion @VERSION_FAMILY@" "QuietUninstallString" "$\"$INSTDIR\Uninstall.exe$\" /S"
|
||||
|
||||
!insertmacro MUI_STARTMENU_WRITE_BEGIN Application
|
||||
@@ -195,8 +195,10 @@ Section "un.EdgeTX Companion @VERSION_FAMILY@"
|
||||
Delete "$INSTDIR\libusb0.dll"
|
||||
Delete "$INSTDIR\libusb-1.0.dll"
|
||||
; OpenSSL libs
|
||||
Delete "$INSTDIR\libeay32.dll"
|
||||
Delete "$INSTDIR\ssleay32.dll"
|
||||
Delete "$INSTDIR\libssl-1_1.dll"
|
||||
Delete "$INSTDIR\libssl-1_1-x64.dll"
|
||||
Delete "$INSTDIR\libcrypto-1_1.dll"
|
||||
Delete "$INSTDIR\libcrypto-1_1-x64.dll"
|
||||
; MinGW libs
|
||||
Delete "$INSTDIR\libgcc_s_dw2-1.dll"
|
||||
Delete "$INSTDIR\libgcc_s_seh-1.dll"
|
||||
|
||||
Binary file not shown.
BIN
Binary file not shown.
Executable
BIN
Binary file not shown.
Executable
BIN
Binary file not shown.
Executable
BIN
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -32,7 +32,7 @@ OUTDIR=$2
|
||||
|
||||
COMMON_OPTIONS="-DGVARS=YES -DHELI=YES -DLUA=YES -Wno-dev -DCMAKE_BUILD_TYPE=Release"
|
||||
if [ "$(uname)" = "Darwin" ]; then
|
||||
COMMON_OPTIONS="${COMMON_OPTIONS} -DCMAKE_OSX_DEPLOYMENT_TARGET='10.9'"
|
||||
COMMON_OPTIONS="${COMMON_OPTIONS} -DCMAKE_OSX_DEPLOYMENT_TARGET='10.15'"
|
||||
elif [ "$(uname)" != "Linux" ]; then # Assume Windows and MSYS2
|
||||
if [ "${MSYSTEM,,}" == "mingw32" ]; then # MSYS 32bit detected
|
||||
COMMON_OPTIONS="${COMMON_OPTIONS} -DSDL2_LIBRARY_PATH=/mingw32/bin/"
|
||||
|
||||
Reference in New Issue
Block a user