From 2b50951385d559ea39f039d752faa7cf6fa41929 Mon Sep 17 00:00:00 2001
From: Vincent Texier <vit@free.fr>
Date: Sun, 21 Dec 2014 11:09:07 +0100
Subject: [PATCH] Add bin/cutecoin command

Simply run .../bin/cutecoin command from anywhere without installing or freezing cutecoin
Handle ctrl-c signal to quit
---
 .gitignore   |  3 ++-
 bin/cutecoin | 27 +++++++++++++++++++++++++++
 2 files changed, 29 insertions(+), 1 deletion(-)
 create mode 100755 bin/cutecoin

diff --git a/.gitignore b/.gitignore
index 431e4395..026d0917 100644
--- a/.gitignore
+++ b/.gitignore
@@ -10,7 +10,7 @@ dist
 build
 eggs
 parts
-bin
+bin/[a-b,d-z]
 var
 sdist
 develop-eggs
@@ -35,6 +35,7 @@ nosetests.xml
 .project
 .pydevproject
 .settings
+.idea
 
 # Generated files
 src/cutecoin/gen_resources/*
diff --git a/bin/cutecoin b/bin/cutecoin
new file mode 100755
index 00000000..e8fa6c9d
--- /dev/null
+++ b/bin/cutecoin
@@ -0,0 +1,27 @@
+#!/usr/bin/env python3
+# -*- coding: utf-8 -*-
+
+"""
+Created on 1 févr. 2014
+
+@author: inso
+"""
+import signal
+import sys
+import os
+sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '../lib')))
+sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '../src')))
+from PyQt5.QtWidgets import QApplication, QDialog
+from cutecoin.gui.mainWindow import MainWindow
+from cutecoin.core.app import Application
+
+
+if __name__ == '__main__':
+    # activate ctrl-c interrupt
+    signal.signal(signal.SIGINT, signal.SIG_DFL)
+    cutecoin = QApplication(sys.argv)
+    app = Application(sys.argv)
+    window = MainWindow(app)
+    window.show()
+    sys.exit(cutecoin.exec_())
+    pass
-- 
GitLab