diff --git a/BUILD.md b/BUILD.md new file mode 100644 index 0000000..226940f --- /dev/null +++ b/BUILD.md @@ -0,0 +1,39 @@ +# How to build ISO file + +## Preparing minceraft + +At first, you need to prepare minceraft. + +Minceraft preparing consists of 5 steps: + +- Copying UltimMC configs to `data/mine` dir +- Building and copying mods to MC instance +- Compiling UltimMC from source (if you want to skip this step, you only need to copy built release of UltimMC to `ultimmc/build` directory) +- Downloading assets and libraries (just launches instance in online mode) +- Copying UltimMC configs again + +Use `mkmine` to do all this automatically: + +```bash +./mkmine + +# IMPORTANT: if you get java selection window, choose Java 21 +``` + +## Creating ISO file + +Use `mkiso` script to create ISO file. Result will be in the `output/` directory. + +Script compiles it only for x86_64, but I think it's not really hard to make it compile for any other architecture + +This script only work on Void Linux (because it needs XBPS). + +```bash +sudo ./mkiso + +# idk why it needs sudo, please pr if you know how to remove it +``` + +## One-liner + +Finally, you can forget all above and use just `[ -d data/mine ] || ./mkmine; sudo ./mkiso` \ No newline at end of file diff --git a/HACKING.md b/HACKING.md new file mode 100644 index 0000000..5a1855b --- /dev/null +++ b/HACKING.md @@ -0,0 +1,45 @@ +# How to add extra mods + +Important: we use Fabric Loader by default, if you want to change it to another loader, read `How to change MC version or loader` section below. + +## Building mod from source + +If you want to build them from source, just add new directory with `build.sh` script to `mods/` + +Example of build.sh: +```bash +#!/bin/bash + +./gradlew build +# build jar file + +mv build/libs/*.jar ../build +# move jar file to mods/build/ +``` + +## Add an already built mod + +To add any mod you want, just add this line to `mods/build-all.sh` + +If you have downloading link: +```bash +wget https://example.com/path/to/your-mod.jar +``` + +If your jar is in some dir: +```bash +cp /path/to/your-mod.jar . +``` + +# How to change MC version or loader + +To change version or loader of Minceraft, edit `mine-data/mmc-pack.json` file. +You can generate it with MultiMC or PrismLauncher, and just copy. + +# How to change my nickname + +UltimMC's nickname is stored in `run_mine.sh` file. Just change it from Steve to your one. + +# Finally + +Finally, after all the changes, build the ISO by [this guide](https://github.com/MeexReay/minceraftOS/blob/main/BUILD.md) \ No newline at end of file diff --git a/README.md b/README.md index 0caf5b0..a1c02be 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ Precompiled images: [Latest release](https://github.com/MeexReay/minceraftOS/rel To burn live-cd iso to disk use: -``` +```bash sudo dd if=/path/to/minceraftOS.iso of=/dev/ status=progress ``` @@ -29,45 +29,11 @@ To find out your `` (ex. sda), use `lsblk` or `fdisk -l` For now, there is no read-write mode, only live-cd -## How to make ISO file +## How to build ISO file -### Preparing minceraft - -At first, you need to prepare minceraft. - -Minceraft preparing consists of 5 steps: - -- Copying UltimMC configs to `data/mine` dir -- Building and copying mods to MC instance -- Compiling UltimMC from source (if you want to skip this step, you only need to copy built release of UltimMC to `ultimmc/build` directory) -- Downloading assets and libraries (just launches instance in online mode) -- Copying UltimMC configs again - -Use `mkmine` to do all this automatically: - -``` -./mkmine - -# IMPORTANT: if you get java selection window, choose Java 21 -``` - -### Creating ISO file - -Use `mkiso` script to create ISO file. Result will be in the `output/` directory. - -Script compiles it only for x86_64, but I think it's not really hard to make it compile for any other architecture - -This script only work on Void Linux (because it needs XBPS). - -``` -sudo ./mkiso - -# idk why it needs sudo, please pr if you know how to remove it -``` - -### One-liner - -Finally, you can forget all above and use just `[ -d data/mine ] || ./mkmine; sudo ./mkiso` +One-liner: `[ -d data/mine ] || ./mkmine; sudo ./mkiso` \ +Read more: [BUILD.md](https://github.com/MeexReay/minceraftOS/blob/main/BUILD.md) \ +Modification: [HACKING.md](https://github.com/MeexReay/minceraftOS/blob/main/HACKING.md) ## Roadmap diff --git a/mods/build-all.sh b/mods/build-all.sh index b91c0ce..d22bc34 100755 --- a/mods/build-all.sh +++ b/mods/build-all.sh @@ -13,4 +13,8 @@ for dir in */; do fi done -curl -o build/fabric-api.jar https://cdn.modrinth.com/data/P7dR8mSH/versions/IXeiAH6H/fabric-api-0.118.5%2B1.21.4.jar +cd build + +### Add your extra mods here ### + +wget https://cdn.modrinth.com/data/P7dR8mSH/versions/IXeiAH6H/fabric-api-0.118.5%2B1.21.4.jar diff --git a/version b/version index 17e51c3..6da28dd 100644 --- a/version +++ b/version @@ -1 +1 @@ -0.1.1 +0.1.1 \ No newline at end of file