IDE: display contents of revisions.txt (put there by installer builder script) in About Dialog.
authorEdouard Tisserant <edouard@beremiz.fr>
Tue, 27 Feb 2024 12:11:24 +0100
changeset 3906 f831ff63ca6e
parent 3901 b8b3573475e7
child 3907 394c130196b0
child 3908 32eb6e05008a
IDE: display contents of revisions.txt (put there by installer builder script) in About Dialog.
BeremizIDE.py
PLCOpenEditor.py
dialogs/AboutDialog.py
version.py
--- a/BeremizIDE.py	Fri Feb 23 11:54:51 2024 +0100
+++ b/BeremizIDE.py	Tue Feb 27 12:11:24 2024 +0100
@@ -45,7 +45,7 @@
 from editors.TextViewer import TextViewer
 from editors.ResourceEditor import ConfigurationEditor, ResourceEditor
 from editors.DataTypeEditor import DataTypeEditor
-from util.paths import Bpath
+from util.paths import Bpath, ThirdPartyPath
 from util.MiniTextControler import MiniTextControler
 from util.BitmapLibrary import GetBitmap
 from controls.LogViewer import LogViewer
@@ -980,6 +980,10 @@
         info = wx.adv.AboutDialogInfo()
         info = version.GetAboutDialogInfo(info)
         info.Name = "Beremiz"
+        with open(ThirdPartyPath("revisions.txt")) as f:
+            revisions=f.read()
+            info.SetVersion(info.GetVersion(), longVersion=revisions)
+
         info.Description = _("Open Source framework for automation, "
             "implementing IEC 61131 IDE with constantly growing set of extensions "
             "and flexible PLC runtime.")
--- a/PLCOpenEditor.py	Fri Feb 23 11:54:51 2024 +0100
+++ b/PLCOpenEditor.py	Tue Feb 27 12:11:24 2024 +0100
@@ -357,7 +357,7 @@
 
     def OnAboutMenu(self, event):
         info = wx.adv.AboutDialogInfo()
-        info = version.GetAboutDialogInfo()
+        info = version.GetAboutDialogInfo(info)
         info.Name = "PLCOpenEditor"
         info.Description = _("PLCOpenEditor is part of Beremiz project.\n\n"
                              "Beremiz is an ") + info.Description
--- a/dialogs/AboutDialog.py	Fri Feb 23 11:54:51 2024 +0100
+++ b/dialogs/AboutDialog.py	Tue Feb 27 12:11:24 2024 +0100
@@ -62,6 +62,7 @@
         description.Wrap(400)
         copyright = wx.StaticText(self, label=info.Copyright)
         url = HyperLinkCtrl(self, label=info.WebSite[0], URL=info.WebSite[1])
+        long_version = wx.StaticText(self, label=info.GetLongVersion())
 
         font = name.GetClassDefaultAttributes().font
         font.SetWeight(wx.FONTWEIGHT_BOLD)
@@ -84,6 +85,7 @@
         sizer.Add(description, flag=wx.CENTER | wx.BOTTOM, border=10)
         sizer.Add(copyright, flag=wx.CENTER | wx.BOTTOM, border=10)
         sizer.Add(url, flag=wx.CENTER | wx.BOTTOM, border=15)
+        sizer.Add(long_version, flag=wx.CENTER | wx.BOTTOM, border=10)
         sizer.Add(btnSizer, flag=wx.CENTER | wx.BOTTOM, border=5)
 
         container = wx.BoxSizer(wx.VERTICAL)
--- a/version.py	Fri Feb 23 11:54:51 2024 +0100
+++ b/version.py	Tue Feb 27 12:11:24 2024 +0100
@@ -185,7 +185,7 @@
     return info
 
 
-app_version = "1.4-beta2"
+app_version = "1.4"
 
 if __name__ == "__main__":
     print(app_version)