From 9ff170660b87d047112e04826269c0844d061acc Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Sat, 12 Aug 2017 18:56:59 -0500 Subject: [PATCH] Move mc decompile source to its own folder Makes caching easier, ever so slightly more organized. --- .gitignore | 3 +-- .travis.yml | 2 +- scripts/decompile.sh | 2 +- scripts/importmcdev.sh | 2 +- scripts/init.sh | 2 +- scripts/makemcdevsrc.sh | 2 +- scripts/remap.sh | 4 ++-- scripts/testServer.sh | 2 +- 8 files changed, 9 insertions(+), 10 deletions(-) diff --git a/.gitignore b/.gitignore index a8596ddd67..dac4662c93 100644 --- a/.gitignore +++ b/.gitignore @@ -24,6 +24,7 @@ dist/ manifest.mf work/1.* +work/Minecraft work/BuildData work/Bukkit work/CraftBukkit @@ -52,8 +53,6 @@ run/ Paper-Server Paper-API -PaperSpigot-Server -PaperSpigot-API Paperclip.jar paperclip.jar paperclip-*.jar diff --git a/.travis.yml b/.travis.yml index 237ea0da70..1ee9160291 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,4 +12,4 @@ before_install: cache: directories: - '$HOME/.m2/repository' - - 'work' + - 'work/Minecraft' diff --git a/scripts/decompile.sh b/scripts/decompile.sh index e56736beb1..f2c1754fdd 100755 --- a/scripts/decompile.sh +++ b/scripts/decompile.sh @@ -6,7 +6,7 @@ PS1="$" basedir="$(cd "$1" && pwd -P)" workdir="$basedir/work" minecraftversion=$(cat "$workdir/BuildData/info.json" | grep minecraftVersion | cut -d '"' -f 4) -decompiledir="$workdir/$minecraftversion" +decompiledir="$workdir/Minecraft/$minecraftversion" classdir="$decompiledir/classes" echo "Extracting NMS classes..." diff --git a/scripts/importmcdev.sh b/scripts/importmcdev.sh index a6f85e4930..260cf2a78b 100755 --- a/scripts/importmcdev.sh +++ b/scripts/importmcdev.sh @@ -9,7 +9,7 @@ basedir="$(cd "$1" && pwd -P)" workdir="$basedir/work" minecraftversion=$(cat "$workdir/BuildData/info.json" | grep minecraftVersion | cut -d '"' -f 4) -decompiledir="$workdir/$minecraftversion" +decompiledir="$workdir/Minecraft/$minecraftversion" export importedmcdev="" function import { diff --git a/scripts/init.sh b/scripts/init.sh index ce1d01cb61..87f80ad22f 100755 --- a/scripts/init.sh +++ b/scripts/init.sh @@ -6,7 +6,7 @@ PS1="$" basedir="$(cd "$1" && pwd -P)" workdir="$basedir/work" minecraftversion=$(cat "$workdir/BuildData/info.json" | grep minecraftVersion | cut -d '"' -f 4) -decompiledir="$workdir/$minecraftversion" +decompiledir="$workdir/Minecraft/$minecraftversion" nms="$decompiledir/net/minecraft/server" cb="src/main/java/net/minecraft/server" gpgsign="$(git config commit.gpgsign || echo "false")" diff --git a/scripts/makemcdevsrc.sh b/scripts/makemcdevsrc.sh index 35111da845..a599924247 100755 --- a/scripts/makemcdevsrc.sh +++ b/scripts/makemcdevsrc.sh @@ -7,7 +7,7 @@ PS1="$" basedir="$(cd "$1" && pwd -P)" workdir="$basedir/work" minecraftversion=$(cat "$workdir/BuildData/info.json" | grep minecraftVersion | cut -d '"' -f 4) -decompiledir="$workdir/$minecraftversion" +decompiledir="$workdir/Minecraft/$minecraftversion" nms="$decompiledir/net/minecraft/server" papernms="Paper-Server/src/main/java/net/minecraft/server" mcdevsrc="${decompiledir}/src/net/minecraft/server" diff --git a/scripts/remap.sh b/scripts/remap.sh index 4e0d0f8a78..26888cf5bd 100755 --- a/scripts/remap.sh +++ b/scripts/remap.sh @@ -11,11 +11,11 @@ accesstransforms="$workdir/BuildData/mappings/"$(cat "${workdir}/BuildData/info. classmappings="$workdir/BuildData/mappings/"$(cat "${workdir}/BuildData/info.json" | grep classMappings | cut -d '"' -f 4) membermappings="$workdir/BuildData/mappings/"$(cat "${workdir}/BuildData/info.json" | grep memberMappings | cut -d '"' -f 4) packagemappings="$workdir/BuildData/mappings/"$(cat "${workdir}/BuildData/info.json" | grep packageMappings | cut -d '"' -f 4) -jarpath="$workdir/$minecraftversion/$minecraftversion" +jarpath="$workdir/Minecraft/$minecraftversion/$minecraftversion" echo "Downloading unmapped vanilla jar..." if [ ! -f "$jarpath.jar" ]; then - mkdir -p "$workdir/$minecraftversion" + mkdir -p "$workdir/Minecraft/$minecraftversion" curl -s -o "$jarpath.jar" "https://s3.amazonaws.com/Minecraft.Download/versions/$minecraftversion/minecraft_server.$minecraftversion.jar" if [ "$?" != "0" ]; then echo "Failed to download the vanilla server jar. Check connectivity or try again later." diff --git a/scripts/testServer.sh b/scripts/testServer.sh index 71faf96b3d..ce8619bf03 100755 --- a/scripts/testServer.sh +++ b/scripts/testServer.sh @@ -5,7 +5,7 @@ PS1="$" basedir="$(cd "$1" && pwd -P)" workdir="$basedir/work" minecraftversion=$(cat "$workdir/BuildData/info.json" | grep minecraftVersion | cut -d '"' -f 4) -decompiledir="$workdir/$minecraftversion" +decompiledir="$workdir/Minecraft/$minecraftversion" #