diff --git a/CMakeLists.txt b/CMakeLists.txt index 94d1e3aab..cc97ec924 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -40,6 +40,17 @@ set (CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PROJECT_SOURCE_DIR}/CMake/Modules) include (${PROJECT_SOURCE_DIR}/CMake/VersionCompute.cmake) +# make sure that the default configuration is a RELEASE +if (NOT CMAKE_BUILD_TYPE) + set (CMAKE_BUILD_TYPE RELEASE CACHE STRING + "Choose the type of build, options are: None Debug Release." + FORCE) +endif (NOT CMAKE_BUILD_TYPE) +if (CMAKE_BUILD_TYPE MATCHES "[Dd][Ee][Bb][Uu][Gg]") + set (is_debug_build 1) +endif () + + # # Options & features # @@ -47,6 +58,8 @@ include (${PROJECT_SOURCE_DIR}/CMake/VersionCompute.cmake) # wsjtx_config.h.in which makes them available to the C/C++ # pre-processor. # +include (CMakeDependentOption) + option (UPDATE_TRANSLATIONS "Update source translation translations/*.ts files (WARNING: make clean will delete the source .ts files! Danger!)") option (WSJT_SHARED_RUNTIME "Debugging option that allows running from a shared Cloud directory.") @@ -59,6 +72,10 @@ option (WSJT_STANDARD_FILE_LOCATIONS "All non-installation files located in \"St option (WSJT_SOFT_KEYING "Apply a ramp to CW keying envelope to reduce transients." ON) option (WSJT_SKIP_MANPAGES "Skip *nix manpage generation") +CMAKE_DEPENDENT_OPTION (WSJT_ENABLE_EXPERIMENTAL_FEATURES "Enable features not fully ready for public releases." ON + "is_debug_build" OFF) + + # # install locations # @@ -347,13 +364,6 @@ if (POLICY CMP0020) cmake_policy (SET CMP0020 NEW) # link to Qt winmain on Windows endif (POLICY CMP0020) -# make sure that the default is a RELEASE -if (NOT CMAKE_BUILD_TYPE) - set (CMAKE_BUILD_TYPE RELEASE CACHE STRING - "Choose the type of build, options are: None Debug Release." - FORCE) -endif (NOT CMAKE_BUILD_TYPE) - # # decide on platform specifc packing and fixing up @@ -729,7 +739,7 @@ endif (NOT WIN32 AND NOT APPLE) # # bundle fixup only done in Release or MinSizeRel configurations # -if (NOT CMAKE_BUILD_TYPE STREQUAL "Debug") +if (NOT is_debug_build) # get_target_property (QtCore_location Qt5::Core LOCATION) # get_filename_component (QtCore_location ${QtCore_location} PATH) @@ -857,7 +867,7 @@ file (APPEND \"\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/${WSJT_QT_CONF_DESTINATION ) endif (APPLE OR WIN32) -endif (NOT CMAKE_BUILD_TYPE STREQUAL "Debug") +endif (NOT is_debug_build) # diff --git a/Configuration.cpp b/Configuration.cpp index 76be13ffe..3100c0e02 100644 --- a/Configuration.cpp +++ b/Configuration.cpp @@ -793,6 +793,10 @@ Configuration::impl::impl (Configuration * self, QString const& instance_key, QS initialise_models (); transceiver_thread_.start (); + +#if !WSJT_ENABLE_EXPERIMENTAL_FEATURES + ui_->jt9w_group_box->setEnabled (false); +#endif } Configuration::impl::~impl () diff --git a/Configuration.ui b/Configuration.ui index 6b315acf1..d214ff65a 100644 --- a/Configuration.ui +++ b/Configuration.ui @@ -6,10 +6,16 @@ 0 0 - 586 - 550 + 508 + 471 + + + 508 + 471 + + Configuration @@ -1815,12 +1821,12 @@ soundcard changes - - - - - + + + + + diff --git a/mainwindow.cpp b/mainwindow.cpp index 5ee0d3187..a2aae7de3 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -414,6 +414,10 @@ MainWindow::MainWindow(bool multiple, QSettings * settings, QSharedMemory *shdme m_config.transceiver_online (true); qsy (m_lastMonitoredFrequency); monitor (!m_config.monitor_off_at_startup ()); + +#if !WSJT_ENABLE_EXPERIMENTAL_FEATURES + ui->actionJT9W_1->setEnabled (false); +#endif } //--------------------------------------------------- MainWindow destructor diff --git a/wsjtx_config.h.in b/wsjtx_config.h.in index 0d2769b57..f905727e9 100644 --- a/wsjtx_config.h.in +++ b/wsjtx_config.h.in @@ -24,6 +24,7 @@ #cmakedefine01 WSJT_HAMLIB_TRACE #cmakedefine01 WSJT_STANDARD_FILE_LOCATIONS #cmakedefine01 WSJT_SOFT_KEYING +#cmakedefine01 WSJT_ENABLE_EXPERIMENTAL_FEATURES #define WSJTX_STRINGIZE1(x) #x #define WSJTX_STRINGIZE(x) WSJTX_STRINGIZE1(x)