1
0
mirror of https://github.com/SKCraft/Launcher.git synced 2024-11-30 13:13:58 +01:00
Commit Graph

171 Commits

Author SHA1 Message Date
johnfriedrich
e2fde95c25
Style Account Select Dialog 2021-02-19 22:58:50 +01:00
Henry Le Grys
daa955fac6 Remove packed check from launcher self-updater 2021-02-19 03:18:24 +00:00
Henry
dd3f4e7290
Add User-Agent to news page HTTP requests (#401) 2021-02-19 03:09:22 +00:00
David Lohle
4703b0dede Add User-Agent to news page HTTP requests
Cloudflare, and some other MITM proxies consider the default Java HttpURLConnection
from Java 1.8 to be an invalid, unsafe request and reject it. This leads to CF returning a
403 on request. This commit adds the same User-Agent that's applied to the other calls, so
that those that front their SKMC launcher news page with Cloudflare can have successful
page loads.
2021-02-18 21:36:03 -05:00
Henry Le Grys
660fb40c44 Fix weird Lists import from internal jcommander package 2021-02-18 23:30:14 +00:00
Henry Le Grys
5d5a462387 Switch to using Minecraft services as skin provider
We do some local processing to draw the head of the skin in 32px
resolution.
2021-02-18 22:39:51 +00:00
Henry Le Grys
fd78863697 Make skin service return null on error 2021-02-18 21:22:58 +00:00
Henry
4177c15675
Redesign login dialogs & support new Microsoft logins (#398) 2021-02-17 01:15:39 +00:00
Henry Le Grys
8eb66d4c67 Clean up error reporting for Minecraft API authentication 2021-02-16 22:16:42 +00:00
Henry Le Grys
ff12d154c8 Convert avatarImage fields to type byte[] 2021-02-16 17:39:54 +00:00
Henry Le Grys
a7dcd2c7fb Prompt Microsoft's OAuth to allow account selection on sign-in
Since signing in via browser should be a rare event (thanks to our
automatic refreshing) it's not so bad that this increases login
friction.
2021-02-16 17:23:25 +00:00
Henry Le Grys
5cf38207ae Fix XSTS error codes being missed due to Jackson weirdness 2021-02-16 17:19:11 +00:00
Henry Le Grys
fec1eaacf4 Fix an NPE due to unfinished getLoginService method 2021-02-16 16:51:45 +00:00
Henry Le Grys
df6415eea4 Show XSTS error messages if non-empty 2021-02-15 21:24:39 +00:00
Henry Le Grys
832dab329a Fix unknown Xbox error formatting 2021-02-15 16:27:31 +00:00
Henry Le Grys
7803242ffa Issue a warning when reformatting URLs fails 2021-02-13 02:58:09 +00:00
Henry Le Grys
b979eb33c9 Set account dialog selection colors correctly 2021-02-13 01:51:53 +00:00
Henry Le Grys
571d1769a2 Remove Pack200 from bootstrapper & default to normal .jar filename 2021-02-12 22:41:04 +00:00
Henry Le Grys
8d3a172ee9 Improve progress messaging during long Microsoft login dance 2021-02-11 18:16:10 +00:00
Henry Le Grys
93c3f04cbb Handle cancelled OAuth requests 2021-02-11 18:01:13 +00:00
Henry Le Grys
1d4e46214b Report Xbox authentication errors 2021-02-11 17:40:59 +00:00
Henry Le Grys
6b442c771e Improve authentication error messages 2021-02-09 03:06:37 +00:00
Henry Le Grys
b189173b34 Use cached avatar in MicrosoftLoginService 2021-02-09 02:21:56 +00:00
Henry Le Grys
21a108f796 Remove Yggdrasil agent from properties file 2021-02-09 01:44:47 +00:00
Henry Le Grys
2ec8180d2a Add confirmation dialog for forgetting accounts 2021-02-09 01:41:49 +00:00
Henry Le Grys
3effa7d674 Re-add offline session button & alter play button 2021-02-09 01:36:04 +00:00
Henry Le Grys
d2127e9b13 Implement Microsoft OAuth login process 2021-02-09 01:24:55 +00:00
Henry Le Grys
3ddaea55dc Remove old replaced authentication classes 2021-02-08 21:46:33 +00:00
Henry Le Grys
194e977176 Flesh out account selector some more 2021-02-08 21:16:54 +00:00
Henry Le Grys
18a99b338e Fix persistence, download & persist avatar locally 2021-02-08 20:38:49 +00:00
Henry Le Grys
b6252863da Start refactoring auth framework
Featuring:
* New account selection dialog
* Upgrade to Java 8!
* Questionable transitional class names
* Lots of swing code!
2021-02-08 05:48:05 +00:00
Henry Le Grys
25a433ab5b Use explicit wait/notify for popup feature selection dialog
Was getting some persistent strange behaviours with this particular
invokeAndWait call, so I've swapped it out for a manually implemented
wait & notify
2021-02-07 00:41:46 +00:00
Henry Le Grys
4aaa4f9931 Update Gradle & plugins to support Java 9+ better 2021-02-05 04:05:48 +00:00
Henry Le Grys
ffd3e54fc8 Support unpacked jars in self-updater 2021-02-02 03:36:01 +00:00
Henry Le Grys
27da4e8e4c Fix misspelled field in launcher configuration 2021-01-30 01:46:22 +00:00
Henry Le Grys
40fcfdf992 Fix library handling bug in cases of bad JSON key ordering 2021-01-29 16:21:59 +00:00
Henry Le Grys
9aced19edc Change equals & hash code calculation for libraries
The two methods actually agree with each other now
2021-01-26 03:12:38 +00:00
Henry Le Grys
f880192919 Reduce game arguments to strings where possible
Helps to reduce the size of the manifest a little, and looks nicer!
2021-01-26 01:11:02 +00:00
Henry Le Grys
67f3fc1fa4 Add a scanner to download missing targets of .url.txt files 2021-01-25 14:38:26 +00:00
Henry Le Grys
d0d8ad79ee Fix native handling for cases where some platforms are not present 2021-01-25 13:00:24 +00:00
Henry Le Grys
3a7c250736 Improve fabric loader processor by better utilizing fabric meta API
Removes a bunch of hardcoded workarounds :)
2021-01-06 23:07:11 +00:00
Henry Le Grys
7707e5e45e Add support for HTTPS redirects 2021-01-06 03:21:40 +00:00
Henry Le Grys
92048fbd3a Ensure the launcher directory is referenced absolutely
Fixes #379
2021-01-05 23:06:24 +00:00
Henry Le Grys
f53ee9b6fa Ignore 'all artifacts' list during re-serialization 2021-01-05 03:53:47 +00:00
Henry Le Grys
15a87f0df3 Verify libraries & game jars during updates 2021-01-05 03:18:52 +00:00
Henry Le Grys
3981fe4ab2 Download all libraries for every platform when building packs 2021-01-05 02:59:33 +00:00
Henry Le Grys
d6ac0983de Fix forge loaders being named wrong & warning for wrong loader version 2020-12-25 00:49:55 +00:00
Henry
dd62193b0b
Fix extraction of folders inside ZipExtract (#271) 2020-12-24 23:18:54 +00:00
Henry
495d94370c
Use absolute paths for legacy launcher wrapper support (#335) 2020-12-24 18:58:03 +00:00
Henry Le Grys
e22e70ea81 Add flag in version info: loader should override version arguments
Fixes #4
2020-12-23 00:23:35 +00:00
Henry Le Grys
b9fc461063 Delegate to platform classloader to let processors run on Java 9+
Fixes #1
2020-12-22 23:19:04 +00:00
Henry Le Grys
ffdea1f59a Update gradle buildscripts to use 'application' plugin 2020-12-22 22:01:15 +00:00
Henry Le Grys
9f9f94ddb3 Cleanup install processor & update documentation 2020-12-22 16:12:39 +00:00
Henry Le Grys
ca08bbda34 Update natives handling to handle architecture-specific native strings
Fixes #2
2020-12-22 14:14:50 +00:00
Henry Le Grys
5f0b44acd3 Add custom serializer for game arguments for more concise version JSON 2020-12-22 13:50:25 +00:00
Henry Le Grys
00aba629dc Update & document backwards compatibility measures
Fixes errors when launching old (manifest version < 3) packs
2020-12-20 00:26:49 +00:00
Henry Le Grys
22ac043cdd Bump minimum manifest version 2020-12-19 19:13:02 +00:00
Henry Le Grys
b12e3610b5 Fix Updater logic for downloading a missing version manifest
This codepath was unlikely to be hit since modern manifests always embed
the version manifest, but good to have a working fallback...
2020-12-07 03:44:03 +00:00
Henry Le Grys
fb7a99549e Set progress dialog as resizable
Fixes a bug under Linux where the dialog never resizes, even when the
details button is clicked.
2020-12-03 12:30:27 +00:00
Henry Le Grys
9a32ab8dc3 Add support for Fabric loader & expand SidedData
Also improved library handling some more
2020-12-03 01:17:18 +00:00
Henry Le Grys
e1062303df Fix argument passing & add back commandline for legacy versions
- Game/jvm arguments are now passed one-at-a-time, never grouped
- Added support for legacy version manifests by adding in the missing
arguments
- Correctly pull arguments from old manifests
- Some slightly hacky handling for old library stanzas
- Short-circuit if library URL has empty path to prevent accidentally
downloading HTML pages as jars
- Add launcherShortname prop, passed to --versionType
2020-12-02 04:14:29 +00:00
Henry Le Grys
aeedf09f8c Refactor loader processing into subclasses for greater flexibility 2020-12-02 02:29:52 +00:00
Henry Le Grys
8b6f3abaf9 Skip extra files that are server-only 2020-12-02 01:22:26 +00:00
Henry Le Grys
25d7b8227c Remove unused properties from launcher.properties 2020-12-02 01:01:43 +00:00
Henry Le Grys
86247c98a9 Update launcher/runner component to new models
- Fix game arguments being missing from version manifest due to new format
- Update Runner to use more substitutions & support new argument model
- Move loader/installer libraries to their own section to avoid runtime conflicts
- Implement some basic feature matching for arguments
2020-12-01 23:41:55 +00:00
Henry Le Grys
410031a86f Initial 1.16 update
oh lord okay
- Update to new launchermeta endpoint for version manifests
- Fix library handling (libraries now seem to give us the URL most of the time)
- Write entire new system for handling the forge installer process
- Fix asset handling, mostly (still TODO is remove all traces of assetSource, it's given to us by launchermeta now)
2020-12-01 18:41:44 +00:00
Magi1053
3448a018d3
Use absolute paths for legacy launcher wrapper support 2020-01-29 18:29:32 -06:00
Jan-Otto Kröpke
1c212fa148
Fix extraction of folders inside ZipExtract 2018-12-24 02:23:51 +01:00
sk89q
40b5fb838c Update to Java 9/10. Fancy version is still broken. 2018-07-14 19:09:40 -07:00
Albert Pham
403f2848b8
Merge pull request #215 from me4502/master
Add argument to configuration for auto-joining a server.
2017-11-11 07:54:21 -08:00
Albert Pham
768f7a5a0c
Merge pull request #188 from Matrix89/master
Add clear console button.
2017-11-11 07:53:28 -08:00
Matthew Miller
21e67328c7 Added server argument to configuration 2017-11-11 15:42:16 +10:00
Oliver Kahrmann
300da2df56 Fix runtime issue with Java 9 (java.xml.bind API) 2017-10-20 19:04:11 +02:00
sk89q
f9a728dcd6 Add minecraft.applet.TargetDirectory flag for legacy MC. 2017-08-18 15:34:24 -07:00
Matrix89
23a05d1299 Add clear console button 2017-03-24 18:14:30 +02:00
Oliver Kahrmann
bd532842b3 Reload news page when pressing "Check for Updates" 2016-07-31 22:35:48 +02:00
Jurek Weber
b2ae3316c4 use HTTPS instead of HTTP 2016-05-24 10:27:03 +02:00
sk89q
d01d93c349 Revert 'Use a JList rather than JTable for the instance list.' 2016-04-06 18:23:16 -07:00
sk89q
aa4a51882b Detect BSD as Linux. 2016-04-05 22:02:40 -07:00
Wyatt Childers
8ab5a647af Updated maven_repos.json
https://central.maven.org/ now forces users to use https://repo1.maven.org
2016-01-12 22:29:09 -05:00
sk89q
1673dc57e8 Select nearest entry on right click of instance list. 2015-11-14 16:22:20 -08:00
sk89q
991d39ced6 Use a JList rather than JTable for the instance list. 2015-11-14 14:13:50 -08:00
sk89q
2cd6ba59ff Load UI assets in the background. 2015-11-14 12:09:46 -08:00
sk89q
c1cbff754e Possibly improve detection of 32-bit/64-bit. 2015-08-03 14:25:54 -07:00
sk89q
300c8167d8 Clean up JavaRuntimeFinder. 2015-08-03 14:21:03 -07:00
sk89q
4c8a65d8a3 Set better memory defaults. 2015-08-03 14:16:23 -07:00
sk89q
3e18bcde89 Fix the Launch/Install context menu options not being localized.
Fixes #72
2015-08-03 13:46:58 -07:00
sk89q
64ee00bd1d Fix the launcher frame starting too small on some systems.
Fixes #83
2015-08-03 13:44:25 -07:00
sk89q
40555cce59 Merge pull request #82 from seebs/master
Avoid pathological failure mode when trimming lines.
2015-08-03 13:40:54 -07:00
Seebs
2a50a19d73 Avoid pathological failure mode when trimming lines
If for any reason the document associated with a LimitLinesDocumentListener
ended up not getting shorter when its first line was removed (this is,
of course, impossible), sklauncher would wedge in a busy loop that
completely killed the GUI thread forever.

Solution, part #1: Don't do a while loop, just remove multiple lines
if you need to.

But wait, why are we having this problem at all? It turns out that there
are problems when the document's length changes, which can manifest as
tons of BadLocationExceptions going uncaught in the AWT thread which is
trying to refresh the window. Why? Probably because the insert into the
document isn't happening in the Swing run queue, but concurrently with
it. So use an invokeLater to do the actual insertion.

With these two changes, and a console set to 125 lines, I got no failures.
Previously, if I set the console to 125 lines, it would die catastrophically
before Minecraft was done starting up.

Also performance may be noticably better. It's pretty common for things
to dump 20+ lines into the buffer at once. If you have a 10,000 line buffer,
and you then delete the first line of it 20 times, that's actually a whole
lot of allocation and shuffling going on.
2015-07-30 19:00:08 -05:00
sk89q
454aa327a4 [Creator] Add mod update checker. 2015-07-27 19:56:53 -07:00
sk89q
4364d1f709 Have TableColumnAdjuster re-adjust columns later after model change. 2015-07-27 19:52:26 -07:00
sk89q
a3ad521e38 Add HttpRequest.asJson(TypeReference type). 2015-07-27 19:52:06 -07:00
sk89q
8959f6ef76 Suppress unchecked warnings in LoginDialog. 2015-07-24 17:07:24 -07:00
sk89q
8eeee1081d Add an about dialog. 2015-07-24 16:51:19 -07:00
sk89q
4a35f5f5b6 Fix some native compatibility issues. 2015-07-24 11:54:08 -07:00
sk89q
815383a3a8 [Creator] Add test online option. 2015-07-24 11:38:29 -07:00
sk89q
0cc95225dd Add new creator tools. 2015-07-23 23:46:18 -07:00
sk89q
4fc8c274c3 Expand the build tools to encompass many more tasks. 2015-07-21 01:23:57 -07:00
sk89q
080ac12545 [Build Tools] Don't confirm process close. 2015-07-20 16:03:40 -07:00