diff --git a/BiogasControllerApp-V2.3/bin/gui/gui.kv b/BiogasControllerApp-V2.3/bin/gui/gui.kv index b07f5ef..c049319 100644 --- a/BiogasControllerApp-V2.3/bin/gui/gui.kv +++ b/BiogasControllerApp-V2.3/bin/gui/gui.kv @@ -7,6 +7,25 @@ RootScreen: Credits: Modify: +: + title: "NOTICE" + size_hint: 0.7, 0.5 + auto_dismiss: True + GridLayout: + cols:1 + Label: + text: "THIS SOFTWARE IS FREE SOFTWARE LICENSED UNDER THE GNU GENERAL PUBLIC LICENSE V3 (GPL V3) AND AS SUCH COMES WITH ABSOLUTELY NO WARRANTY! \n\nmore info under Settings > Credits" + text_size: self.width, None + GridLayout: + cols: 2 + Button: + text: "ok" + on_release: + root.dismiss() + Button: + text: "Don't show anymore" + on_release: + root.notshowanymore() : title: "BiogasControllerApp" font_size: 50 @@ -626,6 +645,9 @@ RootScreen: text: "This is a rework of the BiogasControllerApp V1, that was originally programmed by S. Reichmuth." Label: text: "Written by: Janis Hutz\nDesigned by: Janis Hutz\nDesign language: Kivy" + Label: + text: "This software is free Software licensed under the GPL V3 (GNU General Public License) and as such comes with absolutely no warranty. In return, you can use, modify, distribute or use any of the code of this software in your own project, if you reuse the same license. For more infos, you can find a copy of this license in the project folder." + text_size: self.width, None : on_pre_enter: self.config = root.read_config() diff --git a/BiogasControllerApp-V2.3/biogascontrollerapp.py b/BiogasControllerApp-V2.3/biogascontrollerapp.py index 2f9b8dc..126330d 100644 --- a/BiogasControllerApp-V2.3/biogascontrollerapp.py +++ b/BiogasControllerApp-V2.3/biogascontrollerapp.py @@ -163,6 +163,14 @@ class SaveConf(Popup): pass +class InfoPU(Popup): + def notshowanymore(self): + config.set("License", "show", "0") + with open("./config/settings.ini", "w") as configfile: + config.write(configfile) + self.dismiss() + + #################################################################### # SCREENS #################################################################### @@ -180,7 +188,16 @@ class HomeScreen(Screen): logger.error(e) return self.info + def openlicensepu(self): + self.licensepu = InfoPU() + self.licensepu.open() + def tryconnection(self): + if config["License"]["show"] == "1": + self.openlicensepu() + logger.info("Showing License info") + else: + pass try: com.connect(19200, special_port) com.quitcom() @@ -867,6 +884,9 @@ class BiogasControllerApp(App): logger.info("Init finished, starting UI") -if __name__ == "__main__": - bga = BiogasControllerApp() - bga.run() +try: + if __name__ == "__main__": + bga = BiogasControllerApp() + bga.run() +except Exception as e: + logger.critical(e) \ No newline at end of file diff --git a/BiogasControllerApp-V2.3/config/settings.ini b/BiogasControllerApp-V2.3/config/settings.ini index 20a4dbf..1c38166 100644 --- a/BiogasControllerApp-V2.3/config/settings.ini +++ b/BiogasControllerApp-V2.3/config/settings.ini @@ -1,16 +1,19 @@ [Port Settings] -specificPort = None +specificport = None [UI Config] -sizeH = 600 -sizeW = 800 +sizeh = 600 +sizew = 800 [Dev Settings] -# Settings generally aimed towards the devs of this software! verbose = False log_level = DEBUG -disableConnectionCheck = False +disableconnectioncheck = False + +[License] +show = 1 [Info] version = V2.3.0 -subVersion = +subversion = + diff --git a/README.md b/README.md index 4b37e8c..d973277 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,8 @@ **BiogasControllerApp V2.3** - + THIS SOFWARE FALLS UNDER THE GPL V3 LICENSE AND AS SUCH COMES WITH + ABSOLUTELY NO WARRANTY! Thank you for downloading the new Version of the BiogasControllerApp! You are greeted with lots of new features, including a new and redesigned Graphical User Interface (later "GUI")