MommyHeather / AdvancedBackups

BSD 3-Clause "New" or "Revised" License
26 stars 4 forks source link

Feature request : startup scripts for the cli restoration tool #10

Closed MommyHeather closed 11 months ago

MommyHeather commented 12 months ago

When the backup folders are made, create a script for windows and linux users in the backup folder, by the readme.

This would :

Doing this would make the presence of a cli tool more obvious, along with removing any issues with many curseforge users not having a suitable system java installation.

NielsPilgaard commented 12 months ago

using the java installation that was used to run the game

How would we go about identifying that java installation?

MommyHeather commented 12 months ago

using the java installation that was used to run the game

How would we go about identifying that java installation?

Turns out, it's a little more difficult than I first thought when I suggested this at 3am haha The best bet seems to be getting the process id and performing a system call to determine how the process was ran from there...?

Alternatively, something less guaranteed would be to check the current location - should be easy to tell if it's curseforge or not, and if so we can use its local installation - otherwise query PATH for system java installs?

NielsPilgaard commented 12 months ago

Both those approaches seem a bit fickle to be honest. I think the best approach would be to rely on the user having the correct system java install, and if they don't it simply won't work.

MommyHeather commented 12 months ago

I get that... but I'm really not a fan of leaving them with no tool.

Either way, I'll update that readme file to mention system java being a requirement.

NielsPilgaard commented 12 months ago

Is the required java version different between mod versions, or can say, java 8, be used for them all?

MommyHeather commented 12 months ago

Is the required java version different between mod versions, or can say, java 8, be used for them all?

Currently the required version is the one required by the game version - so java 8 for 1.16 or lower, and higher versions for higher minecraft versions.

This isn't a code dependency, so could be changed with a bit of work.

NielsPilgaard commented 12 months ago

I think changing it to java 8 or above would be great, far more likely the system java will work then.

MommyHeather commented 12 months ago

Yeah, fair. I'll look into doing that, it seems ForgeGradle hates me if I just set the target java version to 8, so it'll be a tad more complex..

MommyHeather commented 12 months ago

Yeah, bit of a refactor will be required, but it'll be done no worries.

Anything else to say or shall I close this issue?

NielsPilgaard commented 12 months ago

One last thing - Are you going to make the .sh and .bat scripts, or is that on the modpack dev to make?

MommyHeather commented 12 months ago

One last thing - Are you going to make the .sh and .bat scripts, or is that on the modpack dev to make?

I've no issues bunding them with the mod - especially if they're runnable with just java 8.

NielsPilgaard commented 12 months ago

Perfect 👌

MommyHeather commented 12 months ago

11 Created and ready to merge, with that the core stuff (including cli) should be buildable targeting java 8 and safe to bundle with any version specific release. This will be tested further before merging.

MommyHeather commented 11 months ago

Cool. All merged, all mod jars are now runnable with java 8 - scripts next, then I can close this issue and move onto the other stuff.

NielsPilgaard commented 11 months ago

Awesome 👌

MommyHeather commented 11 months ago

With 3151125 this is now fully implemented. Closing.