Update README
This commit is contained in:
41
README.md
41
README.md
@@ -4,13 +4,11 @@ A Minecraft mod to record game sessions and replay them afterwards from any pers
|
|||||||
## Building
|
## Building
|
||||||
Make sure your sub-projects are up-to-date: `git submodule update --init --recursive`
|
Make sure your sub-projects are up-to-date: `git submodule update --init --recursive`
|
||||||
|
|
||||||
After the initial clone, running `./gradlew setupDecompWorkspace` is necessary. This may take quite some time.
|
For compiling 1.7.10, you must run `./gradlew :jGui:1.7.10:setupDecompWorkspace :1.7.10:setupDecompWorkspace` once after the initial clone. This may take quite some time.
|
||||||
This will also be necessary if the `replaymod_at.cfg` file has been changed (getting errors about code that is trying
|
|
||||||
to access private fields is a good indication that this has happened).
|
|
||||||
|
|
||||||
### No IDE
|
### No IDE
|
||||||
You can build the mod by running `./gradlew build`. You can then find the final jar files in `versions/$MCVERSION/build/libs/`.
|
You can build the mod by running `./gradlew build` (or just `./gradlew shadowJar`). You can then find the final jar files in `versions/$MCVERSION/build/libs/`.
|
||||||
You can also build single versions by running `./gradlew :1.8:build` (builds the MC 1.8 version).
|
You can also build single versions by running `./gradlew :1.8:build` (or just `./gradlew :1.8:shadowJar`) (builds the MC 1.8 version).
|
||||||
|
|
||||||
### IntelliJ
|
### IntelliJ
|
||||||
For the initial setup run `./gradlew idea genIntellijRuns`.
|
For the initial setup run `./gradlew idea genIntellijRuns`.
|
||||||
@@ -18,11 +16,9 @@ You also need to enable the Mixin annotation processor:
|
|||||||
1. Go to File -> Settings -> Build, Execution, Deployment -> Compiler -> Annotation Processors
|
1. Go to File -> Settings -> Build, Execution, Deployment -> Compiler -> Annotation Processors
|
||||||
2. Tick "Enable annotation processing"
|
2. Tick "Enable annotation processing"
|
||||||
3. Add a new entry to the "Annotation Processor options"
|
3. Add a new entry to the "Annotation Processor options"
|
||||||
4. Set the name to "reobfSrgFile" and the value to "$path/build/mcp-srg.srg" where you replace $path with the full
|
4. For Forge, set the name to "reobfSrgFile" and the value to "$path/versions/$MCVERSION/build/mcp-srg.srg" where you replace $path with the full
|
||||||
path to the folder containing the gradlew file
|
path to the folder containing the gradlew file
|
||||||
|
4. For Fabric, set the name to "inMapFileNamedIntermediary" and the value to "$HOME/.gradle/caches/fabric-loom/mappings/net.fabricmc.yarn-tiny-$YARNVERSION" where you replace $HOME with your home folder and $YARNVERSION with the respective yarn version used by the RM
|
||||||
Whenever you switch to a different core version (see `:setCoreVersion` below), you can either just run `./gradlew idea` or instead run
|
|
||||||
`./gradlew copySrg` and then refresh the gradle project from within IntelliJ.
|
|
||||||
|
|
||||||
### Eclipse
|
### Eclipse
|
||||||
|
|
||||||
@@ -69,25 +65,24 @@ The `//$$` shall be aligned with the inner-most `//#if`.
|
|||||||
//#endif
|
//#endif
|
||||||
```
|
```
|
||||||
Code for the more recent MC version shall be placed in the first branch of the if-else-construct.
|
Code for the more recent MC version shall be placed in the first branch of the if-else-construct.
|
||||||
Version-dependent import statements shall be placed separately from and after all other imports but before the `static` and `java.*` imports.
|
Version-dependent import statements shall be placed separately from and after all other imports.
|
||||||
Common version dependent code (including the fml and forge event bus) are available as static methods/fields in the `MCVer` class.
|
Common version dependent code (including the fml and forge event bus) are available as static methods/fields in the `MCVer` class.
|
||||||
|
|
||||||
The source code resides in `src/main` (gradle project `:core`) and is automatically passed through the
|
The source code in `src/main` is generally for the most recent Minecraft version and is automatically passed through the
|
||||||
preprocessor when any of the concrete versions are built (gradle projects `:1.8`, `:1.8.9`, etc.).
|
preprocessor when any of the other versions are built (gradle projects `:1.8`, `:1.8.9`, etc.).
|
||||||
Do **NOT** edit any of the code in `versions/$MCVERSION/build/` as it is automatically generated and will be overwritten without warning.
|
Do **NOT** edit any of the code in `versions/$MCVERSION/build/` as it is automatically generated and will be overwritten without warning.
|
||||||
|
|
||||||
You can pass the original source code through the preprocessor if you wish to develop/debug with another version of Minecraft:
|
You can change the version of the code in `src/main` if you wish to develop/debug with another version of Minecraft:
|
||||||
```bash
|
```bash
|
||||||
./gradle :1.9.4:setCoreVersion # switches all sources in src/main to 1.9.4
|
./gradle :1.9.4:setCoreVersion # switches all sources in src/main to 1.9.4
|
||||||
```
|
```
|
||||||
If you do so, you'll also have to run `./gradlew :core:copySrg :core:setupDecompWorkspace :jGui:core:setupDecompWorkspace`,
|
If you do so, you'll also have to refresh the project in your IDE.
|
||||||
followed by a refresh of the project in your IDE.
|
|
||||||
|
|
||||||
Make sure to switch back to the most recent branch before committing!
|
Make sure to switch back to the most recent branch before committing!
|
||||||
Care should also be taken that switching to a different branch and back doesn't introduce any uncommitted changes (e.g. due to different indention, especially in case of nested conditions).
|
Care should also be taken that switching to a different branch and back doesn't introduce any uncommitted changes (e.g. due to different indention, especially in case of nested conditions).
|
||||||
|
|
||||||
The `replaymod_at.cfg` file uses the same preprocessor but with different keywords (see already existent examples in that file).
|
Some files may use the same preprocessor with different keywords.
|
||||||
If required, more file extensions and keywords can be added to the upstream implementation or the respective tasks.
|
If required, more file extensions and keywords can be added in the `preprocess` block of the `versions/common.gradle` script.
|
||||||
|
|
||||||
### Versioning
|
### Versioning
|
||||||
The ReplayMod uses the versioning scheme outlined [here](http://mcforge.readthedocs.io/en/latest/conventions/versioning/)
|
The ReplayMod uses the versioning scheme outlined [here](http://mcforge.readthedocs.io/en/latest/conventions/versioning/)
|
||||||
@@ -99,22 +94,18 @@ keep the version name the same for all of them (with the exception of `MCVERSION
|
|||||||
"Multiple Minecraft Version" section does not apply.
|
"Multiple Minecraft Version" section does not apply.
|
||||||
- For pre-releases the shorter `-bX` is used instead of `-betaX`
|
- For pre-releases the shorter `-bX` is used instead of `-betaX`
|
||||||
|
|
||||||
When a new version is (pre-)release, a new annotated tag should be added with the name of the version and the
|
When a new version is (pre-)release, a new commit modifying the `version.txt` file should be added and the
|
||||||
`versions.json` file in the `master` branch should be updated. To simplify this process the gradle task `doRelease` can
|
`versions.json` file in the `master` branch should be updated. To simplify this process the gradle task `doRelease` can
|
||||||
be used: `./gradlew -PreleaseVersion=2.0.0-rc1 doRelease`. It will create the tag and update the version.json
|
be used: `./gradlew -PreleaseVersion=2.0.0-rc1 doRelease`. It will create the commit and update the version.json
|
||||||
accordingly.
|
accordingly.
|
||||||
(**Dev Note**: The gradle task still needs to be updated, now that all versions are on a single branch!
|
|
||||||
We're also considering to change the naming of versions to be commit-based, rather than tag-based.
|
|
||||||
So you don't get a different version if you haven't pulled all the tags.)
|
|
||||||
|
|
||||||
Care should be taken that the updated `version.json` is not pushed before a jar file is available on the
|
Care should be taken that the updated `version.json` is not pushed before a jar file is available on the
|
||||||
download page (or Jenkins) as it will inform the users of the update.
|
download page (or Jenkins) as it will inform the users of the update.
|
||||||
|
|
||||||
### Bugs
|
### Bugs
|
||||||
Bugs in the mod are tracked via [Bugzilla](https://bugs.replaymod.com/).
|
GitHub should generally be used to report bugs.
|
||||||
GitHub should only be used for issues that are generally not likely to affect any end users.
|
|
||||||
|
|
||||||
Bug numbers in commits such as `(fixes #42)` refer to Bugzilla unless noted otherwise.
|
In the past, bugs were tracked via [Bugzilla](https://bugs.replaymod.com/), so bug numbers in commits prior to 2020 such as `(fixes #42)` generally referred to Bugzilla unless noted otherwise.
|
||||||
|
|
||||||
## License
|
## License
|
||||||
The ReplayMod is provided under the terms of the GNU General Public License Version 3 or (at your option) any later version.
|
The ReplayMod is provided under the terms of the GNU General Public License Version 3 or (at your option) any later version.
|
||||||
|
|||||||
Reference in New Issue
Block a user