add comments, add compilation instructions, upload image.ico

This commit is contained in:
Obie Hinojosa 2024-11-02 02:44:42 -07:00
parent ab7805be2e
commit e5a645f2cb
2 changed files with 11 additions and 4 deletions

BIN
image.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 422 KiB

View File

@ -1,3 +1,9 @@
# compiling this is easy, just run `pip install wget` and `pip install pyinstaller` and then...
# compile with `python -m PyInstaller --onefile installer.py --icon image.ico`
# (wget is a dependency for this python script that doesnt come with python by default)
#import dependencies
import wget import wget
import tarfile import tarfile
import os import os
@ -6,8 +12,6 @@ import time
import shutil import shutil
from pathlib import Path from pathlib import Path
#define some functions ahead of time #define some functions ahead of time
def delete_directory(directory): def delete_directory(directory):
try: try:
@ -70,18 +74,21 @@ def win_check_folder_exists(folder):
if not os.path.exists(dir): if not os.path.exists(dir):
print() print()
print("[WARN!]: Mod folder not found. (is Fabric installed?)") print("[WARN!]: Mod folder not found. (is Fabric installed?)")
print("[WARN!]: (note: the script will continue on from here and the mods directory will be made automatically, but") print("[WARN!]: (note: the script WILL KEEP GOING ANYWAYS and the mods directory will be MADE AUTOMATICALLY, but")
print("[WARM!]: if you don't have fabric, the mods won't be loaded and you won't be able to join the server.)") print("[WARM!]: if you don't have fabric, the mods won't be loaded and you won't be able to join the server.)")
print()
print("[WARN!] THIS IS NOT A FATAL ERROR! DON'T CLOSE THE WINDOW!")
os.mkdir("mods") os.mkdir("mods")
print() print()
time.sleep(20) time.sleep(20)
#checks for mod folder existence and outputs [WARN!]
def check_for_old_mod_archive(filepath): def check_for_old_mod_archive(filepath):
if os.path.exists(filepath): if os.path.exists(filepath):
print("Found previously downloaded archive, deleting... Done.") print("Found previously downloaded archive, deleting... Done.")
#shut up #shut up
os.remove(filepath) os.remove(filepath)
#deletes old downloaded mod archives
#detect operating system and find home, minecraft, & mod folders #detect operating system and find home, minecraft, & mod folders
homedir = os.path.expanduser("~") homedir = os.path.expanduser("~")