Commit Graph

39 Commits

Author SHA1 Message Date
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
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
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
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
Rachel Powers
209a1650e4 clang_format and code cleanup
Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>
2022-11-01 07:06:36 -07:00
Rachel Powers
6010ce0dc5 chore(remove FS::copyFile):
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>
2022-11-01 04:28:57 -07:00
Rachel Powers
fda2c116be code quality cleanup
Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>
2022-11-01 04:24:11 -07:00
Rachel Powers
e9d4793b1e minor clean up and add some docs
Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>
2022-11-01 04:24:11 -07:00
Rachel Powers
13c7efa058 copy found mods to instance (FTB and Flame)
Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>
2022-11-01 04:24:11 -07:00
Rachel Powers
028e086960 send blocked mod info to dialog & prototype UI
Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>
2022-11-01 04:24:11 -07:00
timoreo
9ff364b0d3
huge nit: added const refs, everywhere
Signed-off-by: timoreo <contact@timoreo.fr>
2022-09-26 11:50:31 +02:00
flow
06019f01e3
feat: add dialog to ask whether to chaneg instance's name
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>
2022-09-20 18:36:10 -03:00
flow
ddde885084
fix: show warning in case there's no old index when updating
Signed-off-by: flow <flowlnlnln@gmail.com>
2022-09-20 18:36:10 -03:00
flow
be8c6f218c
refactor: setAbortStatus -> setAbortable
Signed-off-by: flow <flowlnlnln@gmail.com>
2022-09-20 18:36:10 -03:00
flow
d2fdbec41d
fix: move file deletion to the end of the instance update
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>
2022-09-20 18:36:09 -03:00
flow
2dd372600c
fix: some abort-related issues
Signed-off-by: flow <flowlnlnln@gmail.com>
2022-09-20 18:36:09 -03:00
flow
eda6cf11ef
feat(ui): improve info dialog before updating an instance
Adds a 'Cancel' option, and add a note about doing a backup before
updating.

Signed-off-by: flow <flowlnlnln@gmail.com>
2022-09-20 18:36:09 -03:00
flow
87002fb8f8
fix: hook up setAbortStatus in instance import tasks
Signed-off-by: flow <flowlnlnln@gmail.com>
2022-09-20 18:36:09 -03:00
flow
4b0ceea894
fix: correctly set managed pack fields in CF pack
Signed-off-by: flow <flowlnlnln@gmail.com>
2022-09-20 18:36:09 -03:00
flow
8c0816c166
feat: add override awareness to CF modpack updating
Signed-off-by: flow <flowlnlnln@gmail.com>
2022-09-20 18:36:08 -03:00
flow
6131346e2f
refactor: change the way instance names are handled
While working on pack updating, instance naming always gets in the way,
since we need both way of respecting the user's name choice, and a
standarized way of getting the original pack name / version.

This tries to circunvent such problems by abstracting away the naming
schema into it's own struct, holding both the original name / version,
and the user-defined name, so that everyone can be happy and world peace
can be achieved! (at least that's what i'd hope :c).

Signed-off-by: flow <flowlnlnln@gmail.com>
2022-09-20 18:36:08 -03:00
flow
795d6f35ee
feat: add curseforge modpack updating
Signed-off-by: flow <flowlnlnln@gmail.com>
2022-09-20 18:36:08 -03:00
flow
ebd46705d5
refactor: move creation of CF file download task to a separate function
Signed-off-by: flow <flowlnlnln@gmail.com>
2022-09-20 18:36:08 -03:00
flow
72d2ca234e
refactor: move flame modpack import to separate file
Signed-off-by: flow <flowlnlnln@gmail.com>
2022-09-20 18:36:07 -03:00