1
2
3
4
5
6
7 import os
8
10 """Update the version from version control system metadata if possible.
11 """
12 global version
13
14 branchPath = os.path.dirname(os.path.dirname(__file__))
15 locationPath = os.path.join(branchPath, ".bzr", "branch", "location")
16 try:
17
18 branchPath = file(locationPath, "r").read().split("file:///", 1)[1]
19 except (IOError, IndexError):
20 pass
21
22 lastRevPath = os.path.join(branchPath, ".bzr", "branch", "last-revision")
23 try:
24
25 rev = file(lastRevPath, "r").read().split(" ")[0]
26 branch = os.path.basename(os.path.abspath(branchPath))
27 version = "bzr-%s-%s" % (branch, rev)
28 except (IOError, IndexError):
29 pass
30
31 name="NVDA"
32 longName=_("NonVisual Desktop Access")
33 version="2012.1dev"
34 publisher="unknown"
35 try:
36 from _buildVersion import version, publisher
37 except ImportError:
38 _updateVersionFromVCS()
39 description=_("A free and open source screen reader for Microsoft Windows")
40 url="http://www.nvda-project.org/"
41 copyrightYears="2006-2011"
42 copyright=_("Copyright (C) {years} NVDA Contributors").format(
43 years=copyrightYears)
44 aboutMessage=_(u"""{longName} ({name})
45 Version: {version}
46 URL: {url}
47 {copyright}
48
49 {name} is covered by the GNU General Public License (Version 2). You are free to share or change this software in any way you like as long as it is accompanied by the license and you make all source code available to anyone who wants it. This applies to both original and modified copies of this software, plus any derivative works.
50 For further details, you can view the license from the Help menu.
51 It can also be viewed online at: http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
52
53 {name} is developed by NV Access, a non-profit organisation committed to helping and promoting free and open source solutions for blind and vision impaired people.
54 If you find NVDA useful and want it to continue to improve, please consider donating to NV Access. You can do this by selecting Donate from the NVDA menu.""").format(**globals())
55
56
57 isTestVersion = not version[0].isdigit() or "alpha" in version or "beta" in version or "dev" in version
58