diff --git a/GroundSystem.py b/GroundSystem.py index f72a52a..342a213 100644 --- a/GroundSystem.py +++ b/GroundSystem.py @@ -24,7 +24,9 @@ import shlex import subprocess import sys -from pathlib import Path +import os +import signal +import pathlib from PyQt5.QtWidgets import QApplication, QMainWindow, QMessageBox @@ -36,8 +38,8 @@ __version__ = _version - -ROOTDIR = Path(sys.argv[0]).resolve().parent +#ROOTDIR = Path(sys.argv[0]).resolve().parent +ROOTDIR = pathlib.Path(__file__).parent.absolute() # @@ -71,7 +73,7 @@ def closeEvent(self, evnt): if self.RoutingService: self.RoutingService.stop() print("Stopped routing service") - + os.kill(0, signal.SIGKILL) super().closeEvent(evnt) # Read the selected spacecraft from combo box on GUI @@ -171,9 +173,10 @@ def initRoutingService(self): # # Main + # -if __name__ == "__main__": - +def main(): + # Report Version Number upon startup print(_version_string) @@ -193,3 +196,6 @@ def initRoutingService(self): # Execute the app sys.exit(app.exec_()) + +if __name__ == "__main__": + main() diff --git a/Subsystems/__init__.py b/Subsystems/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/Subsystems/cmdGui/CommandFiles/__init__.py b/Subsystems/cmdGui/CommandFiles/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/Subsystems/cmdGui/__init__.py b/Subsystems/cmdGui/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/Subsystems/cmdUtil/__init__.py b/Subsystems/cmdUtil/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/Subsystems/tlmGUI/__init__.py b/Subsystems/tlmGUI/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..49fe098 --- /dev/null +++ b/requirements.txt @@ -0,0 +1 @@ +setuptools diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..f95033d --- /dev/null +++ b/setup.py @@ -0,0 +1,13 @@ +from setuptools import setup + +setup( + name='GroundSystem', + packages=['Subsystems','Subsystems.tlmGUI','Subsystems.cmdGui','Subsystems.cmdUtil'], + include_package_data=True, + version='0.0.0', + entry_points={ + 'console_scripts':[ + 'startg=GroundSystem:main' + ] + }, + )