diff --git a/CHANGELOG.md b/CHANGELOG.md index a8749ecf..95f8e54b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,7 +8,8 @@ This project adheres to [Semantic Versioning](http://semver.org/). ## [1.13.7 / 5.68.7] - 2024-04- ### Added -- Added DropAdmin and improved related checkboxes #3851 https://github.com/sandboxie-plus/Sandboxie/pull/3851 (thanks offhub) +- added DropAdmin and improved related checkboxes #3851 https://github.com/sandboxie-plus/Sandboxie/pull/3851 (thanks offhub) +- added file version info doe SbieDll.dll and SbieSvc.exe to the Plus About dialog ### Fixed - fixed issue with start agent option [#3844](https://github.com/sandboxie-plus/Sandboxie/pull/3844) (thanks offhub) diff --git a/Sandboxie/common/my_version.h b/Sandboxie/common/my_version.h index bde9e8ea..cc410258 100644 --- a/Sandboxie/common/my_version.h +++ b/Sandboxie/common/my_version.h @@ -21,9 +21,22 @@ #ifndef _MY_VERSION_H #define _MY_VERSION_H -#define MY_VERSION_BINARY 5,68,7 -#define MY_VERSION_STRING "5.68.7" -#define MY_ABI_VERSION 0x56800 +#define STR2(X) #X +#define STR(X) STR2(X) + +#define VERSION_MJR 5 +#define VERSION_MIN 70 +#define VERSION_REV 0 +#define VERSION_UPD 0 + +#if VERSION_UPD > 0 + #define MY_VERSION_BINARY VERSION_MJR,VERSION_MIN,VERSION_REV,VERSION_UPD + #define MY_VERSION_STRING STR(VERSION_MJR.VERSION_MIN.VERSION_REV.VERSION_UPD) +#else + #define MY_VERSION_BINARY VERSION_MJR,VERSION_MIN,VERSION_REV + #define MY_VERSION_STRING STR(VERSION_MJR.VERSION_MIN.VERSION_REV) +#endif +#define MY_ABI_VERSION 0x56800 // These #defines are used by either Resource Compiler or NSIS installer #define SBIE_INSTALLER_PATH "..\\Bin\\" diff --git a/SandboxiePlus/SandMan/SandMan.cpp b/SandboxiePlus/SandMan/SandMan.cpp index 9a84071d..9b446df3 100644 --- a/SandboxiePlus/SandMan/SandMan.cpp +++ b/SandboxiePlus/SandMan/SandMan.cpp @@ -4101,16 +4101,18 @@ bool CSandMan::IsWFPEnabled() const return (g_FeatureFlags & CSbieAPI::eSbieFeatureWFP) != 0; } -QString CSandMan::GetVersion() +QString CSandMan::GetVersion(bool bWithUpdates) { - QString Version = QString::number(VERSION_MJR) + "." + QString::number(VERSION_MIN) //.rightJustified(2, '0') -//#if VERSION_REV > 0 || VERSION_MJR == 0 - + "." + QString::number(VERSION_REV) -//#endif + QString Version = QString::number(VERSION_MJR) + "." + QString::number(VERSION_MIN) + "." + QString::number(VERSION_REV); + if (bWithUpdates) { + int iUpdate = COnlineUpdater::GetCurrentUpdate(); + if (iUpdate) + Version += QChar('a' + (iUpdate - 1)); + } #if VERSION_UPD > 0 - + QChar('a' + VERSION_UPD - 1) + else + Version += QChar('a' + VERSION_UPD - 1); #endif - ; return Version; } @@ -4293,30 +4295,39 @@ void CSandMan::OnAbout() { if (sender() == m_pAbout) { + if ((QGuiApplication::queryKeyboardModifiers() & Qt::ControlModifier) != 0){ + CSupportDialog::CheckSupport(); + return; + } + QString AboutCaption = tr( "

About Sandboxie-Plus

" "

Version %1

" - "

Copyright (c) 2020-2024 by DavidXanatos

" - ).arg(theGUI->GetVersion()); + "

" MY_COPYRIGHT_STRING "

" + ).arg(theGUI->GetVersion(true)); QString CertInfo; - if (!g_Certificate.isEmpty()) { - CertInfo = tr("This copy of Sandboxie+ is certified for: %1").arg(GetArguments(g_Certificate, L'\n', L':').value("NAME")); - } else { - CertInfo = tr("Sandboxie+ is free for personal and non-commercial use."); - } + if (!g_Certificate.isEmpty()) + CertInfo = tr("This copy of Sandboxie-Plus is certified for: %1").arg(GetArguments(g_Certificate, L'\n', L':').value("NAME")); + else + CertInfo = tr("Sandboxie-Plus is free for personal and non-commercial use."); + + QString SbiePath = theAPI->GetSbiePath(); QString AboutText = tr( "Sandboxie-Plus is an open source continuation of Sandboxie.
" "Visit sandboxie-plus.com for more information.
" "
" - "%3
" + "%2
" "
" - "Driver version: %1
" - "Features: %2
" + "Features: %3
" + "
" + "Installation Location: %1
" + "SbieDrv.sys: %4
SbieSvc.exe: %5
SbieDll.dll: %6
" "
" "Icons from icons8.com" - ).arg(theAPI->GetVersion()).arg(theAPI->GetFeatureStr()).arg(CertInfo); + ).arg(SbiePath).arg(CertInfo).arg(theAPI->GetFeatureStr()) + .arg(GetProductVersion(SbiePath + "\\SbieDrv.sys")).arg(GetProductVersion(SbiePath + "\\SbieSvc.exe")).arg(GetProductVersion(SbiePath + "\\SbieDll.dll")); QMessageBox *msgBox = new QMessageBox(this); msgBox->setAttribute(Qt::WA_DeleteOnClose); diff --git a/SandboxiePlus/SandMan/SandMan.h b/SandboxiePlus/SandMan/SandMan.h index 451f8c33..2ec94b14 100644 --- a/SandboxiePlus/SandMan/SandMan.h +++ b/SandboxiePlus/SandMan/SandMan.h @@ -47,7 +47,7 @@ public: CScriptManager* GetScripts() { return m_SbieScripts; } CAddonManager* GetAddonManager() { return m_AddonManager; } - static QString GetVersion(); + static QString GetVersion(bool bWithUpdates = false); static void ShowMessageBox(QWidget* Widget, QMessageBox::Icon Icon, const QString& Message); bool IsImDiskReady() const { return m_ImDiskReady; } diff --git a/SandboxiePlus/SandMan/Windows/SettingsWindow.cpp b/SandboxiePlus/SandMan/Windows/SettingsWindow.cpp index 413d21ed..cbfe915c 100644 --- a/SandboxiePlus/SandMan/Windows/SettingsWindow.cpp +++ b/SandboxiePlus/SandMan/Windows/SettingsWindow.cpp @@ -2449,14 +2449,9 @@ void CSettingsWindow::OnUpdateData(const QVariantMap& Data, const QVariantMap& P if (Data.isEmpty() || Data["error"].toBool()) return; - QString Version = QString::number(VERSION_MJR) + "." + QString::number(VERSION_MIN) + "." + QString::number(VERSION_REV); - int iUpdate = COnlineUpdater::GetCurrentUpdate(); - if(iUpdate) - Version += QChar('a' + (iUpdate - 1)); - m_UpdateData = Data; QVariantMap Releases = m_UpdateData["releases"].toMap(); - ui.lblCurrent->setText(tr("%1 (Current)").arg(Version)); + ui.lblCurrent->setText(tr("%1 (Current)").arg(theGUI->GetVersion(true))); ui.lblStable->setText(CSettingsWindow__MkVersion("stable", Releases)); ui.lblPreview->setText(CSettingsWindow__MkVersion("preview", Releases)); if(ui.radInsider->isEnabled())