Merge branch 'main' of https://git.sarushinobie.dev/saru/family-minecraft-modpack
This commit is contained in:
commit
b69f7074a0
22
installer.py
22
installer.py
@ -167,27 +167,34 @@ if platform.system() == "Linux":
|
||||
print("[INFO]: Changed current working directory to '" + str(mcfolder) + "'")
|
||||
|
||||
time.sleep(1)
|
||||
print()
|
||||
print("Backing up minecraft install...")
|
||||
print(); print("Backing up minecraft install...")
|
||||
print("Don't close the window! This'll take a moment...")
|
||||
|
||||
compress_tar(mcfolder, "mod-backup.tar.gz")
|
||||
compress_tar(mcfolder, "backup.tar.gz")
|
||||
|
||||
elif platform.system() == "Windows":
|
||||
print("Operating system detected: Windows")
|
||||
|
||||
os.chdir("AppData/Roaming/.minecraft")
|
||||
try:
|
||||
os.chdir("AppData/Roaming/.minecraft")
|
||||
except:
|
||||
print("[ERR!] Fatal: Minecraft directory not found. (Is Minecraft installed?)")
|
||||
print("[ERR!] Fatal: This window will close in 10 seconds...")
|
||||
print
|
||||
time.sleep(10)
|
||||
exit
|
||||
|
||||
mcfolder = str(Path.cwd())
|
||||
print("Changed current working directory to '" + str(mcfolder) + "'")
|
||||
print("[INFO]: Changed current working directory to '" + str(mcfolder) + "'")
|
||||
|
||||
time.sleep(1)
|
||||
print(); print("Backing up minecraft install...")
|
||||
print("Don't close the window! This'll take a moment...")
|
||||
|
||||
modfolder = str(mcfolder) + '/mods'
|
||||
compress_tar(mcfolder, "mod-backup.tar.gz")
|
||||
compress_tar(mcfolder, "backup.tar.gz")
|
||||
|
||||
os.chdir(mcfolder)
|
||||
os.chdir(mcfolder)
|
||||
time.sleep(2)
|
||||
# unclear if this timeout is necessary for UX
|
||||
|
||||
@ -195,7 +202,6 @@ time.sleep(2)
|
||||
delete_file("mods.tar.gz")
|
||||
delete_directory("mods")
|
||||
print("Deleting mod folder contents...")
|
||||
#shut up
|
||||
os.mkdir(str("mods"))
|
||||
|
||||
# download mod archive from git repo and extract
|
||||
|
Loading…
x
Reference in New Issue
Block a user