Commit Graph

299 Commits

Author SHA1 Message Date
Rachel Powers
b6452215c1 feat: add details signal to Task
feat: add details to mod pack downloading
feat: add logging rule sloading form `ligging.ini at data path root
feat: add `launcher.task` `launcher.task.net` and `launcher.task.net.[down|up]load` logging categories
fix: add new subtask progress to the end of the lay out not the beginning (cuts down on flickering)

Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>
2023-05-01 10:47:50 -07:00
Rachel Powers
9d2f0e4dc8 feat: Propogated subtask progress
Oh boy this is big.

> TaskStepProgress struct is now QMetaObject compatabile and can be sent through signals
> Task now has a method to propogates sub task progress it must be signal bound by each task containing a task wishing to report progress of it's children.
> Downloads report speed
> Tasks now have UUIDS to track them
  - use when reporting
  - use when logging
  - use when storeing them or objects related to them

Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>
2023-05-01 10:47:20 -07:00
Sefa Eyeoglu
ff07714e8c
chore: remove FTB modpack support
We have been contacted by Feed the Beast to drop support for the FTB
modpack browser from Prism Launcher.

Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
2023-04-28 11:35:20 +02:00
Kenneth Chew
430369feb8
fix: explicit conversion to C string to fix MinGW g++ 10 build
Signed-off-by: Kenneth Chew <kenneth.c0@protonmail.com>
2023-03-12 18:33:48 -04:00
flow
b724607e31
feat(RD): add shader pack downloader
Signed-off-by: flow <flowlnlnln@gmail.com>
2023-02-05 17:02:56 -03:00
flow
c3ea303a37
feat(RD): add resource pack downloader
Signed-off-by: flow <flowlnlnln@gmail.com>
2023-02-05 17:02:52 -03:00
flow
435273e08a
fix(Inst.Import): don't allow bad file path in mrpack import
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>
2023-02-02 17:11:24 -03:00
flow
29f7ea752f
refactor: make shared_qobject_ptr ctor explicit
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>
2023-01-25 16:57:51 -03:00
Sefa Eyeoglu
6e841a3b7e
Merge branch 'develop' into remove-updater
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
2023-01-24 14:40:17 +01:00
flow
ea5020e188
fix(license): add/fix my copyright/license headers
*sobbing in messy legal stuff i know nothing about*

Signed-off-by: flow <flowlnlnln@gmail.com>
2023-01-23 11:12:43 -03:00
flow
c95c81d42f
fix(ModUpdater): ensure instead of require icon_url
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>
2023-01-13 16:59:37 -03:00
flow
9407596b12
fix(ModUpdater): fail mods individually when there's errors in the JSON
Prevents a single problematic mod from invalidating all the API
response.

Signed-off-by: flow <flowlnlnln@gmail.com>
2023-01-13 16:49:21 -03:00
flow
c294c2d1df
refactor(RD): allow setting custom folder target for downloaded resources
Signed-off-by: flow <flowlnlnln@gmail.com>
2023-01-13 16:23:09 -03:00
flow
ba677a8cb7
refactor: change some ResourceAPI from NetJob to Task
This makes it easier to create resource apis that aren't network-based.

Signed-off-by: flow <flowlnlnln@gmail.com>
2023-01-13 16:23:09 -03:00
flow
7d128c79a3
fix: CodeQL warnings about the rule of two
shush

Signed-off-by: flow <flowlnlnln@gmail.com>
2023-01-13 16:23:08 -03:00
flow
38e20eb148
fix(RD): pass copy of IndexedPack to callbacks instead of ref.
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>
2023-01-13 16:23:07 -03:00
flow
36571c5e22
refactor(RD): clear up sorting methods
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>
2023-01-13 16:23:07 -03:00
flow
c8eca4fb85
fix: build with qt5.12 on Linux and pedantic flag
Signed-off-by: flow <flowlnlnln@gmail.com>
2023-01-13 16:23:07 -03:00
flow
45d1319891
refactor(RD): decouple ResourceModels from ResourcePages
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>
2023-01-13 16:23:07 -03:00
flow
6a18079953
refactor: generalize mod models and APIs to resources
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>
2023-01-13 16:23:00 -03:00
flow
b937d33436
Merge pull request #714 from redstrate/cmark 2023-01-13 16:16:00 -03:00
Joshua Goins
807da6a035 fix: Remove extra line breaks for modrinth descriptions
Signed-off-by: Joshua Goins <josh@redstrate.com>
2023-01-12 10:08:52 -05:00
Sefa Eyeoglu
f3f628410d
Merge pull request #576 from Ryex/identify-zip-packs
fix https://github.com/PrismLauncher/PrismLauncher/issues/349
2023-01-07 17:33:34 +01:00
byquanton
2faf8332ee
fix: Add 1.16+ Forge library prefix in TechnicPackProcessor.cpp
Signed-off-by: byquanton <32410361+byquanton@users.noreply.github.com>
2023-01-06 02:44:10 +01:00
Rachel Powers
7f438425aa refactor: add an identify function to make easy to reuse
Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>
2022-12-29 19:47:19 -07:00
Rachel Powers
c470f05abf refactor: use std::filesystem::rename insted of copy and then moving.
Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>
2022-12-29 17:21:54 -07:00
Rachel Powers
3691f3a296 fix: cleanup and suggested changes
Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>
2022-12-26 14:50:15 -07:00
Rachel Powers
b2082bfde7 fix: explicit QFileInfo converison for qt6
fix: validatePath in validateZIPResouces

Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>
2022-12-25 17:16:26 -07:00
Rachel Powers
78984eea3a feat: support installing worlds during flame pack import.
Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>
2022-12-25 16:49:56 -07:00
Rachel Powers
8422e3ac01 feat: zip resource validation check for flame
Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>
2022-12-24 20:43:17 -07:00
flow
e3f8d99087
refactor(Inst. Import): use m_* for member variables in MR components
Makes it clearer what is being changed when.

Signed-off-by: flow <flowlnlnln@gmail.com>
2022-12-17 12:41:10 -03:00
flow
22aebc2215
fix(Inst. Import): correctly set component versions when updating
This makes it so that the later call to parse the old manifest doesn't
change the class data, so that the new data con continue there and be
reflected on the component list later.

Co-authored-by: Sefa Eyeoglu <contact@scrumplex.net>
Signed-off-by: flow <flowlnlnln@gmail.com>
2022-12-17 12:38:58 -03:00
flow
5450e0edf3
fix(Inst.Import): don't set managed pack info from imported ZIPs
This prevents the Managed Pack page from showing up even though there's
no way for it to work correctly.

Signed-off-by: flow <flowlnlnln@gmail.com>
2022-12-13 13:43:27 -03:00
flow
4a13d72997
Merge pull request #32 from flowln/modpack_update_page
Closes https://github.com/PrismLauncher/PrismLauncher/issues/180
Closes https://github.com/PrismLauncher/PrismLauncher/issues/170
2022-12-10 06:34:18 -08:00
Rachel Powers
0f48e0fc06 fix(blockedmods): Track and use targetFolder for blocked files
Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>
2022-12-08 18:42:51 -07:00
flow
34230bfcf4
fix: don't try updating Flame instance names when updating versions
Since the exact version string is only available in the manifest,
there's no easy way of getting it before commiting to the update, so
there's not much of a good way of showing the updated name in the UI,
and using the displayName is weird and gives some buggy behavior.

We may want to re-enable it in the future if we find a reliable way of
showing the correct info on the UI before starting the update.

Signed-off-by: flow <flowlnlnln@gmail.com>
2022-12-07 18:05:46 -03:00
flow
bb386a1162
fix(ManagedPackPage): only update the current instance exactly
Also carry on the original ID to avoid updating the wrong instance.

Signed-off-by: flow <flowlnlnln@gmail.com>
2022-12-06 17:00:34 -03:00
flow
968366c2ae
feat+fix: allow forwarding extra info to InstanceImportTask
This allows us to pass to the creation instances their actual pack ID
and version ID, that in Flame's case, are only available before starting
to create an instance.

Signed-off-by: flow <flowlnlnln@gmail.com>
2022-12-06 17:00:32 -03:00
flow
82699cc297
feat: allow skipping the update confirmation dialog
Signed-off-by: flow <flowlnlnln@gmail.com>
2022-12-06 17:00:32 -03:00
flow
08d008a5aa
refactor: abstract away update confirmation dialog
... so that we can avoid code duplication.

Signed-off-by: flow <flowlnlnln@gmail.com>
2022-12-06 17:00:29 -03:00
flow
cba2608c1c
feat: add logic for the modrinth instance modpack page
Signed-off-by: flow <flowlnlnln@gmail.com>
2022-12-06 16:54:54 -03:00
Sefa Eyeoglu
c8c3fe1023
chore: add license headers
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
2022-12-06 13:18:50 +01:00
Sefa Eyeoglu
85bddbed86
chore: reformat code
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
2022-12-06 13:16:27 +01:00
Sefa Eyeoglu
07359865c6
fix: don't allocate BlockedsModsDialog
Fixes temporary memory leak!

Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
2022-12-05 21:39:26 +01:00
flow
386fb28a35
fix(FileResolvingTask): Fail instead of crash when there's API errors
Also remove non-used variable (rip).

Signed-off-by: flow <flowlnlnln@gmail.com>
2022-12-01 15:33:35 -03:00
Rachel Powers
9af1b00df5 feat: add list of watched folders
move explanation text into dialog class and it's own label

Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>
2022-11-11 18:05:19 -07:00
Rachel Powers
3f6cc17818 properly handle a currently running hashing task
Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>
2022-11-11 15:45:40 -07:00
Rachel Powers
5909af9878 drag&drop + add folder to watch
Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>
2022-11-11 14:17:33 -07:00
flow
64576f4c4c
Merge pull request #304 from Ryex/move-downloads
Fixes https://github.com/PrismLauncher/PrismLauncher/issues/222
2022-11-11 12:48:53 -08:00
Rachel Powers
2f10fa8b61 add some extra debug logs for CF blocked mods
Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>
2022-11-11 05:41:32 -07:00