Upload files to 'troubleshooter'
This commit is contained in:
parent
978803a9fd
commit
6f337a899f
1 changed files with 78 additions and 20 deletions
|
@ -251,33 +251,91 @@ if not settings.read("Python-is-good"):
|
||||||
"urllib":None,
|
"urllib":None,
|
||||||
"urllib3":None,
|
"urllib3":None,
|
||||||
"socket":None,
|
"socket":None,
|
||||||
"readline":None
|
"readline":None,
|
||||||
|
"json":None,
|
||||||
|
"threading":None
|
||||||
}
|
}
|
||||||
|
|
||||||
modules_test(Modules, "checkingpythonmodules", "Python-is-good")
|
modules_test(Modules, "checkingpythonmodules", "Python-is-good")
|
||||||
|
|
||||||
if not settings.read("VCStudio-is-good"):
|
if not settings.read("VCStudio-is-good"):
|
||||||
|
|
||||||
OwnModules = {
|
missing = []
|
||||||
"settings.settings":None,
|
|
||||||
"settings.talk":None,
|
try:
|
||||||
"troubleshooter.troubleshooter":None,
|
|
||||||
"troubleshooter.fix":None,
|
# Let's get the list of files that supposed to be in here.
|
||||||
"project_manager.pm_console":None,
|
|
||||||
"project_manager.pm_gtk":None,
|
udata = open("settings/update.data")
|
||||||
"project_manager.pm_project":None,
|
udata = udata.read()
|
||||||
"project_manager.pm_mainLayer":None,
|
udata = udata.split("\n")
|
||||||
"UI.UI_color":None,
|
|
||||||
"UI.UI_elements":None,
|
# Let's parse it
|
||||||
"UI.UI_testing":None,
|
|
||||||
}
|
files = []
|
||||||
|
|
||||||
modules_test(OwnModules, "checkingpartsoftheprogramm", "VCStudio-is-good")
|
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")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue