Commit Graph

266 Commits

Author SHA1 Message Date
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
6541570969
fix: simplify abort handling and add missing emits
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
be769d07f1
fix: correctly set all managed pack fields in Modrinth pack
Signed-off-by: flow <flowlnlnln@gmail.com>
2022-09-20 18:36:08 -03:00
flow
3a9d58e31c
feat: add override handling in modrinth pack update
Signed-off-by: flow <flowlnlnln@gmail.com>
2022-09-20 18:36:08 -03:00
flow
7024acac06
feat: add override helper functions
These help us keep track of relevant metadata information about
overrides, so that we know what they are when we update a pack.

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
flow
2246c3359b
refactor: add throw_on_blocked arg to Flame file parse
Signed-off-by: flow <flowlnlnln@gmail.com>
2022-09-20 18:36:07 -03:00
flow
242fb156a2
feat: add 'getFiles' by fileIds route in Flame API
Signed-off-by: flow <flowlnlnln@gmail.com>
2022-09-20 18:36:07 -03:00
flow
208ed73e59
feat: add early modrinth pack updating
Still some FIXMEs and TODOs to consider, but the general thing is here!

Signed-off-by: flow <flowlnlnln@gmail.com>
2022-09-20 18:36:06 -03:00
flow
4441b37338
refactor: move modrinth modpack import to separate file
Signed-off-by: flow <flowlnlnln@gmail.com>
2022-09-20 18:32:36 -03:00
Sefa Eyeoglu
4c7d3a103c
refactor: restructure tests
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
2022-09-11 22:29:01 +02:00
flow
1b0ca47682
Merge pull request #939 from flowln/mod_downloader_improve
Some more UI / UX improvements to the mod downloader!
2022-09-07 08:27:11 -03:00
timoreo
4817f0312d
Fixed up a warning
Signed-off-by: timoreo <contact@timoreo.fr>
2022-09-06 14:32:19 +02:00
flow
2186b134a4
fix: Mod type enum -> Resource type enum
Signed-off-by: flow <flowlnlnln@gmail.com>
2022-08-28 14:47:52 -03:00
Sefa Eyeoglu
f371ec210c
Merge pull request #1052 from flowln/resource_model 2022-08-28 16:52:53 +02:00
Sefa Eyeoglu
afcd669d2f
Merge pull request #965 from flowln/fat_files_in_memory
Refactor a bit EnsureMetadataTask and calculate hashes in a incremental manner
2022-08-28 11:03:12 +02:00
flow
3225f514f6
refactor: move general info from Mod to Resource
This allows us to create other resources that are not Mods, but can
still share a significant portion of code.

Signed-off-by: flow <flowlnlnln@gmail.com>
2022-08-20 10:41:59 -03:00
Sefa Eyeoglu
70a8f6743a
Merge pull request #919 from kumquat-ir/download-all-blocked 2022-08-20 12:50:01 +02:00
timoreo
c375e7b4df
Merge pull request #897 from jamierocks/atl-updating-initial 2022-08-11 08:50:05 +02:00
flow
7b27f200b1
fix: don't mutate QHash while iterating over it
Even though it was using a QMutableHashIterator, sometimes it didn't
work quite well, so this is a bit better.

Signed-off-by: flow <flowlnlnln@gmail.com>
2022-08-05 16:30:12 -03:00
flow
f4b207220c
fix: add some more nullptr checks / protection
die sigsegv 🔫

Signed-off-by: flow <flowlnlnln@gmail.com>
2022-08-05 15:10:44 -03:00
flow
6aaf1f4f21
feat: lazy-load CF mod descriptions
Signed-off-by: flow <flowlnlnln@gmail.com>
2022-08-01 07:33:30 -03:00
flow
368a0ddd44
feat: add mod descriptions to CF mods
Signed-off-by: flow <flowlnlnln@gmail.com>
2022-08-01 07:33:30 -03:00
flow
6f052baa94
refactor: use function cb instead of class cb in getVersions
I've discovered even more functional programming! :^)

Signed-off-by: flow <flowlnlnln@gmail.com>
2022-08-01 07:33:30 -03:00
flow
74c6c5cfbc
refactor: use function cb instead of class cb in getModInfo
I've discovered functional programming :^)
This makes this route more fit for general use.

Signed-off-by: flow <flowlnlnln@gmail.com>
2022-08-01 07:33:30 -03:00
flow
6e9a27f40f
feat: display the 'body' of a MR mod on the mod downloader
Signed-off-by: flow <flowlnlnln@gmail.com>
2022-08-01 07:33:29 -03:00
kumquat-ir
9c105914f0 use BlockedModsDialog for ftb packs as well
Signed-off-by: kumquat-ir <66188216+kumquat-ir@users.noreply.github.com>
2022-07-31 15:05:47 -04:00
LennyMcLennington
94a63e3859
Merge pull request #941 from Scrumplex/bump-cxx-standard
Bump to C++17
2022-07-30 17:10:59 +01:00
flow
fbf1901d86
refactor: shuffle some things around to improve readability
Signed-off-by: flow <flowlnlnln@gmail.com>
2022-07-26 20:33:33 +02:00
flow
0382f33c46
fix(ui): pump events to show "Copying modpack files..." text
Signed-off-by: flow <flowlnlnln@gmail.com>
2022-07-26 20:33:33 +02:00
flow
13372f3f99
chore: clean up FTBPackInstallTask a bit and connect missing signals
Signed-off-by: flow <flowlnlnln@gmail.com>
2022-07-26 20:33:33 +02:00
flow
e741cb7f0a
fix: add abort handlign in Flame's FileResolvingTask
Signed-off-by: flow <flowlnlnln@gmail.com>
2022-07-26 20:33:33 +02:00
Sefa Eyeoglu
fb289c6b17
chore: add license headers
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
2022-07-26 20:33:29 +02:00
Sefa Eyeoglu
75a7ea55d4
feat: implement mod resolving for FTB
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
2022-07-26 20:33:10 +02:00
flow
e6f2a3893a
refactor+feat: improve code separation in ensure metadata
... and avoid calculating the same hash multiple times

Signed-off-by: flow <flowlnlnln@gmail.com>
2022-07-24 17:46:54 -03:00
flow
631a93bcd8
refactor: add a HashUtils place for hashing stuff
Signed-off-by: flow <flowlnlnln@gmail.com>
2022-07-24 17:46:54 -03:00
flow
b1763353ea
feat: do incremental calculation of CF's hash
Signed-off-by: flow <flowlnlnln@gmail.com>
2022-07-24 17:46:53 -03:00
flow
15ec1abb6a
feat: use QIODevice for calcuating the JAR hash on Modrinth
Signed-off-by: flow <flowlnlnln@gmail.com>
2022-07-24 17:46:53 -03:00
flow
cfda8dbb2b
refactor: use QIODevice instead of a whole QByteArray for hash calc.
This allows Qt to do its thing and optimize the data gathering from the
JAR.

Signed-off-by: flow <flowlnlnln@gmail.com>
2022-07-24 17:46:53 -03:00
Sefa Eyeoglu
c666c3e251
refactor!: bump to C++17 and C17
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
2022-07-20 14:22:10 +02:00
Sefa Eyeoglu
28ae5d710e
fix: fix translations for mod updater
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
2022-07-19 18:03:45 +02:00
flow
6bb8332b4b
fix: bogus returns in EnsureMetadataTask
Signed-off-by: flow <flowlnlnln@gmail.com>
2022-07-17 11:43:12 -03:00
flow
de9e304236
fix: std::list -> QList
Qt6 removed Qlist::toStdList() 😭

Signed-off-by: flow <flowlnlnln@gmail.com>
2022-07-17 11:33:45 -03:00
flow
001bbef9ee
fix: don't use shared_ptr for a background task T_T
Signed-off-by: flow <flowlnlnln@gmail.com>
2022-07-17 11:33:44 -03:00
flow
c4316e81e6
change: make Mod a QObject used as a pointer
Prevents problems when copying it around!

Signed-off-by: flow <flowlnlnln@gmail.com>
2022-07-17 11:33:44 -03:00
flow
5f75e531e6
fix: handling around disabled mods
Don't update disabled mods to prevent mod duplication. Also, chop
filename in the metadata with a '.disabled'.

Signed-off-by: flow <flowlnlnln@gmail.com>
2022-07-17 11:33:43 -03:00
flow
a7648d60ce
fix: don't require non-essential items in mod index
Also adds slug field.

Signed-off-by: flow <flowlnlnln@gmail.com>
2022-07-17 11:33:43 -03:00
flow
52c45c2d32
feat: add some mod api calls
- Get Project: Already existed but required a specific caller type. This
  is more general.
- Get Projects: A single call to multiple of the above

Both providers support these calls.

Signed-off-by: flow <flowlnlnln@gmail.com>
2022-07-17 11:33:43 -03:00
flow
fd6755c93f
change: mod metadata improvements
- Use slug instead of name
- Keep temporary status before having local details

Signed-off-by: flow <flowlnlnln@gmail.com>
2022-07-17 11:33:43 -03:00
flow
4e6978ff6f
feat: improve metadata gen. networking and performance
This makes the metadata generation code a lot messier and harder to use,
but there's not really much else that can be done about it while
preserving all it's capabilities :(

At least we now have speed

Signed-off-by: flow <flowlnlnln@gmail.com>
2022-07-17 11:33:43 -03:00
flow
91a5c4bdcb
feat: add metadata get/delete via mod id
This is, in many cases, more reliable than name comparisons, so it's
useful specially in cases where a mod changes name between versions

Signed-off-by: flow <flowlnlnln@gmail.com>
2022-07-17 11:33:43 -03:00
flow
6e2869834f
feat: add mod update dialog
This subclasses the Review mods dialog to make a "Update review" one.
Also, all the necessary components built until now are put together in a
coherent unity that checks and generates metadata on-the-fly and checks for
mod updates, while giving and receiving feedback to the user.

Signed-off-by: flow <flowlnlnln@gmail.com>
2022-07-17 11:33:42 -03:00
flow
b8b71c7dd2
feat: add mod update check tasks
Those tasks take a list of mods and check on the mod providers for
updates. They assume that the mods have metadata already.

Signed-off-by: flow <flowlnlnln@gmail.com>
2022-07-17 11:33:42 -03:00
flow
c3f6c3dd82
feat: add changelog to mod providers
The Modrinth changelog is fairly straight-forward, as it's given to us
directly with the API call we already did. Flame, on the other hand,
requires us to do another call to get the changelog, so it can introduce
quite a heavy performance impact. This way, we make it optional to get
such changelog.

Signed-off-by: flow <flowlnlnln@gmail.com>
2022-07-17 11:33:42 -03:00
flow
844b245776
feat: add EnsureMetadataTask
This task is responsible for checking if the mod has metadata for a
specific provider, and create it if it doesn't.

In the context of the mod updater, this is not the best architecture,
since we do a single task for each mod. However, this way of structuring
it allows us to use it later on in more diverse scenarios.

This way we decouple this task from the mod updater, trading off some performance
(though that will be mitigated when we have a way of running arbitrary tasks
concurrently).

Signed-off-by: flow <flowlnlnln@gmail.com>
2022-07-17 11:33:42 -03:00
flow
4bcf8e6975
feat: add api call to flame
Call added:
- Get Fingerprints Matches
- Get Mod File Changelog

Signed-off-by: flow <flowlnlnln@gmail.com>
2022-07-17 11:33:42 -03:00
flow
0e52112016
feat: add some api calls to modrinth
Calls added:
- Get version from hash
- Get versions from hashes
- Latest version of a project from a hash, loader(s), and game version(s)
- Latest versions of multiple project from hashes, loader(s), and game version(s)

Some of those are not used yet, but may be of use later on, so we have
it if we need it :)

Signed-off-by: flow <flowlnlnln@gmail.com>
2022-07-17 11:33:41 -03:00
Sefa Eyeoglu
3b4539de79
chore: update license headers
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
2022-07-10 12:19:15 +02:00
Sefa Eyeoglu
c363423718
refactor: fix deprecation up to Qt 6
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
2022-07-10 12:19:15 +02:00
Sefa Eyeoglu
ff2cd50bfa
refactor: replace QRegExp with QRegularExpression
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
2022-07-10 12:17:52 +02:00
Sefa Eyeoglu
984692dc62
refactor: fix deprecation up to Qt 5.15
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
2022-07-10 12:17:52 +02:00
Jamie Mansfield
a7fc23dd96
ATLauncher: Reset existing directory if required 2022-07-10 11:15:48 +01:00
txtsd
c1bcbf8c63
Merge pull request #880 from Scrumplex/fix-loader-importance
Make loader components not important
2022-07-10 15:44:17 +05:30
Jamie Mansfield
9e69b8fe1b
ATLauncher: Parse keeps and deletes from pack manifests 2022-07-10 11:05:11 +01:00
Jamie Mansfield
e0ae631d59
ATLauncher: Add modes to install task and display appropriate message
This will display the update/reinstall message for the installation
method currently in use..
2022-07-10 10:55:05 +01:00
Sefa Eyeoglu
e6fe701727
Merge pull request #808 from Scrumplex/fix-lgtm-warnings 2022-07-09 01:10:59 +02:00
flow
998271414e
Merge pull request #890 from Scrumplex/fix-technic-forge
Fix Technic instances using Forge
2022-07-08 16:18:59 -03:00
Sefa Eyeoglu
4ab0e70a9a
fix(technic): map loader libraries to components properly
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
2022-07-08 17:28:06 +02:00
Sefa Eyeoglu
301b811310
fix: make loader components not important
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
2022-07-07 09:58:03 +02:00
flow
4bfc445cf8
fix: add progress indicator on Flame mod resolution dialog
This code is super :pofat: omg

Signed-off-by: flow <flowlnlnln@gmail.com>
2022-07-03 12:43:04 -03:00
flow
fb75c23f4e
Merge pull request #784 from Scrumplex/refactor-cmake
Refactor tests
2022-07-02 17:50:08 -03:00
Sefa Eyeoglu
9ec260619b
fix: fix warnings reported by LGTM.com 2022-06-17 16:34:32 +02:00
DioEgizio
1f6cef6f8a
fix https://github.com/PolyMC/PolyMC/issues/798 2022-06-15 09:11:23 +02:00
Ezekiel Smith
3e8d450741
Merge pull request #665 from jamierocks/h-managed-packs
PackPlatforms: Record where packs come from
2022-06-14 23:54:44 +10:00
Ezekiel Smith
27239b2dde
Merge pull request #634 from flowln/donate_links
More links for CF / Modrinth mods / modpacks
2022-06-14 23:52:00 +10:00
Sefa Eyeoglu
effe46db86
refactor: move away from UnitTest.cmake 2022-06-14 14:44:49 +02:00
Sefa Eyeoglu
a4ef0940ed
chore: add license headers 2022-06-12 13:50:58 +02:00
flow
e843b8e188
fix(test): fix packwiz test 2022-06-12 13:33:17 +02:00
flow
b3c8f9d508
revert: don't check modrinth whitelisted hosts
people didn't seem to like it, and its not required
2022-06-09 19:57:51 -03:00
flow
1b878030aa
fix: enable using more than one download url in mrpacks
Kinda, it's ugly and hackish, since we don't have the facilities to
do this properly (yet!)
2022-06-09 19:54:50 -03:00
flow
8966364648
Merge pull request #685 from kthchew/fix/technic-quilt
Add Quilt support for Technic modpacks
2022-06-06 18:03:05 -03:00
Sefa Eyeoglu
1ab00ca8b2
Merge pull request #426 from flowln/mod_perma
Add on-disk mod metadata information
2022-06-04 13:23:38 +02:00
Kenneth Chew
7ac16ed073
Use QStringList instead of QSet<QString>
Co-authored-by: flow <flowlnlnln@gmail.com>
2022-05-30 14:40:20 -04:00
Kenneth Chew
3585e4764b
Add Quilt support for Technic modpacks 2022-05-30 14:14:03 -04:00
timoreo
2746251dcd
Fix modrinth search filters 2022-05-29 18:23:34 +02:00
Jamie Mansfield
80da1f1bb9
ATLauncher: Use ATLauncher rather than FTB in error messages 2022-05-29 00:04:28 +01:00
Jamie Mansfield
febdb85f96
ModpacksCH: Use ModpacksCH rather than FTB in error messages 2022-05-29 00:04:28 +01:00
Jamie Mansfield
96b76c8f5c
ModpacksCH: Make packs managed when installing 2022-05-29 00:04:27 +01:00
Jamie Mansfield
411bf3be03
ATLauncher: Make packs managed when installing 2022-05-29 00:04:27 +01:00
Jamie Mansfield
a98b6663e1
ATLauncher: Pass the full pack name through to the install task 2022-05-29 00:04:27 +01:00
Lenny McLennington
abd240468e clean up validateDownloadUrl 2022-05-28 17:11:55 -03:00
flow
b5e00027d1
change: add 'gitlab.com' to whitelisted Modrinth modpack urls 2022-05-28 17:01:58 -03:00
flow
f4604bbf79
change: update whitelisted hosts in Modrinth modpacks 2022-05-28 17:01:52 -03:00