Added a necessary precondition for the GPL V3 license

This commit is contained in:
janis
2022-06-23 13:40:34 +02:00
parent 0261be8fad
commit edb48415f7
4 changed files with 56 additions and 10 deletions

View File

@@ -7,6 +7,25 @@ RootScreen:
Credits: Credits:
Modify: Modify:
<InfoPU>:
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()
<QuitPU>: <QuitPU>:
title: "BiogasControllerApp" title: "BiogasControllerApp"
font_size: 50 font_size: 50
@@ -626,6 +645,9 @@ RootScreen:
text: "This is a rework of the BiogasControllerApp V1, that was originally programmed by S. Reichmuth." text: "This is a rework of the BiogasControllerApp V1, that was originally programmed by S. Reichmuth."
Label: Label:
text: "Written by: Janis Hutz\nDesigned by: Janis Hutz\nDesign language: Kivy" 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
<Modify>: <Modify>:
on_pre_enter: self.config = root.read_config() on_pre_enter: self.config = root.read_config()

View File

@@ -163,6 +163,14 @@ class SaveConf(Popup):
pass 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 # SCREENS
#################################################################### ####################################################################
@@ -180,7 +188,16 @@ class HomeScreen(Screen):
logger.error(e) logger.error(e)
return self.info return self.info
def openlicensepu(self):
self.licensepu = InfoPU()
self.licensepu.open()
def tryconnection(self): def tryconnection(self):
if config["License"]["show"] == "1":
self.openlicensepu()
logger.info("Showing License info")
else:
pass
try: try:
com.connect(19200, special_port) com.connect(19200, special_port)
com.quitcom() com.quitcom()
@@ -867,6 +884,9 @@ class BiogasControllerApp(App):
logger.info("Init finished, starting UI") logger.info("Init finished, starting UI")
try:
if __name__ == "__main__": if __name__ == "__main__":
bga = BiogasControllerApp() bga = BiogasControllerApp()
bga.run() bga.run()
except Exception as e:
logger.critical(e)

View File

@@ -1,16 +1,19 @@
[Port Settings] [Port Settings]
specificPort = None specificport = None
[UI Config] [UI Config]
sizeH = 600 sizeh = 600
sizeW = 800 sizew = 800
[Dev Settings] [Dev Settings]
# Settings generally aimed towards the devs of this software!
verbose = False verbose = False
log_level = DEBUG log_level = DEBUG
disableConnectionCheck = False disableconnectioncheck = False
[License]
show = 1
[Info] [Info]
version = V2.3.0 version = V2.3.0
subVersion = subversion =

View File

@@ -2,7 +2,8 @@
**BiogasControllerApp V2.3** **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 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") lots of new features, including a new and redesigned Graphical User Interface (later "GUI")