version.py
author Andrey Skvortsov <andrej.skvortzov@gmail.com>
Fri, 15 Sep 2017 20:01:21 +0300
changeset 1811 4e3c78a84c64
parent 1803 da138c5a3063
child 1846 14b40afccd69
permissions -rw-r--r--
add custom TextCtrl allowed to enter long integer with bounds checking

It's needed because wx.SpinCtrl supports only 'int' type. For UDINT
and (U)LINT long type is necessary.
1565
894f31f8ca64 make about dialog boxes use standard wx about dialogs
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1561
diff changeset
     1
#!/usr/bin/env python
894f31f8ca64 make about dialog boxes use standard wx about dialogs
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1561
diff changeset
     2
# -*- coding: utf-8 -*-
894f31f8ca64 make about dialog boxes use standard wx about dialogs
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1561
diff changeset
     3
894f31f8ca64 make about dialog boxes use standard wx about dialogs
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1561
diff changeset
     4
# This file is part of Beremiz, a Integrated Development Environment for
894f31f8ca64 make about dialog boxes use standard wx about dialogs
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1561
diff changeset
     5
# programming IEC 61131-3 automates supporting plcopen standard and CanFestival.
894f31f8ca64 make about dialog boxes use standard wx about dialogs
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1561
diff changeset
     6
#
894f31f8ca64 make about dialog boxes use standard wx about dialogs
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1561
diff changeset
     7
# Copyright (C) 2016: Andrey Skvortsov
894f31f8ca64 make about dialog boxes use standard wx about dialogs
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1561
diff changeset
     8
#
894f31f8ca64 make about dialog boxes use standard wx about dialogs
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1561
diff changeset
     9
# See COPYING file for copyrights details.
894f31f8ca64 make about dialog boxes use standard wx about dialogs
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1561
diff changeset
    10
#
894f31f8ca64 make about dialog boxes use standard wx about dialogs
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1561
diff changeset
    11
# This program is free software; you can redistribute it and/or
894f31f8ca64 make about dialog boxes use standard wx about dialogs
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1561
diff changeset
    12
# modify it under the terms of the GNU General Public License
894f31f8ca64 make about dialog boxes use standard wx about dialogs
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1561
diff changeset
    13
# as published by the Free Software Foundation; either version 2
894f31f8ca64 make about dialog boxes use standard wx about dialogs
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1561
diff changeset
    14
# of the License, or (at your option) any later version.
894f31f8ca64 make about dialog boxes use standard wx about dialogs
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1561
diff changeset
    15
#
894f31f8ca64 make about dialog boxes use standard wx about dialogs
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1561
diff changeset
    16
# This program is distributed in the hope that it will be useful,
894f31f8ca64 make about dialog boxes use standard wx about dialogs
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1561
diff changeset
    17
# but WITHOUT ANY WARRANTY; without even the implied warranty of
894f31f8ca64 make about dialog boxes use standard wx about dialogs
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1561
diff changeset
    18
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
894f31f8ca64 make about dialog boxes use standard wx about dialogs
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1561
diff changeset
    19
# GNU General Public License for more details.
894f31f8ca64 make about dialog boxes use standard wx about dialogs
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1561
diff changeset
    20
#
894f31f8ca64 make about dialog boxes use standard wx about dialogs
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1561
diff changeset
    21
# You should have received a copy of the GNU General Public License
894f31f8ca64 make about dialog boxes use standard wx about dialogs
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1561
diff changeset
    22
# along with this program; if not, write to the Free Software
894f31f8ca64 make about dialog boxes use standard wx about dialogs
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1561
diff changeset
    23
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
894f31f8ca64 make about dialog boxes use standard wx about dialogs
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1561
diff changeset
    24
894f31f8ca64 make about dialog boxes use standard wx about dialogs
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1561
diff changeset
    25
1732
94ffe74e6895 clean-up: fix PEP8 E401 multiple imports on one line
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1706
diff changeset
    26
import subprocess
94ffe74e6895 clean-up: fix PEP8 E401 multiple imports on one line
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1706
diff changeset
    27
import os
94ffe74e6895 clean-up: fix PEP8 E401 multiple imports on one line
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1706
diff changeset
    28
1680
6db967480b7d make run Beremiz and PLCOpen Editor, if full path contain non-lating
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1569
diff changeset
    29
import util.paths as paths
1561
f53ece47e18d add version.py needed for previous commit '4ce8492'
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
    30
1736
7e61baa047f0 clean-up: fix PEP8 E302 expected 2 blank lines, found 1
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1735
diff changeset
    31
1692
9cb4d1392baf add information about community support channel to Beremiz and PLCOpenEditor
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1680
diff changeset
    32
def GetCommunityHelpMsg():
1768
691083b5682a clean-up: fix PEP8 E128 continuation line under-indented for visual indent
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1767
diff changeset
    33
    return _(
691083b5682a clean-up: fix PEP8 E128 continuation line under-indented for visual indent
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1767
diff changeset
    34
        "The best place to ask questions about Beremiz/PLCOpenEditor\n"
691083b5682a clean-up: fix PEP8 E128 continuation line under-indented for visual indent
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1767
diff changeset
    35
        "is project's mailing list: beremiz-devel@lists.sourceforge.net\n"
691083b5682a clean-up: fix PEP8 E128 continuation line under-indented for visual indent
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1767
diff changeset
    36
        "\n"
691083b5682a clean-up: fix PEP8 E128 continuation line under-indented for visual indent
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1767
diff changeset
    37
        "This is the main community support channel.\n"
691083b5682a clean-up: fix PEP8 E128 continuation line under-indented for visual indent
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1767
diff changeset
    38
        "For posting it is required to be subscribed to the mailing list.\n"
691083b5682a clean-up: fix PEP8 E128 continuation line under-indented for visual indent
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1767
diff changeset
    39
        "\n"
691083b5682a clean-up: fix PEP8 E128 continuation line under-indented for visual indent
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1767
diff changeset
    40
        "You can subscribe to the list here:\n"
691083b5682a clean-up: fix PEP8 E128 continuation line under-indented for visual indent
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1767
diff changeset
    41
        "https://lists.sourceforge.net/lists/listinfo/beremiz-devel"
691083b5682a clean-up: fix PEP8 E128 continuation line under-indented for visual indent
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1767
diff changeset
    42
    )
1692
9cb4d1392baf add information about community support channel to Beremiz and PLCOpenEditor
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1680
diff changeset
    43
1736
7e61baa047f0 clean-up: fix PEP8 E302 expected 2 blank lines, found 1
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1735
diff changeset
    44
1561
f53ece47e18d add version.py needed for previous commit '4ce8492'
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
    45
def GetAppRevision():
f53ece47e18d add version.py needed for previous commit '4ce8492'
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
    46
    rev = None
1742
92932cd370a4 clean-up: fix PEP8 E225 missing whitespace around operator
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1741
diff changeset
    47
    app_dir = paths.AbsDir(__file__)
1561
f53ece47e18d add version.py needed for previous commit '4ce8492'
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
    48
    try:
f53ece47e18d add version.py needed for previous commit '4ce8492'
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
    49
        pipe = subprocess.Popen(
f53ece47e18d add version.py needed for previous commit '4ce8492'
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
    50
            ["hg", "id", "-i"],
1744
69dfdb26f600 clean-up: fix PEP8 E251 unexpected spaces around keyword / parameter equals
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1742
diff changeset
    51
            stdout=subprocess.PIPE,
69dfdb26f600 clean-up: fix PEP8 E251 unexpected spaces around keyword / parameter equals
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1742
diff changeset
    52
            cwd=app_dir
1561
f53ece47e18d add version.py needed for previous commit '4ce8492'
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
    53
        )
f53ece47e18d add version.py needed for previous commit '4ce8492'
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
    54
        rev = pipe.communicate()[0]
f53ece47e18d add version.py needed for previous commit '4ce8492'
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
    55
        if pipe.returncode != 0:
f53ece47e18d add version.py needed for previous commit '4ce8492'
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
    56
            rev = None
1780
c52d1460cea8 clean-up: fix PEP8 E722 do not use bare except'
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1768
diff changeset
    57
    except Exception:
1561
f53ece47e18d add version.py needed for previous commit '4ce8492'
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
    58
        pass
1735
c02818d7e29f clean-up: fix PEP8 W293 blank line contains whitespace
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1732
diff changeset
    59
1561
f53ece47e18d add version.py needed for previous commit '4ce8492'
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
    60
    # if this is not mercurial repository
f53ece47e18d add version.py needed for previous commit '4ce8492'
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
    61
    # try to read revision from file
f53ece47e18d add version.py needed for previous commit '4ce8492'
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
    62
    if rev is None:
f53ece47e18d add version.py needed for previous commit '4ce8492'
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
    63
        try:
1740
b789b695b5c6 clean-up: fix PEP8 E231 missing whitespace after ':' or ','
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1738
diff changeset
    64
            f = open(os.path.join(app_dir, "revision"))
1561
f53ece47e18d add version.py needed for previous commit '4ce8492'
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
    65
            rev = f.readline()
1780
c52d1460cea8 clean-up: fix PEP8 E722 do not use bare except'
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1768
diff changeset
    66
        except Exception:
1561
f53ece47e18d add version.py needed for previous commit '4ce8492'
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
    67
            pass
f53ece47e18d add version.py needed for previous commit '4ce8492'
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
    68
    return rev
f53ece47e18d add version.py needed for previous commit '4ce8492'
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
    69
1736
7e61baa047f0 clean-up: fix PEP8 E302 expected 2 blank lines, found 1
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1735
diff changeset
    70
1565
894f31f8ca64 make about dialog boxes use standard wx about dialogs
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1561
diff changeset
    71
def GetAboutDialogInfo():
894f31f8ca64 make about dialog boxes use standard wx about dialogs
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1561
diff changeset
    72
    import wx
894f31f8ca64 make about dialog boxes use standard wx about dialogs
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1561
diff changeset
    73
    info = wx.AboutDialogInfo()
894f31f8ca64 make about dialog boxes use standard wx about dialogs
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1561
diff changeset
    74
894f31f8ca64 make about dialog boxes use standard wx about dialogs
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1561
diff changeset
    75
    info.Name = "Beremiz"
894f31f8ca64 make about dialog boxes use standard wx about dialogs
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1561
diff changeset
    76
    info.Version = app_version
1735
c02818d7e29f clean-up: fix PEP8 W293 blank line contains whitespace
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1732
diff changeset
    77
1758
845ca626db09 clean-up: fix PEP8 E222 multiple spaces after operator
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1754
diff changeset
    78
    info.Copyright = ""
845ca626db09 clean-up: fix PEP8 E222 multiple spaces after operator
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1754
diff changeset
    79
    info.Copyright += "(C) 2016-2017 Andrey Skvortsov\n"
1565
894f31f8ca64 make about dialog boxes use standard wx about dialogs
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1561
diff changeset
    80
    info.Copyright += "(C) 2008-2015 Eduard Tisserant\n"
894f31f8ca64 make about dialog boxes use standard wx about dialogs
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1561
diff changeset
    81
    info.Copyright += "(C) 2008-2015 Laurent Bessard"
894f31f8ca64 make about dialog boxes use standard wx about dialogs
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1561
diff changeset
    82
894f31f8ca64 make about dialog boxes use standard wx about dialogs
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1561
diff changeset
    83
    info.WebSite = ("http://beremiz.org", "beremiz.org")
1735
c02818d7e29f clean-up: fix PEP8 W293 blank line contains whitespace
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1732
diff changeset
    84
1565
894f31f8ca64 make about dialog boxes use standard wx about dialogs
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1561
diff changeset
    85
    info.Description = _("Open Source framework for automation, "
1767
c74815729afd clean-up: fix PEP8 E127 continuation line over-indented for visual indent
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1758
diff changeset
    86
                         "implemented IEC 61131 IDE with constantly growing set of extensions "
c74815729afd clean-up: fix PEP8 E127 continuation line over-indented for visual indent
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1758
diff changeset
    87
                         "and flexible PLC runtime.")
1735
c02818d7e29f clean-up: fix PEP8 W293 blank line contains whitespace
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1732
diff changeset
    88
1768
691083b5682a clean-up: fix PEP8 E128 continuation line under-indented for visual indent
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1767
diff changeset
    89
    info.Developers = (
691083b5682a clean-up: fix PEP8 E128 continuation line under-indented for visual indent
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1767
diff changeset
    90
        "Andrey Skvortsov <andrej.skvortzov@gmail.com>",
691083b5682a clean-up: fix PEP8 E128 continuation line under-indented for visual indent
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1767
diff changeset
    91
        "Sergey Surkov <surkov.sv@summatechnology.ru>",
691083b5682a clean-up: fix PEP8 E128 continuation line under-indented for visual indent
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1767
diff changeset
    92
        "Edouard Tisserant <edouard.tisserant@gmail.com>",
691083b5682a clean-up: fix PEP8 E128 continuation line under-indented for visual indent
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1767
diff changeset
    93
        "Laurent Bessard <laurent.bessard@gmail.com>")
1565
894f31f8ca64 make about dialog boxes use standard wx about dialogs
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1561
diff changeset
    94
1768
691083b5682a clean-up: fix PEP8 E128 continuation line under-indented for visual indent
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1767
diff changeset
    95
    info.License = (
691083b5682a clean-up: fix PEP8 E128 continuation line under-indented for visual indent
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1767
diff changeset
    96
        '\n This program is free software; you can redistribute it and/or\n'
691083b5682a clean-up: fix PEP8 E128 continuation line under-indented for visual indent
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1767
diff changeset
    97
        ' modify it under the terms of the GNU General Public License\n'
691083b5682a clean-up: fix PEP8 E128 continuation line under-indented for visual indent
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1767
diff changeset
    98
        ' as published by the Free Software Foundation; either version 2\n'
691083b5682a clean-up: fix PEP8 E128 continuation line under-indented for visual indent
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1767
diff changeset
    99
        ' of the License, or (at your option) any later version.\n'
691083b5682a clean-up: fix PEP8 E128 continuation line under-indented for visual indent
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1767
diff changeset
   100
        '\n'
691083b5682a clean-up: fix PEP8 E128 continuation line under-indented for visual indent
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1767
diff changeset
   101
        ' This program is distributed in the hope that it will be useful,\n'
691083b5682a clean-up: fix PEP8 E128 continuation line under-indented for visual indent
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1767
diff changeset
   102
        ' but WITHOUT ANY WARRANTY; without even the implied warranty of\n'
691083b5682a clean-up: fix PEP8 E128 continuation line under-indented for visual indent
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1767
diff changeset
   103
        ' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n'
691083b5682a clean-up: fix PEP8 E128 continuation line under-indented for visual indent
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1767
diff changeset
   104
        ' GNU General Public License below for more details.\n'
691083b5682a clean-up: fix PEP8 E128 continuation line under-indented for visual indent
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1767
diff changeset
   105
        '\n'
691083b5682a clean-up: fix PEP8 E128 continuation line under-indented for visual indent
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1767
diff changeset
   106
        '\n'
691083b5682a clean-up: fix PEP8 E128 continuation line under-indented for visual indent
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1767
diff changeset
   107
        '\n'
691083b5682a clean-up: fix PEP8 E128 continuation line under-indented for visual indent
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1767
diff changeset
   108
        ''
691083b5682a clean-up: fix PEP8 E128 continuation line under-indented for visual indent
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1767
diff changeset
   109
    )
1565
894f31f8ca64 make about dialog boxes use standard wx about dialogs
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1561
diff changeset
   110
894f31f8ca64 make about dialog boxes use standard wx about dialogs
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1561
diff changeset
   111
    # read license file
1742
92932cd370a4 clean-up: fix PEP8 E225 missing whitespace around operator
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1741
diff changeset
   112
    path = paths.AbsDir(__file__)
1680
6db967480b7d make run Beremiz and PLCOpen Editor, if full path contain non-lating
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1569
diff changeset
   113
    license_path = os.path.join(path, "COPYING")
1742
92932cd370a4 clean-up: fix PEP8 E225 missing whitespace around operator
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1741
diff changeset
   114
    license = ''
1565
894f31f8ca64 make about dialog boxes use standard wx about dialogs
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1561
diff changeset
   115
    if os.path.exists(license_path):
894f31f8ca64 make about dialog boxes use standard wx about dialogs
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1561
diff changeset
   116
        with open(license_path) as f:
894f31f8ca64 make about dialog boxes use standard wx about dialogs
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1561
diff changeset
   117
            info.License += f.read()
894f31f8ca64 make about dialog boxes use standard wx about dialogs
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1561
diff changeset
   118
1569
06632b380d2a remove old debug code
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1565
diff changeset
   119
    info.Icon = wx.Icon(os.path.join(path, "images", "about_brz_logo.png"), wx.BITMAP_TYPE_PNG)
1565
894f31f8ca64 make about dialog boxes use standard wx about dialogs
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1561
diff changeset
   120
1768
691083b5682a clean-up: fix PEP8 E128 continuation line under-indented for visual indent
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1767
diff changeset
   121
    info.Translators = (
1803
da138c5a3063 updated all existing translations
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1780
diff changeset
   122
        "Bengali (Bangladesh)",
da138c5a3063 updated all existing translations
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1780
diff changeset
   123
        "  Adhir Dutta <likhon52@gmail.com>, 2017",
da138c5a3063 updated all existing translations
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1780
diff changeset
   124
        "",
da138c5a3063 updated all existing translations
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1780
diff changeset
   125
da138c5a3063 updated all existing translations
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1780
diff changeset
   126
        "Chinese",
da138c5a3063 updated all existing translations
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1780
diff changeset
   127
        "  Frank Guan <gpfrank@163.com>, 2017",
da138c5a3063 updated all existing translations
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1780
diff changeset
   128
        "",
da138c5a3063 updated all existing translations
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1780
diff changeset
   129
da138c5a3063 updated all existing translations
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1780
diff changeset
   130
        "French",
da138c5a3063 updated all existing translations
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1780
diff changeset
   131
        "  Fabien Marteau <mail@fabienm.eu>, 2017",
da138c5a3063 updated all existing translations
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1780
diff changeset
   132
        "  Laurent Bessard <laurent.bessard@gmail.com>, 2008",
da138c5a3063 updated all existing translations
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1780
diff changeset
   133
        "",
da138c5a3063 updated all existing translations
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1780
diff changeset
   134
da138c5a3063 updated all existing translations
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1780
diff changeset
   135
        "German",
da138c5a3063 updated all existing translations
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1780
diff changeset
   136
        "  Andrey Skvortsov <andrej.skvortzov@gmail.com>, 2017",
da138c5a3063 updated all existing translations
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1780
diff changeset
   137
        "  Mark Muzenhardt <mark.muzenhardt@gmail.com>, 2012",
da138c5a3063 updated all existing translations
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1780
diff changeset
   138
        "",
da138c5a3063 updated all existing translations
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1780
diff changeset
   139
da138c5a3063 updated all existing translations
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1780
diff changeset
   140
        "Hungarian",
da138c5a3063 updated all existing translations
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1780
diff changeset
   141
        "  Gábor Véninger <veninger.gabor@gmail.com>, 2017",
da138c5a3063 updated all existing translations
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1780
diff changeset
   142
        "",
da138c5a3063 updated all existing translations
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1780
diff changeset
   143
da138c5a3063 updated all existing translations
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1780
diff changeset
   144
        "Italian",
da138c5a3063 updated all existing translations
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1780
diff changeset
   145
        "  Luca Magnabosco <magnabosco.luca@gmail.com>, 2017",
da138c5a3063 updated all existing translations
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1780
diff changeset
   146
        "  Manuele Conti <manuele.conti@sirius-es.it>, 2017",
da138c5a3063 updated all existing translations
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1780
diff changeset
   147
        "",
da138c5a3063 updated all existing translations
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1780
diff changeset
   148
da138c5a3063 updated all existing translations
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1780
diff changeset
   149
        "Korean",
da138c5a3063 updated all existing translations
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1780
diff changeset
   150
        "  Reinhard Lee <lij3105@gmail.com>, 2012",
da138c5a3063 updated all existing translations
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1780
diff changeset
   151
        "",
da138c5a3063 updated all existing translations
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1780
diff changeset
   152
da138c5a3063 updated all existing translations
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1780
diff changeset
   153
        "Portuguese (Portugal)",
da138c5a3063 updated all existing translations
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1780
diff changeset
   154
        "  Pedro Coimbra <pcoimbra310@gmail.com>, 2017",
da138c5a3063 updated all existing translations
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1780
diff changeset
   155
        "",
da138c5a3063 updated all existing translations
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1780
diff changeset
   156
da138c5a3063 updated all existing translations
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1780
diff changeset
   157
        "Portuguese (Brazil)",
da138c5a3063 updated all existing translations
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1780
diff changeset
   158
        "  Thiago Alves <thiagoralves@gmail.com>, 2017",
da138c5a3063 updated all existing translations
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1780
diff changeset
   159
        "",
da138c5a3063 updated all existing translations
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1780
diff changeset
   160
da138c5a3063 updated all existing translations
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1780
diff changeset
   161
        "Russian",
da138c5a3063 updated all existing translations
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1780
diff changeset
   162
        "  Andrey Skvortsov <andrej.skvortzov@gmail.com>, 2017",
da138c5a3063 updated all existing translations
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1780
diff changeset
   163
        "",
da138c5a3063 updated all existing translations
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1780
diff changeset
   164
da138c5a3063 updated all existing translations
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1780
diff changeset
   165
        "Slovenian",
da138c5a3063 updated all existing translations
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1780
diff changeset
   166
        "  Janez Pregelj <janezpregelj@gmail.com>, 2017",
da138c5a3063 updated all existing translations
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1780
diff changeset
   167
        "",
da138c5a3063 updated all existing translations
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1780
diff changeset
   168
da138c5a3063 updated all existing translations
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1780
diff changeset
   169
        "Spanish",
da138c5a3063 updated all existing translations
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1780
diff changeset
   170
        "  Marcial González de Armas <mgacod@gmail.com>, 2017",
da138c5a3063 updated all existing translations
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1780
diff changeset
   171
        "  Carlos Guilarte <guilartec@gmail.com>, 2017",
da138c5a3063 updated all existing translations
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1780
diff changeset
   172
        "",
da138c5a3063 updated all existing translations
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1780
diff changeset
   173
1706
b5c0a10145f1 update Russian and French (Fabien M) translations
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1692
diff changeset
   174
    )
1565
894f31f8ca64 make about dialog boxes use standard wx about dialogs
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1561
diff changeset
   175
    return info
894f31f8ca64 make about dialog boxes use standard wx about dialogs
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1561
diff changeset
   176
1749
d73b64672238 clean-up: fix PEP8 E305 expected 2 blank lines after class or function definition
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1744
diff changeset
   177
1758
845ca626db09 clean-up: fix PEP8 E222 multiple spaces after operator
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1754
diff changeset
   178
app_version = "1.2"
1561
f53ece47e18d add version.py needed for previous commit '4ce8492'
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   179
rev = GetAppRevision()
f53ece47e18d add version.py needed for previous commit '4ce8492'
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   180
if rev is not None:
f53ece47e18d add version.py needed for previous commit '4ce8492'
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   181
    app_version = app_version + "-" + rev.rstrip()