Windows: fix versions, executable name, icons, folder installation

Fix a crash coming from Notifier (Component was not set/used on the correct indexes)
Fix reg_routes for Linphones accounts.
Update SDK
This commit is contained in:
Julien Wadel 2024-09-24 17:54:54 +02:00
parent b5bac4bff6
commit ceccc36a4c
9 changed files with 37 additions and 22 deletions

View file

@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 3.16) cmake_minimum_required(VERSION 3.16)
project(Linphone VERSION 6.0 LANGUAGES CXX) project(Linphone VERSION 6.0.0 LANGUAGES CXX)
################################################################ ################################################################
# PACKAGES # PACKAGES
@ -52,6 +52,13 @@ set(CMAKE_INCLUDE_CURRENT_DIR ON)#useful for config.h
if(NOT LINPHONEAPP_VERSION) if(NOT LINPHONEAPP_VERSION)
bc_compute_full_version(LINPHONEAPP_VERSION) bc_compute_full_version(LINPHONEAPP_VERSION)
endif() endif()
set(LINPHONE_MAJOR_VERSION)
set(LINPHONE_MINOR_VERSION)
set(LINPHONE_MICRO_VERSION)
set(LINPHONE_BRANCH_VERSION)
bc_parse_full_version(${LINPHONEAPP_VERSION} LINPHONE_MAJOR_VERSION LINPHONE_MINOR_VERSION LINPHONE_MICRO_VERSION LINPHONE_BRANCH_VERSION)
include(application_info.cmake) include(application_info.cmake)
string(TIMESTAMP CURRENT_YEAR "%Y") string(TIMESTAMP CURRENT_YEAR "%Y")
if(NOT APPLICATION_START_LICENCE OR "${CURRENT_YEAR}" STREQUAL "${APPLICATION_START_LICENCE}") if(NOT APPLICATION_START_LICENCE OR "${CURRENT_YEAR}" STREQUAL "${APPLICATION_START_LICENCE}")
@ -98,6 +105,12 @@ add_subdirectory(model)
add_subdirectory(view) add_subdirectory(view)
add_subdirectory(core) add_subdirectory(core)
# set application details
if(WIN32)
configure_file("${CMAKE_SOURCE_DIR}/cmake/install/windows/appDetailsWindows.rc.in" "${CMAKE_CURRENT_BINARY_DIR}/appDetailsWindows.rc")
set(_APPDETAILS_RC_FILE ${CMAKE_CURRENT_BINARY_DIR}/appDetailsWindows.rc)
endif()
#fonts.qrc is in data and not in data/font because we want to use 'font' in path and not in prefix. #fonts.qrc is in data and not in data/font because we want to use 'font' in path and not in prefix.
#TODO make prefix working #TODO make prefix working
set(_LINPHONEAPP_FONTS_FILES) set(_LINPHONEAPP_FONTS_FILES)
@ -110,6 +123,7 @@ set_property(SOURCE data/fonts.qrc PROPERTY SKIP_AUTORCC ON)
qt6_add_executable(Linphone qt6_add_executable(Linphone
${_LINPHONEAPP_SOURCES} ${_LINPHONEAPP_SOURCES}
${_LINPHONEAPP_FONTS_FILES} ${_LINPHONEAPP_FONTS_FILES}
${_APPDETAILS_RC_FILE}
) )
set_source_files_properties(${_LINPHONEAPP_QML_SINGLETONS} PROPERTIES QT_QML_SINGLETON_TYPE TRUE) set_source_files_properties(${_LINPHONEAPP_QML_SINGLETONS} PROPERTIES QT_QML_SINGLETON_TYPE TRUE)

View file

@ -1,6 +1,6 @@
set(APPLICATION_DESCRIPTION "A libre SIP client") set(APPLICATION_DESCRIPTION "A libre SIP client")
set(APPLICATION_ID "com.belledonnecommunications.linphone60") set(APPLICATION_ID "com.belledonnecommunications.linphone60")
set(APPLICATION_NAME Linphone60) set(APPLICATION_NAME Linphone6)
set(APPLICATION_URL "https://www.linphone.org") set(APPLICATION_URL "https://www.linphone.org")
set(APPLICATION_VENDOR "Belledonne Communications") set(APPLICATION_VENDOR "Belledonne Communications")
set(APPLICATION_LICENCE "GNU General Public License V3") set(APPLICATION_LICENCE "GNU General Public License V3")
@ -8,4 +8,4 @@ set(APPLICATION_LICENCE_URL "https://www.gnu.org/licenses/gpl-3.0.html")
set(APPLICATION_START_LICENCE "2010") set(APPLICATION_START_LICENCE "2010")
set(APPLICATION_SEMVER ${LINPHONEAPP_VERSION}) set(APPLICATION_SEMVER ${LINPHONEAPP_VERSION})
set(EXECUTABLE_NAME linphone60) set(EXECUTABLE_NAME linphone6)

View file

@ -98,7 +98,7 @@ const QHash<int, Notifier::Notification> Notifier::Notifications = {
Notifier::Notifier(QObject *parent) : QObject(parent) { Notifier::Notifier(QObject *parent) : QObject(parent) {
mustBeInMainThread(getClassName()); mustBeInMainThread(getClassName());
const int nComponents = Notifications.size(); const int nComponents = Notifications.size();
mComponents = new QQmlComponent *[nComponents]; mComponents.resize(nComponents);
QQmlEngine *engine = App::getInstance()->mEngine; QQmlEngine *engine = App::getInstance()->mEngine;
for (const auto &key : Notifications.keys()) { for (const auto &key : Notifications.keys()) {
@ -120,10 +120,7 @@ Notifier::~Notifier() {
delete mMutex; delete mMutex;
const int nComponents = Notifications.size(); const int nComponents = Notifications.size();
if (mComponents) { mComponents.clear();
delete[] mComponents;
mComponents = nullptr;
}
} }
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------

View file

@ -41,12 +41,12 @@ public:
~Notifier(); ~Notifier();
enum NotificationType { enum NotificationType {
ReceivedMessage, //ReceivedMessage,
ReceivedFileMessage, //ReceivedFileMessage,
ReceivedCall, ReceivedCall,
NewVersionAvailable, //NewVersionAvailable,
SnapshotWasTaken, //SnapshotWasTaken,
RecordingCompleted //RecordingCompleted
}; };
// void notifyReceivedCall(Call *call); // void notifyReceivedCall(Call *call);
@ -95,7 +95,8 @@ private:
int mInstancesNumber = 0; int mInstancesNumber = 0;
QMutex *mMutex = nullptr; QMutex *mMutex = nullptr;
QQmlComponent **mComponents = nullptr; //QQmlComponent **mComponents = nullptr;
QVector<QQmlComponent *> mComponents;
static const QHash<int, Notification> Notifications; static const QHash<int, Notification> Notifications;

View file

@ -14,6 +14,7 @@
<entry name="reg_expires" overwrite="true">600</entry> <entry name="reg_expires" overwrite="true">600</entry>
<entry name="reg_identity" overwrite="true">sip:?@sip.linphone.org</entry> <entry name="reg_identity" overwrite="true">sip:?@sip.linphone.org</entry>
<entry name="reg_proxy" overwrite="true">&lt;sip:sip.linphone.org;transport=tls&gt;</entry> <entry name="reg_proxy" overwrite="true">&lt;sip:sip.linphone.org;transport=tls&gt;</entry>
<entry name="reg_route" overwrite="true">&lt;sip:sip.linphone.org;transport=tls&gt;</entry>
<entry name="reg_sendregister" overwrite="true">1</entry> <entry name="reg_sendregister" overwrite="true">1</entry>
<entry name="nat_policy_ref" overwrite="true">default_nat_policy_values</entry> <entry name="nat_policy_ref" overwrite="true">default_nat_policy_values</entry>
<entry name="realm" overwrite="true">sip.linphone.org</entry> <entry name="realm" overwrite="true">sip.linphone.org</entry>

View file

@ -14,6 +14,7 @@
<entry name="reg_expires" overwrite="true">600</entry> <entry name="reg_expires" overwrite="true">600</entry>
<entry name="reg_identity" overwrite="true">sip:?@sip.linphone.org</entry> <entry name="reg_identity" overwrite="true">sip:?@sip.linphone.org</entry>
<entry name="reg_proxy" overwrite="true">&lt;sip:sip.linphone.org;transport=tls&gt;</entry> <entry name="reg_proxy" overwrite="true">&lt;sip:sip.linphone.org;transport=tls&gt;</entry>
<entry name="reg_route" overwrite="true">&lt;sip:sip.linphone.org;transport=tls&gt;</entry>
<entry name="reg_sendregister" overwrite="true">1</entry> <entry name="reg_sendregister" overwrite="true">1</entry>
<entry name="nat_policy_ref" overwrite="true">default_nat_policy_values</entry> <entry name="nat_policy_ref" overwrite="true">default_nat_policy_values</entry>
<entry name="realm" overwrite="true">sip.linphone.org</entry> <entry name="realm" overwrite="true">sip.linphone.org</entry>

View file

@ -167,6 +167,7 @@ For example:
## Specific instructions for the Windows platform ## Specific instructions for the Windows platform
32-bit version is not supported as Qt6 doesn't provide 32bits packages for MSVC. 32-bit version is not supported as Qt6 doesn't provide 32bits packages for MSVC.
Visual Studio 2022 is only supported.
1. Install main tools: 1. Install main tools:
- `MinGW/MSYS2` : [download](https://www.msys2.org/) - `MinGW/MSYS2` : [download](https://www.msys2.org/)
@ -186,7 +187,7 @@ Specify `-DENABLE_WINDOWS_TOOLS_CHECK=ON` when building the SDK to install autom
2. Ensure that you have downloaded the correct Qt version on msvc. 2. Ensure that you have downloaded the correct Qt version on msvc.
3. Or open a Command line with Visual Studio `Developer Command Prompt for VS 2019` and call qtenv2.bat that is in your qt binaries eg: `C:\Qt\<version>\msvc2019\bin\qtenv2.bat` 3. Or open a Command line with Visual Studio `Developer Command Prompt for VS 2022` and call qtenv2.bat that is in your qt binaries eg: `C:\Qt\<version>\msvc2019\bin\qtenv2.bat`
4. Build as usual with adding `-A x64` to `cmake ..` (General Steps) : 4. Build as usual with adding `-A x64` to `cmake ..` (General Steps) :
- `cmake .. -DCMAKE_BUILD_PARALLEL_LEVEL=10 -DCMAKE_BUILD_TYPE=RelWithDebInfo -A x64` - `cmake .. -DCMAKE_BUILD_PARALLEL_LEVEL=10 -DCMAKE_BUILD_TYPE=RelWithDebInfo -A x64`

View file

@ -185,7 +185,7 @@ if(${ENABLE_APP_PACKAGING})
configure_file("${CMAKE_SOURCE_DIR}/cmake/install/cleanCPack.cmake.in" "${CMAKE_BINARY_DIR}/cmake/install/cleanCPack.cmake" @ONLY) configure_file("${CMAKE_SOURCE_DIR}/cmake/install/cleanCPack.cmake.in" "${CMAKE_BINARY_DIR}/cmake/install/cleanCPack.cmake" @ONLY)
set(CPACK_PRE_BUILD_SCRIPTS "${CMAKE_BINARY_DIR}/cmake/install/cleanCPack.cmake") set(CPACK_PRE_BUILD_SCRIPTS "${CMAKE_BINARY_DIR}/cmake/install/cleanCPack.cmake")
set(CPACK_PACKAGE_INSTALL_DIRECTORY ${APPLICATION_NAME})
if(APPLE) if(APPLE)
############################################## ##############################################
# APPLE # APPLE

View file

@ -1,4 +1,4 @@
A ICON MOVEABLE PURE LOADONCALL DISCARDABLE "assets/icon.ico" A ICON MOVEABLE PURE LOADONCALL DISCARDABLE "data/icon.ico"
# if defined(UNDER_CE) # if defined(UNDER_CE)
# include <winbase.h> # include <winbase.h>
@ -7,8 +7,8 @@ A ICON MOVEABLE PURE LOADONCALL DISCARDABLE "assets/icon.ico"
# endif # endif
VS_VERSION_INFO VERSIONINFO VS_VERSION_INFO VERSIONINFO
PRODUCTVERSION ${version_major},${version_minor},${version_patch},0 PRODUCTVERSION ${LINPHONE_MAJOR_VERSION},${LINPHONE_MINOR_VERSION},${LINPHONE_MICRO_VERSION},0
FILEVERSION ${version_major},${version_minor},${version_patch},0 FILEVERSION ${LINPHONE_MAJOR_VERSION},${LINPHONE_MINOR_VERSION},${LINPHONE_MICRO_VERSION},0
FILEFLAGSMASK 0x3fL FILEFLAGSMASK 0x3fL
#ifdef _DEBUG #ifdef _DEBUG
FILEFLAGS VS_FF_DEBUG FILEFLAGS VS_FF_DEBUG