Fast mod-reload added + File counter, progress
This commit is contained in:
parent
936b3a9000
commit
618263b5d4
@ -110,23 +110,35 @@ def cloneMods(modDir):
|
||||
else:
|
||||
cloneFolder(os.path.join(root,dir),tmpAppPath,True,False,True)
|
||||
|
||||
def loadMods(output = False):
|
||||
if areModsLoaded():
|
||||
if unloadMods() == False:
|
||||
if output: print("Unloading mods failed!")
|
||||
def loadMods(output = False, fast = False):
|
||||
if fast == False:
|
||||
if areModsLoaded():
|
||||
if unloadMods() == False:
|
||||
if output: print("Unloading mods failed!")
|
||||
return False
|
||||
|
||||
if fast == True:
|
||||
if areModsLoaded() == False:
|
||||
if output: print("Can not fast-load mods when mods aren't loaded.")
|
||||
return False
|
||||
|
||||
print("Claiming app folder...")
|
||||
claimFolder(appPath)
|
||||
print("Claiming mod folder...")
|
||||
claimFolder(modPath)
|
||||
print("Cloning app folder...")
|
||||
cloneFolder(appPath,tmpAppPath,False)
|
||||
print("Cloning mods...")
|
||||
cloneMods(modPath)
|
||||
|
||||
os.rename(appPath,originalAppPath)
|
||||
os.rename(tmpAppPath,appPath)
|
||||
if fast == False:
|
||||
print("Claiming app folder...")
|
||||
claimFolder(appPath)
|
||||
print("Claiming mod folder...")
|
||||
claimFolder(modPath)
|
||||
print("Cloning app folder...")
|
||||
cloneFolder(appPath,tmpAppPath,False)
|
||||
print("Cloning mods...")
|
||||
cloneMods(modPath)
|
||||
|
||||
os.rename(appPath,originalAppPath)
|
||||
os.rename(tmpAppPath,appPath)
|
||||
else:
|
||||
os.rename(appPath,tmpAppPath)
|
||||
cloneMods(modPath)
|
||||
os.rename(tmpAppPath,appPath)
|
||||
|
||||
#ctypes.windll.kernel32.SetFileAttributesW(originalAppPath,2)
|
||||
|
||||
if output: print("\nMods have been loaded!")
|
||||
@ -243,14 +255,16 @@ def mainMenu():
|
||||
print("")
|
||||
print("Please choose an action:")
|
||||
print("1) Reload Mods")
|
||||
print("2) Unload Mods")
|
||||
print("3) Open Mods-Folder")
|
||||
print("2) Fast-Load Mods")
|
||||
print("3) Unload Mods")
|
||||
print("4) Open Mods-Folder")
|
||||
choice = input("Choice: ")
|
||||
|
||||
clear()
|
||||
if choice == "1": loadMods(True); input("Press ENTER to continue.")
|
||||
if choice == "2": unloadMods(True); input("Press ENTER to continue.")
|
||||
if choice == "3": openModsFolder()
|
||||
if choice == "2": loadMods(True,True); input("Press ENTER to continue.")
|
||||
if choice == "3": unloadMods(True); input("Press ENTER to continue.")
|
||||
if choice == "4": openModsFolder()
|
||||
|
||||
def requestAppPath():
|
||||
while True:
|
||||
|
Loading…
Reference in New Issue
Block a user