version.py
author Andrey Skvortsov <andrej.skvortzov@gmail.com>
Tue, 03 Jul 2018 17:09:11 +0300
changeset 2241 e762e234181d
parent 2239 813792f22527
child 2351 467f6daff4e9
permissions -rw-r--r--
Add information how to make shelve command work with check_source.sh called from hg hook

and added coresponding flag handling in check_source.sh
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 = ""
845ca626db09 clean-up: fix PEP8 E222 multiple spaces after operator
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1754
diff changeset
    82
    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
    83
    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
    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 = (
1803
da138c5a3063 updated all existing translations
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1780
diff changeset
   124
        "Bengali (Bangladesh)",
da138c5a3063 updated all existing translations
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1780
diff changeset
   125
        "  Adhir Dutta <likhon52@gmail.com>, 2017",
da138c5a3063 updated all existing translations
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1780
diff changeset
   126
        "",
da138c5a3063 updated all existing translations
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1780
diff changeset
   127
da138c5a3063 updated all existing translations
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1780
diff changeset
   128
        "Chinese",
da138c5a3063 updated all existing translations
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1780
diff changeset
   129
        "  Frank Guan <gpfrank@163.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
        "French",
da138c5a3063 updated all existing translations
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1780
diff changeset
   133
        "  Fabien Marteau <mail@fabienm.eu>, 2017",
da138c5a3063 updated all existing translations
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1780
diff changeset
   134
        "  Laurent Bessard <laurent.bessard@gmail.com>, 2008",
da138c5a3063 updated all existing translations
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1780
diff changeset
   135
        "",
da138c5a3063 updated all existing translations
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1780
diff changeset
   136
da138c5a3063 updated all existing translations
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1780
diff changeset
   137
        "German",
da138c5a3063 updated all existing translations
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1780
diff changeset
   138
        "  Andrey Skvortsov <andrej.skvortzov@gmail.com>, 2017",
da138c5a3063 updated all existing translations
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1780
diff changeset
   139
        "  Mark Muzenhardt <mark.muzenhardt@gmail.com>, 2012",
da138c5a3063 updated all existing translations
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1780
diff changeset
   140
        "",
da138c5a3063 updated all existing translations
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1780
diff changeset
   141
da138c5a3063 updated all existing translations
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1780
diff changeset
   142
        "Hungarian",
da138c5a3063 updated all existing translations
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1780
diff changeset
   143
        "  Gábor Véninger <veninger.gabor@gmail.com>, 2017",
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
da138c5a3063 updated all existing translations
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1780
diff changeset
   146
        "Italian",
da138c5a3063 updated all existing translations
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1780
diff changeset
   147
        "  Luca Magnabosco <magnabosco.luca@gmail.com>, 2017",
da138c5a3063 updated all existing translations
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1780
diff changeset
   148
        "  Manuele Conti <manuele.conti@sirius-es.it>, 2017",
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
        "Korean",
da138c5a3063 updated all existing translations
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1780
diff changeset
   152
        "  Reinhard Lee <lij3105@gmail.com>, 2012",
da138c5a3063 updated all existing translations
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1780
diff changeset
   153
        "",
da138c5a3063 updated all existing translations
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1780
diff changeset
   154
da138c5a3063 updated all existing translations
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1780
diff changeset
   155
        "Portuguese (Portugal)",
da138c5a3063 updated all existing translations
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1780
diff changeset
   156
        "  Pedro Coimbra <pcoimbra310@gmail.com>, 2017",
da138c5a3063 updated all existing translations
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1780
diff changeset
   157
        "",
da138c5a3063 updated all existing translations
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1780
diff changeset
   158
da138c5a3063 updated all existing translations
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1780
diff changeset
   159
        "Portuguese (Brazil)",
da138c5a3063 updated all existing translations
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1780
diff changeset
   160
        "  Thiago Alves <thiagoralves@gmail.com>, 2017",
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
da138c5a3063 updated all existing translations
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1780
diff changeset
   163
        "Russian",
da138c5a3063 updated all existing translations
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1780
diff changeset
   164
        "  Andrey Skvortsov <andrej.skvortzov@gmail.com>, 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
        "Slovenian",
da138c5a3063 updated all existing translations
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1780
diff changeset
   168
        "  Janez Pregelj <janezpregelj@gmail.com>, 2017",
da138c5a3063 updated all existing translations
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1780
diff changeset
   169
        "",
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
        "Spanish",
da138c5a3063 updated all existing translations
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1780
diff changeset
   172
        "  Marcial González de Armas <mgacod@gmail.com>, 2017",
da138c5a3063 updated all existing translations
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1780
diff changeset
   173
        "  Carlos Guilarte <guilartec@gmail.com>, 2017",
da138c5a3063 updated all existing translations
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1780
diff changeset
   174
        "",
da138c5a3063 updated all existing translations
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1780
diff changeset
   175
1706
b5c0a10145f1 update Russian and French (Fabien M) translations
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1692
diff changeset
   176
    )
1565
894f31f8ca64 make about dialog boxes use standard wx about dialogs
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1561
diff changeset
   177
    return info
894f31f8ca64 make about dialog boxes use standard wx about dialogs
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1561
diff changeset
   178
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
   179
1758
845ca626db09 clean-up: fix PEP8 E222 multiple spaces after operator
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1754
diff changeset
   180
app_version = "1.2"
1561
f53ece47e18d add version.py needed for previous commit '4ce8492'
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   181
rev = GetAppRevision()
f53ece47e18d add version.py needed for previous commit '4ce8492'
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   182
if rev is not None:
f53ece47e18d add version.py needed for previous commit '4ce8492'
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   183
    app_version = app_version + "-" + rev.rstrip()