Fix: Setup-Versionserkennung

Pythonversion wird nun richtig erkannt.
This commit is contained in:
Daniel Spittank 2017-02-05 23:15:21 +01:00
parent 5983d49f51
commit f80857b401

View file

@ -12,24 +12,24 @@ except:
try:
# Android
import androidhelper
platform = "Android"
plfn = "Android"
except:
try:
# iOS
import objc_util
platform = "iOS"
plfn = "iOS"
except:
# Andere, bisher nicht implementiert
print("Velamentum konnte nicht installiert werden.")
quit()
# Pfade festlegen
if platform == "Android":
tmpPVSP = "3" if pvt()[0] > 2 else ""
if plfn == "Android":
tmpPVSP = "3" if int(pvt()[0]) > 2 else ""
archPath = "/sdcard/qpython/scripts" + tmpPVSP + "/tmp"
biblPath = "/sdcard/qpython/lib/python" + pvt()[0] + "." + pvt()[1] + "/site-packages"
exmpPath = "/sdcard/qpython/scripts" + tmpPVSP + "/Beispiele"
elif platform == "iOS":
elif plfn == "iOS":
archPath = os.path.expanduser("~/Documents/tmp")
biblPath = os.path.expanduser("~/Documents/site-packages")
exmpPath = os.path.expanduser("~/Documents/Examples")
@ -52,7 +52,7 @@ arch.extractall(path=archPath)
# Installieren
vsrcPath = archPath + "/" + cmid + "/source/"
shutil.move(vsrcPath + platform, biblPath + '/velamentum')
shutil.move(vsrcPath + plfn, biblPath + '/velamentum')
shutil.move(vsrcPath + "Examples", exmpPath + '/velamentum')
# Nicht benötigte Dateien löschen