Upload files to 'troubleshooter'

This commit is contained in:
Jeison Yehuda Amihud (Blender Dumbass) 2020-12-10 22:04:12 +00:00
parent 978803a9fd
commit 6f337a899f

View file

@ -251,33 +251,91 @@ if not settings.read("Python-is-good"):
"urllib":None,
"urllib3":None,
"socket":None,
"readline":None
"readline":None,
"json":None,
"threading":None
}
modules_test(Modules, "checkingpythonmodules", "Python-is-good")
if not settings.read("VCStudio-is-good"):
OwnModules = {
"settings.settings":None,
"settings.talk":None,
"troubleshooter.troubleshooter":None,
"troubleshooter.fix":None,
"project_manager.pm_console":None,
"project_manager.pm_gtk":None,
"project_manager.pm_project":None,
"project_manager.pm_mainLayer":None,
"UI.UI_color":None,
"UI.UI_elements":None,
"UI.UI_testing":None,
}
modules_test(OwnModules, "checkingpartsoftheprogramm", "VCStudio-is-good")
missing = []
try:
# Let's get the list of files that supposed to be in here.
udata = open("settings/update.data")
udata = udata.read()
udata = udata.split("\n")
# Let's parse it
files = []
for f in udata:
if f and not f.startswith("VERSION") and not f.startswith("[") \
and not f.startswith("#") and f not in files:
files.append(f)
Modules = {}
num = 1
for f in sorted(files):
if num == h-5:
modules_test(Modules, "checkingpartsoftheprogramm", "VCStudio-is-good")
Modules = {}
num = 1
try:
test = open(f)
test = test.read()
if f.endswith(".py") and not "import bpy" in test\
and "-" not in f and f != "run.py":
Modules[f.replace("/", ".")[:-3]] = None
num += 1
except:
if not os.path.exists(os.getcwd()+"/"+f):
missing.append(f)
modules_test(Modules, "checkingpartsoftheprogramm", "VCStudio-is-good")
except:
i = "settings/update.data"
ans = i + " "*int(w/2-len(i)) + talk.text("failed")
output("\033[1;41m", " "+ans)
for i in missing:
ans = i + " "*int(w/2-len(i)) + talk.text("failed")
output("\033[1;41m", " "+ans)
desktop = """[Desktop Entry]
Name=VCStudio
GenericName=Blender-Organizer
Path="""+os.getcwd()+"""
Exec=python3 run.py
Icon="""+os.getcwd()+"""/tinyicon.png
Terminal=false
Type=Application
Categories=Graphics;3DGraphics;Office
"""
if os.path.exists(os.environ['HOME']+"/.local/share/applications") \
and not os.path.exists(os.environ['HOME']+"/.local/share/applications/VCStudio.desktop"):
o = open(os.environ['HOME']+"/.local/share/applications/VCStudio.desktop", "w")
o.write(desktop)
o.close()
output("\033[1;42m", talk.text("desktopcreated"))
print("\033[1;m")