forked from openlp/openlp
Changed location and name of version file.
This commit is contained in:
parent
2766081522
commit
447446fe9e
11
openlp.pyw
11
openlp.pyw
@ -32,6 +32,7 @@ from logging import FileHandler
|
|||||||
from optparse import OptionParser
|
from optparse import OptionParser
|
||||||
from PyQt4 import QtCore, QtGui
|
from PyQt4 import QtCore, QtGui
|
||||||
|
|
||||||
|
import openlp
|
||||||
from openlp.core.lib import Receiver, str_to_bool
|
from openlp.core.lib import Receiver, str_to_bool
|
||||||
from openlp.core.resources import qInitResources
|
from openlp.core.resources import qInitResources
|
||||||
from openlp.core.ui import MainWindow, SplashScreen, ScreenList
|
from openlp.core.ui import MainWindow, SplashScreen, ScreenList
|
||||||
@ -79,8 +80,10 @@ class OpenLP(QtGui.QApplication):
|
|||||||
Run the OpenLP application.
|
Run the OpenLP application.
|
||||||
"""
|
"""
|
||||||
#Load and store current Application Version
|
#Load and store current Application Version
|
||||||
filepath = os.path.split(os.path.abspath(__file__))[0]
|
filepath = AppLocation.get_directory(AppLocation.AppDir)
|
||||||
filepath = os.path.abspath(os.path.join(filepath, u'version.txt'))
|
if not hasattr(sys, u'frozen'):
|
||||||
|
filepath = os.path.join(filepath, u'openlp')
|
||||||
|
filepath = os.path.join(filepath, u'.version')
|
||||||
fversion = None
|
fversion = None
|
||||||
try:
|
try:
|
||||||
fversion = open(filepath, u'r')
|
fversion = open(filepath, u'r')
|
||||||
@ -97,9 +100,9 @@ class OpenLP(QtGui.QApplication):
|
|||||||
app_version[u'version'], app_version[u'build']))
|
app_version[u'version'], app_version[u'build']))
|
||||||
except:
|
except:
|
||||||
app_version = {
|
app_version = {
|
||||||
u'full': u'1.9.0-000',
|
u'full': u'1.9.0-bzr000',
|
||||||
u'version': u'1.9.0',
|
u'version': u'1.9.0',
|
||||||
u'build': u'000'
|
u'build': u'bzr000'
|
||||||
}
|
}
|
||||||
finally:
|
finally:
|
||||||
if fversion:
|
if fversion:
|
||||||
|
Loading…
Reference in New Issue
Block a user