aboutsummaryrefslogtreecommitdiff
path: root/launcher
AgeCommit message (Collapse)Author
2022-09-03feat: allow specifying factory for resources in BasicFolderLoadTaskflow
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-01Merge pull request #1095 from flowln/ensure_file_path_in_overrideSefa Eyeoglu
2022-08-31Merge pull request #1067 from Scrumplex/classpath-epicnessflow
Move classpath definition into NewLaunch itself
2022-08-31Merge pull request #1080 from flowln/eternal_cacheflow
Never invalidate libraries cache entries by time elapsed
2022-08-28fix: make MultipleOptionsTask inherit directly from SequentialTaskflow
It's not a good idea to have multiple concurrent tasks running on a sequential thing like this one. Signed-off-by: flow <flowlnlnln@gmail.com>
2022-08-28feat(test): add more tests to Tasksflow
Signed-off-by: flow <flowlnlnln@gmail.com>
2022-08-28refactor: make NetJob inherit from ConcurrentTask as well!flow
Avoids lots of code duplication Signed-off-by: flow <flowlnlnln@gmail.com>
2022-08-28refactor: make MultipleOptionsTask inherit from ConcurrentTask tooflow
Signed-off-by: flow <flowlnlnln@gmail.com>
2022-08-28refactor: make SequentialTask inherit from ConcurrentTaskflow
In a way, sequential tasks are just concurrent tasks with only a single task running concurrently, so we can remove LOTS of duplicated logic :) Signed-off-by: flow <flowlnlnln@gmail.com>
2022-08-28fix: abort logic running subsequent tasks anyways some timesflow
Signed-off-by: flow <flowlnlnln@gmail.com>
2022-08-28fix: 'succeeded while not running' spam in ConcurrentTaskflow
Signed-off-by: flow <flowlnlnln@gmail.com>
2022-08-28fix: bogus progress update when the total step progress was zeroflow
Signed-off-by: flow <flowlnlnln@gmail.com>
2022-08-28fix: only try to start tasks that are really thereflow
This fixes an annoying issue where concurrent tasks would try to start multiple tasks even when there was not that many tasks to run in the first place, causing some amount of log spam. Signed-off-by: flow <flowlnlnln@gmail.com>
2022-08-28fix: ensure destination file paths exist when overriding foldersflow
Signed-off-by: flow <flowlnlnln@gmail.com>
2022-08-28fix: Mod type enum -> Resource type enumflow
Signed-off-by: flow <flowlnlnln@gmail.com>
2022-08-28Merge pull request #1052 from flowln/resource_modelSefa Eyeoglu
2022-08-28Merge pull request #965 from flowln/fat_files_in_memorySefa Eyeoglu
Refactor a bit EnsureMetadataTask and calculate hashes in a incremental manner
2022-08-24fix: fix urls on ftb legacyDioEgizio
Signed-off-by: DioEgizio <83089242+DioEgizio@users.noreply.github.com>
2022-08-21fix: make FML libraries cache eternalflow
Signed-off-by: flow <flowlnlnln@gmail.com>
2022-08-21fix: make libraries cache eternalflow
This restores the behavior prior to PR #920. Signed-off-by: flow <flowlnlnln@gmail.com>
2022-08-21feat: add eternal cache entriesflow
Those are entries that don't get stale over time, so we don't invalidate them if they 'expire'. Signed-off-by: flow <flowlnlnln@gmail.com>
2022-08-20fix: LGTM warningsflow
Signed-off-by: flow <flowlnlnln@gmail.com>
2022-08-20change: add enable/disable to resourcesflow
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-20refactor+fix: add new tests for Resource models and fix issuesflow
Signed-off-by: flow <flowlnlnln@gmail.com>
2022-08-20refactor: simplify Mod structureflow
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-20fix(tests): add timeout on ModFolderModel's testsflow
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-20fix: don't give shared pointer to obj. external to the modelflow
It causes some weird problems and adds refcounting overhead. Signed-off-by: flow <flowlnlnln@gmail.com>
2022-08-20refactor: adapt rest of the codebase to the new resource modelflow
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-20refactor: make Resource Pack model inherit from ResourceFolderModelflow
Signed-off-by: flow <flowlnlnln@gmail.com>
2022-08-20refactor: move more tied logic to model and move logic to the resourcesflow
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-20refactor: move things around in the mod modelflow
Makes the method order in the cpp file the same as in the header file. Signed-off-by: flow <flowlnlnln@gmail.com>
2022-08-20refactor: move general code from mod model to its own modelflow
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-20refactor: move general info from Mod to Resourceflow
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-20feat: make Task a QRunnableflow
This makes it possible to run a task in another thread. I added a variable to toggle debug prints because they seem to trigger an assertion on Qt internals when the task in on another thread. Of course, this isn't awesome, but can wait until we improve our logging. Signed-off-by: flow <flowlnlnln@gmail.com>
2022-08-20fix: distinguish CoremodsSefa Eyeoglu
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
2022-08-20Merge pull request #878 from flowln/lazy_settingsSefa Eyeoglu
2022-08-20Merge pull request #1023 from flowln/better_shared_ptrSefa Eyeoglu
2022-08-20Merge pull request #1044 from flowln/better_orphan_fixSefa Eyeoglu
2022-08-20Merge pull request #992 from Scrumplex/refactor-versionSefa Eyeoglu
2022-08-20Merge pull request #1007 from Gingeh/disable-update-buttonSefa Eyeoglu
2022-08-20Merge pull request #919 from kumquat-ir/download-all-blockedSefa Eyeoglu
2022-08-19Merge pull request #1068 from TayouVR/improvedWindowsJavaCheckSefa Eyeoglu
2022-08-18use qEnvironmentVariable instead of qgetenv in JavaUtilsTayou
Signed-off-by: Tayou <tayou@gmx.net>
2022-08-18Merge pull request #1049 from flowln/waiting_for_news_-_-Sefa Eyeoglu
2022-08-18check for java installs in PATH on windowsTayou
this should find java installs from scoop as well as any other installer, that registers java in the PATH environment variable. Signed-off-by: Tayou <tayou@gmx.net>
2022-08-18refactor: move classpath definition into NewLaunch itselfSefa Eyeoglu
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
2022-08-18Merge pull request #968 from magneticflux-/utf8-loggingSefa Eyeoglu
Decode process lines as UTF-8
2022-08-13Use C locale codec for decodingMitchell Skaggs
This should correctly decode multi-byte non-UTF-8 text, such as Windows-936 (Simplified Chinese) Signed-off-by: Mitchell Skaggs <skaggsm333@gmail.com>
2022-08-12fix: hide 'More news...' button if the news aren't loaded yetflow
Signed-off-by: flow <flowlnlnln@gmail.com>
2022-08-12refactor: switch to new versioning schemeSefa Eyeoglu
The new versioning system is based on the versioning system used by the GNOME Foundation for the GNOME desktop. We are dropping the "major version" as defined by SemVer and move to a version number with a most and least significant number. The most significant number must be incremented, if there are new features or significant changes since last major release. Otherwise, the least significant number must be incremented, if there are only minor changes since the last release. New features or significant changes mustn't be introduced by a bump of the least significant number. If a minor change would introduce small user-facing changes (like a message-box or slight UI changes), it could still be classified as a minor change. At the end of the day, a human shall decide, if a change is minor or significant, as there is no clear line that would separate a "minor" and a "significant" change in a GUI-application. Definitions: feature: New user-facing functionality significant change: Something that changes user-facing behavior minor change: Something that fixes unexpected behavior Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>