Some Small Updates :)

This commit is contained in:
Bigsk 2020-11-18 15:49:12 +08:00
parent 5b6592869b
commit 8cedf72d2c

17
core.py
View File

@ -137,22 +137,7 @@ class GMCLCore(object):
else: else:
return "Error:Wrong Auth Way." return "Error:Wrong Auth Way."
def SetRecomMem(self): def SetRecomMem(self):
if(platform.system()=="Windows"): '''The recommendation memory value set function'''
path="C:/"
elif(platform.system()=="Linux"):
path="/"
else:
path="/"
i=0
for ipath in os.listdir(Path):
FullDir=os.path.join(path,ipath)
if(os.path.isfile(FullDir)):
if("javaw.exe" in os.path.split(FullDir)[1]):
return FullDir
i+=1
if(i==1):
break
def SetRecomMem(self):
self.__Memory = float(psutil.virtual_memory().free / 1024 ** 3) * 0.8 self.__Memory = float(psutil.virtual_memory().free / 1024 ** 3) * 0.8
def SetJavaPath(self,path): def SetJavaPath(self,path):
if(path==None): if(path==None):