aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRael <rael.gc@gmail.com>2015-10-22 15:58:19 -0200
committerRael <rael.gc@gmail.com>2015-10-22 15:58:19 -0200
commiteabe4af0a34f5535806f0ea0dbbe04c5e53d79aa (patch)
tree8b535f26750948a226137348527312b1bbaf3e8a
parent72c66cc6cf0857eec5c63a41aff87a183c2aa938 (diff)
downloadscudcloud-eabe4af0a34f5535806f0ea0dbbe04c5e53d79aa.zip
scudcloud-eabe4af0a34f5535806f0ea0dbbe04c5e53d79aa.tar.gz
scudcloud-eabe4af0a34f5535806f0ea0dbbe04c5e53d79aa.tar.bz2
Moving version info to external file
-rw-r--r--scudcloud-1.0/VERSION1
-rw-r--r--scudcloud-1.0/debian/install1
-rwxr-xr-xscudcloud-1.0/scudcloud7
3 files changed, 5 insertions, 4 deletions
diff --git a/scudcloud-1.0/VERSION b/scudcloud-1.0/VERSION
new file mode 100644
index 0000000..8bdc532
--- /dev/null
+++ b/scudcloud-1.0/VERSION
@@ -0,0 +1 @@
+1.0.85
diff --git a/scudcloud-1.0/debian/install b/scudcloud-1.0/debian/install
index 9309933..aa6e8be 100644
--- a/scudcloud-1.0/debian/install
+++ b/scudcloud-1.0/debian/install
@@ -1,4 +1,5 @@
LICENSE opt/scudcloud
+VERSION opt/scudcloud
lib/*.py opt/scudcloud/lib
resources/* opt/scudcloud/resources
scudcloud opt/scudcloud
diff --git a/scudcloud-1.0/scudcloud b/scudcloud-1.0/scudcloud
index 6b7498f..734350c 100755
--- a/scudcloud-1.0/scudcloud
+++ b/scudcloud-1.0/scudcloud
@@ -14,12 +14,11 @@ from scudcloud import ScudCloud
# The ScudCloud QMainWindow
win = None
-VERSION = '1.0.85'
-
def main():
global win
Resources.INSTALL_DIR = INSTALL_DIR
signal.signal(signal.SIGINT, exit)
+ args = parse_arguments()
appKey = "scudcloud.pid"
socket = QLocalSocket()
socket.connectToServer(appKey)
@@ -31,7 +30,6 @@ def main():
app = QtGui.QApplication(sys.argv)
app.setApplicationName(Resources.APP_NAME)
app.setWindowIcon(QtGui.QIcon(Resources.get_path('scudcloud.png')))
- args = parse_arguments()
ScudCloud.debug = args.debug
ScudCloud.minimized = True if args.minimized is True else None
ScudCloud.plugins = False if args.no_plugins is True else True
@@ -79,7 +77,8 @@ def parse_arguments():
parser.add_argument('--version', action="store_true", help="print version and exit")
args = parser.parse_args()
if args.version:
- print("ScudCloud "+VERSION)
+ with open(os.path.join(Resources.INSTALL_DIR, 'VERSION'), "r") as f:
+ print("ScudCloud "+f.read())
sys.exit()
args.confdir = expanduser(args.confdir)
return args