Compare commits

...

17 Commits
0.1.2 ... main

Author SHA1 Message Date
b3b929adda Update LICENSE 2025-07-10 16:54:53 -05:00
8ccf819e2a remove previous installer before download 2025-05-31 12:03:25 -05:00
9d9c84e215 rename installer.sh because i liek it better 2025-05-31 11:59:21 -05:00
86141c5c5c update comments 2025-05-31 11:14:11 -05:00
c23a60bdc1 upload install.sh 2025-05-31 11:12:28 -05:00
ea21bcd2a2 correct installer version to match prospective release 2025-05-31 11:05:05 -05:00
b69f7074a0 Merge branch 'main' of https://git.sarushinobie.dev/saru/family-minecraft-modpack 2025-05-31 10:58:10 -05:00
4bba1611cd rewrite exit message and update mod link to 0.1.3 2025-05-31 10:58:10 -05:00
d542397870 correct typos 2025-05-29 04:34:06 -05:00
98c1324af0 add error handling to windows install branch 2025-05-29 04:28:54 -05:00
4176263cb1 rename backup tarball 2025-05-29 04:16:49 -05:00
26a18d7877 update wget.download tarball link 2025-05-28 22:51:54 -05:00
69659a9787 correct typo 2025-05-28 22:39:25 -05:00
09733aa472 correct prism launcher flatpak directories (again) 2025-05-28 22:33:38 -05:00
d534d78d55 correct prism launcher flatpak directory 2025-05-28 22:29:13 -05:00
0026c06200 revert bbb14ce0c0e49ea009682ea1b8ba0fdba15a9afe
revert correct prism launcher
2025-05-28 22:27:50 -05:00
bbb14ce0c0 correct prism launcher 2025-05-28 22:22:17 -05:00
3 changed files with 42 additions and 15 deletions

View File

@ -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:

View File

@ -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")
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
View 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...