diff --git a/CMakeLists.txt b/CMakeLists.txt index 4caaad8086..00529b28a3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -92,7 +92,7 @@ elseif(UNIX AND NOT APPLE) endif() message(STATUS "CMAKE_INSTALL_PREFIX is set to ${CMAKE_INSTALL_PREFIX}") -set(CODELITE_VERSION "18.01.0") +set(CODELITE_VERSION "18.1.0") # for now, we keep wxCrafter version to be the same as CodeLite version this allows for better support set(WXCRAFTER_VERSION ${CODELITE_VERSION}) diff --git a/CodeLite/clVersionString.cpp b/CodeLite/clVersionString.cpp index dabb41f32c..720f6d32a4 100644 --- a/CodeLite/clVersionString.cpp +++ b/CodeLite/clVersionString.cpp @@ -1,14 +1,16 @@ #include "clVersionString.hpp" +#include "file_logger.h" + #include -#include #include #include #include clVersionString::clVersionString(const wxString& version_string) + : m_versionString(version_string) { - auto parts = ::wxStringTokenize(version_string, ".", wxTOKEN_STRTOK); + auto parts = ::wxStringTokenize(m_versionString, ".", wxTOKEN_STRTOK); for (const auto& str : parts) { long n = 0; str.ToCLong(&n); @@ -21,6 +23,7 @@ clVersionString::~clVersionString() {} int clVersionString::Compare(const wxString& other) const { clVersionString ver_other(other); + clDEBUG() << "Comparing:" << other << "against:" << m_versionString << endl; size_t elements_count = std::max(ver_other.m_numbers.size(), m_numbers.size()); for (size_t i = 0; i < elements_count; ++i) { if (number_at(i) > ver_other.number_at(i)) { diff --git a/CodeLite/clVersionString.hpp b/CodeLite/clVersionString.hpp index c16859dd90..8393ca7174 100644 --- a/CodeLite/clVersionString.hpp +++ b/CodeLite/clVersionString.hpp @@ -5,11 +5,9 @@ #include #include -/// Utility class converting between version string -> number -/// Example: 1.2.3 -> 1*10^2 + 2*10^3 + 3*10^0 -> 123 +/// Utility class for comparing between version string in the format of X.Y.Z class WXDLLIMPEXP_CL clVersionString { - public: clVersionString(const wxString& version_string); ~clVersionString(); @@ -18,7 +16,10 @@ class WXDLLIMPEXP_CL clVersionString /// Return `0` if they are equal int Compare(const wxString& other) const; + const wxString& GetVersionString() const { return m_versionString; } + private: long number_at(size_t index) const; std::vector m_numbers; + wxString m_versionString; }; diff --git a/LiteEditor/code_parser.rc b/LiteEditor/code_parser.rc index c8fb4abc5e..72dc1865be 100644 --- a/LiteEditor/code_parser.rc +++ b/LiteEditor/code_parser.rc @@ -16,8 +16,8 @@ aaaaa ICON "codelite-logo.ico" /////////////////////////////////////////////////////////////////////////////// // Version information VS_VERSION_INFO VERSIONINFO -FILEVERSION 18,01,0,0 -PRODUCTVERSION 18,01,0,0 +FILEVERSION 18,1,0,0 +PRODUCTVERSION 18,1,0,0 FILEFLAGSMASK 0x3fL // VS_FFI_FILEFLAGSMASK FILEFLAGS 0x0L // final version FILEOS VOS_NT_WINDOWS32 @@ -31,14 +31,14 @@ FILESUBTYPE VFT2_UNKNOWN { // not used VALUE "CompanyName", "Eran Ifrah" VALUE "Developer", "Eran Ifrah" VALUE "FileDescription", "CodeLite, an Open Source cross platform C, C++, Rust, Python, PHP and Node.js IDE" - VALUE "FileVersion", "18.01.0" + VALUE "FileVersion", "18.1.0" VALUE "InternalName", "CodeLite" VALUE "LegalCopyright", "Copyright (C) 2007-2025 Eran Ifrah" VALUE "LegalTrademarks", "All rights reserved." VALUE "OriginalFilename", "codelite.exe" VALUE "PrivateBuild", "" VALUE "ProductName", "CodeLite" - VALUE "ProductVersion", "18.01.0 (64-BIT)" + VALUE "ProductVersion", "18.1.0 (64-BIT)" VALUE "SpecialBuild", "" VALUE "Support", "https://forums.codelite.org" VALUE "Users", "Unlimited." diff --git a/LiteEditor/frame.cpp b/LiteEditor/frame.cpp index 754ff8c14c..266118fca3 100644 --- a/LiteEditor/frame.cpp +++ b/LiteEditor/frame.cpp @@ -1918,7 +1918,7 @@ void clMainFrame::OnAbout(wxCommandEvent& WXUNUSED(event)) // Misc info.SetWebSite("https://codelite.org", _("CodeLite Home")); info.SetVersion(CODELITE_VERSION_STRING); - info.SetCopyright("Eran Ifrah 2007-2024"); + info.SetCopyright("Eran Ifrah 2007-2025"); // Load the license file wxFileName license(clStandardPaths::Get().GetDataDir(), "LICENSE"); diff --git a/LiteEditor/webupdatethread.cpp b/LiteEditor/webupdatethread.cpp index 92259bc68f..63f4c1b393 100644 --- a/LiteEditor/webupdatethread.cpp +++ b/LiteEditor/webupdatethread.cpp @@ -27,6 +27,7 @@ #include "JSON.h" #include "autoversion.h" +#include "clVersionString.hpp" #include "file_logger.h" #include "precompiled_header.h" #include "procutils.h" @@ -48,36 +49,38 @@ struct CodeLiteVersion { wxString m_codename; wxString m_arch; wxString m_url; - int m_version; + wxString m_version; bool m_isReleaseVersion; CodeLiteVersion(const JSONItem& json) - : m_version(wxNOT_FOUND) - , m_isReleaseVersion(false) + : m_isReleaseVersion(false) { m_os = json.namedObject("os").toString(); m_codename = json.namedObject("codename").toString(); m_arch = json.namedObject("arch").toString(); m_url = json.namedObject("url").toString(); - m_version = json.namedObject("version").toInt(); + if (json.namedObject("version").isNumber()) { + m_version = "18.0.0"; // the last version supporting number was 18.0.0 + } else { + m_version = json.namedObject("version").toString(); + } m_isReleaseVersion = json.namedObject("isRelease").toBool(m_isReleaseVersion); } void Print() { clDEBUG() << "--->" << m_os << "," << m_codename << "," << m_arch << "," << m_version << clEndl; } /** - * @brief return true of this codelite version object is newer than the provided input + * @brief return true of this CodeLite version object is newer than the provided input */ bool IsNewer(const wxString& os, const wxString& codename, const wxString& arch) const { - wxString strVersionNumer = CURRENT_CODELITE_VERSION; - strVersionNumer.Replace(".", ""); - long nVersionNumber = -1; - strVersionNumer.ToCLong(&nVersionNumber); + clVersionString this_version{ CURRENT_CODELITE_VERSION }; + clVersionString version_from_web{ m_version }; if ((m_os == os) && (m_arch == arch) && (m_codename == codename)) { - bool res = (m_version > nVersionNumber); + bool res = version_from_web.Compare(CURRENT_CODELITE_VERSION) > 0; if (res) { - clDEBUG() << "Found new version!" << clEndl; + clSYSTEM() << "A newer version of CodeLite is available for download. Current version is:" + << this_version.GetVersionString() << ", new version:" << m_version << endl; } return res; } @@ -89,7 +92,6 @@ struct CodeLiteVersion { const wxString& GetCodename() const { return m_codename; } const wxString& GetOs() const { return m_os; } const wxString& GetUrl() const { return m_url; } - int GetVersion() const { return m_version; } }; WebUpdateJob::WebUpdateJob(wxEvtHandler* parent, bool userRequest, bool onlyRelease) @@ -118,7 +120,7 @@ void WebUpdateJob::ParseFile() if (!v.IsReleaseVersion() && m_onlyRelease) { // User wishes to be prompted for new releases only // skip weekly builds - clDEBUG() << "Found version:" << v.GetVersion() + clDEBUG() << "Found version:" << v.m_version << ", a non release version. However, use requested for stable releases only" << endl; continue; } @@ -126,8 +128,8 @@ void WebUpdateJob::ParseFile() if (v.IsNewer(os, codename, arch)) { clDEBUG() << "A new version of CodeLite found" << clEndl; wxCommandEvent event(wxEVT_CMD_NEW_VERSION_AVAILABLE); - event.SetClientData(new WebUpdateJobData("https://codelite.org/support.php", v.GetUrl(), - CURRENT_CODELITE_VERSION, "", false, true)); + event.SetClientData(new WebUpdateJobData( + "https://codelite.org/support.php", v.GetUrl(), CURRENT_CODELITE_VERSION, "", false, true)); m_parent->AddPendingEvent(event); return; } diff --git a/Plugin/clAboutDialogBase.cpp b/Plugin/clAboutDialogBase.cpp index 160057c60e..38af7ea2c5 100644 --- a/Plugin/clAboutDialogBase.cpp +++ b/Plugin/clAboutDialogBase.cpp @@ -19,12 +19,12 @@ wxBorder get_border_simple_theme_aware_bit() #else return wxBORDER_DEFAULT; #endif -} // DoGetBorderSimpleBit +} // get_border_simple_theme_aware_bit bool bBitmapLoaded = false; } // namespace -clAboutDialogBase::clAboutDialogBase(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, - const wxSize& size, long style) +clAboutDialogBase::clAboutDialogBase( + wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style) : wxDialog(parent, id, title, pos, size, style) { if (!bBitmapLoaded) { @@ -49,17 +49,20 @@ clAboutDialogBase::clAboutDialogBase(wxWindow* parent, wxWindowID id, const wxSt wxBoxSizer* boxSizer16 = new wxBoxSizer(wxVERTICAL); m_panelAbout->SetSizer(boxSizer16); - m_staticTextTitle = new wxStaticText(m_panelAbout, wxID_ANY, + m_staticTextTitle = new wxStaticText(m_panelAbout, + wxID_ANY, _("CodeLite, a free, open source, C/C++/Rust/Python/PHP and JavaScript IDE"), - wxDefaultPosition, wxDLG_UNIT(m_panelAbout, wxSize(-1, -1)), 0); + wxDefaultPosition, + wxDLG_UNIT(m_panelAbout, wxSize(-1, -1)), + 0); wxFont m_staticTextTitleFont = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT); m_staticTextTitleFont.SetStyle(wxFONTSTYLE_ITALIC); m_staticTextTitle->SetFont(m_staticTextTitleFont); boxSizer16->Add(m_staticTextTitle, 0, wxALL | wxALIGN_CENTER_HORIZONTAL, WXC_FROM_DIP(10)); - m_panel22 = new wxPanel(m_panelAbout, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_panelAbout, wxSize(-1, -1)), - wxTAB_TRAVERSAL); + m_panel22 = new wxPanel( + m_panelAbout, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_panelAbout, wxSize(-1, -1)), wxTAB_TRAVERSAL); boxSizer16->Add(m_panel22, 1, wxEXPAND, WXC_FROM_DIP(5)); @@ -72,8 +75,8 @@ clAboutDialogBase::clAboutDialogBase(wxWindow* parent, wxWindowID id, const wxSt boxSizer26->Add(flexGridSizer32, 1, wxALL | wxEXPAND, WXC_FROM_DIP(5)); - m_staticText34 = new wxStaticText(m_panel22, wxID_ANY, _("Author:"), wxDefaultPosition, - wxDLG_UNIT(m_panel22, wxSize(-1, -1)), 0); + m_staticText34 = new wxStaticText( + m_panel22, wxID_ANY, _("Author:"), wxDefaultPosition, wxDLG_UNIT(m_panel22, wxSize(-1, -1)), 0); wxFont m_staticText34Font = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT); m_staticText34Font.SetStyle(wxFONTSTYLE_ITALIC); m_staticText34Font.SetWeight(wxFONTWEIGHT_BOLD); @@ -81,13 +84,17 @@ clAboutDialogBase::clAboutDialogBase(wxWindow* parent, wxWindowID id, const wxSt flexGridSizer32->Add(m_staticText34, 0, wxRIGHT | wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5)); - m_staticTextSubtitle = new wxStaticText(m_panel22, wxID_ANY, _("2007 - 2024, by Eran Ifrah"), wxDefaultPosition, - wxDLG_UNIT(m_panel22, wxSize(-1, -1)), 0); + m_staticTextSubtitle = new wxStaticText(m_panel22, + wxID_ANY, + _("2007 - 2025, by Eran Ifrah"), + wxDefaultPosition, + wxDLG_UNIT(m_panel22, wxSize(-1, -1)), + 0); flexGridSizer32->Add(m_staticTextSubtitle, 0, wxLEFT | wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5)); - m_staticText36 = new wxStaticText(m_panel22, wxID_ANY, _("Version:"), wxDefaultPosition, - wxDLG_UNIT(m_panel22, wxSize(-1, -1)), 0); + m_staticText36 = new wxStaticText( + m_panel22, wxID_ANY, _("Version:"), wxDefaultPosition, wxDLG_UNIT(m_panel22, wxSize(-1, -1)), 0); wxFont m_staticText36Font = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT); m_staticText36Font.SetStyle(wxFONTSTYLE_ITALIC); m_staticText36Font.SetWeight(wxFONTWEIGHT_BOLD); @@ -100,8 +107,8 @@ clAboutDialogBase::clAboutDialogBase(wxWindow* parent, wxWindowID id, const wxSt flexGridSizer32->Add(m_staticTextVersion, 0, wxLEFT | wxEXPAND, WXC_FROM_DIP(5)); - m_staticText40 = new wxStaticText(m_panel22, wxID_ANY, _("Home Page:"), wxDefaultPosition, - wxDLG_UNIT(m_panel22, wxSize(-1, -1)), 0); + m_staticText40 = new wxStaticText( + m_panel22, wxID_ANY, _("Home Page:"), wxDefaultPosition, wxDLG_UNIT(m_panel22, wxSize(-1, -1)), 0); wxFont m_staticText40Font = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT); m_staticText40Font.SetStyle(wxFONTSTYLE_ITALIC); m_staticText40Font.SetWeight(wxFONTWEIGHT_BOLD); @@ -109,8 +116,13 @@ clAboutDialogBase::clAboutDialogBase(wxWindow* parent, wxWindowID id, const wxSt flexGridSizer32->Add(m_staticText40, 0, wxRIGHT | wxALIGN_RIGHT, WXC_FROM_DIP(5)); - m_hyperLink44 = new wxHyperlinkCtrl(m_panel22, wxID_ANY, _("CodeLite IDE"), wxT("https://codelite.org"), - wxDefaultPosition, wxDLG_UNIT(m_panel22, wxSize(-1, -1)), wxHL_DEFAULT_STYLE); + m_hyperLink44 = new wxHyperlinkCtrl(m_panel22, + wxID_ANY, + _("CodeLite IDE"), + wxT("https://codelite.org"), + wxDefaultPosition, + wxDLG_UNIT(m_panel22, wxSize(-1, -1)), + wxHL_DEFAULT_STYLE); flexGridSizer32->Add(m_hyperLink44, 0, wxLEFT, WXC_FROM_DIP(5)); @@ -121,9 +133,11 @@ clAboutDialogBase::clAboutDialogBase(wxWindow* parent, wxWindowID id, const wxSt wxBoxSizer* boxSizer18 = new wxBoxSizer(wxVERTICAL); m_paneLicense->SetSizer(boxSizer18); - m_stcLicense = - new clThemedSTC(m_paneLicense, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_paneLicense, wxSize(300, 200)), - wxBORDER_NONE | get_border_simple_theme_aware_bit()); + m_stcLicense = new clThemedSTC(m_paneLicense, + wxID_ANY, + wxDefaultPosition, + wxDLG_UNIT(m_paneLicense, wxSize(300, 200)), + wxBORDER_NONE | get_border_simple_theme_aware_bit()); // Configure the fold margin m_stcLicense->SetMarginType(4, wxSTC_MARGIN_SYMBOL); m_stcLicense->SetMarginMask(4, wxSTC_MASK_FOLDERS); @@ -168,9 +182,11 @@ clAboutDialogBase::clAboutDialogBase(wxWindow* parent, wxWindowID id, const wxSt wxBoxSizer* boxSizer20 = new wxBoxSizer(wxVERTICAL); m_panelCredits->SetSizer(boxSizer20); - m_stcCredits = - new clThemedSTC(m_panelCredits, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_panelCredits, wxSize(-1, -1)), - wxBORDER_NONE | get_border_simple_theme_aware_bit()); + m_stcCredits = new clThemedSTC(m_panelCredits, + wxID_ANY, + wxDefaultPosition, + wxDLG_UNIT(m_panelCredits, wxSize(-1, -1)), + wxBORDER_NONE | get_border_simple_theme_aware_bit()); // Configure the fold margin m_stcCredits->SetMarginType(4, wxSTC_MARGIN_SYMBOL); m_stcCredits->SetMarginMask(4, wxSTC_MASK_FOLDERS); diff --git a/Plugin/clAboutDialogBase.h b/Plugin/clAboutDialogBase.h index c031b29321..455a559286 100644 --- a/Plugin/clAboutDialogBase.h +++ b/Plugin/clAboutDialogBase.h @@ -77,8 +77,11 @@ class clAboutDialogBase : public wxDialog clThemedSTC* GetStcCredits() { return m_stcCredits; } wxPanel* GetPanelCredits() { return m_panelCredits; } wxNotebook* GetNotebook8() { return m_notebook8; } - clAboutDialogBase(wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("About"), - const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize(-1, -1), + clAboutDialogBase(wxWindow* parent, + wxWindowID id = wxID_ANY, + const wxString& title = _("About"), + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxSize(-1, -1), long style = wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER); virtual ~clAboutDialogBase(); }; diff --git a/Plugin/clAboutDialogBase.wxcp b/Plugin/clAboutDialogBase.wxcp index 50defedf09..4a36314476 100644 --- a/Plugin/clAboutDialogBase.wxcp +++ b/Plugin/clAboutDialogBase.wxcp @@ -698,7 +698,7 @@ }, { "type": "multi-string", "m_label": "Label:", - "m_value": "2007 - 2024, by Eran Ifrah" + "m_value": "2007 - 2025, by Eran Ifrah" }, { "type": "string", "m_label": "Wrap:", diff --git a/Runtime/Info.plist b/Runtime/Info.plist index 60e39c6e9b..aec0bb510b 100644 --- a/Runtime/Info.plist +++ b/Runtime/Info.plist @@ -8,7 +8,7 @@ CFBundleExecutable CodeLite CFBundleInfoDictionaryVersion - 18.01.0 + 18.1.0 CFBundleName CodeLite CFBundleIconFile @@ -18,9 +18,9 @@ CFBundleIdentifier com.eranif.CodeLite CFBundleVersion - CodeLite IDE version 18.01.0 + CodeLite IDE version 18.1.0 CFBundleShortVersionString - CodeLite IDE version 18.01.0 + CodeLite IDE version 18.1.0 CSResourcesFileMapped CFBundleDocumentTypes diff --git a/art/cl-splash.png b/art/cl-splash.png index 1f05813e3c..dcdbfa9488 100644 Binary files a/art/cl-splash.png and b/art/cl-splash.png differ diff --git a/art/cl-splash.xcf b/art/cl-splash.xcf index 12eabbbc7a..1b6cae29f5 100644 Binary files a/art/cl-splash.xcf and b/art/cl-splash.xcf differ diff --git a/art/cl-splash@2x.png b/art/cl-splash@2x.png index 71eb9bfa2e..9fe79a69d1 100644 Binary files a/art/cl-splash@2x.png and b/art/cl-splash@2x.png differ diff --git a/art/splashscreen@2x.png b/art/splashscreen@2x.png index 8691f79744..401fd1dcf2 100644 Binary files a/art/splashscreen@2x.png and b/art/splashscreen@2x.png differ