version.py
author usveticic
Wed, 05 Aug 2020 15:15:33 +0200
branchsvghmi
changeset 3012 65471f50b421
parent 2515 6551a73702a3
child 3570 eb915a9fdcb0
permissions -rw-r--r--
Create new slider widget which extand class widget
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
1881
091005ec69c4 fix pylint py3k conversion warning: "(no-absolute-import) import missing `from __future__ import absolute_import`"
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1846
diff changeset
    26
from __future__ import absolute_import
2239
813792f22527 Make information about translation to be in unicode
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1881
diff changeset
    27
from __future__ import unicode_literals
813792f22527 Make information about translation to be in unicode
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1881
diff changeset
    28
1732
94ffe74e6895 clean-up: fix PEP8 E401 multiple imports on one line
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1706
diff changeset
    29
import subprocess
94ffe74e6895 clean-up: fix PEP8 E401 multiple imports on one line
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1706
diff changeset
    30
import os
94ffe74e6895 clean-up: fix PEP8 E401 multiple imports on one line
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1706
diff changeset
    31
1680
6db967480b7d make run Beremiz and PLCOpen Editor, if full path contain non-lating
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1569
diff changeset
    32
import util.paths as paths
1561
f53ece47e18d add version.py needed for previous commit '4ce8492'
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
    33
1736
7e61baa047f0 clean-up: fix PEP8 E302 expected 2 blank lines, found 1
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1735
diff changeset
    34
1692
9cb4d1392baf add information about community support channel to Beremiz and PLCOpenEditor
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1680
diff changeset
    35
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
    36
    return _(
691083b5682a clean-up: fix PEP8 E128 continuation line under-indented for visual indent
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1767
diff changeset
    37
        "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
    38
        "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
    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
        "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
    41
        "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
    42
        "\n"
691083b5682a clean-up: fix PEP8 E128 continuation line under-indented for visual indent
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1767
diff changeset
    43
        "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
    44
        "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
    45
    )
1692
9cb4d1392baf add information about community support channel to Beremiz and PLCOpenEditor
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1680
diff changeset
    46
1736
7e61baa047f0 clean-up: fix PEP8 E302 expected 2 blank lines, found 1
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1735
diff changeset
    47
1561
f53ece47e18d add version.py needed for previous commit '4ce8492'
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
    48
def GetAppRevision():
f53ece47e18d add version.py needed for previous commit '4ce8492'
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
    49
    rev = None
1742
92932cd370a4 clean-up: fix PEP8 E225 missing whitespace around operator
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1741
diff changeset
    50
    app_dir = paths.AbsDir(__file__)
1561
f53ece47e18d add version.py needed for previous commit '4ce8492'
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
    51
    try:
f53ece47e18d add version.py needed for previous commit '4ce8492'
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
    52
        pipe = subprocess.Popen(
f53ece47e18d add version.py needed for previous commit '4ce8492'
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
    53
            ["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
    54
            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
    55
            cwd=app_dir
1561
f53ece47e18d add version.py needed for previous commit '4ce8492'
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
    56
        )
f53ece47e18d add version.py needed for previous commit '4ce8492'
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
    57
        rev = pipe.communicate()[0]
f53ece47e18d add version.py needed for previous commit '4ce8492'
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
    58
        if pipe.returncode != 0:
f53ece47e18d add version.py needed for previous commit '4ce8492'
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
    59
            rev = None
1780
c52d1460cea8 clean-up: fix PEP8 E722 do not use bare except'
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1768
diff changeset
    60
    except Exception:
1561
f53ece47e18d add version.py needed for previous commit '4ce8492'
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
    61
        pass
1735
c02818d7e29f clean-up: fix PEP8 W293 blank line contains whitespace
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1732
diff changeset
    62
1561
f53ece47e18d add version.py needed for previous commit '4ce8492'
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
    63
    # if this is not mercurial repository
f53ece47e18d add version.py needed for previous commit '4ce8492'
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
    64
    # try to read revision from file
f53ece47e18d add version.py needed for previous commit '4ce8492'
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
    65
    if rev is None:
f53ece47e18d add version.py needed for previous commit '4ce8492'
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
    66
        try:
1740
b789b695b5c6 clean-up: fix PEP8 E231 missing whitespace after ':' or ','
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1738
diff changeset
    67
            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
    68
            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
    69
        except Exception:
1561
f53ece47e18d add version.py needed for previous commit '4ce8492'
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
    70
            pass
f53ece47e18d add version.py needed for previous commit '4ce8492'
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
    71
    return rev
f53ece47e18d add version.py needed for previous commit '4ce8492'
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
    72
1736
7e61baa047f0 clean-up: fix PEP8 E302 expected 2 blank lines, found 1
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1735
diff changeset
    73
1565
894f31f8ca64 make about dialog boxes use standard wx about dialogs
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1561
diff changeset
    74
def GetAboutDialogInfo():
894f31f8ca64 make about dialog boxes use standard wx about dialogs
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1561
diff changeset
    75
    import wx
894f31f8ca64 make about dialog boxes use standard wx about dialogs
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1561
diff changeset
    76
    info = wx.AboutDialogInfo()
894f31f8ca64 make about dialog boxes use standard wx about dialogs
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1561
diff changeset
    77
894f31f8ca64 make about dialog boxes use standard wx about dialogs
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1561
diff changeset
    78
    info.Name = "Beremiz"
894f31f8ca64 make about dialog boxes use standard wx about dialogs
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1561
diff changeset
    79
    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
    80
1758
845ca626db09 clean-up: fix PEP8 E222 multiple spaces after operator
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1754
diff changeset
    81
    info.Copyright = ""
2351
467f6daff4e9 Update Beremiz translations and list of translators
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 2239
diff changeset
    82
    info.Copyright += "(C) 2016-2018 Andrey Skvortsov\n"
467f6daff4e9 Update Beremiz translations and list of translators
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 2239
diff changeset
    83
    info.Copyright += "(C) 2008-2018 Eduard Tisserant\n"
1565
894f31f8ca64 make about dialog boxes use standard wx about dialogs
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1561
diff changeset
    84
    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
    85
894f31f8ca64 make about dialog boxes use standard wx about dialogs
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1561
diff changeset
    86
    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
    87
1565
894f31f8ca64 make about dialog boxes use standard wx about dialogs
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1561
diff changeset
    88
    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
    89
                         "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
    90
                         "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
    91
1768
691083b5682a clean-up: fix PEP8 E128 continuation line under-indented for visual indent
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1767
diff changeset
    92
    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
    93
        "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
    94
        "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
    95
        "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
    96
        "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
    97
1768
691083b5682a clean-up: fix PEP8 E128 continuation line under-indented for visual indent
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1767
diff changeset
    98
    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
    99
        '\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
   100
        ' 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
   101
        ' 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
   102
        ' 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
   103
        '\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
        ' 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
   105
        ' 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
   106
        ' 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
   107
        ' 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
   108
        '\n'
691083b5682a clean-up: fix PEP8 E128 continuation line under-indented for visual indent
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1767
diff changeset
   109
        '\n'
691083b5682a clean-up: fix PEP8 E128 continuation line under-indented for visual indent
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1767
diff changeset
   110
        '\n'
691083b5682a clean-up: fix PEP8 E128 continuation line under-indented for visual indent
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1767
diff changeset
   111
        ''
691083b5682a clean-up: fix PEP8 E128 continuation line under-indented for visual indent
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1767
diff changeset
   112
    )
1565
894f31f8ca64 make about dialog boxes use standard wx about dialogs
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1561
diff changeset
   113
894f31f8ca64 make about dialog boxes use standard wx about dialogs
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1561
diff changeset
   114
    # read license file
1742
92932cd370a4 clean-up: fix PEP8 E225 missing whitespace around operator
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1741
diff changeset
   115
    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
   116
    license_path = os.path.join(path, "COPYING")
1565
894f31f8ca64 make about dialog boxes use standard wx about dialogs
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1561
diff changeset
   117
    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
   118
        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
   119
            info.License += f.read()
894f31f8ca64 make about dialog boxes use standard wx about dialogs
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1561
diff changeset
   120
1569
06632b380d2a remove old debug code
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1565
diff changeset
   121
    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
   122
1768
691083b5682a clean-up: fix PEP8 E128 continuation line under-indented for visual indent
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1767
diff changeset
   123
    info.Translators = (
2515
6551a73702a3 updated list of translators
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 2351
diff changeset
   124
        "Basque",
6551a73702a3 updated list of translators
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 2351
diff changeset
   125
        "José Miguel Andonegi <jm.andonegi@gmail.com>, 2019",
6551a73702a3 updated list of translators
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 2351
diff changeset
   126
        "",
6551a73702a3 updated list of translators
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 2351
diff changeset
   127
1803
da138c5a3063 updated all existing translations
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1780
diff changeset
   128
        "Bengali (Bangladesh)",
da138c5a3063 updated all existing translations
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1780
diff changeset
   129
        "  Adhir Dutta <likhon52@gmail.com>, 2017",
da138c5a3063 updated all existing translations
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1780
diff changeset
   130
        "",
da138c5a3063 updated all existing translations
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1780
diff changeset
   131
da138c5a3063 updated all existing translations
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1780
diff changeset
   132
        "Chinese",
2351
467f6daff4e9 Update Beremiz translations and list of translators
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 2239
diff changeset
   133
        "  Frank Guan <gpfrank@163.com>, 2018",
467f6daff4e9 Update Beremiz translations and list of translators
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 2239
diff changeset
   134
        "  Tango Wu <wuyangtang@live.com>, 2017",
467f6daff4e9 Update Beremiz translations and list of translators
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 2239
diff changeset
   135
        "  Yiwei Yan <523136664@qq.com>, 2018",
2515
6551a73702a3 updated list of translators
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 2351
diff changeset
   136
        "  Ji Wang <2485567515@qq.com>, 2019",
6551a73702a3 updated list of translators
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 2351
diff changeset
   137
        "  珂 曾 <15627997@qq.com>, 2019",
2351
467f6daff4e9 Update Beremiz translations and list of translators
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 2239
diff changeset
   138
        "",
467f6daff4e9 Update Beremiz translations and list of translators
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 2239
diff changeset
   139
467f6daff4e9 Update Beremiz translations and list of translators
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 2239
diff changeset
   140
        "Dutch (Netherlands)",
2515
6551a73702a3 updated list of translators
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 2351
diff changeset
   141
        "  Martijn Berntsen <mxberntsen@gmail.com>, 2019",
2351
467f6daff4e9 Update Beremiz translations and list of translators
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 2239
diff changeset
   142
        "  Jordy van der Heijden <jordyvanderheijden@gmail.com>, 2018",
1803
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
da138c5a3063 updated all existing translations
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1780
diff changeset
   145
        "French",
2351
467f6daff4e9 Update Beremiz translations and list of translators
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 2239
diff changeset
   146
        "  Edouard Tisserant <edouard.tisserant@gmail.com>, 2018",
1803
da138c5a3063 updated all existing translations
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1780
diff changeset
   147
        "  Fabien Marteau <mail@fabienm.eu>, 2017",
da138c5a3063 updated all existing translations
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1780
diff changeset
   148
        "  Laurent Bessard <laurent.bessard@gmail.com>, 2008",
da138c5a3063 updated all existing translations
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1780
diff changeset
   149
        "",
da138c5a3063 updated all existing translations
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1780
diff changeset
   150
da138c5a3063 updated all existing translations
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1780
diff changeset
   151
        "German",
da138c5a3063 updated all existing translations
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1780
diff changeset
   152
        "  Andrey Skvortsov <andrej.skvortzov@gmail.com>, 2017",
2351
467f6daff4e9 Update Beremiz translations and list of translators
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 2239
diff changeset
   153
        "  Hendrik Knackstedt <h.knackstedt@stud.uni-hannover.de>, 2017 ",
1803
da138c5a3063 updated all existing translations
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1780
diff changeset
   154
        "  Mark Muzenhardt <mark.muzenhardt@gmail.com>, 2012",
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
        "Hungarian",
2351
467f6daff4e9 Update Beremiz translations and list of translators
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 2239
diff changeset
   158
        "  Krisztián Veress <krive001@gmail.com>, 2018",
1803
da138c5a3063 updated all existing translations
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1780
diff changeset
   159
        "  Gábor Véninger <veninger.gabor@gmail.com>, 2017",
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
da138c5a3063 updated all existing translations
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1780
diff changeset
   162
        "Italian",
da138c5a3063 updated all existing translations
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1780
diff changeset
   163
        "  Luca Magnabosco <magnabosco.luca@gmail.com>, 2017",
da138c5a3063 updated all existing translations
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1780
diff changeset
   164
        "  Manuele Conti <manuele.conti@sirius-es.it>, 2017",
da138c5a3063 updated all existing translations
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1780
diff changeset
   165
        "",
da138c5a3063 updated all existing translations
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1780
diff changeset
   166
da138c5a3063 updated all existing translations
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1780
diff changeset
   167
        "Korean",
2351
467f6daff4e9 Update Beremiz translations and list of translators
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 2239
diff changeset
   168
        "  Ikhwan Kim <duo821228@gmail.com>, 2018",
1803
da138c5a3063 updated all existing translations
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1780
diff changeset
   169
        "  Reinhard Lee <lij3105@gmail.com>, 2012",
da138c5a3063 updated all existing translations
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1780
diff changeset
   170
        "",
da138c5a3063 updated all existing translations
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1780
diff changeset
   171
2515
6551a73702a3 updated list of translators
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 2351
diff changeset
   172
        "Polish",
6551a73702a3 updated list of translators
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 2351
diff changeset
   173
        "  Adam B <adisz.pl@gmail.com>, 2019",
6551a73702a3 updated list of translators
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 2351
diff changeset
   174
        "",
6551a73702a3 updated list of translators
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 2351
diff changeset
   175
2351
467f6daff4e9 Update Beremiz translations and list of translators
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 2239
diff changeset
   176
        "Portuguese",
1803
da138c5a3063 updated all existing translations
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1780
diff changeset
   177
        "  Pedro Coimbra <pcoimbra310@gmail.com>, 2017",
da138c5a3063 updated all existing translations
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1780
diff changeset
   178
        "",
da138c5a3063 updated all existing translations
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1780
diff changeset
   179
da138c5a3063 updated all existing translations
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1780
diff changeset
   180
        "Portuguese (Brazil)",
2351
467f6daff4e9 Update Beremiz translations and list of translators
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 2239
diff changeset
   181
        "  Rodrigo Rolle <ro_pita@hotmail.com>, 2018",
1803
da138c5a3063 updated all existing translations
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1780
diff changeset
   182
        "  Thiago Alves <thiagoralves@gmail.com>, 2017",
da138c5a3063 updated all existing translations
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1780
diff changeset
   183
        "",
da138c5a3063 updated all existing translations
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1780
diff changeset
   184
2351
467f6daff4e9 Update Beremiz translations and list of translators
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 2239
diff changeset
   185
        "Romanian",
467f6daff4e9 Update Beremiz translations and list of translators
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 2239
diff changeset
   186
        "  Emil Saracutu <emil_saracutu@yahoo.com>, 2018",
467f6daff4e9 Update Beremiz translations and list of translators
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 2239
diff changeset
   187
        "",
467f6daff4e9 Update Beremiz translations and list of translators
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 2239
diff changeset
   188
1803
da138c5a3063 updated all existing translations
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1780
diff changeset
   189
        "Russian",
2351
467f6daff4e9 Update Beremiz translations and list of translators
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 2239
diff changeset
   190
        "  Andrey Skvortsov <andrej.skvortzov@gmail.com>, 2018",
467f6daff4e9 Update Beremiz translations and list of translators
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 2239
diff changeset
   191
        "  Sergey Surkov <surkov.sv@summatechnology.ru>, 2018",
467f6daff4e9 Update Beremiz translations and list of translators
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 2239
diff changeset
   192
        "  zx_alexis <zxalexis@gmail.com>, 2017",
1803
da138c5a3063 updated all existing translations
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1780
diff changeset
   193
        "",
da138c5a3063 updated all existing translations
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1780
diff changeset
   194
da138c5a3063 updated all existing translations
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1780
diff changeset
   195
        "Slovenian",
2351
467f6daff4e9 Update Beremiz translations and list of translators
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 2239
diff changeset
   196
        "  Janez Pregelj <janezpregelj@gmail.com>, 2018",
467f6daff4e9 Update Beremiz translations and list of translators
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 2239
diff changeset
   197
        "  Andraz Gregorcic <andraz.gregorcic@smarteh.si>, 2017",
1803
da138c5a3063 updated all existing translations
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1780
diff changeset
   198
        "",
da138c5a3063 updated all existing translations
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1780
diff changeset
   199
da138c5a3063 updated all existing translations
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1780
diff changeset
   200
        "Spanish",
2351
467f6daff4e9 Update Beremiz translations and list of translators
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 2239
diff changeset
   201
        "  Carlos Guilarte <guilartec@gmail.com>, 2018",
467f6daff4e9 Update Beremiz translations and list of translators
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 2239
diff changeset
   202
        "  Yegor Yefremov <yegorslists@googlemail.com>, 2018",
467f6daff4e9 Update Beremiz translations and list of translators
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 2239
diff changeset
   203
        "  Jorge Rojas, 2018",
1803
da138c5a3063 updated all existing translations
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1780
diff changeset
   204
        "  Marcial González de Armas <mgacod@gmail.com>, 2017",
2351
467f6daff4e9 Update Beremiz translations and list of translators
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 2239
diff changeset
   205
        "  Nelson Mambre <nmambre@gmail.com>, 2017",
467f6daff4e9 Update Beremiz translations and list of translators
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 2239
diff changeset
   206
        "",
467f6daff4e9 Update Beremiz translations and list of translators
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 2239
diff changeset
   207
467f6daff4e9 Update Beremiz translations and list of translators
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 2239
diff changeset
   208
        "Turkish",
467f6daff4e9 Update Beremiz translations and list of translators
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 2239
diff changeset
   209
        "  Ibrahim Kilicarslan <ibrahimhalilkilicarslan@outlook.com>, 2018",
1803
da138c5a3063 updated all existing translations
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1780
diff changeset
   210
        "",
da138c5a3063 updated all existing translations
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1780
diff changeset
   211
2515
6551a73702a3 updated list of translators
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 2351
diff changeset
   212
        "Vietnamese (Viet Nam)",
6551a73702a3 updated list of translators
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 2351
diff changeset
   213
        "  Nhất Thìn, 2019",
6551a73702a3 updated list of translators
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 2351
diff changeset
   214
        "",
6551a73702a3 updated list of translators
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 2351
diff changeset
   215
6551a73702a3 updated list of translators
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 2351
diff changeset
   216
1706
b5c0a10145f1 update Russian and French (Fabien M) translations
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1692
diff changeset
   217
    )
1565
894f31f8ca64 make about dialog boxes use standard wx about dialogs
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1561
diff changeset
   218
    return info
894f31f8ca64 make about dialog boxes use standard wx about dialogs
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1561
diff changeset
   219
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
   220
1758
845ca626db09 clean-up: fix PEP8 E222 multiple spaces after operator
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1754
diff changeset
   221
app_version = "1.2"
1561
f53ece47e18d add version.py needed for previous commit '4ce8492'
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   222
rev = GetAppRevision()
f53ece47e18d add version.py needed for previous commit '4ce8492'
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   223
if rev is not None:
f53ece47e18d add version.py needed for previous commit '4ce8492'
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   224
    app_version = app_version + "-" + rev.rstrip()