aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore2
-rw-r--r--local-config.ini7
-rwxr-xr-xmodpackman.py81
-rw-r--r--mods.txt4
-rw-r--r--packs/jeffrey-3/.gitignore8
-rw-r--r--packs/jeffrey-3/config/creeperconfetti-common.toml8
-rw-r--r--packs/jeffrey-3/jeffrey-3-icon.ico (renamed from jeffrey-3-icon.ico)bin9662 -> 9662 bytes
-rw-r--r--packs/jeffrey-3/jeffrey-3-icon.png (renamed from jeffrey-3-icon.png)bin923 -> 923 bytes
-rw-r--r--packs/jeffrey-3/pack-lock.ini83
-rw-r--r--packs/jeffrey-3/pack.ini (renamed from pack.ini)0
-rw-r--r--todo.md7
-rw-r--r--util.py18
-rw-r--r--version.txt80
13 files changed, 174 insertions, 124 deletions
diff --git a/.gitignore b/.gitignore
index 8f39806..fcb831d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -6,3 +6,5 @@ __pycache__/
*.swp
*.swo
*.log
+build/
+dist/
diff --git a/local-config.ini b/local-config.ini
deleted file mode 100644
index c263df3..0000000
--- a/local-config.ini
+++ /dev/null
@@ -1,7 +0,0 @@
-# this file is local configuration merged into the pack configuration at runtime
-# (values here override those in pack.ini)
-[pack]
-# Uncomment this to override the default automatic selection of the mod install directory.
-#location = /home/example/.minecraft/instances/jeffrey/mods
-# A comma-separated list of mods that won't be deleted during the install process.
-whitelist = example_mod.jar,example_extra_mod.jar
diff --git a/modpackman.py b/modpackman.py
index 503fbf3..a37730d 100755
--- a/modpackman.py
+++ b/modpackman.py
@@ -10,6 +10,7 @@ import shutil
import requests
import pathlib
import hashlib
+from configparser import RawConfigParser
import util
from util import config
@@ -18,66 +19,88 @@ from util import config
def install():
mods_location = os.path.join(config["pack"]["location"], "mods")
whitelist = config["pack"]["whitelist"]
- version_file = "version.txt"
- pack_version = util.get_version_from_file(version_file)
- print("Updating pack with version " + str(pack_version) + "...")
- print()
+
+ # Actual download links are stored in pack-lock.ini, so we need to read it in here
+ pack_lock = RawConfigParser()
+ pack_lock.read('pack-lock.ini')
+
+ print(f"Updating pack with version {pack_lock['global']['pack_version']}...")
# create the mods folder if it doesn't already exist
pathlib.Path(mods_location).mkdir(parents=True, exist_ok=True)
- # (fname, checksum, url)
- mods = util.read_file(version_file)
- names = [mod[0] for mod in mods]
+ names = set(f'{mod}.jar' for mod in pack_lock['mod_versions'].keys())
# whitelist client mods (e.g. optifine)
- names += whitelist
+ names.update(whitelist)
i = 0
- for mod in mods:
- mod_path = os.path.join(mods_location, mod[0])
+ for entry in pack_lock['mod_versions'].items():
+ name = f'{entry[0]}.jar'
+ checksum, url = entry[1].split(',')
+ mod_path = os.path.join(mods_location, name)
i += 1
if os.path.exists(mod_path) and os.path.isfile(mod_path) and \
- hashlib.sha1(open(mod_path, 'rb').read()).hexdigest() == mod[1]:
- print("Skipping {mod[0]}, already up to date".format(mod=mod))
+ hashlib.sha1(open(mod_path, 'rb').read()).hexdigest() == checksum:
+ print(f"Skipping {name}, already up to date")
else:
- print('Installing {mod[0]} from {mod[2]}...'.format(mod=mod))
- print(' ({i} of {x})'.format(i=i,x=len(mods)), end='\r')
- download_obj = requests.get(mod[2], stream=True)
+ print(f'Installing {name} from {url}...')
+ print(f' ({i} of {len(pack_lock["mod_versions"])})', end='\r')
+ download_obj = requests.get(url, stream=True)
with open(mod_path, "wb") as write_file:
shutil.copyfileobj(download_obj.raw, write_file)
print("Done!" + " " * 8)
+ # Remove any old mods that might be stuck in the mods folder
print()
print("Removing old mods...")
for jar in os.listdir(mods_location):
if jar not in names and os.path.splitext(jar)[1] == ".jar":
os.remove(os.path.join(mods_location, jar))
- print("Removing '{jar}'".format(jar=jar))
+ print(f"Removing '{jar}'")
+
+
+ print('\nInstalling configs...')
+ # For config files, we don't need to remove any extras, as they
+ # will simply be ignored by Forge
+ if not os.path.exists('config'):
+ raise RuntimeError("Error: config folder must exist!")
+
+ mc_config_folder = os.path.join(config['pack']['location'], 'config')
+ if not os.path.exists(mc_config_folder):
+ os.mkdir(mc_config_folder)
+ for cfg in os.listdir('config'):
+ shutil.copyfile(cfg, os.path.join(mc_config_folder, cfg))
print()
print("Finished installing mods!")
-# Using the latest urls, update downloads.txt to match and have the correct sha1
-def apply_updates(mods, version_file, game_version=(2, 0, 0)):
- pack_version = util.get_version_from_file(version_file)
+
+def apply_updates():
+ """
+ Using the URLs defined in pack.ini, update all mods to the latest
+ compatible version and write them out to pack-lock.ini
+ """
print("Populating version file...")
print("Getting new versions of all mods...")
- mod_urls = util.find_updated_urls([x for x in mods.values()], game_version, threads=3)
+ mod_urls = util.find_updated_urls([x for x in config['mods'].values()], config['pack']['game_version'], threads=16)
print("Downloading and checksumming all mods...")
checksums = util.find_checksums(mod_urls)
- # Write information out to version.txt
- with open(version_file, 'w') as f:
- f.write('# Format: <jarname> <hex digested sha1> <direct download url>\n')
- f.write("#VERSION " + str(pack_version + 1) + "\n")
- for name, checksum, url in zip((k+'.jar' for k in mods.keys()), checksums, mod_urls):
- f.write(f'{name} {checksum} {url}\n')
+ # Write the updated mods list out to pack-lock.ini
+ pack_lock = RawConfigParser()
+ pack_lock.read('pack-lock.ini')
+ pack_lock['global']['pack_version'] = str(int(pack_lock['global']['pack_version']) + 1)
+ # This is only needed for the self-update feature
+ pack_lock['global']['config_files'] = ','.join(os.listdir('config'))
+ pack_lock['mods'] = {name: f'{checksum},{url}' for name, checksum, url in zip(config['mods'].keys(), checksums, mod_urls)}
+ with open('pack-lock.ini', 'w') as f:
+ pack_lock.write(f)
print()
print("Done!")
- print(f"Updates applied to {version_file}")
- print("New pack version is " + str(pack_version + 1))
+ print("Updates applied to pack-lock.ini")
+ print(f"New pack version is {pack_lock['global']['pack_version']}")
print("[!] No mods were installed. To update your mods folder, run 'update.py install'")
@@ -136,7 +159,7 @@ if __name__ == "__main__":
if args.command == "install":
install()
elif args.command == "apply_updates":
- apply_updates(config['mods'], "version.txt", config['pack']["game_version"])
+ apply_updates()
elif args.command == "check_updates":
check_updates(config['mods'], "version.txt", config['pack']["game_version"])
else:
diff --git a/mods.txt b/mods.txt
deleted file mode 100644
index 1978f1a..0000000
--- a/mods.txt
+++ /dev/null
@@ -1,4 +0,0 @@
-# fill this file with the download links for mods, or the curseforge mod main page
-# e.g.
-thaumcraft.jar https://www.curseforge.com/minecraft/mc-mods/thaumcraft
-baubles.jar https://www.curseforge.com/minecraft/mc-mods/baubles
diff --git a/packs/jeffrey-3/.gitignore b/packs/jeffrey-3/.gitignore
new file mode 100644
index 0000000..8f39806
--- /dev/null
+++ b/packs/jeffrey-3/.gitignore
@@ -0,0 +1,8 @@
+local-config.ini
+geckodriver
+geckodriver.exe
+geckodriver.log
+__pycache__/
+*.swp
+*.swo
+*.log
diff --git a/packs/jeffrey-3/config/creeperconfetti-common.toml b/packs/jeffrey-3/config/creeperconfetti-common.toml
new file mode 100644
index 0000000..d049bda
--- /dev/null
+++ b/packs/jeffrey-3/config/creeperconfetti-common.toml
@@ -0,0 +1,8 @@
+
+[General]
+ #The %chance that any given creeper will explode into confetti [0..100|default:100]
+ #Range: 0 ~ 100
+ confettiChance = 5
+ #Confetti Explosions Damage Players [false/true|default:false]
+ damagePlayers = false
+
diff --git a/jeffrey-3-icon.ico b/packs/jeffrey-3/jeffrey-3-icon.ico
index 3a75d9c..3a75d9c 100644
--- a/jeffrey-3-icon.ico
+++ b/packs/jeffrey-3/jeffrey-3-icon.ico
Binary files differ
diff --git a/jeffrey-3-icon.png b/packs/jeffrey-3/jeffrey-3-icon.png
index d60084b..d60084b 100644
--- a/jeffrey-3-icon.png
+++ b/packs/jeffrey-3/jeffrey-3-icon.png
Binary files differ
diff --git a/packs/jeffrey-3/pack-lock.ini b/packs/jeffrey-3/pack-lock.ini
new file mode 100644
index 0000000..f12e46c
--- /dev/null
+++ b/packs/jeffrey-3/pack-lock.ini
@@ -0,0 +1,83 @@
+[global]
+config_files = creeperconfetti-common.toml
+pack_version = 1
+
+[mod_versions]
+building-gadgets = 13e89349f2929c205c6c80615c6e927f70c9b1e0,https://media.forgecdn.net/files/3097/299/buildinggadgets-3.7.2.jar
+item-collectors = a4b3eeb92dd79736ce622e92f49bd5ff2b0b84f0,https://media.forgecdn.net/files/3101/223/itemcollectors-1.0.6-mc1.16.4.jar
+natures-compass = 30ae4fe62fbfdff8d81f84a821588ba882851a04,https://media.forgecdn.net/files/3123/531/NaturesCompass-1.16.4-1.8.5.jar
+packing-tape = 46060f5793a82a87967bf8137cbff73f34c40ac7,https://media.forgecdn.net/files/3082/552/PackingTape-1.16.3-0.10.0.jar
+seals = 8f83c9e18cae5929a24c528c4a0703d4f5202cac,https://media.forgecdn.net/files/3073/361/seals-1.16.3-2.0.0.jar
+simple-planes = 8c520c2bcd10c2e86c8e03cc0355e373610330dc,https://media.forgecdn.net/files/3118/221/simpleplanes-1.16.3-3.2.0.2.jar
+ender-chests = c30300af94311a46cc533cf9549f93432bbbcbe1,https://media.forgecdn.net/files/3106/960/enderchests-1.16-1.7.5.jar
+ender-tanks = a750b0d7fe4d50c23c647818b2bd11ea63b95ce9,https://media.forgecdn.net/files/3055/892/endertanks-1.16-1.9.3.jar
+gauges-and-switches = 438f5cdc2665016b5524eb2a9cf0d782019fba10,https://media.forgecdn.net/files/3104/34/rsgauges-1.16.4-1.2.6-b1.jar
+moving-elevators = aac2bf90b49f07875971e05d7cc00b1ddf440548,https://media.forgecdn.net/files/3117/14/movingelevators-1.2.27-mc1.16.4.jar
+cooking-for-blockheads = cb9d33c55eefc4d876b2590a9bd099c0ef1cea77,https://media.forgecdn.net/files/3098/223/CookingForBlockheads_1.16.3-9.2.2.jar
+discord-presence = cf7250f8cdd6dcbd0a3048a4bc992cb0f3964671,https://media.forgecdn.net/files/3103/834/SimpleDiscordRichPresence-1.16.4-1.3.5.jar
+shetiphiancore = b9e612714fc2bb7a6bd1be8b04a143b45d76b121,https://media.forgecdn.net/files/3090/382/shetiphiancore-1.16-3.8.4.jar
+quark = caf968bf01def88d248cdef3beebca4fa6690b30,https://media.forgecdn.net/files/3117/57/Quark-r2.4-276.jar
+blood-magic = 1a1254ba9bd8ffd2da3c5b2ba78b87fdadb07a2f,https://media.forgecdn.net/files/3118/746/BloodMagic-1.16.3-3.0.1-6.jar
+astral-sorcery = fe95397955f0e14f43b390d2d655766f4507e2c2,https://media.forgecdn.net/files/3118/579/astralsorcery-1.16.4-1.13.1.jar
+ae2 = 7d2b29fceaed530813aae3b60bef27a28ecc3257,https://media.forgecdn.net/files/3118/473/appliedenergistics2-8.2.0-alpha.2.jar
+mekanism = 6ada0dcce6673613dd26fea9afda663e697b3886,https://media.forgecdn.net/files/3100/510/Mekanism-1.16.4-10.0.17.444.jar
+mekanism-tools = 07a5c41e013229c417d74e343ef05e63ae55f273,https://media.forgecdn.net/files/3100/513/MekanismTools-1.16.4-10.0.17.444.jar
+mekanism-generators = e04ea7214b587e5d2ce56830c9d8de5039de6874,https://media.forgecdn.net/files/3100/512/MekanismGenerators-1.16.4-10.0.17.444.jar
+mekanism-additions = 0ad7c37f23a1fb5369bbf6cc655f1dc71884b53b,https://media.forgecdn.net/files/3100/514/MekanismAdditions-1.16.4-10.0.17.444.jar
+psi = 35ff69060bbdf7514da60d224ffd9db8bdd0f772,https://media.forgecdn.net/files/3106/707/Psi%201.16-88.jar
+cc-tweaked = 569a119e39aa59d03d10189bec829f7bc8d6fb9b,https://media.forgecdn.net/files/3104/639/cc-tweaked-1.16.4-1.94.0.jar
+immersive-engineering = a1263bd875531ee5bf70937fa207f4509efb1cfe,https://media.forgecdn.net/files/3102/280/ImmersiveEngineering-1.16.4-4.1.1-128.jar
+botania = c890bd2ec0d13ead2627b0bf0c7599de6b2f6194,https://media.forgecdn.net/files/3086/502/Botania-1.16.3-409.jar
+jei = 2bbcffbbe7ac7c93e75783637a0a78fddcb4109d,https://media.forgecdn.net/files/3109/181/jei-1.16.4-7.6.0.58.jar
+tetra = 6e097ef3053cc56b95973607db632d08ebf6c554,https://media.forgecdn.net/files/3104/240/tetra-1.16.4-3.3.1.jar
+immersive-portals = 3fc06df79a96fc9e695c3f1091772e8cd2b175cd,https://github.com/DylanJones/ImmersivePortalsModForForge/releases/download/v0.9-1.16-temp/immersive-portals-0.9.jar
+inventory-sorter = fb538c5a8eb1e8a7a2bc35f3344b816634d53e4e,https://media.forgecdn.net/files/3077/903/inventorysorter-1.16.1-18.1.0.jar
+creeper-confetti = c1d06621ba453680fe31dd30fe11f6ea9bcc8e93,https://media.forgecdn.net/files/3063/500/creeperconfetti-3.4.jar
+hwyla = 79123ef4c447affe57e77ee241d78c494bd8948d,https://media.forgecdn.net/files/3033/593/Hwyla-forge-1.10.11-B78_1.16.2.jar
+jer = dcede97c594d1f89a071bd2f904f232f789aea44,https://media.forgecdn.net/files/3109/962/JustEnoughResources-1.16.4-0.12.0.103.jar
+ender-tendril = caa72968398bf124e5c2fcb03833547b74b68056,https://media.forgecdn.net/files/3069/322/EnderTendril-1.16.3-1.1.1%2B4.jar
+discord-integration = d144c5a7918f3ccd7ab01b8768893c0562388cb3,https://media.forgecdn.net/files/3118/761/dcintegration-2.0.2-1.16.jar
+step = dcc4854053a27c8c893fb3809b6d2a2cda0741ab,https://media.forgecdn.net/files/3100/371/step-1.16.4-1.0.3.jar
+simply-backpacks = d4bb5d2d4d8078debef3e7f0788f21db3f637bfa,https://media.forgecdn.net/files/3076/926/simplybackpacks-1.16.3-1.4.13.jar
+better-mineshafts = aab53b56b16d0d6627a5717f2e79c384e416535b,https://media.forgecdn.net/files/3112/344/BetterMineshafts-Forge-1.16.3-1.1.jar
+comforts = dee90d20dd732ee14d1e600bd886cb4f75271d94,https://media.forgecdn.net/files/3107/489/comforts-forge-1.16.4-4.0.0.2.jar
+better-than-llamas = 29cecac936279cc87cc4a957acfbcca8d5551b2e,https://media.forgecdn.net/files/3062/115/BetterThanLlamas-1.16.3-1.1.1.jar
+better-than-bunnies = 58640158f2aedbb0547d37568c0ccca66fd49944,https://media.forgecdn.net/files/3062/114/BetterThanBunnies-1.16.3-1.2.0.jar
+corpse = d5bf41cad1a7c7d90972697e3f5494dd0444e15c,https://media.forgecdn.net/files/3123/623/corpse-1.16.4-1.0.4.jar
+gilded-armor = 2eae828bcf1ef89c302f7100fe02505ac048c5e1,https://media.forgecdn.net/files/3069/303/gildedarmor-1.16.3-1.0.3.jar
+jei-integration = e9368114e66bf4fc23cd21dd97b95c469115dd55,https://media.forgecdn.net/files/3122/292/jeiintegration_1.16.4-6.1.1.11.jar
+openblocks-elevator = 6e3e440447a57b7b2b3256d4acbf1519be3a09c8,https://media.forgecdn.net/files/3110/386/elevatorid-1.16.4-1.7.8.jar
+ranged-pumps = 202c2aba870b852638d6ed28074dd0e91b2f76c1,https://media.forgecdn.net/files/3065/697/rangedpumps-0.8.2.jar
+the-conjurer = 3dd29349f2190d2f5b40cebed4fa67f6bb716324,https://media.forgecdn.net/files/3107/953/the-conjurer-1.16.4-1.0.13.jar
+trashcans = cc59ed3017aca041de132cbfe14cff279be00312,https://media.forgecdn.net/files/3101/203/trashcans-1.0.3-mc1.16.4.jar
+controlling = d7d04f585795b3d3040a6ad863a8737cf2efa6ac,https://media.forgecdn.net/files/3110/995/Controlling-7.0.0.11.jar
+ding = d984f82495e1ed12236aeea6e6be20d2bd094d72,https://media.forgecdn.net/files/3062/74/Ding-1.16.3-1.2.0.jar
+appleskin = d0e2d9d9bf17806d3fbd263a8702822ab33edeb1,https://media.forgecdn.net/files/3035/787/AppleSkin-mc1.16.2-forge-1.0.14.jar
+enchantment-descriptions = 30439e14507a5b942d4b696af8a1dbc463134199,https://media.forgecdn.net/files/3112/901/EnchantmentDescriptions-1.16.4-6.0.2.jar
+emojiful = 994b1e4de03a22880a904339c64d35db93d09732,https://media.forgecdn.net/files/3099/65/emojiful-1.16.3-2.1.1.jar
+clumps = d7b9dad4a2ca23b4e262cfc0d793b5565a21bd95,https://media.forgecdn.net/files/3099/275/Clumps-6.0.0.12.jar
+toast-control = 6ebe524115df53b9d9a8068e1490ce20b9e139dc,https://media.forgecdn.net/files/3069/51/Toast-Control-1.16.3-4.3.0.jar
+mouse-tweaks = b9c5ac6c2183eee2c4acda20dc1dd7fc2c387fa2,https://media.forgecdn.net/files/3035/780/MouseTweaks-2.13-mc1.16.2.jar
+recipe-buffers = b6a5af3c63651ae8f5434cec4fa753a5bfc5fdbb,https://media.forgecdn.net/files/3086/475/recipebuffers-1.0.jar
+harvest = f9618079d9456c23133ab89909fdd1c9fbae56b8,https://media.forgecdn.net/files/3087/381/harvest-1.16.3-1.0.3.jar
+light-overlay = a3caff7768581d5d97b5433dd834dfa6d676aea9,https://media.forgecdn.net/files/3091/376/light-overlay-5.5.4.jar
+morpheus = da30b18acd23c270a7da07ed8feb693291efcf90,https://media.forgecdn.net/files/3114/135/Morpheus-1.16.4-4.2.68.jar
+extreme-sound-muffler = 056a06346f1129b5dcdafe335a508c0e8254a7de,https://media.forgecdn.net/files/3125/582/extremeSoundMuffler-3.1_Forge-1.16.4.jar
+fast-workbench = c7f0296b5c569f1fe11aa6368b87bebfa01c9ddc,https://media.forgecdn.net/files/3112/661/FastWorkbench-1.16.3-4.4.1.jar
+findme = 7f18ff3af51b46c388d780c0b0afb9b400cc7962,https://media.forgecdn.net/files/3073/336/findme-1.16.3-2.1.0.0.jar
+wawla = 9aeea4cc8ae5bfa89701435b7c71bffdc43cc49d,https://media.forgecdn.net/files/3124/964/WAWLA-1.16.4-7.0.2.jar
+iron-chests = 3e7a9131d1ea836527d5cf7a1761d8b4dc7026a3,https://media.forgecdn.net/files/3105/315/ironchest-1.16.4-11.2.10.jar
+reauth = f5bdf682d64bcde250c8a2a9c1261e285540ac9b,https://media.forgecdn.net/files/3105/779/ReAuth-1.16-Forge-3.9.3.jar
+yungs-caves = 6b4603a8fc2cb2aa13e8cf745865b25e10e25bde,https://media.forgecdn.net/files/3110/318/BetterCaves-1.16.3-1.0.5.jar
+mgui = 847a29f1913b3957d384e57be8ee415a51c3e8ff,https://media.forgecdn.net/files/3104/239/mgui-1.16.4-3.1.3.jar
+obfuscate = 0c486bc9a07bbd4aa100ef5fffe5b045e141de77,https://media.forgecdn.net/files/3067/472/obfuscate-0.5.0-1.16.3.jar
+placebo = 1513d08e468654c8893f00f6b844fa374fd56620,https://media.forgecdn.net/files/3092/113/Placebo-1.16.3-4.3.3.jar
+cloth-config = 1ee61a4974ce5c720b495a22d1221a4906a4334b,https://media.forgecdn.net/files/3112/227/cloth-config-forge-4.1.1.jar
+structure-jel = e60cf626b505ce13aee752b2bdbe2c273c383f17,https://media.forgecdn.net/files/3120/237/structure-gel-api-1.16.4-1.7.1.jar
+bookshelf = eb2a3f92ef92cab0362adc40d97c3b7accfc08bb,https://media.forgecdn.net/files/3118/648/Bookshelf-1.16.4-9.1.13.jar
+ichunutil = 902ee274d713242aae0339a3ddefabc277b65632,https://media.forgecdn.net/files/3062/89/iChunUtil-1.16.3-10.0.0.jar
+titanium = 21aae20ed2002e20ade0a3722f00c05ac586d9bc,https://media.forgecdn.net/files/3113/257/titanium-1.16.4-3.2.1.jar
+curios = 744de4d8889fbb0c5af43416e3bec16df056fe70,https://media.forgecdn.net/files/3122/651/curios-forge-1.16.4-4.0.3.0.jar
+autoreglib = c722edbeaf70abf9179b1d1613e1622d630621c3,https://media.forgecdn.net/files/3088/870/AutoRegLib-1.6-46.jar
+observerlib = c3154cb3f0e78ff9ef526f6de80dca802a70d31a,https://media.forgecdn.net/files/3123/187/observerlib-1.16.4-1.4.4.jar
+patchouli = 0aa68e4c4015b6a85f8b466bf658cc14695c738d,https://media.forgecdn.net/files/3086/492/Patchouli-1.16.2-47.jar
diff --git a/pack.ini b/packs/jeffrey-3/pack.ini
index b5c1dbb..b5c1dbb 100644
--- a/pack.ini
+++ b/packs/jeffrey-3/pack.ini
diff --git a/todo.md b/todo.md
new file mode 100644
index 0000000..1d7eb4c
--- /dev/null
+++ b/todo.md
@@ -0,0 +1,7 @@
+ - version.txt -> pack-lock.ini
+ - also add file_names for config
+ - pack_version in there as well
+ - copy config folder
+ - download config from url
+ - download everything from specified URL
+ - only when in a bundle
diff --git a/util.py b/util.py
index d6ac035..f2e1cd1 100644
--- a/util.py
+++ b/util.py
@@ -38,6 +38,16 @@ def load_config():
return config
+def update_self():
+ """
+ Try to download new versions of all of the pack configuration and data files
+ in order to update to the latest version. Will overwrite any existing pack.ini and other
+ config files, so be careful!
+ """
+
+ raise NotImplementedError()
+
+
def find_minecraft_directory():
"""
Find the location of the user's .minecraft folder based on
@@ -236,7 +246,6 @@ def firefox():
"""
Start a headless Firefox instance and return the Selenium refrence to it.
"""
- #print("Starting Selenium...")
try:
from selenium.webdriver import Firefox
from selenium.webdriver.firefox.options import Options
@@ -246,9 +255,10 @@ def firefox():
options = Options()
options.add_argument('-headless')
options.add_argument('--window-size 1920,1080')
- #for ~~cursed~~ windows people, put geckodriver in this folder
- if(os.path.exists("./geckodriver.exe")):
- return Firefox(executable_path='./geckodriver')
+
+ # for ~~cursed~~ windows people, put geckodriver in the folder next to modpackman.py
+ if(os.path.exists("../../geckodriver.exe")):
+ return Firefox(executable_path='../../geckodriver')
return Firefox()
diff --git a/version.txt b/version.txt
deleted file mode 100644
index 9568e87..0000000
--- a/version.txt
+++ /dev/null
@@ -1,80 +0,0 @@
-# Format: <jarname> <hex digested sha1> <direct download url>
-#VERSION 36
-building-gadgets.jar 13e89349f2929c205c6c80615c6e927f70c9b1e0 https://media.forgecdn.net/files/3097/299/buildinggadgets-3.7.2.jar
-item-collectors.jar a4b3eeb92dd79736ce622e92f49bd5ff2b0b84f0 https://media.forgecdn.net/files/3101/223/itemcollectors-1.0.6-mc1.16.4.jar
-natures-compass.jar 30ae4fe62fbfdff8d81f84a821588ba882851a04 https://media.forgecdn.net/files/3123/531/NaturesCompass-1.16.4-1.8.5.jar
-packing-tape.jar 46060f5793a82a87967bf8137cbff73f34c40ac7 https://media.forgecdn.net/files/3082/552/PackingTape-1.16.3-0.10.0.jar
-seals.jar 8f83c9e18cae5929a24c528c4a0703d4f5202cac https://media.forgecdn.net/files/3073/361/seals-1.16.3-2.0.0.jar
-simple-planes.jar 8c520c2bcd10c2e86c8e03cc0355e373610330dc https://media.forgecdn.net/files/3118/221/simpleplanes-1.16.3-3.2.0.2.jar
-ender-chests.jar c30300af94311a46cc533cf9549f93432bbbcbe1 https://media.forgecdn.net/files/3106/960/enderchests-1.16-1.7.5.jar
-ender-tanks.jar a750b0d7fe4d50c23c647818b2bd11ea63b95ce9 https://media.forgecdn.net/files/3055/892/endertanks-1.16-1.9.3.jar
-gauges-and-switches.jar 438f5cdc2665016b5524eb2a9cf0d782019fba10 https://media.forgecdn.net/files/3104/34/rsgauges-1.16.4-1.2.6-b1.jar
-moving-elevators.jar aac2bf90b49f07875971e05d7cc00b1ddf440548 https://media.forgecdn.net/files/3117/14/movingelevators-1.2.27-mc1.16.4.jar
-cooking-for-blockheads.jar cb9d33c55eefc4d876b2590a9bd099c0ef1cea77 https://media.forgecdn.net/files/3098/223/CookingForBlockheads_1.16.3-9.2.2.jar
-discord-presence.jar cf7250f8cdd6dcbd0a3048a4bc992cb0f3964671 https://media.forgecdn.net/files/3103/834/SimpleDiscordRichPresence-1.16.4-1.3.5.jar
-shetiphiancore.jar b9e612714fc2bb7a6bd1be8b04a143b45d76b121 https://media.forgecdn.net/files/3090/382/shetiphiancore-1.16-3.8.4.jar
-quark.jar caf968bf01def88d248cdef3beebca4fa6690b30 https://media.forgecdn.net/files/3117/57/Quark-r2.4-276.jar
-blood-magic.jar 1a1254ba9bd8ffd2da3c5b2ba78b87fdadb07a2f https://media.forgecdn.net/files/3118/746/BloodMagic-1.16.3-3.0.1-6.jar
-astral-sorcery.jar fe95397955f0e14f43b390d2d655766f4507e2c2 https://media.forgecdn.net/files/3118/579/astralsorcery-1.16.4-1.13.1.jar
-ae2.jar 7d2b29fceaed530813aae3b60bef27a28ecc3257 https://media.forgecdn.net/files/3118/473/appliedenergistics2-8.2.0-alpha.2.jar
-mekanism.jar 6ada0dcce6673613dd26fea9afda663e697b3886 https://media.forgecdn.net/files/3100/510/Mekanism-1.16.4-10.0.17.444.jar
-mekanism-tools.jar 07a5c41e013229c417d74e343ef05e63ae55f273 https://media.forgecdn.net/files/3100/513/MekanismTools-1.16.4-10.0.17.444.jar
-mekanism-generators.jar e04ea7214b587e5d2ce56830c9d8de5039de6874 https://media.forgecdn.net/files/3100/512/MekanismGenerators-1.16.4-10.0.17.444.jar
-mekanism-additions.jar 0ad7c37f23a1fb5369bbf6cc655f1dc71884b53b https://media.forgecdn.net/files/3100/514/MekanismAdditions-1.16.4-10.0.17.444.jar
-psi.jar 35ff69060bbdf7514da60d224ffd9db8bdd0f772 https://media.forgecdn.net/files/3106/707/Psi%201.16-88.jar
-cc-tweaked.jar 569a119e39aa59d03d10189bec829f7bc8d6fb9b https://media.forgecdn.net/files/3104/639/cc-tweaked-1.16.4-1.94.0.jar
-immersive-engineering.jar a1263bd875531ee5bf70937fa207f4509efb1cfe https://media.forgecdn.net/files/3102/280/ImmersiveEngineering-1.16.4-4.1.1-128.jar
-botania.jar c890bd2ec0d13ead2627b0bf0c7599de6b2f6194 https://media.forgecdn.net/files/3086/502/Botania-1.16.3-409.jar
-jei.jar 2bbcffbbe7ac7c93e75783637a0a78fddcb4109d https://media.forgecdn.net/files/3109/181/jei-1.16.4-7.6.0.58.jar
-tetra.jar 6e097ef3053cc56b95973607db632d08ebf6c554 https://media.forgecdn.net/files/3104/240/tetra-1.16.4-3.3.1.jar
-immersive-portals.jar 3fc06df79a96fc9e695c3f1091772e8cd2b175cd https://github.com/DylanJones/ImmersivePortalsModForForge/releases/download/v0.9-1.16-temp/immersive-portals-0.9.jar
-inventory-sorter.jar fb538c5a8eb1e8a7a2bc35f3344b816634d53e4e https://media.forgecdn.net/files/3077/903/inventorysorter-1.16.1-18.1.0.jar
-creeper-confetti.jar c1d06621ba453680fe31dd30fe11f6ea9bcc8e93 https://media.forgecdn.net/files/3063/500/creeperconfetti-3.4.jar
-hwyla.jar 79123ef4c447affe57e77ee241d78c494bd8948d https://media.forgecdn.net/files/3033/593/Hwyla-forge-1.10.11-B78_1.16.2.jar
-jer.jar dcede97c594d1f89a071bd2f904f232f789aea44 https://media.forgecdn.net/files/3109/962/JustEnoughResources-1.16.4-0.12.0.103.jar
-ender-tendril.jar caa72968398bf124e5c2fcb03833547b74b68056 https://media.forgecdn.net/files/3069/322/EnderTendril-1.16.3-1.1.1%2B4.jar
-discord-integration.jar d144c5a7918f3ccd7ab01b8768893c0562388cb3 https://media.forgecdn.net/files/3118/761/dcintegration-2.0.2-1.16.jar
-step.jar dcc4854053a27c8c893fb3809b6d2a2cda0741ab https://media.forgecdn.net/files/3100/371/step-1.16.4-1.0.3.jar
-simply-backpacks.jar d4bb5d2d4d8078debef3e7f0788f21db3f637bfa https://media.forgecdn.net/files/3076/926/simplybackpacks-1.16.3-1.4.13.jar
-better-mineshafts.jar aab53b56b16d0d6627a5717f2e79c384e416535b https://media.forgecdn.net/files/3112/344/BetterMineshafts-Forge-1.16.3-1.1.jar
-comforts.jar dee90d20dd732ee14d1e600bd886cb4f75271d94 https://media.forgecdn.net/files/3107/489/comforts-forge-1.16.4-4.0.0.2.jar
-better-than-llamas.jar 29cecac936279cc87cc4a957acfbcca8d5551b2e https://media.forgecdn.net/files/3062/115/BetterThanLlamas-1.16.3-1.1.1.jar
-better-than-bunnies.jar 58640158f2aedbb0547d37568c0ccca66fd49944 https://media.forgecdn.net/files/3062/114/BetterThanBunnies-1.16.3-1.2.0.jar
-corpse.jar d5bf41cad1a7c7d90972697e3f5494dd0444e15c https://media.forgecdn.net/files/3123/623/corpse-1.16.4-1.0.4.jar
-gilded-armor.jar 2eae828bcf1ef89c302f7100fe02505ac048c5e1 https://media.forgecdn.net/files/3069/303/gildedarmor-1.16.3-1.0.3.jar
-jei-integration.jar e9368114e66bf4fc23cd21dd97b95c469115dd55 https://media.forgecdn.net/files/3122/292/jeiintegration_1.16.4-6.1.1.11.jar
-openblocks-elevator.jar 6e3e440447a57b7b2b3256d4acbf1519be3a09c8 https://media.forgecdn.net/files/3110/386/elevatorid-1.16.4-1.7.8.jar
-ranged-pumps.jar 202c2aba870b852638d6ed28074dd0e91b2f76c1 https://media.forgecdn.net/files/3065/697/rangedpumps-0.8.2.jar
-the-conjurer.jar 3dd29349f2190d2f5b40cebed4fa67f6bb716324 https://media.forgecdn.net/files/3107/953/the-conjurer-1.16.4-1.0.13.jar
-trashcans.jar cc59ed3017aca041de132cbfe14cff279be00312 https://media.forgecdn.net/files/3101/203/trashcans-1.0.3-mc1.16.4.jar
-controlling.jar d7d04f585795b3d3040a6ad863a8737cf2efa6ac https://media.forgecdn.net/files/3110/995/Controlling-7.0.0.11.jar
-ding.jar d984f82495e1ed12236aeea6e6be20d2bd094d72 https://media.forgecdn.net/files/3062/74/Ding-1.16.3-1.2.0.jar
-appleskin.jar d0e2d9d9bf17806d3fbd263a8702822ab33edeb1 https://media.forgecdn.net/files/3035/787/AppleSkin-mc1.16.2-forge-1.0.14.jar
-enchantment-descriptions.jar 30439e14507a5b942d4b696af8a1dbc463134199 https://media.forgecdn.net/files/3112/901/EnchantmentDescriptions-1.16.4-6.0.2.jar
-emojiful.jar 994b1e4de03a22880a904339c64d35db93d09732 https://media.forgecdn.net/files/3099/65/emojiful-1.16.3-2.1.1.jar
-clumps.jar d7b9dad4a2ca23b4e262cfc0d793b5565a21bd95 https://media.forgecdn.net/files/3099/275/Clumps-6.0.0.12.jar
-toast-control.jar 6ebe524115df53b9d9a8068e1490ce20b9e139dc https://media.forgecdn.net/files/3069/51/Toast-Control-1.16.3-4.3.0.jar
-mouse-tweaks.jar b9c5ac6c2183eee2c4acda20dc1dd7fc2c387fa2 https://media.forgecdn.net/files/3035/780/MouseTweaks-2.13-mc1.16.2.jar
-recipe-buffers.jar b6a5af3c63651ae8f5434cec4fa753a5bfc5fdbb https://media.forgecdn.net/files/3086/475/recipebuffers-1.0.jar
-harvest.jar f9618079d9456c23133ab89909fdd1c9fbae56b8 https://media.forgecdn.net/files/3087/381/harvest-1.16.3-1.0.3.jar
-light-overlay.jar a3caff7768581d5d97b5433dd834dfa6d676aea9 https://media.forgecdn.net/files/3091/376/light-overlay-5.5.4.jar
-morpheus.jar da30b18acd23c270a7da07ed8feb693291efcf90 https://media.forgecdn.net/files/3114/135/Morpheus-1.16.4-4.2.68.jar
-extreme-sound-muffler.jar 056a06346f1129b5dcdafe335a508c0e8254a7de https://media.forgecdn.net/files/3125/582/extremeSoundMuffler-3.1_Forge-1.16.4.jar
-fast-workbench.jar c7f0296b5c569f1fe11aa6368b87bebfa01c9ddc https://media.forgecdn.net/files/3112/661/FastWorkbench-1.16.3-4.4.1.jar
-findme.jar 7f18ff3af51b46c388d780c0b0afb9b400cc7962 https://media.forgecdn.net/files/3073/336/findme-1.16.3-2.1.0.0.jar
-wawla.jar 9aeea4cc8ae5bfa89701435b7c71bffdc43cc49d https://media.forgecdn.net/files/3124/964/WAWLA-1.16.4-7.0.2.jar
-iron-chests.jar 3e7a9131d1ea836527d5cf7a1761d8b4dc7026a3 https://media.forgecdn.net/files/3105/315/ironchest-1.16.4-11.2.10.jar
-reauth.jar f5bdf682d64bcde250c8a2a9c1261e285540ac9b https://media.forgecdn.net/files/3105/779/ReAuth-1.16-Forge-3.9.3.jar
-yungs-caves.jar 6b4603a8fc2cb2aa13e8cf745865b25e10e25bde https://media.forgecdn.net/files/3110/318/BetterCaves-1.16.3-1.0.5.jar
-mgui.jar 847a29f1913b3957d384e57be8ee415a51c3e8ff https://media.forgecdn.net/files/3104/239/mgui-1.16.4-3.1.3.jar
-obfuscate.jar 0c486bc9a07bbd4aa100ef5fffe5b045e141de77 https://media.forgecdn.net/files/3067/472/obfuscate-0.5.0-1.16.3.jar
-placebo.jar 1513d08e468654c8893f00f6b844fa374fd56620 https://media.forgecdn.net/files/3092/113/Placebo-1.16.3-4.3.3.jar
-cloth-config.jar 1ee61a4974ce5c720b495a22d1221a4906a4334b https://media.forgecdn.net/files/3112/227/cloth-config-forge-4.1.1.jar
-structure-jel.jar e60cf626b505ce13aee752b2bdbe2c273c383f17 https://media.forgecdn.net/files/3120/237/structure-gel-api-1.16.4-1.7.1.jar
-bookshelf.jar eb2a3f92ef92cab0362adc40d97c3b7accfc08bb https://media.forgecdn.net/files/3118/648/Bookshelf-1.16.4-9.1.13.jar
-ichunutil.jar 902ee274d713242aae0339a3ddefabc277b65632 https://media.forgecdn.net/files/3062/89/iChunUtil-1.16.3-10.0.0.jar
-titanium.jar 21aae20ed2002e20ade0a3722f00c05ac586d9bc https://media.forgecdn.net/files/3113/257/titanium-1.16.4-3.2.1.jar
-curios.jar 744de4d8889fbb0c5af43416e3bec16df056fe70 https://media.forgecdn.net/files/3122/651/curios-forge-1.16.4-4.0.3.0.jar
-autoreglib.jar c722edbeaf70abf9179b1d1613e1622d630621c3 https://media.forgecdn.net/files/3088/870/AutoRegLib-1.6-46.jar
-observerlib.jar c3154cb3f0e78ff9ef526f6de80dca802a70d31a https://media.forgecdn.net/files/3123/187/observerlib-1.16.4-1.4.4.jar
-patchouli.jar 0aa68e4c4015b6a85f8b466bf658cc14695c738d https://media.forgecdn.net/files/3086/492/Patchouli-1.16.2-47.jar