version.py
changeset 1565 894f31f8ca64
parent 1561 f53ece47e18d
child 1569 06632b380d2a
equal deleted inserted replaced
1564:8ffd0b52c2c7 1565:894f31f8ca64
       
     1 #!/usr/bin/env python
       
     2 # -*- coding: utf-8 -*-
       
     3 
       
     4 # This file is part of Beremiz, a Integrated Development Environment for
       
     5 # programming IEC 61131-3 automates supporting plcopen standard and CanFestival.
       
     6 #
       
     7 # Copyright (C) 2016: Andrey Skvortsov
       
     8 #
       
     9 # See COPYING file for copyrights details.
       
    10 #
       
    11 # This program is free software; you can redistribute it and/or
       
    12 # modify it under the terms of the GNU General Public License
       
    13 # as published by the Free Software Foundation; either version 2
       
    14 # of the License, or (at your option) any later version.
       
    15 #
       
    16 # This program is distributed in the hope that it will be useful,
       
    17 # but WITHOUT ANY WARRANTY; without even the implied warranty of
       
    18 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
       
    19 # GNU General Public License for more details.
       
    20 #
       
    21 # You should have received a copy of the GNU General Public License
       
    22 # along with this program; if not, write to the Free Software
       
    23 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
       
    24 
       
    25 
     1 import subprocess, os
    26 import subprocess, os
     2 
    27 
     3 def GetAppRevision():
    28 def GetAppRevision():
     4     rev = None
    29     rev = None
     5     app_dir=os.path.dirname(os.path.realpath(__file__))    
    30     app_dir=os.path.dirname(os.path.realpath(__file__))    
    23             rev = f.readline()
    48             rev = f.readline()
    24         except:
    49         except:
    25             pass
    50             pass
    26     return rev
    51     return rev
    27 
    52 
       
    53 def GetAboutDialogInfo():
       
    54     import wx
       
    55     info = wx.AboutDialogInfo()
       
    56 
       
    57     info.Name = "Beremiz"
       
    58     info.Version = app_version
       
    59     
       
    60     info.Copyright  = "(C) 2016 Andrey Skvortsov\n"
       
    61     info.Copyright += "(C) 2008-2015 Eduard Tisserant\n"
       
    62     info.Copyright += "(C) 2008-2015 Laurent Bessard"
       
    63 
       
    64     info.WebSite = ("http://beremiz.org", "beremiz.org")
       
    65     
       
    66     info.Description = _("Open Source framework for automation, "
       
    67                              "implemented IEC 61131 IDE with constantly growing set of extensions "
       
    68                              "and flexible PLC runtime.")
       
    69     
       
    70     info.Developers = ("Andrey Skvortsov <andrej.skvortzov@gmail.com>",
       
    71 		       "Sergey Surkov <surkov.sv@summatechnology.ru>",
       
    72 		       "Edouard Tisserant <edouard.tisserant@gmail.com>",
       
    73 		       "Laurent Bessard <laurent.bessard@gmail.com>")
       
    74 
       
    75 
       
    76     info.License = ('\n This program is free software; you can redistribute it and/or\n'
       
    77     ' modify it under the terms of the GNU General Public License\n'
       
    78     ' as published by the Free Software Foundation; either version 2\n'
       
    79     ' of the License, or (at your option) any later version.\n'
       
    80     '\n'
       
    81     ' This program is distributed in the hope that it will be useful,\n'
       
    82     ' but WITHOUT ANY WARRANTY; without even the implied warranty of\n'
       
    83     ' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n'
       
    84     ' GNU General Public License below for more details.\n'
       
    85     '\n'
       
    86     '\n'
       
    87     '\n'
       
    88     '')
       
    89 
       
    90     # read license file
       
    91     path=os.path.join(os.path.dirname(os.path.abspath(__file__)))
       
    92     license_path = os.path.join(path, u"COPYING")
       
    93     license=''
       
    94     if os.path.exists(license_path):
       
    95         with open(license_path) as f:
       
    96             info.License += f.read()
       
    97 
       
    98     info.Icon = wx.Icon(os.path.join(path, "images", "__about_brz_logo.png"), wx.BITMAP_TYPE_PNG)            
       
    99     # info.Icon = wx.Icon(os.path.join(path, "images", "about_brz_logo.png"), wx.BITMAP_TYPE_PNG)
       
   100 
       
   101     info.Translators = ("Russian\t- Andrey Skvortsov <andrej.skvortzov@gmail.com>",
       
   102 	                "Korean\t- Reinhard Lee <lij3105@gmail.com>",
       
   103 	                "German\t- Mark Muzenhardt <mark.muzenhardt@gmail.com>",
       
   104 	                "French\t- Laurent Bessard <laurent.bessard@gmail.com>")
       
   105     return info
       
   106 
    28 app_version =  "1.2"
   107 app_version =  "1.2"
    29 rev = GetAppRevision()
   108 rev = GetAppRevision()
    30 if rev is not None:
   109 if rev is not None:
    31     app_version = app_version + "-" + rev.rstrip()
   110     app_version = app_version + "-" + rev.rstrip()
    32     
   111