This allows other code to reject proceeding when the UID is bad, which
is generally a good idea. :p
Co-authored-by: Sefa Eyeoglu <contact@scrumplex.net>
Signed-off-by: flow <flowlnlnln@gmail.com>
This checks the URL of the path of the file to be downloaded,
ensuring that it always contains the root .minecraft target folder,
following the warning in the mrpack documentation.
Signed-off-by: flow <flowlnlnln@gmail.com>
This turns issues like creating two shared ptrs from a single raw ptr
from popping up at runtime, instead making them a compile error.
Signed-off-by: flow <flowlnlnln@gmail.com>
debug bug builds run form inside the build dir before they are bundled can't find the jars
Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>
... and fixes a minor issue in the parsing.
This changes the expected behavior of Versions in one significant way:
Now, Versions like 1.2 or 1.5 evaluate to LESS THAN 1.2.0 and 1.5.0
respectively. This makes sense for sorting versions, since one expects
the versions without patch release to 'contain' the ones with, so the
ones without should be evaluated uniformily with the ones with the
patch.
Signed-off-by: flow <flowlnlnln@gmail.com>
some stuff still needs to be done in the c++ side because qt designer is dumb >:(
the instance toolbar icon and instance name buttons are still added manually inside MainWindow.cpp
looks almost identical, with some minor tweaks:
- the instance toolbar is now a WideBar, so you can customize what actions you want :D
- the instance toolbar buttons are now fullwidth
- the close window button is now at the end of the file menu
- the help menu has some layout changes
this also fixes some stuff:
- menus not having tooltips
- the top toolbar not connecting to the title bar in kde
- the instance toolbar separators looking weird after you move the toolbar
Signed-off-by: leo78913 <leo3758@riseup.net>
The spec (admitely a very old one) states that this entry should always
have the value "2". However, some mods do not follow this convention,
causing issues.
One notable example is the 1.6 version of Aether II for 1.7.10, that has
this value set at "5" for whatever reason.
Signed-off-by: flow <flowlnlnln@gmail.com>
The spec says that this can be null, and indeed some mods have it set to
null, and should still be considered as valid.
Signed-off-by: flow <flowlnlnln@gmail.com>
While implementing the resource pack downloader in another branch, I
noticed that most of the code in the success callback was identical in
both cases, safe for a few minute differences in strings. So, this tries
to make it easier to share this piece of code.
However, it still leaves the possibility of extending the methods in
ResourceModel to accomodate for cases where this similarity may not
hold.
Signed-off-by: flow <flowlnlnln@gmail.com>
This allows us to check whether a search request is already on-going, in
which case we don't need to make another one (and shouldn't).
Signed-off-by: flow <flowlnlnln@gmail.com>
This prevents a crash in which the pack list gets updated in a search
request meanwhile a versions / extra info request is being processed.
Previously, this situation would cause the reference in the latter
callbacks to be invalidated by an internal relocation of the pack list.
Signed-off-by: flow <flowlnlnln@gmail.com>
This refactors the sorting methods to join every bit of it into a single
list, easing maintanance. It also removes the weird index contraint on
the list of methods by adding an index field to the DS that holds the
method.
Lastly, it puts the available methods on their respective API, so other
resources on the same API can re-use them later on.
Signed-off-by: flow <flowlnlnln@gmail.com>
This makes it so that we don't need a reference to the parent page in
the model. It will be useful once we change the page from a widget-based
one to a QML page.
It also makes tasks be created in the dialog instead of the page, so
that the dialog can also have the necessary information to mark versions
as selected / deselected easily. It also makes the task pointers into
smart pointers.
Signed-off-by: flow <flowlnlnln@gmail.com>
when i.e. clicking on links or just using the downloader at all, this
prevents some flickering and the widget never getting hidden in some
cases.
Signed-off-by: flow <flowlnlnln@gmail.com>
Puts them all inside the 'ResourceDownload' namespace, so that it's a
bit clearer from the outside that those belong to the same 'module'.
Signed-off-by: flow <flowlnlnln@gmail.com>
Firstly, this abstract away behavior in the mod download models that can
also be applied to other types of resources into a superclass, allowing
other resource types to be implemented without so much code duplication.
For that, this also generalizes the APIs used (currently, ModrinthAPI
and FlameAPI) to be able to make requests to other types of resources.
It also does a general cleanup of both of those. In particular, this
makes use of std::optional instead of invalid values for errors and,
well, optional values :p
This is a squash of some commits that were becoming too interlaced
together to be cleanly separated.
Signed-off-by: flow <flowlnlnln@gmail.com>
fixed by properly converting from a file path and converting to native seperators.
should have known naive handling of file path as a URL would come back to bite us cross platform.
Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>