Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In-place pack mod updating #138

Merged
merged 11 commits into from
Mar 3, 2024
Merged

In-place pack mod updating #138

merged 11 commits into from
Mar 3, 2024

Conversation

Caedis
Copy link
Member

@Caedis Caedis commented Mar 2, 2024

This is mainly for me, but it could be useful to other devs who update to nightly often.
Currently, this is mods only. Configs are not touched.

generate_nightly will need to be ran before hand

poetry run python -m gtnh.cli.generate_nightly --update-available
poetry run python -m gtnh.cli.update_pack_inplace [--use-symlink] <Side> "<.minecraft path>"

Side can be one of: CLIENT, SERVER, CLIENT_JAVA9, SERVER_JAVA9
The --use-symlink flag can be supplied if you want mods to be symlinked from the cache (only on posix systems)

An example to update the mods on my server:
poetry run python -m gtnh.cli.update_pack_inplace SERVER_JAVA9 "/mnt/rootshare/appdata/minecraft/gtnh/"

and on my local computer:
poetry run python -m gtnh.cli.update_pack_inplace CLIENT_JAVA9 "/mnt/games/Minecraft/Instances/GTNH Nightly/.minecraft/"

Quotes are only needed if the path contains spaces which can be escaped instead if you want.

To have certain mods excluded from the local pack, create a .inplace_mod_exclusions file in the root of the project and include the mod names from gtnh-assets.json

Example (I use RTG + CC, ModernControlling, and Xaero's)

Realistic-World-Gen
DefaultWorldGenerator
Controlling
JourneyMap
JourneyMap Server

@Caedis
Copy link
Member Author

Caedis commented Mar 2, 2024

Note, it will not catch custom versions of jars in the pack (like a -pre tag you built and tagged locally)

@Caedis
Copy link
Member Author

Caedis commented Mar 2, 2024

First thing I have really done in python, so please give any criticism.

@Caedis Caedis requested a review from a team March 2, 2024 23:28
Copy link
Contributor

@mitchej123 mitchej123 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems reasonable enough

@Caedis
Copy link
Member Author

Caedis commented Mar 3, 2024

Gonna hold off until the other PR is merged so I can make logging changes here as well

@Caedis Caedis merged commit afe94a3 into dev Mar 3, 2024
1 check passed
@Caedis Caedis deleted the feature/updatePackInplace branch March 3, 2024 06:38
@boubou19 boubou19 restored the feature/updatePackInplace branch March 13, 2024 14:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants