Increase max image size on GUI.

More customization on about, update checker and video.
(SDK) Fix a crash when starting a core on an account that don't have a contact address.

Fix typo in Readme and adapt MSYS2 paths in CI for Windows.
This commit is contained in:
Julien Wadel 2022-12-28 12:32:15 +01:00
parent 8f596c7e6b
commit b132e19e2e
10 changed files with 41 additions and 15 deletions

View file

@ -23,7 +23,7 @@
# We double the "\" to escape paths as -replace uses regular expressions
- $PATH_TEMP = $PATH_TEMP -replace "C:\\MinGW\\bin;" -replace "C:\\Strawberry\\c\\bin;" -replace "C:\\Program Files\\NASM"
- echo $PATH_TEMP
- $env:Path = ($PATH_TEMP + ";C:\msys64;C:\msys64\usr\bin;C:\msys64\" + $MINGW_TYPE + "\bin;" + $env:SIGNTOOL_ROOT + "\x64")
- $env:Path = ($PATH_TEMP + ";C:\msys64\" + $MINGW_TYPE + "\bin;" + $env:SIGNTOOL_ROOT + "\x64;C:\msys64;C:\msys64\usr\bin;")
- If ($MINGW_TYPE -eq "mingw64") {Import-BatchEnvironment "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars64.bat"} Else {Import-BatchEnvironment "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\Tools\VsDevCmd.bat"}
- If ($MINGW_TYPE -eq "mingw64") {$env:Path = ($env:Path + ";C:\Qt\5.15.2\msvc2019_64\bin")} Else {$env:Path = ($env:Path + ";C:\Qt\5.14.2\msvc2019\bin")}
- if ($MAKE_RELEASE_FILE_URL) { } else { $RELEASE_FILE = "" }

View file

@ -22,6 +22,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Missing SetThreadDescription entry point on Windows 7/8 (SDK update)
- Add more margin on message's IMDN that was behind the icon menu in chats.
- Remove JSON dependencies on unused Flexiapi.
- Crash at startup about missing contact address on account (SDK fix)
## 5.0.2 - 2022-12-13

View file

@ -178,9 +178,10 @@ If a build for 64bits is needed, replace all `mingw32` by `mingw64`, `i686` by `
- `pacman -Sy --needed base-devel mingw-w64-i686-toolchain`
- `pacman -S python3-pip` in `MSYS2 MSYS` console
- `python3 -m pip install pystache six` in `cmd`
- In this order, add `C:\msys64\`, `C:\msys64\usr\bin` and `C:\msys64\mingw32\bin` in your PATH (the last one is needed by cmake to know where gcc is) to the PATH environement variable from windows advanced settings.
- In this order, add `C:\msys64\mingw<N>\bin`, `C:\msys64\` and `C:\msys64\usr\bin` in your PATH environement variable from Windows advanced settings. Binaries from the msys folder (not from mingw32/64) doesn't fully support Windows Path and thus, they are to be avoided.
*<N> is the version of MinGW32/64*
When building the SDK, it will install automatically from MSYS2 : `perl`, `yasm`, `gawk`, `bzip2`, `nasm, `sed`, `patch`, `pkg-config`, `gettext`, `glib2` and `intltool` (if needed)
When building the SDK, it will install automatically from MSYS2 : `toolchain`, `python`, `doxygen`, `perl`, `yasm`, `gawk`, `bzip2`, `nasm`, `sed`, `patch`, `pkg-config`, `gettext`, `glib2`, `intltool` and `graphviz` (if needed)
- `git` : use MSYS2 : `pacman -S git` or [download](https://git-scm.com/download/win)

View file

@ -62,7 +62,7 @@ set(APP_LIBRARY app-library)
set(APP_PLUGIN app-plugin)
include(application_info.cmake)
string(TIMESTAMP CURRENT_YEAR "%Y")
if( "${CURRENT_YEAR}" STREQUAL "${APPLICATION_START_LICENCE}")
if(NOT APPLICATION_START_LICENCE OR "${CURRENT_YEAR}" STREQUAL "${APPLICATION_START_LICENCE}")
set(COPYRIGHT_RANGE_DATE "${APPLICATION_START_LICENCE}")
else()
set(COPYRIGHT_RANGE_DATE "${APPLICATION_START_LICENCE}-${CURRENT_YEAR}")
@ -133,10 +133,18 @@ endif()
set(CMAKE_INCLUDE_CURRENT_DIR ON)#useful for config.h
set(QT5_PACKAGES Core Gui Quick Widgets QuickControls2 Svg LinguistTools Concurrent Network Test Qml)
if(ENABLE_APP_WEBVIEW)
list(APPEND QT5_PACKAGES WebView WebEngine WebEngineCore)
add_definitions(-DENABLE_WEBVIEW)
endif()
if(ENABLE_UPDATE_CHECK)
add_definitions(-DENABLE_UPDATE_CHECK)
endif()
if(ENABLE_VIDEO)
add_definitions(-DENABLE_VIDEO)
endif()
if (UNIX AND NOT APPLE)
list(APPEND QT5_PACKAGES DBus)
endif ()

View file

@ -425,7 +425,11 @@ void App::initContentApp () {
#else
mEngine->rootContext()->setContextProperty("applicationLicence", "");
#endif
mEngine->rootContext()->setContextProperty("copyrightRangeDate", COPYRIGHT_RANGE_DATE);
#ifdef COPYRIGHT_RANGE_DATE
mEngine->rootContext()->setContextProperty("copyrightRangeDate", COPYRIGHT_RANGE_DATE);
#else
mEngine->rootContext()->setContextProperty("copyrightRangeDate", "");
#endif
mEngine->rootContext()->setContextProperty("Colors", mColorListModel->getQmlData());
mEngine->rootContext()->setContextProperty("Images", mImageListModel->getQmlData());

View file

@ -24,7 +24,6 @@
#include <memory>
#include <QQuickFramebufferObject>
#include <mediastreamer2/msogl.h>
#include <QMutex>
#include <QTimer>

View file

@ -257,7 +257,12 @@ void SettingsModel::setAssistantLogoutUrl (QString url) {
}
bool SettingsModel::isCguAccepted () const{
return !!mConfig->getInt(UiSection, "read_and_agree_terms_and_privacy", 0);
#ifdef APPLICATION_VENDOR
QString applicationVendor = APPLICATION_VENDOR;
#else
QString applicationVendor;
#endif
return !!mConfig->getInt(UiSection, "read_and_agree_terms_and_privacy", ( applicationVendor != "" && Constants::CguUrl != QString("") && Constants::PrivatePolicyUrl != QString("") ? 0 : 1));
}
void SettingsModel::acceptCgu(const bool accept){
@ -1572,8 +1577,14 @@ void SettingsModel::setCheckForUpdateEnabled(bool enable){
emit checkForUpdateEnabledChanged();
}
QString SettingsModel::getVersionCheckUrl() const{
return Utils::coreStringToAppString(mConfig->getString("misc", "version_check_url_root", Constants::VersionCheckReleaseUrl));
QString SettingsModel::getVersionCheckUrl(){
auto url = mConfig->getString("misc", "version_check_url_root", "");
if( url == "" ){
url = Constants::VersionCheckReleaseUrl;
if( url != "")
mConfig->setString("misc", "version_check_url_root", url);
}
return Utils::coreStringToAppString(url);
}
void SettingsModel::setVersionCheckUrl(const QString& url){

View file

@ -580,7 +580,7 @@ public:
bool isCheckForUpdateEnabled() const;
void setCheckForUpdateEnabled(bool enable);
QString getVersionCheckUrl() const;
QString getVersionCheckUrl();
void setVersionCheckUrl(const QString& url);
VersionCheckType getVersionCheckType() const;

View file

@ -82,8 +82,8 @@ public:
static constexpr char DefaultAssistantLogoutUrl[] = "https://subscribe.linphone.org/logout";
//--------------
// Max image size in bytes. (100Kb)
static constexpr qint64 MaxImageSize = 102400;// In Bytes.
// Max image size in bytes. (1Mb)
static constexpr qint64 MaxImageSize = 1024000;// In Bytes.
static constexpr qint64 FileSizeLimit = 524288000;// In Bytes.
static constexpr int ThumbnailImageFileWidth = 100;
static constexpr int ThumbnailImageFileHeight = 100;

View file

@ -94,9 +94,11 @@ DialogPlus {
color: AboutStyle.copyrightBlock.license.colorModel.color
elide: Text.ElideRight
font.pointSize: AboutStyle.copyrightBlock.license.pointSize
visible: applicationVendor != ''
text: (applicationLicence? applicationLicence+'\n':'') +'\u00A9 '+ copyrightRangeDate +
' ' + applicationVendor
visible: applicationVendor || applicationLicence || copyrightRangeDate
text: (applicationLicence? applicationLicence+'\n':'')
+(copyrightRangeDate || applicationVendor ? '\u00A9 ': '')
+ (copyrightRangeDate ? copyrightRangeDate : '')
+ (applicationVendor ? ' ' + applicationVendor : '')
width: parent.width