From 39528995c4c98dd14e24228ec3f2ff90adcefbf6 Mon Sep 17 00:00:00 2001 From: Merith-TK Date: Mon, 15 May 2023 14:06:23 -0700 Subject: [PATCH] update build tools --- .minecraft/bin/version.json | 108 +++++++++--------- .minecraft/index.toml | 19 +-- ...ack_icon.png => modpack-template_icon.png} | Bin .minecraft/mods/sodium.pw.toml | 8 +- .minecraft/pack.toml | 2 +- Makefile | 76 ++++++++---- instance.cfg | 2 +- mmc-pack.json | 53 +-------- modpack_icon.png => modpack-template_icon.png | Bin 9 files changed, 118 insertions(+), 150 deletions(-) rename .minecraft/{modpack_icon.png => modpack-template_icon.png} (100%) rename modpack_icon.png => modpack-template_icon.png (100%) diff --git a/.minecraft/bin/version.json b/.minecraft/bin/version.json index bd620d1..491a782 100644 --- a/.minecraft/bin/version.json +++ b/.minecraft/bin/version.json @@ -1,55 +1,55 @@ { - "id": "1.18.1", - "inheritsFrom": "1.18.1", - "releaseTime": "2022-02-25T18:25:26+0000", - "time": "2022-02-25T18:25:26+0000", - "type": "release", - "minecraftArguments": "--username ${auth_player_name} --version ${version_name} --gameDir ${game_directory} --assetsDir ${assets_root} --assetIndex ${assets_index_name} --uuid ${auth_uuid} --accessToken ${auth_access_token} --userType ${user_type} --versionType ${version_type}", - "libraries": [ - { - "name": "net.fabricmc:tiny-mappings-parser:0.3.0+build.17", - "url": "https://maven.fabricmc.net/" - }, - { - "name": "net.fabricmc:sponge-mixin:0.11.2+mixin.0.8.5", - "url": "https://maven.fabricmc.net/" - }, - { - "name": "net.fabricmc:tiny-remapper:0.8.1", - "url": "https://maven.fabricmc.net/" - }, - { - "name": "net.fabricmc:access-widener:2.1.0", - "url": "https://maven.fabricmc.net/" - }, - { - "name": "org.ow2.asm:asm:9.2", - "url": "https://maven.fabricmc.net/" - }, - { - "name": "org.ow2.asm:asm-analysis:9.2", - "url": "https://maven.fabricmc.net/" - }, - { - "name": "org.ow2.asm:asm-commons:9.2", - "url": "https://maven.fabricmc.net/" - }, - { - "name": "org.ow2.asm:asm-tree:9.2", - "url": "https://maven.fabricmc.net/" - }, - { - "name": "org.ow2.asm:asm-util:9.2", - "url": "https://maven.fabricmc.net/" - }, - { - "name": "net.fabricmc:intermediary:1.18.1", - "url": "https://maven.fabricmc.net/" - }, - { - "name": "net.fabricmc:fabric-loader:0.13.3", - "url": "https://maven.fabricmc.net/" - } - ], - "mainClass": "net.fabricmc.loader.impl.launch.knot.KnotClient" -} \ No newline at end of file + "id": "1.19.4", + "inheritsFrom": "1.19.4", + "releaseTime": "2023-05-15T21:05:10+0000", + "time": "2023-05-15T21:05:10+0000", + "type": "release", + "minecraftArguments": "--username ${auth_player_name} --version ${version_name} --gameDir ${game_directory} --assetsDir ${assets_root} --assetIndex ${assets_index_name} --uuid ${auth_uuid} --accessToken ${auth_access_token} --userType ${user_type} --versionType ${version_type}", + "libraries": [ + { + "name": "net.fabricmc:tiny-mappings-parser:0.3.0+build.17", + "url": "https://maven.fabricmc.net/" + }, + { + "name": "net.fabricmc:sponge-mixin:0.12.4+mixin.0.8.5", + "url": "https://maven.fabricmc.net/" + }, + { + "name": "net.fabricmc:tiny-remapper:0.8.2", + "url": "https://maven.fabricmc.net/" + }, + { + "name": "net.fabricmc:access-widener:2.1.0", + "url": "https://maven.fabricmc.net/" + }, + { + "name": "org.ow2.asm:asm:9.4", + "url": "https://maven.fabricmc.net/" + }, + { + "name": "org.ow2.asm:asm-analysis:9.4", + "url": "https://maven.fabricmc.net/" + }, + { + "name": "org.ow2.asm:asm-commons:9.4", + "url": "https://maven.fabricmc.net/" + }, + { + "name": "org.ow2.asm:asm-tree:9.4", + "url": "https://maven.fabricmc.net/" + }, + { + "name": "org.ow2.asm:asm-util:9.4", + "url": "https://maven.fabricmc.net/" + }, + { + "name": "net.fabricmc:intermediary:1.19.4", + "url": "https://maven.fabricmc.net/" + }, + { + "name": "net.fabricmc:fabric-loader:0.14.19", + "url": "https://maven.fabricmc.net/" + } + ], + "mainClass": "net.fabricmc.loader.impl.launch.knot.KnotClient" + } \ No newline at end of file diff --git a/.minecraft/index.toml b/.minecraft/index.toml index ad67ffe..6a9eda2 100644 --- a/.minecraft/index.toml +++ b/.minecraft/index.toml @@ -5,7 +5,7 @@ file = "bin/version.json" hash = "b5f8dc11af2e5d2eeb17007a53fced417fdb3020baac8a8f8dd230a2d3fd854e" [[files]] -file = "modpack.icon.png" +file = "modpack-template_icon.png" hash = "50f74a7debb4a852e1384434500515f2478b8dcf0d71b75eba148ca34d89715c" [[files]] @@ -13,29 +13,14 @@ file = "mods/lithium.pw.toml" hash = "be8427f766253fce639d6e3e351b726a9b98e6ebc3ed4bec2023ea352bda0ae8" metafile = true -[[files]] -file = "mods/lithium.toml" -hash = "869cfbeecb3595d8e72a7ec77741389e9b2154d63478ac3ecb1fcaa0879c80ec" -metafile = true - [[files]] file = "mods/phosphor.pw.toml" hash = "466d5892937df5aa05388291463b163b42fa454d8bfd22713484a0167ca3702d" metafile = true -[[files]] -file = "mods/phosphor.toml" -hash = "103f9e1bc20ebbef5a496b73572aaa9a24066831fc61fe3a28eedea3602153f9" -metafile = true - [[files]] file = "mods/sodium.pw.toml" -hash = "942e9738be0c83d196cd7cee9a3e93b9184faff7882d83e3d52ec66912ac07eb" -metafile = true - -[[files]] -file = "mods/sodium.toml" -hash = "4aba93a705eb2c6300818297bc1d85329b9b085392810dbf15c79b5e3dd6d0ef" +hash = "74942b197e40ee1a4852751088b911b7ef4b9dd4191c3029896464924a8d8272" metafile = true [[files]] diff --git a/.minecraft/modpack_icon.png b/.minecraft/modpack-template_icon.png similarity index 100% rename from .minecraft/modpack_icon.png rename to .minecraft/modpack-template_icon.png diff --git a/.minecraft/mods/sodium.pw.toml b/.minecraft/mods/sodium.pw.toml index 3e283d0..63a64b6 100644 --- a/.minecraft/mods/sodium.pw.toml +++ b/.minecraft/mods/sodium.pw.toml @@ -1,13 +1,13 @@ name = "Sodium" -filename = "sodium-fabric-mc1.19.4-0.4.11+build.26.jar" +filename = "sodium-fabric-mc1.19.4-0.4.10+build.24.jar" side = "client" [download] -url = "https://cdn.modrinth.com/data/AANobbMI/versions/ugiIczl5/sodium-fabric-mc1.19.4-0.4.11%2Bbuild.26.jar" +url = "https://cdn.modrinth.com/data/AANobbMI/versions/b4hTi3mo/sodium-fabric-mc1.19.4-0.4.10%2Bbuild.24.jar" hash-format = "sha1" -hash = "db1f37c03a674a5f01132f5a3bb8fb6361c9dca8" +hash = "b060680929d7a6d130fb980a9f9907461df05fa1" [update] [update.modrinth] mod-id = "AANobbMI" -version = "ugiIczl5" +version = "b4hTi3mo" diff --git a/.minecraft/pack.toml b/.minecraft/pack.toml index e1fe7d2..f484c83 100644 --- a/.minecraft/pack.toml +++ b/.minecraft/pack.toml @@ -6,7 +6,7 @@ pack-format = "packwiz:1.1.0" [index] file = "index.toml" hash-format = "sha256" -hash = "3ab22d665a56d4ba026899210762e6bf3641be4f35fe8d56ffd4e2ed3d191114" +hash = "9b67be5e99d9ed21485dd7d7c77b00fcd54e186c760105ee4c8dda508f9e2f44" [versions] fabric = "0.14.9" diff --git a/Makefile b/Makefile index df314ff..5b29ab7 100644 --- a/Makefile +++ b/Makefile @@ -1,44 +1,57 @@ default: @echo "No Default make command configured" @echo "Please use either" - @echo " - make curseforge" - @echo " - make multimc" - @echo " - make technic" - @echo " - make all" + @echo " - make multimc" + @echo " - make curseforge" + @echo " - make modrinth" + @echo " - make technic" + @echo " - make server" + @echo " - make all" + @echo "" + @echo "Curseforge will make a curseforge import file" + @echo "" + @echo "Modrinth will make a modrinth import file" @echo "" - @echo "Curseforge will make a curseforge compatible zip" @echo "Multimc will make a multimc zip file which contains" @echo " the packwiz updater" @echo "" @echo "Technic will make a technic pack zip" @echo "" + @echo "Server will make a server pack zip" + @echo " This will include the packwiz updater," + @echo " but will not be configured to run by default" + @echo "" @echo "All will make all packs it can" @echo "" PACKNAME := $(notdir $(CURDIR)) +PACKURL := $(shell pw detect) -curseforge: +curseforge: refresh -mkdir .build @echo "Making Curseforge pack" packwiz curseforge export --pack-file .minecraft/pack.toml - mv ./*.zip ./.build/ + mv ./*.zip ./.build/${PACKNAME}-curseforge.zip -modrinth: +modrinth: refresh -mkdir .build @echo "Making Modrinth pack" - packwiz modrinth export --pack-file .minecraft/pack.toml - mv ./*.mrpack ./.build/ + packwiz modrinth export --pack-file .minecraft/pack.toml + mv ./*.mrpack ./.build/${PACKNAME}-modrinth.mrpack -multimc: +multimc: refresh -mkdir .build @echo "Making MultiMC pack" 7z d .build/${PACKNAME}-multimc.zip ./* -r 7z d .build/${PACKNAME}-multimc.zip ./.minecraft -r + @sed -i 's#{PACKURL}#${PACKURL}#' instance.cfg 7z a .build/${PACKNAME}-multimc.zip ./* -r 7z a .build/${PACKNAME}-multimc.zip ./.minecraft -r 7z d .build/${PACKNAME}-multimc.zip ./.build ./.minecraft/mods ./.minecraft/pack.toml ./.minecraft/index.toml -r + @sed -i 's#${PACKURL}#{PACKURL}#' instance.cfg -technic: + +technic: refresh -mkdir .build @echo "Making Technic pack" -rm -rf .technic @@ -49,18 +62,39 @@ technic: 7z d .build/${PACKNAME}-technic.zip ./* ./.* -r 7z a .build/${PACKNAME}-technic.zip ./.technic/* -r -preClean: - -rm -rf .build -postClean: - -rm -rf .technic - -git gc --aggressive --prune +server: refresh + -mkdir .build + @echo "Making Server pack" + -rm -rf .server + -cp -r .minecraft .server + cp ${PACKNAME}_icon.png .server/server-icon.png + cd .server && java -jar ../.minecraft/packwiz-installer-bootstrap.jar -s server ../.minecraft/pack.toml && cd .. + 7z d .build/${PACKNAME}-server.zip ./* ./.* -r + 7z a .build/${PACKNAME}-server.zip ./.server/* -r -all: preClean curseforge modrinth multimc technic postClean +preClean: refresh + -rm -rf .build + -rm -rf .server +postClean: refresh + -rm -rf .technic + -rm -rf .server + -git gc --aggressive --prune +clean: preClean postClean + +all: preClean curseforge modrinth multimc technic server postClean + +refresh: + cd .minecraft && packwiz refresh update-packwiz: go install github.com/packwiz/packwiz@latest go install github.com/Merith-TK/packwiz-wrapper/cmd/pw@main - go install github.com/Merith-TK/packwiz-wrapper/cmd/pw-modlist@main - go install github.com/Merith-TK/packwiz-wrapper/cmd/pw-reinstall@main clear - @echo "Packwiz has been Updated" \ No newline at end of file + @echo "Packwiz has been Updated" + +run-server: + cd .minecraft && pw refresh && cd .. + -mkdir .run + echo "eula=true" > .run/eula.txt + cd .run && java -jar ../.minecraft/packwiz-installer-bootstrap.jar ../.minecraft/pack.toml -s server && cd .. + cd .run && java -Xmx2G -Xms2G -jar server.jar nogui && cd .. diff --git a/instance.cfg b/instance.cfg index 3c5da19..1f0c6a4 100644 --- a/instance.cfg +++ b/instance.cfg @@ -2,4 +2,4 @@ InstanceType=OneSix iconKey=modpack.icon name=Modpack Template OverrideCommands=true -PreLaunchCommand="$INST_JAVA" -jar packwiz-installer-bootstrap.jar https://gitlab.com/Merith-TK/modpack-template/-/raw/main/.minecraft/pack.toml \ No newline at end of file +PreLaunchCommand="$INST_JAVA" -jar packwiz-installer-bootstrap.jar {PACKURL} \ No newline at end of file diff --git a/mmc-pack.json b/mmc-pack.json index 63a762b..36c765f 100644 --- a/mmc-pack.json +++ b/mmc-pack.json @@ -1,52 +1 @@ -{ - "components": [ - { - "cachedName": "LWJGL 3", - "cachedVersion": "3.2.2", - "cachedVolatile": true, - "dependencyOnly": true, - "uid": "org.lwjgl3", - "version": "3.2.2" - }, - { - "cachedName": "Minecraft", - "cachedRequires": [ - { - "equals": "3.2.2", - "suggests": "3.2.2", - "uid": "org.lwjgl3" - } - ], - "cachedVersion": "1.18.1", - "important": true, - "uid": "net.minecraft", - "version": "1.18.1" - }, - { - "cachedName": "Intermediary Mappings", - "cachedRequires": [ - { - "equals": "1.18.1", - "uid": "net.minecraft" - } - ], - "cachedVersion": "1.18.1", - "cachedVolatile": true, - "dependencyOnly": true, - "uid": "net.fabricmc.intermediary", - "version": "1.18.1" - }, - { - "cachedName": "Fabric Loader", - "cachedRequires": [ - { - "uid": "net.fabricmc.intermediary" - } - ], - "cachedVersion": "0.13.3", - "uid": "net.fabricmc.fabric-loader", - "version": "0.13.3" - } - ], - "formatVersion": 1 -} +{"components":[{"uid":"net.minecraft","version":"1.19.4"},{"cachedName":"LWJGL 3","cachedVersion":"3.2.2","cachedVolatile":true,"dependencyOnly":true,"uid":"org.lwjgl3","version":"3.2.2"},{"uid":"net.fabricmc.fabric-loader","version":"0.14.9"}],"formatVersion":1} \ No newline at end of file diff --git a/modpack_icon.png b/modpack-template_icon.png similarity index 100% rename from modpack_icon.png rename to modpack-template_icon.png