Commit Graph

375 Commits

Author SHA1 Message Date
Alexandru Ionut Tripon
ed261f0af9
Update launcher/minecraft/mod/tasks/LocalModParseTask.cpp
Co-authored-by: flow <flowlnlnln@gmail.com>
Signed-off-by: Alexandru Ionut Tripon <alexandru.tripon97@gmail.com>
2022-09-25 20:38:55 +03:00
Trial97
600c49f7f0
Replaced tomlc99 with tomlplusplus
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
2022-09-24 00:10:27 +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
941d75824a
refactor: add instance creation abstraction and move vanilla
This is so that 1. Code is more cleanly separated, and 2. Allows to more
easily add instance updating :)

Signed-off-by: flow <flowlnlnln@gmail.com>
2022-09-20 18:32:36 -03:00
Sefa Eyeoglu
7bd8bd13fe
feat: support multiarch system classifiers
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
2022-09-20 16:01:06 +02:00
Sefa Eyeoglu
09e85e948c
refactor: introduce RuntimeContext
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
2022-09-20 15:59:43 +02:00
Sefa Eyeoglu
9ec1c00887
fix: register JavaRealArchitecture for MinecraftInstance
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
2022-09-20 15:58:56 +02:00
Sefa Eyeoglu
a24d589845
fix: ensure all resource folders exist
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
2022-09-20 10:39:05 +02:00
Sefa Eyeoglu
23fc453fae
fix: comments and naming of texture pack stuff
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
2022-09-20 10:26:15 +02:00
Sefa Eyeoglu
aad6f74db6
fix: tests
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
2022-09-20 10:26:15 +02:00
Sefa Eyeoglu
07dcefabcb
feat: add texture pack parsing
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
2022-09-20 10:26:15 +02:00
txtsd
40c68595d7
Merge pull request #1150 from flowln/fix_crash_on_game_quit 2022-09-20 09:41:59 +05:30
flow
0873b8d304
fix: prevent container detaching in ResourceFolderModel
and use const accessors whenever we can!

Signed-off-by: flow <flowlnlnln@gmail.com>
2022-09-16 20:12:31 -03:00
flow
c9eb584ac8
fix: prevent deletes by shared pointer accidental creation
This fixes the launcher crashing when opening the game :iea:

Signed-off-by: flow <flowlnlnln@gmail.com>
2022-09-16 20:12:30 -03:00
flow
10493bd44a
fix: move newly allocated resources to the main thread
This avoids them getting deleted when the worker thread exits, due to
thread affinity on the created thread.

Signed-off-by: flow <flowlnlnln@gmail.com>
2022-09-16 20:12:30 -03:00
flow
9e35230467
fix: memory leak when getting mods from the mods folder
friendly reminder to always delete your news.

Signed-off-by: flow <flowlnlnln@gmail.com>
2022-09-16 20:12:30 -03:00
flow
81e326571b
fix: enable demo launch only on supported instances
e.g. >= 1.3.1 instances

Signed-off-by: flow <flowlnlnln@gmail.com>
2022-09-15 19:27:42 -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
333dbca01e
Merge pull request #1105 from flowln/better_resource_packs
Add basic resource pack parsing and fix issues
2022-09-07 08:30:36 -03:00
Sefa Eyeoglu
b70a82c609
Merge pull request #1111 from PolyMC/revert-1067-classpath-epicness 2022-09-05 20:06:33 +02:00
Sefa Eyeoglu
8e3356f11a
Merge pull request #1034 from Scrumplex/detect-performance-features 2022-09-05 17:45:17 +02:00
Sefa Eyeoglu
1b559c7776
Revert "Move classpath definition into NewLaunch itself"
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
2022-09-05 17:37:10 +02:00
flow
bedd3c50b6
fix: improve handling of unrecognized pack formats
Signed-off-by: flow <flowlnlnln@gmail.com>
2022-09-03 15:05:23 -03:00
flow
9db27c6acc
fix: crash when adding resource packs directly in the folder
This fixes an issue in which, when adding a new resource pack externally
to PolyMC, when the resource pack view was open, would crash poly.

Signed-off-by: flow <flowlnlnln@gmail.com>
2022-09-03 13:37:22 -03:00
flow
42c81395b3
fix: race condition on ResourceFolderModel tests
This (hopefully) fixes the race contiditions that sometimes got
triggered in tests.

Signed-off-by: flow <flowlnlnln@gmail.com>
2022-09-03 13:37:22 -03:00
flow
3b13e692d2
feat: move resource pack images to QPixmapCache
This takes care of evicting entries when the cache gets too big for us,
so we can add new entries without much worries.

Signed-off-by: flow <flowlnlnln@gmail.com>
2022-09-03 13:37:22 -03:00
flow
0331f5a1eb
feat(tests): add tests for resource pack parsing
Signed-off-by: flow <flowlnlnln@gmail.com>
2022-09-03 13:37:22 -03:00
flow
8a7e117f6b
refactor: move resource pack file parsing utilities to separate namespace
This makes it easier to use that logic in other contexts.

Signed-off-by: flow <flowlnlnln@gmail.com>
2022-09-03 13:37:22 -03:00
flow
9b984cedac
feat: add image from pack.png to resource packs
Signed-off-by: flow <flowlnlnln@gmail.com>
2022-09-03 13:37:22 -03:00
flow
6a93688b2e
fix: filtering in regex search in resource packs
Signed-off-by: flow <flowlnlnln@gmail.com>
2022-09-03 13:37:21 -03:00
flow
3ab17a97a8
fix: sorting by pack format
Signed-off-by: flow <flowlnlnln@gmail.com>
2022-09-03 13:37:21 -03:00
flow
f21ae66265
feat: add basic resource pack parsing of pack.mcmeta
This parses the pack format ID and the description from the local file,
from both a ZIP and a folder, and hooks it into the model.

Signed-off-by: flow <flowlnlnln@gmail.com>
2022-09-03 13:37:21 -03:00
flow
050768c266
feat: add more resource pack info
Adds pack format id and description to ResourcePack, that'll be parsed
from pack.mcmeta.

Signed-off-by: flow <flowlnlnln@gmail.com>
2022-09-03 13:37:21 -03:00
flow
cda2bfc240
feat: allow specifying factory for resources in BasicFolderLoadTask
This allows us to hook our own resource type, that possibly has more
content than the base Resource, to it.

Signed-off-by: flow <flowlnlnln@gmail.com>
2022-09-03 13:37:20 -03:00
flow
ba3ac85356
Merge pull request #1067 from Scrumplex/classpath-epicness
Move classpath definition into NewLaunch itself
2022-08-31 18:28:29 -03:00
flow
ec29cedeb7
Merge pull request #1080 from flowln/eternal_cache
Never invalidate libraries cache entries by time elapsed
2022-08-31 18:28:07 -03:00
flow
ddf1e1ccee
fix: make FML libraries cache eternal
Signed-off-by: flow <flowlnlnln@gmail.com>
2022-08-21 13:47:49 -03:00
flow
5ac4e73697
fix: make libraries cache eternal
This restores the behavior prior to PR #920.

Signed-off-by: flow <flowlnlnln@gmail.com>
2022-08-21 13:47:49 -03:00
flow
0b81b283bf
fix: LGTM warnings
Signed-off-by: flow <flowlnlnln@gmail.com>
2022-08-20 10:49:56 -03:00
flow
e2ab2aea32
change: add enable/disable to resources
TIL that zip resource packs, when disabled, actually have the effect of
not showing up in the game at all. Since this can be useful to someone,
I moved the logic for it to the resources.

Signed-off-by: flow <flowlnlnln@gmail.com>
2022-08-20 10:49:54 -03:00
flow
c3ceefbafb
refactor+fix: add new tests for Resource models and fix issues
Signed-off-by: flow <flowlnlnln@gmail.com>
2022-08-20 10:49:23 -03:00
flow
e7cf9932a9
refactor: simplify Mod structure
No need to keep track of pointers left and right. A single one already
gives enough headaches!

Signed-off-by: flow <flowlnlnln@gmail.com>
2022-08-20 10:48:51 -03:00
flow
0c9d03f5df
fix(tests): add timeout on ModFolderModel's tests
If the update never ends, the signal is not emitted and we become stuck
in the event loop forever. So a very lenient timer is added to prevent
that.

Signed-off-by: flow <flowlnlnln@gmail.com>
2022-08-20 10:48:01 -03:00
flow
92aa24ae34
fix: don't give shared pointer to obj. external to the model
It causes some weird problems and adds refcounting overhead.

Signed-off-by: flow <flowlnlnln@gmail.com>
2022-08-20 10:48:00 -03:00
flow
97a74d5c1f
refactor: adapt rest of the codebase to the new resource model
In order to access the ModFolderModel from the ModFolderPage, i created
a new m_model for the correct type, shadowing the m_model of type
ResourceFolderModel. This creates two shared_ptr references to the same object,
but since they will have the same lifetime, it doesn't generate a memory
leak.

Signed-off-by: flow <flowlnlnln@gmail.com>
2022-08-20 10:47:58 -03:00
flow
256f8094f5
refactor: make Resource Pack model inherit from ResourceFolderModel
Signed-off-by: flow <flowlnlnln@gmail.com>
2022-08-20 10:47:11 -03:00
flow
1e2f0ab308
refactor: move more tied logic to model and move logic to the resources
This moves the QSortFilterProxyModel to the resource model files,
acessible via a factory method, and moves the sorting and filtering to
the objects themselves, decoupling the code a bit.

This also adds a basic implementation of methods in the
ResourceFolderModel, simplifying the process of constructing a new model
from it.

Signed-off-by: flow <flowlnlnln@gmail.com>
2022-08-20 10:47:08 -03:00
flow
af2cf2734d
refactor: move things around in the mod model
Makes the method order in the cpp file the same as in the header file.

Signed-off-by: flow <flowlnlnln@gmail.com>
2022-08-20 10:46:33 -03:00
flow
ec62d8e973
refactor: move general code from mod model to its own model
This aims to continue decoupling other types of resources (e.g. resource
packs, shader packs, etc) from mods, so that we don't have to
continuously watch our backs for changes to one of them affecting the
others.

To do so, this creates a more general list model for resources, based on
the mods one, that allows you to extend it with functionality for other
resources.

I had to do some template and preprocessor stuff to get around the
QObject limitation of not allowing templated classes, so that's sadge :c

On the other hand, I tried cleaning up most general-purpose code in the
mod model, and added some documentation, because it looks nice :D

Signed-off-by: flow <flowlnlnln@gmail.com>
2022-08-20 10:45:01 -03: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
92d7e44525
Merge pull request #878 from flowln/lazy_settings 2022-08-20 12:50:56 +02:00
Sefa Eyeoglu
a517f442ea
Merge pull request #1023 from flowln/better_shared_ptr 2022-08-20 12:50:50 +02:00
Sefa Eyeoglu
01505910f4
refactor: move classpath definition into NewLaunch itself
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
2022-08-18 18:14:01 +02:00
flow
2f5e55bea0
fix: only remove orphaned metadata on first opening
This avoids deleting the metadata while one is updating their mods.

Signed-off-by: flow <flowlnlnln@gmail.com>
2022-08-11 13:11:56 -03:00
Sefa Eyeoglu
d82bb29919
fix: don't apply GameMode/MangoHud, if they aren't supported
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
2022-08-08 21:19:46 +02:00
Sefa Eyeoglu
33af0c6a7c
refactor: don't include mangohud's library path
This could cause issues on some environments. Users should just put
MangoHud libs into global LD_LIBRARY_PATH, just like with any other
library

Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
2022-08-08 21:16:37 +02:00
flow
362ecdb583
refactor+fix: use QSharedPointer for shared_qobject_ptr
Signed-off-by: flow <flowlnlnln@gmail.com>
2022-08-04 15:33:51 -03:00
flow
31ba1de53b
fix: remove orphaned metadata to avoid problems with auto-updating insts
Just as my master has taught me. 🔫

Signed-off-by: flow <flowlnlnln@gmail.com>
2022-08-02 16:15:39 -03: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
1a6cb9ee99
chore: add some debugging prints in AccountList
Signed-off-by: flow <flowlnlnln@gmail.com>
2022-07-26 15:11:56 -03:00
Sefa Eyeoglu
c65f5f7728
Merge pull request #877 from Scrumplex/refactor-offline-accounts 2022-07-23 13:54:36 +02:00
Sefa Eyeoglu
2e94562f79
fix: treat accounts as offline, if auth servers are down
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
2022-07-23 12:38:01 +02:00
flow
439e7bbf4e
change: unicode chars for folders and disabled mods in mod list
Signed-off-by: flow <flowlnlnln@gmail.com>
2022-07-22 17:45:27 -03:00
flow
33853b6107
fix: use single-space unicode char for checkmark in mod list
Signed-off-by: flow <flowlnlnln@gmail.com>
2022-07-22 11:48:08 -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
flow
54b335711a
fix: raw-pointers and leaks in ModFolderLoadTask
Co-authored-by: timoreo <contact@timoreo.fr>
Signed-off-by: flow <flowlnlnln@gmail.com>
2022-07-17 11:56:23 -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
650af5eb64
change: use ModStatus as a simple member instead of a pointer
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
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
a53ee2e35c
fix: mod parsing of 'String-fied' version (i.e. OpenBlocks)
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
dfab55112b
feat: remove existing mod when updating/redownloading it
Signed-off-by: flow <flowlnlnln@gmail.com>
2022-07-17 11:33:42 -03:00
flow
2d10c246a8
feat: add update mods to the ui / mod model
Signed-off-by: flow <flowlnlnln@gmail.com>
2022-07-17 11:33:42 -03:00
flow
43b9db6e45
change: allow deleting mods while preserving their metadata
Signed-off-by: flow <flowlnlnln@gmail.com>
2022-07-17 11:33:41 -03:00
flow
509f7bd018
fix: move time record overrides to BaseInstance
This is needed so that we can show time stats in the UI without having
to load all type-specific settings, which would make all the previous
changes useless :c

This is apparently done with console settings too, so I don't think
there's a problem doing this too :>

Signed-off-by: flow <flowlnlnln@gmail.com>
2022-07-12 21:15:59 -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
15c5bbcf22
fix: fix slots for Qt 6
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
dada513
3b187b5246
Merge pull request #876 from Scrumplex/revert-updater-stuff
Revert "fix: remove updater if it is not used"
2022-07-10 10:50:03 +02:00
Sefa Eyeoglu
e6fe701727
Merge pull request #808 from Scrumplex/fix-lgtm-warnings 2022-07-09 01:10:59 +02:00
Sefa Eyeoglu
08989bde5e
Merge pull request #839 from flowln/modrinth_packs_bug_hunt 2022-07-08 16:25:35 +02:00
flow
273cf3d565
feat: lazy-load MinecraftInstance settings
Makes the startup go fast!

vrum

Signed-off-by: flow <flowlnlnln@gmail.com>
2022-07-06 17:17:54 -03:00
flow
f432cfd73a
change: put settings initialization in a separate function
Signed-off-by: flow <flowlnlnln@gmail.com>
2022-07-06 16:18:09 -03:00
Sefa Eyeoglu
e210a4b244
Revert "fix: remove updater if it is not used"
This reverts commit 2ff0aa09e3.

Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
2022-07-06 18:13:51 +02:00
Sefa Eyeoglu
f1902a4471
Merge pull request #794 from Scrumplex/resolve-jars-dynamically 2022-07-06 17:40:09 +02:00
Sefa Eyeoglu
04b865adae
Merge pull request #707 from Jan200101/PR/gamemode
Add Performance related settings
2022-07-06 17:11:43 +02:00
Jan200101
cad581388f
Add Performance related settings
Integrates support for Feral Gamemode, discrete GPU support for Mesa and the proprietary Nvidia driver and MangoHud support

Signed-off-by: Jan200101 <sentrycraft123@gmail.com>
2022-07-06 09:34:14 +02:00
flow
e5f6dc1b14
fix: aborts when using a Qt build with assertions enabled
Preventing undefined behaviour hooray! :D

Signed-off-by: flow <flowlnlnln@gmail.com>
2022-07-03 12:44:19 -03:00
Sefa Eyeoglu
474d77ac57
feat: resolve JARs dynamically
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
2022-07-03 17:31:01 +02:00
Sefa Eyeoglu
5599b5a337
Merge pull request #855 from Gingeh/account-list 2022-07-03 12:55:36 +02:00
flow
cd22da9c62
Merge pull request #864 from ivanpu/uncensored-offline
Don't censor "offline" word when that's the access token
2022-07-02 17:56:04 -03:00
flow
fb75c23f4e
Merge pull request #784 from Scrumplex/refactor-cmake
Refactor tests
2022-07-02 17:50:08 -03:00
Ezekiel Smith
7f22994f68
Merge pull request #831 from flowln/abort_connections
Add missing connections to the abort signal in some tasks
2022-07-03 01:50:36 +10:00
Ezekiel Smith
e32030f364
Merge pull request #860 from kthchew/fix/status-version
Show MC version of instance in status bar
2022-07-03 01:47:27 +10:00
Ivan Puntiy
b40619bcbd don't censor offline access token 2022-07-02 18:05:33 +03:00
Sefa Eyeoglu
8cec4b60a6
fix: update NewLaunch package name 2022-07-01 19:50:41 +02:00
Kenneth Chew
79840f0fca
Remove redundant type name from status bar
The type name is always "Minecraft", so it showed "Minecraft X.X.X (Minecraft)"
2022-06-30 23:02:56 -04:00
Kenneth Chew
06bf7b0f31
Fix Minecraft version not appearing in status bar 2022-06-30 23:02:56 -04:00
Gingeh
b5d2570fe2
Change Online status to Ready 2022-06-30 22:17:15 +10:00
Gingeh
91b5f0228d add tr() to offline account name
Co-authored-by: flow <flowlnlnln@gmail.com>
2022-06-30 08:59:41 +10:00
Gingeh
84bd5ace6c Move account checkboxes to the profile column (oops) 2022-06-29 19:58:41 +10:00
Gingeh
63589d2ba9 Rename profile column to username and update the tooltip 2022-06-29 18:49:06 +10:00
Gingeh
f685139d89 Move the profile name column to the left 2022-06-29 18:43:29 +10:00
Gingeh
68d6ce60a9 Don't show account name for offline accounts 2022-06-29 18:42:01 +10:00
flow
5da87d1904
fix: add missing connections to the abort signal
Beginning with efa3fbff39, we separated
the failing and the aborting signals, as they can mean different
things in certain contexts. Still, some places are not yet changed to
reflect this modification. This can cause aborting of progress dialogs
to not work, instead making the application hang in an unusable satte.

This goes through some places where it's not hooked up yet, fixing their
behaviour in those kinds of situation.
2022-06-22 20:20:39 -03:00
Sefa Eyeoglu
04e822acfb
fix: remove old reference to launchermeta 2022-06-22 20:47:47 +02:00
Sefa Eyeoglu
9ec260619b
fix: fix warnings reported by LGTM.com 2022-06-17 16:34:32 +02:00
Ezekiel Smith
e6b1a1fa76
Merge pull request #716 from flowln/mod_perma_2
Hide index folder on Windows
2022-06-14 23:58:35 +10:00
Sefa Eyeoglu
effe46db86
refactor: move away from UnitTest.cmake 2022-06-14 14:44:49 +02:00
Sefa Eyeoglu
349fc4143d
Merge pull request #714 from Scrumplex/fix-tests
Fix mod metadata tests
2022-06-13 23:10:35 +02:00
Sefa Eyeoglu
4be9e6a0bc
refactor: make is_indexed false by default
Co-authored-by: flow <flowlnlnln@gmail.com>
2022-06-13 22:07:42 +02:00
flow
4448418b63
fix: segfault when the same mod is present enabled and disabled at once
This maintains the previous behaviour
2022-06-12 09:44:03 -03:00
flow
9f1f37e780
fix: correctly handle disabled mods with metadata
im stupid
2022-06-12 09:25:25 -03:00
flow
40ccd1a469
fix: handling of incomplete mods
(i.e. mods without ModDetails that may have metadata)
2022-06-12 09:25:21 -03:00
Sefa Eyeoglu
a4ef0940ed
chore: add license headers 2022-06-12 13:50:58 +02:00
Sefa Eyeoglu
2ff0aa09e3
fix: remove updater if it is not used 2022-06-12 13:39:47 +02:00
Sefa Eyeoglu
32217a774f
fix(tests): wait until ModFolderModel has updated 2022-06-12 13:33:17 +02:00
Sefa Eyeoglu
8856c8cd62
refactor(test): fix loading mod metadata setting 2022-06-12 13:33:17 +02:00
Sefa Eyeoglu
51258ab28c
Merge pull request #709 from Scrumplex/fix-instancetypes
Always store InstanceType
2022-06-11 19:29:46 +02:00
flow
c2a43c6f40
fix: hide .index folder on Windows 2022-06-04 11:02:59 -03:00
Sefa Eyeoglu
778baa6dbe
fix: always store InstanceType 2022-06-04 11:59:12 +02:00
flow
2fc1b99911
chore: add license headers
Prevents a massive inload of Scrumplex ditto's :)

I didn't add it to every file modified in this PR because the other
changes are pretty minor, and would explode the diff of the PR. I hope
that's not a problem O_O
2022-05-23 14:58:14 -03:00
flow
3a923060ce
fix: use correct hash_type when creating metadata
also fix: wrong parameter name in LocalModUpdateTask's constructor
also fix: correct hash_format in CF
2022-05-23 14:58:14 -03:00
flow
67e0214fa5
fix: don't try to delete mods multiple times
Shows a more helpful message if there's a parsing error when reading the
index file.

Also fixes a clazy warning with using the `.data()` method in a
temporary QByteArray object.
2022-05-23 14:43:10 -03:00
flow
e17b6804a7
fix: implement PR suggestions
Some stylistic changes, and get hashes from the mod providers when
building the metadata.
2022-05-23 14:43:09 -03:00
flow
96e36f0604
refactor: make mod metadata presence (or lack of) easier to find out 2022-05-23 14:43:09 -03:00
flow
ba50765c30
tidy: apply clang-tidy to some files
Mostly the ones created in this PR + Mod.h / Mod.cpp / ModDetails.h
2022-05-23 14:42:28 -03:00
flow
d7f6b36990
test+fix: add basic tests and fix issues with it 2022-05-23 14:42:28 -03:00
flow
4439666e67
feat: allow disabling mod metadata usage 2022-05-23 14:42:28 -03:00
flow
23febc6d94
feat: cache metadata in ModDetails
Allows for more easy access to the metadata by outside entities
2022-05-23 14:42:28 -03:00
flow
fab4a7a602
refactor: abstract metadata handling and clarify names 2022-05-23 14:42:28 -03:00
flow
e9fb566c07
refactor: remove unused mod info and organize some stuff 2022-05-23 14:42:27 -03:00
flow
5a34e8fd7c
refactor: move mod tasks to their own subfolder
Makes the launcher/minecraft/mod/ folder a little more organized.
2022-05-23 14:42:27 -03:00
flow
fcfb2cfc3d
feat: use mod metadata for getting mod information
For now this doesn't mean much, but it will help when we need data
exclusive from the metadata, such as addon id and mod provider.

Also removes the metadata when the mod is deleted, and make the Mod.h
file a little more pleasing to look at :)
2022-05-23 14:42:27 -03:00
flow
e93b9560b5
feat: add method to delete mod metadata
Also moves indexDir setting from LocalModUpdateTask -> ModFolderModel
2022-05-23 14:42:27 -03:00
flow
b30b88716e
feat: add very early mod.toml packwiz support
Also use it as a on-disk format for storing mod metadata. This will be
used later on to make better mod managment.
2022-05-23 14:42:22 -03:00
Sefa Eyeoglu
29ef1e2c4b
Merge pull request #597 from Scrumplex/refactor-modloader-modapi 2022-05-22 13:17:53 +02:00
Sefa Eyeoglu
b4707f46ad
Merge pull request #500 from flowln/net_refactor
Refactor a little the code in `launcher/net/` files
2022-05-21 12:06:34 +02:00
Jamie Mansfield
96f16069a9
Launch: Apply the Minecraft version correctly
It was previously using a deprecated field.
2022-05-20 18:47:11 +01:00
Jamie Mansfield
188c5aaa35
Launch: Match Vanilla launcher version string behaviour
This removes a means of profiling users.
2022-05-20 18:43:47 +01:00
Sefa Eyeoglu
943090db98
refactor: allow tracking multiple mod loaders 2022-05-19 08:49:27 +02:00
Sefa Eyeoglu
77caaca50d
fix: only consider enabled mod loaders 2022-05-19 08:09:37 +02:00
Sefa Eyeoglu
f66e0fa0e8
fix: support split natives
Mojang introduced a new structure for natives, notably for LWJGL.
Now instead of using the `natives` structure of the version format, Mojang
chose to create a seperate library entry for each platform, which uses
the `rules` structure to specify the platform. These new split natives
carry the same groupId and artifactId, as the main library, but have an
additional classifier, like `natives-linux`.

When comparing GradleSpecifiers we don't look at the classifier, so when
the launcher sees an artifact called `org.lwjgl:lwjgl:3.3.1` and right
after that an artifact called `org.lwjgl:lwjgl:3.3.1:natives-linux`, it
will treat it as "already added" and forget it.

This change will include the classifier in that comparison.
2022-05-18 22:51:15 +02:00
DioEgizio
127dfadc6c
fix(quilt) always prefer qmj over fmj
this fixes Quilt-only mods like ok zoomer showing wrong metadata
2022-05-18 14:33:58 +02:00
flow
ff9f3cb31f
fix conflicts with develop 2022-05-17 18:25:08 -03:00
Sefa Eyeoglu
1012912272
Merge pull request #567 from Scrumplex/quilt-metadata
Support `quilt.mod.json` metadata
2022-05-17 16:08:59 +02:00
Sefa Eyeoglu
edbd90a4e6
fix: update links for Quilt metadata format 2022-05-17 15:17:20 +02:00