Compare commits
17 Commits
Author | SHA1 | Date | |
---|---|---|---|
b3b929adda | |||
8ccf819e2a | |||
9d9c84e215 | |||
86141c5c5c | |||
c23a60bdc1 | |||
ea21bcd2a2 | |||
b69f7074a0 | |||
4bba1611cd | |||
d542397870 | |||
98c1324af0 | |||
4176263cb1 | |||
26a18d7877 | |||
69659a9787 | |||
09733aa472 | |||
d534d78d55 | |||
0026c06200 | |||
bbb14ce0c0 |
2
LICENSE
2
LICENSE
@ -1,6 +1,6 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2025 saru
|
||||
Copyright (c) 2025 Obie Hinojosa
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
|
34
installer.py
34
installer.py
@ -133,6 +133,8 @@ def check_for_launcher_files(filepath, launchername):
|
||||
# --------------------the real shit!------------------------
|
||||
|
||||
|
||||
print("[INFO]: Welcome! Installer Version: 0.1.4")
|
||||
|
||||
#detect operating system and find home, minecraft, & mod folders
|
||||
homedir = os.path.expanduser("~")
|
||||
os.chdir(homedir)
|
||||
@ -146,7 +148,7 @@ if platform.system() == "Linux":
|
||||
|
||||
detectedlauncher = "OfficialLauncher"
|
||||
check_for_launcher_files(str(Path.cwd()) + "/.local/share/PrismLauncher", "PrismLauncherPackage")
|
||||
check_for_launcher_files(str(Path.cwd()) + "/.var/app/org.prismlauncher.Prism.Launcher", "PrismLauncherFlatpak")
|
||||
check_for_launcher_files(str(Path.cwd()) + "/.var/app/org.prismlauncher.PrismLauncher/data/PrismLauncher/", "PrismLauncherFlatpak")
|
||||
|
||||
if detectedlauncher == "OfficialLauncher":
|
||||
print("[INFO]: No 3rd party launchers detected, falling back to default official launcher directories")
|
||||
@ -157,33 +159,40 @@ if platform.system() == "Linux":
|
||||
os.chdir(".local/share/PrismLauncher/instances/1.20.1/minecraft/")
|
||||
|
||||
if detectedlauncher == "PrismLauncherFlatpak":
|
||||
print("[INFO]: Using Prism Launcher (native) directory settings.")
|
||||
os.chdir(".var/app/org.prismlauncher.Prism.Launcher/data/PrismLauncher/instances/1.20.1/minecraft/")
|
||||
print("[INFO]: Using Prism Launcher (Flatpak) directory settings.")
|
||||
os.chdir(".var/app/org.prismlauncher.PrismLauncher/data/PrismLauncher/instances/1.20.1/minecraft/")
|
||||
|
||||
mcfolder = str(Path.cwd())
|
||||
modfolder = mcfolder + '/mods'
|
||||
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)
|
||||
time.sleep(2)
|
||||
@ -193,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
|
||||
@ -203,7 +211,7 @@ os.environ['SSL_CERT_FILE'] = certifi.where()
|
||||
# this line fixes SSL errors after compiling with PyInstaller as long as certifi is imported alongside it
|
||||
|
||||
try:
|
||||
wget.download('https://git.sarushinobie.dev/saru/family-minecraft-modpack/releases/download/0.0.1/mods.tar.gz')
|
||||
wget.download('https://git.sarushinobie.dev/saru/family-minecraft-modpack/releases/download/0.1.4/mods.tar.gz')
|
||||
# this is insane. `wget` the fucking goat. who knew windows package manager was so cool?
|
||||
except:
|
||||
print(); print("[ERR!] Fatal: Download failed! (Is Adolin online?)"); print()
|
||||
@ -211,9 +219,9 @@ except:
|
||||
extract_tar('mods.tar.gz', 'mods')
|
||||
# ('tarfile', 'directory to extract to')
|
||||
|
||||
print(""); print("sigma!")
|
||||
print("all done!")
|
||||
print(""); print("all done!")
|
||||
print("This window will exit and close in ten seconds. :)")
|
||||
print("(unless you're on linux, then you get to do it on your own. like usual.)")
|
||||
time.sleep(9)
|
||||
print_ascii_art()
|
||||
# print boykisser to console
|
||||
|
19
installer.sh
Executable file
19
installer.sh
Executable file
@ -0,0 +1,19 @@
|
||||
#!/bin/bash
|
||||
|
||||
# this is the quick installer for linux users (blurghh)
|
||||
|
||||
echo "[INFO]: Installer Quick Script for Linux"
|
||||
echo "[INFO]: Installer Version: 0.1.4"
|
||||
echo "[INFO]: Welcome!"
|
||||
|
||||
rm installer
|
||||
wget https://git.sarushinobie.dev/saru/family-minecraft-modpack/releases/download/0.1.4/installer
|
||||
chmod +x ./installer
|
||||
./installer
|
||||
rm installer
|
||||
|
||||
# just realized you have to chmod +x the "quick install"
|
||||
# script too, is there a point even?
|
||||
|
||||
# i mean, at least it makes sure to download the newest
|
||||
# installer version? *this* script shouldn't deprecate...
|
Loading…
x
Reference in New Issue
Block a user