Commit Graph

4922 Commits

Author SHA1 Message Date
TheKodeToad
922220c11e More consistent logging text
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
2022-11-08 16:37:27 +00:00
TheKodeToad
56d5035c63 Fix the warnings properly
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
2022-11-08 16:37:27 +00:00
TheKodeToad
4abf3a20c6 More standard code formatting profile
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
2022-11-08 16:37:25 +00:00
TheKodeToad
5912ef3b45 Just ignore empty lines
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
2022-11-08 16:37:00 +00:00
TheKodeToad
9931c9a286 Remove arguments being passed twice
Passing the classpath into stdin has no effect. Java is already provided the classpath with -cp, which pretty much takes up the largest part of the arguments anyway, which leads me to wonder, what's the point of stdin arguments at all?

Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
2022-11-08 16:37:00 +00:00
TheKodeToad
1da834f650 *opinionated change* Remove LauncherFactory
Factories in OOP are a classic example of over-enginneering. When you only have two launchers I personally think that it's not very useful.

Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
2022-11-08 16:37:00 +00:00
TheKodeToad
fb677a7489 So turns out we can have nice things
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
2022-11-08 16:36:55 +00:00
TheKodeToad
404796d4b2 Sorry for reverting a lot but copying a list just hurts me
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
2022-11-08 16:36:35 +00:00
TheKodeToad
5b9bfe8891 Attempt to mimic clang-format
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
2022-11-08 16:36:33 +00:00
TheKodeToad
779bc2c63d Fix WrongMethodTypeException. Invoke exact don't work like that
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
2022-11-08 16:35:46 +00:00
TheKodeToad
cae1ba7cd8 Less needless verbosity, and return fallback
Needlessly verbose commit message ik.

Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
2022-11-08 16:35:46 +00:00
TheKodeToad
8ce78dcc54 Try to improve consistency
- Makes code formatting more consistent with the C++ codebase. Probably removes some trailing whitespace. Maybe it would be best to commit an Eclipse or IntelliJ code format preferences file?
- Removes obscure suppressions. I personally think it's better to only suppress warnings that javac complains about. Suppressing a lot of non-standardised warnings (many of them turned off by default even in IntelliJ) just creates needless clutter.
- Fixes some trivial warnings instead of suppressing them. serialVersionUID is sort of stupid, but I'd rather mentally ignore it or just fix it if it's really that annoying.

Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
2022-11-08 16:35:43 +00:00
solonovamax
afe088dba1 Fix license headers
- Update license headers in several files to remove multimc apache reference, when unneeded
  - LauncherFactory: we've entirely rewritten this class at this point, so it's fully under GPL code
  - Launcher: this interface contains zero logic, and only a single method named `launch`, so I doubt you can actually copyright that
  - LauncherProvider: same as above
  - ParseException, ParameterNotFoundException: same as above; this class contains almost no logic (And the logic that was added is under GPL)
  - ReflectionUtils, StringUtils: add license header
  - Everything else: modify the program name in the license header from "PolyMC - Minecraft Launcher" to "Prism Launcher"

Signed-off-by: solonovamax <solonovamax@12oclockpoint.com>
2022-11-08 16:25:09 +00:00
solonovamax
e899e31745 More informative exceptions in entrypoint
Signed-off-by: solonovamax <solonovamax@12oclockpoint.com>
2022-11-08 16:25:09 +00:00
solonovamax
dabb84f62a Cleanup launcher classes
Cleanup a bunch of the code in launcher classes
- Migrate the majority of the reflection to ReflectionUtils
- Decrease logic in AbstractLauncher
- Add logging to launcher classes at FINE level
- make mcParams in AbstractLauncher an immutable list to prevent runtime manipulation
  - StandardLauncher instead copies the list to modify it

Signed-off-by: solonovamax <solonovamax@12oclockpoint.com>
2022-11-08 16:25:09 +00:00
solonovamax
9b8096c699 Get rid of gross HashMap being used by LauncherFactory and instead use *fancy* enum
Signed-off-by: solonovamax <solonovamax@12oclockpoint.com>
2022-11-08 16:25:09 +00:00
solonovamax
ac5b74301e Cleanup splitting string into a pair
Signed-off-by: solonovamax <solonovamax@12oclockpoint.com>
2022-11-08 16:25:09 +00:00
TheKodeToad
609b30110b Make main static
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>

Inline local variable

Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
2022-11-08 16:25:09 +00:00
TheKodeToad
35d200356f Create launcher.impl.legacy
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
2022-11-08 16:25:09 +00:00
TheKodeToad
0cd1d7aa7e Excessive safety
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
2022-11-08 16:25:09 +00:00
TheKodeToad
ade7526f5f Remove the need for LegacyUtils
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
2022-11-08 16:25:09 +00:00
TheKodeToad
a7b1700d42 Better variable naming
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
2022-11-08 16:25:09 +00:00
TheKodeToad
c0b8c53e69 Attempt to sort out copyright headers
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
2022-11-08 16:25:09 +00:00
TheKodeToad
e86fbc697f Fix formatting
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
2022-11-08 16:25:09 +00:00
solonovamax
e5622ce824 Code cleanup to net.minecraft.Launcher
No code logic has been changed, only:
- add @Override annotatons
- change setVisible(boolean b) -> setVisible(boolean visible)
- Change block commend on class -> javadoc comment

Signed-off-by: solonovamax <solonovamax@12oclockpoint.com>
2022-11-08 16:25:09 +00:00
solonovamax
99d9868116 Cleanup EntryPoint code
- Don't return an int from listen(). An enum is preferred.
- Make parseLine() static, and pass Parameters to it.

Signed-off-by: solonovamax <solonovamax@12oclockpoint.com>
2022-11-08 16:25:09 +00:00
solonovamax
107fa6b4f7 Code refactors
- Refactor LauncherFactory.LauncherProvider to LauncherFactory
- Refactor all launcher related components to launcher package
- some basic code cleanup
- Rename all, allSafe -> getList and first, firstSafe -> getString
- Rename Utils -> LegacyUtils

Signed-off-by: solonovamax <solonovamax@12oclockpoint.com>
2022-11-08 16:25:09 +00:00
solonovamax
9062d28704 Get rid of singleton, and refactor LauncherFactory to be a static class
Signed-off-by: solonovamax <solonovamax@12oclockpoint.com>
2022-11-08 16:25:09 +00:00
TheKodeToad
e68dcea6bc Various tweaks to the Java component of the launcher
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
2022-11-08 16:24:55 +00:00
flow
e4e0c27e1c
Merge pull request #281 from Scrumplex/fix-nsis-displayname 2022-10-24 11:09:23 -03:00
Sefa Eyeoglu
74b98af8e5
fix: use display name in NSIS
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
2022-10-24 12:43:13 +02:00
Sefa Eyeoglu
224304813a
Merge pull request #274 from Protrikk/patch-1 2022-10-24 11:13:42 +02:00
Trisave
d5109f024b
Better dark theme selection contrast
Tweak background of the selection background in order to make text more readable

Signed-off-by: Trisave <42098407+Protrikk@users.noreply.github.com>
2022-10-23 20:32:04 +02:00
flow
7f441f5b87
Merge pull request #228 from bensuperpc/change_cast 2022-10-23 14:28:33 -03:00
Sefa Eyeoglu
29e6e170cc
Merge pull request #240 from jn64/fix/version-label-width 2022-10-23 02:07:29 +02:00
jn64
01db80d19a Fix version labels width
Make labels fit to the contents, so Ibeam cursor doesn't appear
over empty space. Should have been done with 90025ed.

Signed-off-by: jn64 <23169302+jn64@users.noreply.github.com>
2022-10-23 03:35:23 +08:00
flow
8b28ed67ae
Merge pull request #234 from AliceDTRH/fix/dedupejava 2022-10-22 13:14:26 -03:00
flow
9bb62e1bba
Merge pull request #233 from jamierocks/atl-fix-aborting-installs 2022-10-22 12:19:58 -03:00
AliceDTRH
b2789fef0f
Use correct variable for Windows
Signed-off-by: AliceDTRH <57547425+AliceDTRH@users.noreply.github.com>
2022-10-22 17:19:34 +02:00
AliceDTRH
1471eddc7e
Deduplicates java installs before passing it on
Signed-off-by: AliceDTRH <57547425+AliceDTRH@users.noreply.github.com>
2022-10-22 16:40:31 +02:00
Jamie Mansfield
0e17eee096
ATLauncher: Fix pack installation always aborting
I made a mistake during when cherry picking a previous commit, this
applies the change - and fixes installing ATLauncher packs.
2022-10-22 15:22:30 +01:00
flow
81f1305270
Merge pull request #215 from forkiesassds/develop 2022-10-22 10:48:00 -03:00
Sefa Eyeoglu
2ec4310104
Merge pull request #230 from Scrumplex/add-pr-template 2022-10-22 15:32:00 +02:00
Sefa Eyeoglu
24e4db676a
Merge pull request #224 from jamierocks/atl-abort-close-optional-mods-dialog 2022-10-22 15:31:53 +02:00
Sefa Eyeoglu
6e21a9829d
Merge pull request #225 from Scrumplex/fix-segfault-fileresolver 2022-10-22 15:31:46 +02:00
flow
4e99e10cbd
Merge pull request #218 from getchoo/change-jars-path 2022-10-22 10:18:58 -03:00
Sefa Eyeoglu
8b3093e758
chore: add PR template
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
2022-10-22 14:59:57 +02:00
Sefa Eyeoglu
970e4b020e
fix: fix segfault when resolving Flame resources
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
2022-10-22 14:11:51 +02:00
Jamie Mansfield
a4f4f2891c
DCO Remediation Commit for a6b13487
I, Jamie Mansfield <jmansfield@cadixdev.org>, hereby add my
Signed-off-by to this commit: a6b13487f0

Signed-off-by: Jamie Mansfield <jmansfield@cadixdev.org>
2022-10-22 12:58:56 +01:00
Jamie Mansfield
a6b13487f0
ATLauncher: Abort install if optional mods dialog is closed
This matches the behaviour of ATLauncher.
2022-10-22 12:35:34 +01:00