-
Notifications
You must be signed in to change notification settings - Fork 6
Compilation
Are you impatient for the next release and tired of waiting? Wait no more. By following this easy tutorial, you can have a bleeding edge version of the mod in no time.
I know that for many users, this is a pretty straightforward thing to do, but I am getting tired of explaining it over and over again and worrying about > whether I didn't forget some detail, so I will try to summarize it on this page and just send people link to this page. This guide is mainly intended for > Windows users, since I am assuming that 99% of users using linux already know how to use git and gradle, or at least can figure it out pretty easily.
You need to have JDK 8 installed to compile the mod. Later versions might work, but I haven't tested them myself. You can opt for either Oracle JDK (requires registration on their site, idk why), or OpenJDK(from AdoptOpenJDK Adoptium/Temurin). Install it, and then proceed to the next step.
You will also need git, since github doesn't allow downloading the metadata. Go over download it on the git website, and install it.
Open up the command line (on windows, launch the "Git Bash" tool if you installed git). Navigate to a directory where you would like your to put the source code and clone the repository. For example:
cd $HOME/Downloads
git clone https://github.com/Enginecrafter77/SurvivalInc.git
cd SurvivalInc
This will create a directory named "SurvivalInc" in your downloads directory. After the last command, your command line should be prefixed with '(master)'.
If you don't want the latest version but rather a more specific version (either a release or commit), you can use 'git checkout <version>' or 'git checkout <commit-id>'.
For example, if you wanted version 1.2.7, use:
git checkout v1.2.7
To list the available releases, run git tags
or visit github tags page.
./gradlew build
After few minutes, you should see "BUILD SUCCESSFUL" message. At this point, you can close the command prompt. After that, navigate to the directory where you downloaded the source code. Under 'build/libs', there should be few files. For example, following the example from step 2, the built files will be located in $HOME/Downloads/SurvivalInc/build/libs
. You will need just the one without the -sources
suffix. This is your mod jar file. You can install it like you would install any minecraft mod; by putting it in your minecraft directory.
After that, you should be pretty much done!