From fdbd8dbc87cf5b4bf174e9af3e48ba02df77d2c6 Mon Sep 17 00:00:00 2001 From: Julien Wadel Date: Wed, 24 Apr 2024 11:41:32 +0200 Subject: [PATCH] Set application name and version. Update SDK. --- Linphone/CMakeLists.txt | 8 +++- Linphone/application_info.cmake | 1 + Linphone/core/App.cpp | 5 ++ Linphone/data/config/linphonerc-factory | 62 +++++++++++++++++++++++++ cmake/install/install.cmake | 2 +- external/linphone-sdk | 2 +- 6 files changed, 76 insertions(+), 4 deletions(-) create mode 100644 Linphone/data/config/linphonerc-factory diff --git a/Linphone/CMakeLists.txt b/Linphone/CMakeLists.txt index 10e8e6743..fd2a70d52 100644 --- a/Linphone/CMakeLists.txt +++ b/Linphone/CMakeLists.txt @@ -1,11 +1,11 @@ cmake_minimum_required(VERSION 3.16) -project(Linphone VERSION 0.1 LANGUAGES CXX) +project(Linphone VERSION 6.0 LANGUAGES CXX) ################################################################ # PACKAGES ################################################################ -set(LINPHONE_PACKAGES LinphoneCxx) +set(LINPHONE_PACKAGES LinphoneCxx BCToolbox) list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/Modules") foreach(PACKAGE ${LINPHONE_PACKAGES}) message(STATUS "Trying to find ${PACKAGE}") @@ -38,6 +38,10 @@ set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -DNDEBUG -DQT_NO_DEBUG") set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -DQT_QML_DEBUG -DQT_DECLARATIVE_DEBUG") set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DDEBUG -DQT_QML_DEBUG -DQT_DECLARATIVE_DEBUG" ) set(CMAKE_INCLUDE_CURRENT_DIR ON)#useful for config.h + +if(NOT LINPHONEAPP_VERSION) + bc_compute_full_version(LINPHONEAPP_VERSION) +endif() include(application_info.cmake) diff --git a/Linphone/application_info.cmake b/Linphone/application_info.cmake index 89f70bd0a..537300013 100644 --- a/Linphone/application_info.cmake +++ b/Linphone/application_info.cmake @@ -6,5 +6,6 @@ set(APPLICATION_VENDOR "Belledonne Communications") set(APPLICATION_LICENCE "GNU General Public License V3") set(APPLICATION_LICENCE_URL "https://www.gnu.org/licenses/gpl-3.0.html") set(APPLICATION_START_LICENCE "2010") +set(APPLICATION_SEMVER ${LINPHONEAPP_VERSION}) set(EXECUTABLE_NAME linphone60) diff --git a/Linphone/core/App.cpp b/Linphone/core/App.cpp index ccec73af4..e7aa69d44 100644 --- a/Linphone/core/App.cpp +++ b/Linphone/core/App.cpp @@ -75,6 +75,11 @@ DEFINE_ABSTRACT_OBJECT(App) App::App(int &argc, char *argv[]) : SingleApplication(argc, argv, true, Mode::User | Mode::ExcludeAppPath | Mode::ExcludeAppVersion) { + // Do not use APPLICATION_NAME here. + // The EXECUTABLE_NAME will be used in qt standard paths. It's our goal. + QCoreApplication::setApplicationName(EXECUTABLE_NAME); + QApplication::setOrganizationDomain(EXECUTABLE_NAME); + QCoreApplication::setApplicationVersion(APPLICATION_SEMVER); // If not OpenGL, createRender is never call. QQuickWindow::setGraphicsApi(QSGRendererInterface::OpenGL); // Ignore vertical sync. This way, we avoid blinking on resizes(and other refresh like layouts etc.). diff --git a/Linphone/data/config/linphonerc-factory b/Linphone/data/config/linphonerc-factory new file mode 100644 index 000000000..c567927d3 --- /dev/null +++ b/Linphone/data/config/linphonerc-factory @@ -0,0 +1,62 @@ +[account_creator] +backend=1 +# 1 means FlexiAPI, 0 is XMLRPC +url=https://subscribe.linphone.org/api/ +# replace above URL by https://staging-subscribe.linphone.org/api/ for testing + +[alerts] +alerts_enabled=1 + +[app] +activation_code_length=4 +prefer_basic_chat_room=1 +record_aware=1 + +[assistant] +algorithm=SHA-256 +password_min_length=6 +username_regex=^[a-z0-9+_.\-]*$ + +[lime] +lime_update_threshold=86400 + +[misc] +#log_collection_upload_server_url=https://www.linphone.org:444/lft.php +aggregate_imdn=1 +enable_basic_to_client_group_chat_room_migration=0 +enable_simple_group_chat_message_state=0 +notify_each_friend_individually_when_presence_received=0 + +[net] +force_ice_disablement=0 +mtu=1300 + +[rtp] +accept_any_encryption=1 + +[sip] +auto_answer_replacing_calls=1 +auto_net_state_mon=1 +chat_messages_aggregation=1 +chat_messages_aggregation_delay=1000 +guess_hostname=1 +ping_with_options=0 +register_only_when_network_is_up=1 +rls_uri=sips:rls@sip.linphone.org +update_presence_model_timestamp_before_publish_expires_refresh=1 +use_cpim=1 +zrtp_key_agreements_suites=MS_ZRTP_KEY_AGREEMENT_K255_KYB512 + +[sound] +disable_ringing=1 +#remove this property for any application that is not Linphone public version itself +ec_calibrator_cool_tones=1 +ec_filter=MSWebRTCAEC + +[ui] +assistant_supports_phone_numbers/readonly=0 +use_qrcode=0 + +[video] +auto_resize_preview_to_keep_ratio=1 +max_conference_size=vga diff --git a/cmake/install/install.cmake b/cmake/install/install.cmake index 4892dbbfd..5838d049b 100644 --- a/cmake/install/install.cmake +++ b/cmake/install/install.cmake @@ -50,6 +50,7 @@ install(TARGETS ${TARGET_NAME} if(ENABLE_APP_PACKAGE_ROOTCA) install(FILES "${LINPHONE_OUTPUT_DIR}/share/linphone/rootca.pem" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/${EXECUTABLE_NAME}") endif() +install(FILES "${CMAKE_SOURCE_DIR}/Linphone/data/config/linphonerc-factory" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/${EXECUTABLE_NAME}") set(LINPHONE_QML_DIR "${CMAKE_SOURCE_DIR}/Linphone/view") set(QT_PATH "${Qt6Core_DIR}/../../..") @@ -75,7 +76,6 @@ if(APPLE) endif() install(FILES ${SHARED_LIBRARIES} DESTINATION "${CMAKE_INSTALL_LIBDIR}") install(DIRECTORY "${LINPHONE_OUTPUT_DIR}/${CMAKE_INSTALL_DATAROOTDIR}/images" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}" USE_SOURCE_PERMISSIONS OPTIONAL) - #install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/../../assets/linphonerc-factory" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/${EXECUTABLE_NAME}") file(GLOB SHARED_LIBRARIES "${CMAKE_BINARY_DIR}/cmake/install/macos/${APPLICATION_NAME}.app/Contents/Frameworks/lib*.dylib") diff --git a/external/linphone-sdk b/external/linphone-sdk index 6c146121c..c07748c06 160000 --- a/external/linphone-sdk +++ b/external/linphone-sdk @@ -1 +1 @@ -Subproject commit 6c146121c0c717c566e5c1ba3aa1a5167df5732f +Subproject commit c07748c0683510f0c6267e29f83085a144cf9385