From 5ae3b2c11416eb897a08b0d9531843d0357332f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Mr=C3=A1zek?= Date: Fri, 1 Apr 2016 00:07:37 +0200 Subject: [PATCH] NOISSUE nuke builtin Minecraft versions Use upstream Mojang versions. --- .../resources/versions/LWJGL/2.9.0.json | 45 -- .../LWJGL/2.9.1-nightly-20130708-debug3.json | 45 -- .../LWJGL/2.9.2-nightly-20140822.json | 45 -- application/resources/versions/minecraft.json | 587 ------------------ application/resources/versions/versions.qrc | 5 - .../org/multimc/onesix/OneSixLauncher.java | 49 +- logic/minecraft/MinecraftVersion.cpp | 39 +- logic/minecraft/MinecraftVersion.h | 21 +- logic/minecraft/MinecraftVersionList.cpp | 70 +-- logic/minecraft/MinecraftVersionList.h | 3 +- logic/minecraft/ProfilePatch.h | 1 - 11 files changed, 24 insertions(+), 886 deletions(-) delete mode 100644 application/resources/versions/LWJGL/2.9.0.json delete mode 100644 application/resources/versions/LWJGL/2.9.1-nightly-20130708-debug3.json delete mode 100644 application/resources/versions/LWJGL/2.9.2-nightly-20140822.json delete mode 100644 application/resources/versions/minecraft.json diff --git a/application/resources/versions/LWJGL/2.9.0.json b/application/resources/versions/LWJGL/2.9.0.json deleted file mode 100644 index 5dbd624e..00000000 --- a/application/resources/versions/LWJGL/2.9.0.json +++ /dev/null @@ -1,45 +0,0 @@ - { - "fileId": "org.lwjgl", - "name": "LWJGL", - "version": "2.9.0", - "+libraries": [ - { - "name": "net.java.jinput:jinput:2.0.5" - }, - { - "name": "net.java.jinput:jinput-platform:2.0.5", - "natives": { - "linux": "natives-linux", - "windows": "natives-windows", - "osx": "natives-osx" - }, - "extract": { - "exclude": [ - "META-INF/" - ] - } - }, - { - "name": "net.java.jutils:jutils:1.0.0" - }, - { - "name": "org.lwjgl.lwjgl:lwjgl:2.9.0" - }, - { - "name": "org.lwjgl.lwjgl:lwjgl_util:2.9.0" - }, - { - "name": "org.lwjgl.lwjgl:lwjgl-platform:2.9.0", - "natives": { - "linux": "natives-linux", - "windows": "natives-windows", - "osx": "natives-osx" - }, - "extract": { - "exclude": [ - "META-INF/" - ] - } - } - ] -} diff --git a/application/resources/versions/LWJGL/2.9.1-nightly-20130708-debug3.json b/application/resources/versions/LWJGL/2.9.1-nightly-20130708-debug3.json deleted file mode 100644 index 7265b3b0..00000000 --- a/application/resources/versions/LWJGL/2.9.1-nightly-20130708-debug3.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "fileId": "org.lwjgl", - "name": "LWJGL", - "version": "2.9.1-nightly-20130708-debug3", - "+libraries": [ - { - "name": "net.java.jinput:jinput:2.0.5" - }, - { - "name": "net.java.jinput:jinput-platform:2.0.5", - "natives": { - "linux": "natives-linux", - "windows": "natives-windows", - "osx": "natives-osx" - }, - "extract": { - "exclude": [ - "META-INF/" - ] - } - }, - { - "name": "net.java.jutils:jutils:1.0.0" - }, - { - "name": "org.lwjgl.lwjgl:lwjgl:2.9.1-nightly-20130708-debug3" - }, - { - "name": "org.lwjgl.lwjgl:lwjgl_util:2.9.1-nightly-20130708-debug3" - }, - { - "name": "org.lwjgl.lwjgl:lwjgl-platform:2.9.1-nightly-20130708-debug3", - "natives": { - "linux": "natives-linux", - "windows": "natives-windows", - "osx": "natives-osx" - }, - "extract": { - "exclude": [ - "META-INF/" - ] - } - } - ] -} diff --git a/application/resources/versions/LWJGL/2.9.2-nightly-20140822.json b/application/resources/versions/LWJGL/2.9.2-nightly-20140822.json deleted file mode 100644 index 25b22eb9..00000000 --- a/application/resources/versions/LWJGL/2.9.2-nightly-20140822.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "fileId": "org.lwjgl", - "name": "LWJGL", - "version": "2.9.2-nightly-20140822", - "+libraries": [ - { - "name": "net.java.jinput:jinput:2.0.5" - }, - { - "name": "net.java.jinput:jinput-platform:2.0.5", - "natives": { - "linux": "natives-linux", - "windows": "natives-windows", - "osx": "natives-osx" - }, - "extract": { - "exclude": [ - "META-INF/" - ] - } - }, - { - "name": "net.java.jutils:jutils:1.0.0" - }, - { - "name": "org.lwjgl.lwjgl:lwjgl:2.9.2-nightly-20140822" - }, - { - "name": "org.lwjgl.lwjgl:lwjgl_util:2.9.2-nightly-20140822" - }, - { - "name": "org.lwjgl.lwjgl:lwjgl-platform:2.9.2-nightly-20140822", - "natives": { - "linux": "natives-linux", - "windows": "natives-windows", - "osx": "natives-osx" - }, - "extract": { - "exclude": [ - "META-INF/" - ] - } - } - ] -} diff --git a/application/resources/versions/minecraft.json b/application/resources/versions/minecraft.json deleted file mode 100644 index 9c08a83f..00000000 --- a/application/resources/versions/minecraft.json +++ /dev/null @@ -1,587 +0,0 @@ -{ -"versions": [ - { - "id": "1.5.2", - "checksum": "6897c3287fb971c9f362eb3ab20f5ddd", - "releaseTime": "2013-04-25T17:45:00+02:00", - "type": "release", - "+traits": ["legacyLaunch", "texturepacks"] - }, - { - "id": "1.5.1", - "checksum": "5c1219d869b87d233de3033688ec7567", - "releaseTime": "2013-03-20T12:00:00+02:00", - "type": "release", - "+traits": ["legacyLaunch", "texturepacks"] - }, - { - "id": "1.5", - "checksum": "fd11cbc5b01aae1d62cff0145171f3d9", - "releaseTime": "2013-03-07T00:00:00+02:00", - "type": "snapshot", - "+traits": ["legacyLaunch", "texturepacks"] - }, - { - "id": "1.4.7", - "checksum": "8e80fb01b321c6b3c7efca397a3eea35", - "releaseTime": "2012-12-28T00:00:00+02:00", - "type": "release", - "+traits": ["legacyLaunch", "texturepacks"] - }, - { - "id": "1.4.6", - "checksum": "48677dc4c2b98c29918722b5ab27b4fd", - "releaseTime": "2012-12-20T00:00:00+02:00", - "type": "release", - "+traits": ["legacyLaunch", "texturepacks"] - }, - { - "id": "1.4.5", - "checksum": "b15e2b2b6b4629f0d99a95b6b44412a0", - "releaseTime": "2012-11-20T00:00:00+02:00", - "type": "release", - "+traits": ["legacyLaunch", "texturepacks"] - }, - { - "id": "1.4.4", - "checksum": "7aa46c8058cba2f38e9d2ddddcc77c72", - "releaseTime": "2012-11-14T00:00:00+02:00", - "type": "release", - "+traits": ["legacyLaunch", "texturepacks"] - }, - { - "id": "1.4.3", - "checksum": "9cc3295931edb6339f22989fe1b612a6", - "releaseTime": "2012-11-01T00:00:00+02:00", - "type": "snapshot", - "+traits": ["legacyLaunch", "texturepacks"] - }, - { - "id": "1.4.2", - "checksum": "771175c01778ea67395bc6919a5a9dc5", - "releaseTime": "2012-10-25T00:00:00+02:00", - "type": "release", - "+traits": ["legacyLaunch", "texturepacks"] - }, - { - "id": "1.4.1", - "checksum": "542621a5298659dc65f383f35170fc4c", - "releaseTime": "2012-10-23T00:00:00+02:00", - "type": "snapshot", - "+traits": ["legacyLaunch", "texturepacks"] - }, - { - "id": "1.4", - "checksum": "32a654388b54d3e4bb29c1a46e7d6a12", - "releaseTime": "2012-10-19T00:00:00+02:00", - "type": "snapshot", - "+traits": ["legacyLaunch", "texturepacks"] - }, - { - "id": "1.3.2", - "checksum": "969699f13e5bbe7f12e40ac4f32b7d9a", - "releaseTime": "2012-08-16T00:00:00+02:00", - "type": "release", - "+traits": ["legacyLaunch", "texturepacks"] - }, - { - "id": "1.3.1", - "checksum": "266ccbc9798afd2eadf3d6c01b4c562a", - "releaseTime": "2012-08-01T00:00:00+02:00", - "type": "release", - "+traits": ["legacyLaunch", "texturepacks"] - }, - { - "id": "1.3", - "checksum": "a6effac1eaccf5d429aae340cf95ed5d", - "releaseTime": "2012-07-26T00:00:00+02:00", - "type": "snapshot", - "+traits": ["legacyLaunch", "texturepacks"] - }, - { - "id": "1.2.5", - "checksum": "8e8778078a175a33603a585257f28563", - "releaseTime": "2012-03-30T00:00:00+02:00", - "type": "release", - "+traits": ["legacyLaunch", "texturepacks"] - }, - { - "id": "1.2.4", - "checksum": "25423eab6d8707f96cc6ad8a21a7250a", - "releaseTime": "2012-03-22T00:00:00+02:00", - "type": "release", - "+traits": ["legacyLaunch", "texturepacks"] - }, - { - "id": "1.2.3", - "checksum": "12f6c4b1bdcc63f029e3c088a364b8e4", - "releaseTime": "2012-03-02T00:00:00+02:00", - "type": "release", - "+traits": ["legacyLaunch", "texturepacks"] - }, - { - "id": "1.2.2", - "checksum": "6189e96efaea11e5164b4a4755574324", - "releaseTime": "2012-03-01T00:00:01+02:00", - "type": "release", - "+traits": ["legacyLaunch", "texturepacks"] - }, - { - "id": "1.2.1", - "checksum": "97067a603eba2b6eb75d3194f81f6bcd", - "releaseTime": "2012-03-01T00:00:00+02:00", - "type": "release", - "+traits": ["legacyLaunch", "texturepacks"] - }, - { - "id": "1.1", - "checksum": "e92302d2acdba7c97e0d8df1e10d2006", - "releaseTime": "2012-01-12T00:00:00+02:00", - "type": "release", - "+traits": ["legacyLaunch", "texturepacks"] - }, - { - "id": "1.0", - "checksum": "3820d222b95d0b8c520d9596a756a6e6", - "releaseTime": "2011-11-18T00:00:00+02:00", - "type": "release", - "+traits": ["legacyLaunch", "texturepacks"] - }, - { - "id": "b1.8.1", - "checksum": "f8c5a2ccd3bc996792bbe436d8cc08bc", - "releaseTime": "2011-09-19T00:00:00+02:00", - "type": "old_beta", - "+traits": ["legacyLaunch", "texturepacks"] - }, - { - "id": "b1.8", - "checksum": "a59a9fd4c726a573b0a2bdd10d857f59", - "releaseTime": "2011-09-15T00:00:00+02:00", - "type": "old_beta", - "+traits": ["legacyLaunch", "texturepacks"] - }, - { - "id": "b1.7.3", - "checksum": "eae3353fdaa7e10a59b4cb5b45bfa10d", - "releaseTime": "2011-07-08T00:00:00+02:00", - "type": "old_beta", - "+traits": ["legacyLaunch", "texturepacks"] - }, - { - "id": "b1.7.2", - "checksum": "dd9215ab1141170d4871f42bff4ab302", - "releaseTime": "2011-07-01T00:00:00+02:00", - "type": "old_beta", - "+traits": ["legacyLaunch", "texturepacks"] - }, - { - "id": "b1.7", - "checksum": "682419e9ed1a236c3067822d53cda1e4", - "releaseTime": "2011-06-30T00:00:00+02:00", - "type": "old_beta", - "+traits": ["legacyLaunch", "texturepacks"] - }, - { - "id": "b1.6.6", - "checksum": "ce80072464433cd5b05d505aa8ff29d1", - "releaseTime": "2011-05-31T00:00:00+02:00", - "type": "old_beta", - "+traits": ["legacyLaunch", "texturepacks"] - }, - { - "id": "b1.6.5", - "checksum": "2aba888864b32038c8d22ee5df71b7c8", - "releaseTime": "2011-05-28T00:00:00+02:00", - "type": "old_beta", - "+traits": ["legacyLaunch", "texturepacks"] - }, - { - "id": "b1.6.4", - "checksum": "5c4df6f120336f113180698613853dba", - "releaseTime": "2011-05-26T00:00:04+02:00", - "type": "old_beta", - "+traits": ["legacyLaunch", "texturepacks"] - }, - { - "id": "b1.6.3", - "checksum": "efc2becca965e4f8feb5b4210c6a4fd1", - "releaseTime": "2011-05-26T00:00:03+02:00", - "type": "old_beta", - "+traits": ["legacyLaunch", "texturepacks"] - }, - { - "id": "b1.6.2", - "checksum": "01330b1c930102a683a4dd8d792e632e", - "releaseTime": "2011-05-26T00:00:02+02:00", - "type": "old_beta", - "+traits": ["legacyLaunch", "texturepacks"] - }, - { - "id": "b1.6.1", - "checksum": "a7e82c441a57ef4068c533f4d777336a", - "releaseTime": "2011-05-26T00:00:01+02:00", - "type": "old_beta", - "+traits": ["legacyLaunch", "texturepacks"] - }, - { - "id": "b1.6", - "checksum": "d531e221227a65392259d3141893280d", - "releaseTime": "2011-05-26T00:00:00+02:00", - "type": "old_beta", - "+traits": ["legacyLaunch", "texturepacks"] - }, - { - "id": "b1.5_01", - "checksum": "d02fa9998e30693d8d989d5f88cf0040", - "releaseTime": "2011-04-20T00:00:00+02:00", - "type": "old_beta", - "+traits": ["legacyLaunch", "texturepacks"] - }, - { - "id": "b1.5", - "checksum": "24289130902822d73f8722b52bc07cdb", - "releaseTime": "2011-04-19T00:00:00+02:00", - "type": "old_beta", - "+traits": ["legacyLaunch", "texturepacks"] - }, - { - "id": "b1.4_01", - "checksum": "9379e54b581ba4ef3acc3e326e87db91", - "releaseTime": "2011-04-05T00:00:00+02:00", - "type": "old_beta", - "+traits": ["legacyLaunch", "texturepacks"] - }, - { - "id": "b1.4", - "checksum": "71e64b61175b371ed148b385f2d14ebf", - "releaseTime": "2011-03-31T00:00:00+02:00", - "type": "old_beta", - "+traits": ["legacyLaunch", "texturepacks"] - }, - { - "id": "b1.3_01", - "checksum": "4203826f35e1036f089919032c3d19d1", - "releaseTime": "2011-02-23T00:00:00+02:00", - "type": "old_beta", - "+traits": ["legacyLaunch", "texturepacks"] - }, - { - "id": "b1.3b", - "checksum": "de2164df461d028229ed2e101181bbd4", - "releaseTime": "2011-02-22T00:00:00+02:00", - "type": "old_beta", - "+traits": ["legacyLaunch", "texturepacks"] - }, - { - "id": "b1.2_02", - "checksum": "1736c5ba4f63a981220c2a18a4120180", - "releaseTime": "2011-01-21T00:00:00+02:00", - "type": "old_beta", - "+traits": ["legacyLaunch", "texturepacks"] - }, - { - "id": "b1.2_01", - "checksum": "486d83ec00554b45ffa21af2faa0116a", - "releaseTime": "2011-01-14T00:00:00+02:00", - "type": "old_beta", - "+traits": ["legacyLaunch", "texturepacks"] - }, - { - "id": "b1.2", - "checksum": "6426223efe23c3931a4ef89685be3349", - "releaseTime": "2011-01-13T00:00:00+02:00", - "type": "old_beta", - "+traits": ["legacyLaunch", "texturepacks"] - }, - { - "id": "b1.1_02", - "checksum": "7d547e495a770c62054ef136add43034", - "releaseTime": "2010-12-22T00:00:01+02:00", - "type": "old_beta", - "+traits": ["legacyLaunch", "texturepacks"] - }, - { - "id": "b1.1_01", - "checksum": "1f9331f2bfca81b6ce2acdfc1f105837", - "releaseTime": "2010-12-22T00:00:00+02:00", - "type": "old_beta", - "+traits": ["legacyLaunch", "texturepacks"] - }, - { - "id": "b1.0.2", - "checksum": "d200c465b8c167cc8df6537531fc9a48", - "releaseTime": "2010-12-21T00:00:00+02:00", - "type": "old_beta", - "+traits": ["legacyLaunch", "texturepacks"] - }, - { - "id": "b1.0_01", - "checksum": "03bd20b870dbbd121de5dca98af4e1ce", - "releaseTime": "2010-12-20T00:00:01+02:00", - "type": "old_beta", - "+traits": ["legacyLaunch", "texturepacks"] - }, - { - "id": "b1.0", - "checksum": "5f8733dbbf09b4e7c874661a3c29c239", - "releaseTime": "2010-12-20T00:00:00+02:00", - "type": "old_beta", - "+traits": ["legacyLaunch", "texturepacks"] - }, - { - "id": "a1.2.6", - "checksum": "ddd5e39467f28d1ea1a03b4d9e790867", - "releaseTime": "2010-12-03T00:00:00+02:00", - "type": "old_alpha", - "+traits": ["legacyLaunch", "texturepacks"] - }, - { - "id": "a1.2.5", - "checksum": "7d3a43037190970ff2e11153b5718b74", - "releaseTime": "2010-12-01T00:00:00+02:00", - "type": "old_alpha", - "+traits": ["legacyLaunch", "texturepacks"] - }, - { - "id": "a1.2.4_01", - "checksum": "0a1cc8c668faa6dc93fc418e8b4b097a", - "releaseTime": "2010-11-30T00:00:00+02:00", - "type": "old_alpha", - "+traits": ["legacyLaunch", "texturepacks"] - }, - { - "id": "a1.2.3_04", - "checksum": "b2c25a753c82a1cd228ce71469829dc1", - "releaseTime": "2010-11-26T00:00:00+02:00", - "type": "old_alpha", - "+traits": ["legacyLaunch", "texturepacks"] - }, - { - "id": "a1.2.3_02", - "checksum": "3ad4808ef2ac3b65d10305315260da03", - "releaseTime": "2010-11-25T00:00:00+02:00", - "type": "old_alpha", - "+traits": ["legacyLaunch", "texturepacks"] - }, - { - "id": "a1.2.3_01", - "checksum": "70cbab762b17c5b11fefea9b12564119", - "releaseTime": "2010-11-24T00:00:01+02:00", - "type": "old_alpha", - "+traits": ["legacyLaunch", "texturepacks"] - }, - { - "id": "a1.2.3", - "checksum": "25f053114e34b915e675f82d58f08711", - "releaseTime": "2010-11-24T00:00:00+02:00", - "type": "old_alpha", - "+traits": ["legacyLaunch", "texturepacks"] - }, - { - "id": "a1.2.2b", - "checksum": "6250fb17f8898c4d970d6bd03c229177", - "releaseTime": "2010-11-10T00:00:01+02:00", - "type": "old_alpha", - "+traits": ["legacyLaunch", "texturepacks"] - }, - { - "id": "a1.2.2a", - "checksum": "0f9fe018b344fd9dd849005f9bdca803", - "releaseTime": "2010-11-10T00:00:00+02:00", - "type": "old_alpha", - "+traits": ["legacyLaunch", "texturepacks"] - }, - { - "id": "a1.2.1_01", - "checksum": "0a496e44a7b4e2f493b5893d8e5845bd", - "releaseTime": "2010-11-05T00:00:01+02:00", - "type": "old_alpha", - "+traits": ["legacyLaunch", "no-texturepacks"] - }, - { - "id": "a1.2.1", - "checksum": "0a496e44a7b4e2f493b5893d8e5845bd", - "releaseTime": "2010-11-05T00:00:00+02:00", - "type": "old_alpha", - "+traits": ["legacyLaunch", "no-texturepacks"] - }, - { - "id": "a1.2.0_02", - "checksum": "f5bcb4d0c0e78bc220f164b89ae9bd60", - "releaseTime": "2010-11-04T00:00:00+02:00", - "type": "old_alpha", - "+traits": ["legacyLaunch", "no-texturepacks"] - }, - { - "id": "a1.2.0_01", - "checksum": "b2e9333e967cb89488884c2e5c715d4f", - "releaseTime": "2010-10-31T00:00:00+02:00", - "type": "old_alpha", - "+traits": ["legacyLaunch", "no-texturepacks"] - }, - { - "id": "a1.2.0", - "checksum": "44c384dae02390f700458b95d82c3e2a", - "releaseTime": "2010-10-30T00:00:00+02:00", - "type": "old_alpha", - "+traits": ["legacyLaunch", "no-texturepacks"] - }, - { - "id": "a1.1.2_01", - "checksum": "94346e1b8f6ad0e4a284314f0e29207b", - "releaseTime": "2010-09-23T00:00:00+02:00", - "type": "old_alpha", - "+traits": ["legacyLaunch", "no-texturepacks"] - }, - { - "id": "a1.1.2", - "checksum": "72ba1f834327805cb44164a42b331522", - "releaseTime": "2010-09-20T00:00:00+02:00", - "type": "old_alpha", - "+traits": ["legacyLaunch", "no-texturepacks"] - }, - { - "id": "a1.1.0", - "checksum": "891fd93e04f5daaf35d73c58e45c01b1", - "releaseTime": "2010-09-13T00:00:00+02:00", - "type": "old_alpha", - "+traits": ["legacyLaunch", "no-texturepacks"] - }, - { - "id": "a1.0.17_04", - "checksum": "16ed7dc58244772847991e504afcf02f", - "releaseTime": "2010-08-23T00:00:00+02:00", - "type": "old_alpha", - "+traits": ["legacyLaunch", "no-texturepacks"] - }, - { - "id": "a1.0.17_02", - "checksum": "d89760b0871ef61a55c9f336c0439d58", - "releaseTime": "2010-08-20T00:00:00+02:00", - "type": "old_alpha", - "+traits": ["legacyLaunch", "no-texturepacks"] - }, - { - "id": "a1.0.16", - "checksum": "6bbde02c13aed5766275f4398ede6aae", - "releaseTime": "2010-08-12T00:00:00+02:00", - "type": "old_alpha", - "+traits": ["legacyLaunch", "no-texturepacks"] - }, - { - "id": "a1.0.15", - "checksum": "ade257d2080d56fa983763f9c701fa14", - "releaseTime": "2010-08-04T00:00:00+02:00", - "type": "old_alpha", - "+traits": ["legacyLaunch", "no-texturepacks"] - }, - { - "id": "a1.0.14", - "checksum": "227d0c6fa896a231de6269a074c9a458", - "releaseTime": "2010-07-30T00:00:00+02:00", - "type": "old_alpha", - "+traits": ["legacyLaunch", "no-texturepacks"] - }, - { - "id": "a1.0.11", - "checksum": "6f1b1dd157fa0df39760f5be3eab01b0", - "releaseTime": "2010-07-23T00:00:00+02:00", - "type": "old_alpha", - "+traits": ["legacyLaunch", "no-texturepacks"] - }, - { - "id": "a1.0.5_01", - "checksum": "ae5f606caa18222e7568819c910ee423", - "releaseTime": "2010-07-13T00:00:00+02:00", - "type": "old_alpha", - "mainClass": "y", - "+traits": ["legacyLaunch", "no-texturepacks"] - }, - { - "id": "a1.0.4", - "checksum": "13ce7935c3670e7494e26b2704bfa3e9", - "releaseTime": "2010-07-09T00:00:00+02:00", - "type": "old_alpha", - "mainClass": "ax", - "+traits": ["legacyLaunch", "no-texturepacks"] - }, - { - "id": "inf-20100618", - "checksum": "f5f5aa34760facc10486e906a7c60196", - "releaseTime": "2010-06-16T00:00:00+02:00", - "type": "old_alpha", - "mainClass": "net.minecraft.client.d", - "appletClass": "net.minecraft.client.MinecraftApplet", - "+traits": ["legacyLaunch", "no-texturepacks"] - }, - { - "id": "c0.30_01c", - "checksum": "fcfd7f83a6b27503cf48202381a5adf2", - "releaseTime": "2009-12-22T00:00:00+02:00", - "type": "old_alpha", - "mainClass": "com.mojang.minecraft.l", - "appletClass": "com.mojang.minecraft.MinecraftApplet", - "+traits": ["legacyLaunch", "no-texturepacks"] - }, - { - "id": "c0.0.13a_03", - "checksum": "a9527cb5aef198e0f53e235ebe13dc75", - "releaseTime": "2009-05-22T00:00:00+02:00", - "type": "old_alpha", - "mainClass": "com.mojang.minecraft.c", - "appletClass": "com.mojang.minecraft.MinecraftApplet", - "+traits": ["legacyLaunch", "no-texturepacks"] - }, - { - "id": "c0.0.13a", - "checksum": "3617fbf5fbfd2b837ebf5ceb63584908", - "releaseTime": "2009-05-31T00:00:00+02:00", - "type": "old_alpha", - "mainClass": "com.mojang.minecraft.Minecraft", - "appletClass": "com.mojang.minecraft.MinecraftApplet", - "+traits": ["legacyLaunch", "no-texturepacks"] - }, - { - "id": "c0.0.11a", - "checksum": "a6e03c2eaf74709facc0d2477648e999", - "releaseTime": "2009-05-17T00:00:00+02:00", - "type": "old_alpha", - "mainClass": "com.mojang.minecraft.Minecraft", - "appletClass": "com.mojang.minecraft.MinecraftApplet", - "+traits": ["legacyLaunch", "no-texturepacks"] - }, - { - "id": "rd-161348", - "checksum": "80882b8936a5c8d91500838a6660b504", - "releaseTime": "2009-05-16T13:48:00+02:00", - "type": "old_alpha", - "mainClass": "com.mojang.minecraft.RubyDung", - "+traits": ["no-texturepacks"] - }, - { - "id": "rd-160052", - "checksum": "24c5cc99a2a612697ed2f7d5d04242fe", - "releaseTime": "2009-05-16T00:52:00+02:00", - "type": "old_alpha", - "mainClass": "com.mojang.rubydung.RubyDung", - "+traits": ["no-texturepacks"] - }, - { - "id": "rd-132328", - "checksum": "70e33a81c541b13a477e68c1207124eb", - "releaseTime": "2009-05-13T23:28:00+02:00", - "type": "old_alpha", - "mainClass": "com.mojang.rubydung.RubyDung", - "+traits": ["no-texturepacks"] - }, - { - "id": "rd-132211", - "checksum": "99fdaea10c494b9c3c3254636b98b799", - "releaseTime": "2009-05-13T22:11:00+02:00", - "type": "old_alpha", - "mainClass": "com.mojang.rubydung.RubyDung", - "+traits": ["no-texturepacks"] - } -] -} diff --git a/application/resources/versions/versions.qrc b/application/resources/versions/versions.qrc index e9621e97..c9a3690e 100644 --- a/application/resources/versions/versions.qrc +++ b/application/resources/versions/versions.qrc @@ -1,12 +1,7 @@ - - minecraft.json - LWJGL/2.9.0.json - LWJGL/2.9.1-nightly-20130708-debug3.json LWJGL/2.9.1.json - LWJGL/2.9.2-nightly-20140822.json diff --git a/depends/launcher/org/multimc/onesix/OneSixLauncher.java b/depends/launcher/org/multimc/onesix/OneSixLauncher.java index 0d1e2174..179df0ee 100644 --- a/depends/launcher/org/multimc/onesix/OneSixLauncher.java +++ b/depends/launcher/org/multimc/onesix/OneSixLauncher.java @@ -249,6 +249,8 @@ public class OneSixLauncher implements Launcher mcparams.add(Integer.toString(winSize.height)); } + System.setProperty("minecraft.applet.TargetDirectory", cwd); + // Get the Minecraft Class. Class mc; try @@ -272,53 +274,6 @@ public class OneSixLauncher implements Launcher e.printStackTrace(System.err); return -1; } - /* - final java.nio.ByteBuffer[] icons = IconLoader.load("icon.png"); - new Thread() { - public void run() { - ClassLoader cl = ClassLoader.getSystemClassLoader(); - try - { - Class Display; - Method isCreated; - Method setTitle; - Method setIcon; - Field fieldWindowCreated; - Boolean created = false; - Display = cl.loadClass("org.lwjgl.opengl.Display"); - fieldWindowCreated = Display.getDeclaredField("window_created"); - fieldWindowCreated.setAccessible( true ); - setTitle = Display.getMethod("setTitle", String.class); - setIcon = Display.getMethod("setIcon", java.nio.ByteBuffer[].class); - created = (Boolean) fieldWindowCreated.get( null ); - // set the window title? Maybe? - while(!created) - { - try - { - Thread.sleep(150); - created = (Boolean) fieldWindowCreated.get( null ); - } catch (InterruptedException ignored) {} - } - // Give it a bit more time ;) - Thread.sleep(150); - // set the title - setTitle.invoke(null,windowTitle); - // only set icon when there's actually something to set... - if(icons.length > 0) - { - setIcon.invoke(null,(Object)icons); - } - } - catch (Exception e) - { - System.err.println("Couldn't set window icon or title."); - e.printStackTrace(System.err); - } - } - } - .start(); - */ // init params for the main method to chomp on. String[] paramsArray = mcparams.toArray(new String[mcparams.size()]); try diff --git a/logic/minecraft/MinecraftVersion.cpp b/logic/minecraft/MinecraftVersion.cpp index 3167fc4a..1e1d273c 100644 --- a/logic/minecraft/MinecraftVersion.cpp +++ b/logic/minecraft/MinecraftVersion.cpp @@ -3,20 +3,22 @@ #include "VersionBuildError.h" #include "ProfileUtils.h" #include "settings/SettingsObject.h" +#include "minecraft/VersionFilterData.h" bool MinecraftVersion::usesLegacyLauncher() { - return m_traits.contains("legacyLaunch") || m_traits.contains("aplhaLaunch"); + return getReleaseDateTime() < g_VersionFilterData.legacyCutoffDate; } + QString MinecraftVersion::descriptor() { - return m_descriptor; + return m_version; } QString MinecraftVersion::name() { - return m_name; + return m_version; } QString MinecraftVersion::typeString() const @@ -66,7 +68,7 @@ void MinecraftVersion::applyFileTo(MinecraftProfile *profile) } else { - throw VersionIncomplete(QObject::tr("Can't apply incomplete/builtin Minecraft version %1").arg(m_name)); + throw VersionIncomplete(QObject::tr("Can't apply incomplete/builtin Minecraft version %1").arg(m_version)); } } @@ -75,7 +77,7 @@ QString MinecraftVersion::getUrl() const // legacy fallback if(m_versionFileURL.isEmpty()) { - return QString("http://") + URLConstants::AWS_DOWNLOAD_VERSIONS + m_descriptor + "/" + m_descriptor + ".json"; + return QString("http://") + URLConstants::AWS_DOWNLOAD_VERSIONS + m_version + "/" + m_version + ".json"; } // current return m_versionFileURL; @@ -83,9 +85,8 @@ QString MinecraftVersion::getUrl() const VersionFilePtr MinecraftVersion::getVersionFile() { - QFileInfo versionFile(QString("versions/%1/%1.dat").arg(m_descriptor)); + QFileInfo versionFile(QString("versions/%1/%1.dat").arg(m_version)); m_problems.clear(); - m_problemSeverity = PROBLEM_NONE; if(!versionFile.exists()) { if(m_loadedVersionFile) @@ -124,8 +125,6 @@ bool MinecraftVersion::isCustomizable() case Remote: // locally cached file, or a remote file that we can acquire can be customized return true; - case Builtin: - // builtins do not follow the normal OneSix format. They are not customizable. default: // Everything else is undefined and therefore not customizable. return false; @@ -135,7 +134,7 @@ bool MinecraftVersion::isCustomizable() const QList &MinecraftVersion::getProblems() { - if(m_versionSource != Builtin && getVersionFile()) + if(getVersionFile()) { return getVersionFile()->getProblems(); } @@ -144,7 +143,7 @@ const QList &MinecraftVersion::getProblems() ProblemSeverity MinecraftVersion::getProblemSeverity() { - if(m_versionSource != Builtin && getVersionFile()) + if(getVersionFile()) { return getVersionFile()->getProblemSeverity(); } @@ -159,19 +158,7 @@ void MinecraftVersion::applyTo(MinecraftProfile *profile) applyFileTo(profile); return; } - // if not builtin, do not proceed any further. - if (m_versionSource != Builtin) - { - throw VersionIncomplete(QObject::tr( - "Minecraft version %1 could not be applied: version files are missing.").arg(m_descriptor)); - } - profile->applyMinecraftVersion(m_descriptor); - profile->applyMainClass(m_mainClass); - profile->applyAppletClass(m_appletClass); - profile->applyMinecraftArguments(" ${auth_player_name} ${auth_session}"); // all builtin versions are legacy - profile->applyMinecraftVersionType(m_type); - profile->applyTraits(m_traits); - profile->applyProblemSeverity(m_problemSeverity); + throw VersionIncomplete(QObject::tr("Minecraft version %1 could not be applied: version files are missing.").arg(m_version)); } int MinecraftVersion::getOrder() @@ -195,7 +182,7 @@ QString MinecraftVersion::getName() } QString MinecraftVersion::getVersion() { - return m_descriptor; + return m_version; } QString MinecraftVersion::getID() { @@ -224,5 +211,5 @@ bool MinecraftVersion::hasUpdate() bool MinecraftVersion::isCustom() { // if we add any other source types, this will evaluate to false for them. - return m_versionSource != Builtin && m_versionSource != Local && m_versionSource != Remote; + return m_versionSource != Local && m_versionSource != Remote; } diff --git a/logic/minecraft/MinecraftVersion.h b/logic/minecraft/MinecraftVersion.h index 1539ffd8..b21427d9 100644 --- a/logic/minecraft/MinecraftVersion.h +++ b/logic/minecraft/MinecraftVersion.h @@ -34,7 +34,9 @@ class MULTIMC_LOGIC_EXPORT MinecraftVersion : public BaseVersion, public Profile friend class MinecraftVersionList; public: /* methods */ + // FIXME: nuke this. bool usesLegacyLauncher(); + virtual QString descriptor() override; virtual QString name() override; virtual QString typeString() const override; @@ -89,25 +91,13 @@ private: /* methods */ void applyFileTo(MinecraftProfile *profile); protected: /* data */ - VersionSource m_versionSource = Builtin; + VersionSource m_versionSource = Remote; /// The URL that this version will be downloaded from. QString m_versionFileURL; /// the human readable version name - QString m_name; - - /// the version ID. - QString m_descriptor; - - /// version traits. added by MultiMC - QSet m_traits; - - /// The main class this version uses (if any, can be empty). - QString m_mainClass; - - /// The applet class this version uses (if any, can be empty). - QString m_appletClass; + QString m_version; /// The type of this release QString m_type; @@ -118,9 +108,6 @@ protected: /* data */ /// the time this version was last updated by Mojang QDateTime m_updateTime; - /// MD5 hash of the minecraft jar - QString m_jarChecksum; - /// order of this file... default = -2 int order = -2; diff --git a/logic/minecraft/MinecraftVersionList.cpp b/logic/minecraft/MinecraftVersionList.cpp index bd679c73..eab55c9a 100644 --- a/logic/minecraft/MinecraftVersionList.cpp +++ b/logic/minecraft/MinecraftVersionList.cpp @@ -83,7 +83,6 @@ public: MinecraftVersionList::MinecraftVersionList(QObject *parent) : BaseVersionList(parent) { - loadBuiltinList(); loadCachedList(); } @@ -141,7 +140,7 @@ void MinecraftVersionList::loadCachedList() { throw ListLoadError(tr("Error reading the version list.")); } - loadMojangList(jsonDoc, Local); + loadList(jsonDoc, Local); } catch (Exception &e) { @@ -153,57 +152,7 @@ void MinecraftVersionList::loadCachedList() m_hasLocalIndex = true; } -void MinecraftVersionList::loadBuiltinList() -{ - qDebug() << "Loading builtin version list."; - // grab the version list data from internal resources. - const QJsonDocument doc = - Json::requireDocument(QString(":/versions/minecraft.json"), "builtin version list"); - const QJsonObject root = doc.object(); - - // parse all the versions - for (const auto version : Json::requireArray(root.value("versions"))) - { - QJsonObject versionObj = version.toObject(); - QString versionID = versionObj.value("id").toString(""); - QString versionTypeStr = versionObj.value("type").toString(""); - if (versionID.isEmpty() || versionTypeStr.isEmpty()) - { - qCritical() << "Parsed version is missing ID or type"; - continue; - } - - if (g_VersionFilterData.legacyBlacklist.contains(versionID)) - { - qWarning() << "Blacklisted legacy version ignored: " << versionID; - continue; - } - - // Now, we construct the version object and add it to the list. - std::shared_ptr mcVersion(new MinecraftVersion()); - mcVersion->m_name = mcVersion->m_descriptor = versionID; - - // Parse the timestamp. - mcVersion->m_releaseTime = timeFromS3Time(versionObj.value("releaseTime").toString("")); - mcVersion->m_versionFileURL = QString(); - mcVersion->m_versionSource = Builtin; - mcVersion->m_type = versionTypeStr; - mcVersion->m_appletClass = versionObj.value("appletClass").toString(""); - mcVersion->m_mainClass = versionObj.value("mainClass").toString(""); - mcVersion->m_jarChecksum = versionObj.value("checksum").toString(""); - if (versionObj.contains("+traits")) - { - for (auto traitVal : Json::requireArray(versionObj.value("+traits"))) - { - mcVersion->m_traits.insert(Json::requireString(traitVal)); - } - } - m_lookup[versionID] = mcVersion; - m_vlist.append(mcVersion); - } -} - -void MinecraftVersionList::loadMojangList(QJsonDocument jsonDoc, VersionSource source) +void MinecraftVersionList::loadList(QJsonDocument jsonDoc, VersionSource source) { qDebug() << "Loading" << ((source == Remote) ? "remote" : "local") << "version list."; @@ -260,16 +209,11 @@ void MinecraftVersionList::loadMojangList(QJsonDocument jsonDoc, VersionSource s // Now, we construct the version object and add it to the list. std::shared_ptr mcVersion(new MinecraftVersion()); - mcVersion->m_name = mcVersion->m_descriptor = versionID; + mcVersion->m_version = versionID; mcVersion->m_releaseTime = timeFromS3Time(versionObj.value("releaseTime").toString("")); mcVersion->m_updateTime = timeFromS3Time(versionObj.value("time").toString("")); - if (mcVersion->m_releaseTime < g_VersionFilterData.legacyCutoffDate) - { - continue; - } - // depends on where we load the version from -- network request or local file? mcVersion->m_versionSource = source; mcVersion->m_versionFileURL = versionObj.value("url").toString(""); @@ -444,7 +388,7 @@ void MCVListLoadTask::list_downloaded() throw ListLoadError( tr("Error parsing version list JSON: %1").arg(jsonError.errorString())); } - m_list->loadMojangList(jsonDoc, Remote); + m_list->loadList(jsonDoc, Remote); } catch (Exception &e) { @@ -502,8 +446,6 @@ void MCVListVersionUpdateTask::json_downloaded() // Strip LWJGL from the version file. We use our own. ProfileUtils::removeLwjglFromPatch(file); - // TODO: recognize and add LWJGL versions here. - file->fileId = "net.minecraft"; // now dump the file to disk @@ -627,10 +569,6 @@ void MinecraftVersionList::finalizeUpdate(QString version) auto updatedVersion = std::dynamic_pointer_cast(m_vlist[idx]); - // reject any updates to builtin versions. - if (updatedVersion->m_versionSource == Builtin) - return; - // if we have an update for the version, replace it, make the update local if (updatedVersion->upstreamUpdate) { diff --git a/logic/minecraft/MinecraftVersionList.h b/logic/minecraft/MinecraftVersionList.h index e414a1da..8643f0f0 100644 --- a/logic/minecraft/MinecraftVersionList.h +++ b/logic/minecraft/MinecraftVersionList.h @@ -34,8 +34,7 @@ class MULTIMC_LOGIC_EXPORT MinecraftVersionList : public BaseVersionList Q_OBJECT private: void sortInternal(); - void loadBuiltinList(); - void loadMojangList(QJsonDocument jsonDoc, VersionSource source); + void loadList(QJsonDocument jsonDoc, VersionSource source); void loadCachedList(); void saveCachedList(); void finalizeUpdate(QString version); diff --git a/logic/minecraft/ProfilePatch.h b/logic/minecraft/ProfilePatch.h index fa2f0a0f..f0c65360 100644 --- a/logic/minecraft/ProfilePatch.h +++ b/logic/minecraft/ProfilePatch.h @@ -18,7 +18,6 @@ enum ProblemSeverity /// where is a version from? enum VersionSource { - Builtin, //!< version loaded from the internal resources. Local, //!< version loaded from a file in the cache. Remote, //!< incomplete version on a remote server. };