diff --git a/README.md b/README.md index 23aef32..79b070a 100644 --- a/README.md +++ b/README.md @@ -26,15 +26,23 @@ The current development version of OpenADMS is 0.5 (code name more information, please see https://www.dabamos.de/. ## Installation -To run OpenADMS, clone the master branch, install the dependencies and execute -`openadms.py`: - +Before you can start OpenADMS, you have to clone the master branch and install +all dependencies: ``` $ git clone https://github.com/dabamos/openadms.git $ cd openadms $ python3 -m pip install -U -r requirements.txt -$ python3 openadms.py --config ./config/myconfig.json --with-mqtt-broker --debug ``` +Run OpenADMS from the command line: +``` +$ python3 openadms.py --config ./config/my_config.json --with-mqtt-broker --debug +``` +OpenADMS also features a graphical launcher. At first, run `win_install.bat` on +Microsoft Windows or install the dependencies manually: +``` +$ python3 -m pip install Gooey +``` +Execute `openadms-gui.pyw` to start the graphical launcher. ### Dependencies OpenADMS depends on the following Python libraries: @@ -47,6 +55,9 @@ OpenADMS depends on the following Python libraries: * [pyserial](https://pypi.python.org/pypi/pyserial) (Python Software Foundation Licence) * [uptime](https://pypi.python.org/pypi/uptime) (BSD-2-Clause Licence) +The graphical launcher uses [Gooey](https://pypi.python.org/pypi/Gooey) (MIT +Licence). + ## Message Broker The MQTT protocol is used for the message exchange in OpenADMS. You can either use an external MQTT message broker, like @@ -64,7 +75,6 @@ The configuration of OpenADMS is done by using a JSON-based text file, located in the directory `./config`. Please define modules, serial ports, sensors, and so on there. OpenADMS takes the file name of your custom configuration as an argument. For instance, run: - ``` $ python3 openadms.py --config ./config/myconfig.json --with-mqtt-broker --debug ``` @@ -72,7 +82,6 @@ $ python3 openadms.py --config ./config/myconfig.json --with-mqtt-broker --debug ## Virtual Environment The Python tool `venv` can create a virtual Python environment for development (with `csh`/`tcsh` on Unix): - ``` $ python3 -m venv virtual-environment $ source ./virtual-environment/bin/activate.csh @@ -89,4 +98,3 @@ the project website. ## Licence OpenADMS is licenced under the [European Union Public Licence](https://joinup.ec.europa.eu/community/eupl/og_page/eupl) (EUPL) v1.1. - diff --git a/openadmsw.pyw b/openadms-gui.pyw similarity index 100% rename from openadmsw.pyw rename to openadms-gui.pyw diff --git a/setup.py b/setup.py index 155c862..d1e9e9e 100644 --- a/setup.py +++ b/setup.py @@ -31,7 +31,7 @@ executables = [ Executable('openadms.py', base=base), - Executable('openadmsw.pyw', base=base) + Executable('openadms-gui.pyw', base=base) ] setup(name='OpenADMS', diff --git a/win_make.bat b/win_make.bat index 2d93f93..c625063 100644 --- a/win_make.bat +++ b/win_make.bat @@ -3,10 +3,10 @@ echo Creating executables with Python 3.6 ... :: PyInstaller does not support Python 3.6 yet -:: "C:\Program Files\Python\Python36-64\Scripts\pyinstaller-script.py" --clean --noconfirm --icon="res\img\dabamos.ico" --hidden-import "openadms" --hidden-import "module.database" --hidden-import "module.export" --hidden-import "module.linux" --hidden-import "module.notification" --hidden-import "module.port" --hidden-import "module.processing" --hidden-import "module.prototype" --hidden-import "module.schedule" --hidden-import "module.server" --hidden-import "module.totalstation" --hidden-import "module.virtual" openadmsw.pyw +:: "C:\Program Files\Python\Python36-64\Scripts\pyinstaller-script.py" --clean --noconfirm --icon="res\img\dabamos.ico" --hidden-import "openadms" --hidden-import "module.database" --hidden-import "module.export" --hidden-import "module.linux" --hidden-import "module.notification" --hidden-import "module.port" --hidden-import "module.processing" --hidden-import "module.prototype" --hidden-import "module.schedule" --hidden-import "module.server" --hidden-import "module.totalstation" --hidden-import "module.virtual" openadms-gui.pyw :: Using cx_Freeze instead ... python setup.py build echo Done. -pause \ No newline at end of file +pause