This would cause ODR violations when those headers were included in
other places that also included stuff like "Version.h" (note the
"meta/Version.h"), which can cause problems, especially in LTO.
Signed-off-by: flow <flowlnlnln@gmail.com>
Now that #333 is merged and FS::copy works on non directory copyFile can be removed.
Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>
If a version on Modrinth has more than a single mod loader associated,
it means that it's possible we might get the wrong file for download,
since individual files don't really have this kind of metadata in the
API response.
So, in such cases, it's best to let the user take care of it instead.
Signed-off-by: flow <flowlnlnln@gmail.com>
In particular, this changes the order so that the instance gets created
before downloading the mods (like other install tasks), and the mod download
directly puts the files in the staging folder (like the others), instead
of that weird makeCached and copy stuff.
This fixes some issues with modpack downloads from FTB, like creating an
instance with no mods in it.
Signed-off-by: flow <flowlnlnln@gmail.com>
This prevents custom names from being lost when updating, by only
changing the name if the old instance name constains the old version,
so that we can update it if the user whishes to.
Signed-off-by: flow <flowlnlnln@gmail.com>
This makes it harder for problems in the updating process to affect the
current instance. Network issues, for instance, will no longer put the
instance in an invalid state.
Still, a possible improvement to this would be passing that logic to
InstanceStaging instead, to be handled with the instance commiting
directly. However, as it is now, the code would become very spaguetti-y,
and given that the override operation in the commiting could also put
the instance into an invalid state, it seems to me that, in order to
fully error-proof this, we would need to do a copy operation on the
whole instance, in order to modify the copy, and only in the end
override everything an once with a rename. That also has the possibility
of corrupting the instance if done without super care, however, so I
think we may need to instead create an automatic backup system, with an
undo command of sorts, or something like that. This doesn't seem very
trivial though, so it'll probably need to wait until another PR. In the
meantime, the user is advised to always backup their instances before
doing this kind of action, as always.
What a long commit message o.O
Signed-off-by: flow <flowlnlnln@gmail.com>