Minecraft の Bukkit でMODを作ろうとしたときにテスト環境の準備で手間取った話
環境は
・Windows7 64bit Professional
・git version 1.9.5.msysgit.1
・Java 1.8.0_45 64bit
BuildTools.jar をダウンロードしてきて
java -jar BuildTools.jar
をしてしばらく待ってたら
Applying: Obfuscation Helpers
fatal: sha1 information is lacking or useless (src/main/java/net/minecraft/server/MinecraftServer.java).
Repository lacks necessary blobs to fall back on 3-way merge.
Cannot fall back to three-way merge.
Patch failed at 0004 Obfuscation Helpers
The copy of the patch that failed is found in:
d:/app/Spigot/Spigot-Server/.git/rebase-apply/patch
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
Something did not apply cleanly to Spigot-Server.
Please review above details and finish the apply then
save the changes with rebuildPatches.sh
Error compiling Spigot, are you running this jar via msysgit?
java.lang.RuntimeException: Error running command, return status !=0: bash applyPatches.sh
at org.spigotmc.builder.Builder.runProcess(Builder.java:298)
at org.spigotmc.builder.Builder.main(Builder.java:261)
こんな感じのエラーが吐かれた。
調べてたら、spigotのスレに同じ質問をしている方がいた
リンク
git config --global core.safecrlf true
とし、gitの改行コードの自動変換をtrueにしたらできた。
Success! Everything compiled successfully. Copying final .jar files now. Copying craftbukkit-1.8.7-R0.1-SNAPSHOT-remapped.jar to d:\app\Spigot\. - Saved as craftbukkit-1.8.7.jar Copying craftbukkit-1.8.7-R0.1-SNAPSHOT.jar to d:\app\Spigot\. - Saved as craftbukkit-1.8.7.jar Copying spigot-1.8.7-R0.1-SNAPSHOT-remapped.jar to d:\app\Spigot\. - Saved as spigot-1.8.7.jar Copying spigot-1.8.7-R0.1-SNAPSHOT.jar to d:\app\Spigot\. - Saved as spigot-1.8.7.jar
やったぜ
ではでは。