From b6d455a02bd338e9dc0faa09d4d8177ecd8d569a Mon Sep 17 00:00:00 2001 From: Petr Mrázek Date: Sun, 10 Apr 2016 15:53:05 +0200 Subject: NOISSUE reorganize and document libraries --- libraries/README.md | 145 + libraries/classparser/CMakeLists.txt | 41 + libraries/classparser/include/classparser_config.h | 22 + libraries/classparser/include/javautils.h | 29 + libraries/classparser/src/annotations.cpp | 85 + libraries/classparser/src/annotations.h | 277 ++ libraries/classparser/src/classfile.h | 156 + libraries/classparser/src/constants.h | 220 + libraries/classparser/src/errors.h | 8 + libraries/classparser/src/javaendian.h | 76 + libraries/classparser/src/javautils.cpp | 83 + libraries/classparser/src/membuffer.h | 63 + libraries/gui/CMakeLists.txt | 28 - libraries/gui/DesktopServices.cpp | 149 - libraries/gui/DesktopServices.h | 37 - libraries/gui/SkinUtils.cpp | 47 - libraries/gui/SkinUtils.h | 25 - libraries/gui/icons/IconList.cpp | 381 -- libraries/gui/icons/IconList.h | 85 - libraries/gui/icons/MMCIcon.cpp | 89 - libraries/gui/icons/MMCIcon.h | 55 - libraries/hoedown/CMakeLists.txt | 26 + libraries/hoedown/LICENSE | 15 + libraries/hoedown/README.md | 9 + libraries/hoedown/include/hoedown/autolink.h | 46 + libraries/hoedown/include/hoedown/buffer.h | 134 + libraries/hoedown/include/hoedown/document.h | 172 + libraries/hoedown/include/hoedown/escape.h | 28 + libraries/hoedown/include/hoedown/html.h | 84 + libraries/hoedown/include/hoedown/stack.h | 52 + libraries/hoedown/include/hoedown/version.h | 33 + libraries/hoedown/src/autolink.c | 281 ++ libraries/hoedown/src/buffer.c | 308 ++ libraries/hoedown/src/document.c | 2958 ++++++++++++ libraries/hoedown/src/escape.c | 188 + libraries/hoedown/src/html.c | 754 +++ libraries/hoedown/src/html_blocks.c | 240 + libraries/hoedown/src/html_smartypants.c | 435 ++ libraries/hoedown/src/stack.c | 79 + libraries/hoedown/src/version.c | 9 + libraries/iconfix/CMakeLists.txt | 18 + libraries/iconfix/internal/qhexstring_p.h | 100 + libraries/iconfix/internal/qiconloader.cpp | 688 +++ libraries/iconfix/internal/qiconloader_p.h | 219 + libraries/iconfix/xdgicon.cpp | 152 + libraries/iconfix/xdgicon.h | 46 + libraries/javacheck/.gitignore | 6 + libraries/javacheck/CMakeLists.txt | 13 + libraries/javacheck/JavaCheck.java | 24 + libraries/launcher/.gitignore | 6 + libraries/launcher/CMakeLists.txt | 34 + libraries/launcher/net/minecraft/Launcher.java | 165 + libraries/launcher/org/multimc/EntryPoint.java | 178 + libraries/launcher/org/multimc/IconLoader.java | 132 + libraries/launcher/org/multimc/Launcher.java | 22 + libraries/launcher/org/multimc/LegacyFrame.java | 112 + .../launcher/org/multimc/NotFoundException.java | 21 + libraries/launcher/org/multimc/ParamBucket.java | 86 + libraries/launcher/org/multimc/ParseException.java | 22 + libraries/launcher/org/multimc/Utils.java | 280 ++ .../org/multimc/legacy/LegacyLauncher.java | 175 + .../org/multimc/onesix/OneSixLauncher.java | 367 ++ .../org/simplericity/macify/eawt/Application.java | 176 + .../macify/eawt/ApplicationAdapter.java | 48 + .../simplericity/macify/eawt/ApplicationEvent.java | 25 + .../macify/eawt/ApplicationListener.java | 27 + .../macify/eawt/DefaultApplication.java | 418 ++ libraries/libnbtplusplus | 1 + libraries/logic/AbstractCommonModel.cpp | 133 - libraries/logic/AbstractCommonModel.h | 462 -- libraries/logic/BaseConfigObject.cpp | 103 - libraries/logic/BaseConfigObject.h | 50 - libraries/logic/BaseInstaller.cpp | 61 - libraries/logic/BaseInstaller.h | 46 - libraries/logic/BaseInstance.cpp | 270 -- libraries/logic/BaseInstance.h | 243 - libraries/logic/BaseVersion.h | 59 - libraries/logic/BaseVersionList.cpp | 104 - libraries/logic/BaseVersionList.h | 126 - libraries/logic/CMakeLists.txt | 344 -- libraries/logic/Commandline.cpp | 483 -- libraries/logic/Commandline.h | 252 - libraries/logic/DefaultVariable.h | 35 - libraries/logic/Env.cpp | 222 - libraries/logic/Env.h | 60 - libraries/logic/Exception.h | 34 - libraries/logic/FileSystem.cpp | 436 -- libraries/logic/FileSystem.h | 123 - libraries/logic/GZip.cpp | 115 - libraries/logic/GZip.h | 12 - libraries/logic/InstanceList.cpp | 580 --- libraries/logic/InstanceList.h | 187 - libraries/logic/Json.cpp | 272 -- libraries/logic/Json.h | 249 - libraries/logic/MMCStrings.cpp | 76 - libraries/logic/MMCStrings.h | 10 - libraries/logic/MMCZip.cpp | 491 -- libraries/logic/MMCZip.h | 88 - libraries/logic/NullInstance.h | 90 - libraries/logic/QObjectPtr.h | 78 - libraries/logic/RWStorage.h | 60 - libraries/logic/RecursiveFileSystemWatcher.cpp | 111 - libraries/logic/RecursiveFileSystemWatcher.h | 63 - libraries/logic/SeparatorPrefixTree.h | 298 -- libraries/logic/TypeMagic.h | 37 - libraries/logic/Version.cpp | 140 - libraries/logic/Version.h | 110 - libraries/logic/java/JavaChecker.cpp | 159 - libraries/logic/java/JavaChecker.h | 54 - libraries/logic/java/JavaCheckerJob.cpp | 45 - libraries/logic/java/JavaCheckerJob.h | 84 - libraries/logic/java/JavaInstall.cpp | 28 - libraries/logic/java/JavaInstall.h | 38 - libraries/logic/java/JavaInstallList.cpp | 186 - libraries/logic/java/JavaInstallList.h | 71 - libraries/logic/java/JavaUtils.cpp | 219 - libraries/logic/java/JavaUtils.h | 43 - libraries/logic/java/JavaVersion.cpp | 112 - libraries/logic/java/JavaVersion.h | 30 - libraries/logic/launch/LaunchStep.cpp | 27 - libraries/logic/launch/LaunchStep.h | 48 - libraries/logic/launch/LaunchTask.cpp | 228 - libraries/logic/launch/LaunchTask.h | 122 - libraries/logic/launch/LoggedProcess.cpp | 163 - libraries/logic/launch/LoggedProcess.h | 76 - libraries/logic/launch/MessageLevel.cpp | 36 - libraries/logic/launch/MessageLevel.h | 28 - libraries/logic/launch/steps/CheckJava.cpp | 92 - libraries/logic/launch/steps/CheckJava.h | 41 - libraries/logic/launch/steps/LaunchMinecraft.cpp | 154 - libraries/logic/launch/steps/LaunchMinecraft.h | 48 - libraries/logic/launch/steps/ModMinecraftJar.cpp | 44 - libraries/logic/launch/steps/ModMinecraftJar.h | 39 - libraries/logic/launch/steps/PostLaunchCommand.cpp | 84 - libraries/logic/launch/steps/PostLaunchCommand.h | 39 - libraries/logic/launch/steps/PreLaunchCommand.cpp | 85 - libraries/logic/launch/steps/PreLaunchCommand.h | 39 - libraries/logic/launch/steps/TextPrint.cpp | 29 - libraries/logic/launch/steps/TextPrint.h | 43 - libraries/logic/launch/steps/Update.cpp | 50 - libraries/logic/launch/steps/Update.h | 41 - libraries/logic/minecraft/AssetsUtils.cpp | 230 - libraries/logic/minecraft/AssetsUtils.h | 48 - libraries/logic/minecraft/GradleSpecifier.h | 129 - libraries/logic/minecraft/JarMod.h | 12 - libraries/logic/minecraft/Library.cpp | 239 - libraries/logic/minecraft/Library.h | 184 - libraries/logic/minecraft/MinecraftInstance.cpp | 369 -- libraries/logic/minecraft/MinecraftInstance.h | 69 - libraries/logic/minecraft/MinecraftProfile.cpp | 610 --- libraries/logic/minecraft/MinecraftProfile.h | 200 - libraries/logic/minecraft/MinecraftVersion.cpp | 215 - libraries/logic/minecraft/MinecraftVersion.h | 119 - libraries/logic/minecraft/MinecraftVersionList.cpp | 591 --- libraries/logic/minecraft/MinecraftVersionList.h | 72 - libraries/logic/minecraft/Mod.cpp | 377 -- libraries/logic/minecraft/Mod.h | 134 - libraries/logic/minecraft/ModList.cpp | 616 --- libraries/logic/minecraft/ModList.h | 160 - libraries/logic/minecraft/MojangDownloadInfo.h | 71 - libraries/logic/minecraft/MojangVersionFormat.cpp | 381 -- libraries/logic/minecraft/MojangVersionFormat.h | 25 - libraries/logic/minecraft/OpSys.cpp | 42 - libraries/logic/minecraft/OpSys.h | 37 - libraries/logic/minecraft/ParseUtils.cpp | 34 - libraries/logic/minecraft/ParseUtils.h | 11 - libraries/logic/minecraft/ProfilePatch.h | 104 - libraries/logic/minecraft/ProfileStrategy.h | 35 - libraries/logic/minecraft/ProfileUtils.cpp | 191 - libraries/logic/minecraft/ProfileUtils.h | 25 - libraries/logic/minecraft/Rule.cpp | 93 - libraries/logic/minecraft/Rule.h | 101 - libraries/logic/minecraft/VersionBuildError.h | 58 - libraries/logic/minecraft/VersionFile.cpp | 60 - libraries/logic/minecraft/VersionFile.h | 195 - libraries/logic/minecraft/VersionFilterData.cpp | 75 - libraries/logic/minecraft/VersionFilterData.h | 32 - libraries/logic/minecraft/World.cpp | 385 -- libraries/logic/minecraft/World.h | 83 - libraries/logic/minecraft/WorldList.cpp | 355 -- libraries/logic/minecraft/WorldList.h | 125 - libraries/logic/minecraft/auth/AuthSession.cpp | 30 - libraries/logic/minecraft/auth/AuthSession.h | 51 - libraries/logic/minecraft/auth/MojangAccount.cpp | 278 -- libraries/logic/minecraft/auth/MojangAccount.h | 173 - .../logic/minecraft/auth/MojangAccountList.cpp | 427 -- libraries/logic/minecraft/auth/MojangAccountList.h | 201 - libraries/logic/minecraft/auth/YggdrasilTask.cpp | 255 -- libraries/logic/minecraft/auth/YggdrasilTask.h | 150 - .../minecraft/auth/flows/AuthenticateTask.cpp | 202 - .../logic/minecraft/auth/flows/AuthenticateTask.h | 46 - .../logic/minecraft/auth/flows/RefreshTask.cpp | 144 - libraries/logic/minecraft/auth/flows/RefreshTask.h | 44 - .../logic/minecraft/auth/flows/ValidateTask.cpp | 61 - .../logic/minecraft/auth/flows/ValidateTask.h | 47 - libraries/logic/minecraft/forge/ForgeInstaller.cpp | 458 -- libraries/logic/minecraft/forge/ForgeInstaller.h | 52 - libraries/logic/minecraft/forge/ForgeVersion.cpp | 55 - libraries/logic/minecraft/forge/ForgeVersion.h | 42 - .../logic/minecraft/forge/ForgeVersionList.cpp | 450 -- libraries/logic/minecraft/forge/ForgeVersionList.h | 90 - .../logic/minecraft/forge/ForgeXzDownload.cpp | 358 -- libraries/logic/minecraft/forge/ForgeXzDownload.h | 59 - libraries/logic/minecraft/forge/LegacyForge.cpp | 56 - libraries/logic/minecraft/forge/LegacyForge.h | 25 - libraries/logic/minecraft/ftb/FTBPlugin.cpp | 395 -- libraries/logic/minecraft/ftb/FTBPlugin.h | 13 - .../logic/minecraft/ftb/FTBProfileStrategy.cpp | 128 - libraries/logic/minecraft/ftb/FTBProfileStrategy.h | 21 - libraries/logic/minecraft/ftb/FTBVersion.h | 32 - .../logic/minecraft/ftb/LegacyFTBInstance.cpp | 27 - libraries/logic/minecraft/ftb/LegacyFTBInstance.h | 17 - .../logic/minecraft/ftb/OneSixFTBInstance.cpp | 138 - libraries/logic/minecraft/ftb/OneSixFTBInstance.h | 30 - .../logic/minecraft/legacy/LegacyInstance.cpp | 453 -- libraries/logic/minecraft/legacy/LegacyInstance.h | 142 - libraries/logic/minecraft/legacy/LegacyUpdate.cpp | 393 -- libraries/logic/minecraft/legacy/LegacyUpdate.h | 70 - .../logic/minecraft/legacy/LwjglVersionList.cpp | 189 - .../logic/minecraft/legacy/LwjglVersionList.h | 156 - .../minecraft/liteloader/LiteLoaderInstaller.cpp | 142 - .../minecraft/liteloader/LiteLoaderInstaller.h | 39 - .../minecraft/liteloader/LiteLoaderVersionList.cpp | 276 -- .../minecraft/liteloader/LiteLoaderVersionList.h | 119 - .../logic/minecraft/onesix/OneSixInstance.cpp | 597 --- libraries/logic/minecraft/onesix/OneSixInstance.h | 117 - .../minecraft/onesix/OneSixProfileStrategy.cpp | 418 -- .../logic/minecraft/onesix/OneSixProfileStrategy.h | 26 - libraries/logic/minecraft/onesix/OneSixUpdate.cpp | 342 -- libraries/logic/minecraft/onesix/OneSixUpdate.h | 67 - .../logic/minecraft/onesix/OneSixVersionFormat.cpp | 225 - .../logic/minecraft/onesix/OneSixVersionFormat.h | 22 - libraries/logic/net/ByteArrayDownload.cpp | 105 - libraries/logic/net/ByteArrayDownload.h | 48 - libraries/logic/net/CacheDownload.cpp | 192 - libraries/logic/net/CacheDownload.h | 63 - libraries/logic/net/HttpMetaCache.cpp | 273 -- libraries/logic/net/HttpMetaCache.h | 125 - libraries/logic/net/MD5EtagDownload.cpp | 155 - libraries/logic/net/MD5EtagDownload.h | 52 - libraries/logic/net/NetAction.h | 96 - libraries/logic/net/NetJob.cpp | 125 - libraries/logic/net/NetJob.h | 117 - libraries/logic/net/PasteUpload.cpp | 99 - libraries/logic/net/PasteUpload.h | 50 - libraries/logic/net/URLConstants.cpp | 16 - libraries/logic/net/URLConstants.h | 40 - libraries/logic/news/NewsChecker.cpp | 135 - libraries/logic/news/NewsChecker.h | 107 - libraries/logic/news/NewsEntry.cpp | 77 - libraries/logic/news/NewsEntry.h | 65 - .../logic/notifications/NotificationChecker.cpp | 130 - .../logic/notifications/NotificationChecker.h | 63 - libraries/logic/pathmatcher/FSTreeMatcher.h | 21 - libraries/logic/pathmatcher/IPathMatcher.h | 12 - libraries/logic/pathmatcher/MultiMatcher.h | 31 - libraries/logic/pathmatcher/RegexpMatcher.h | 42 - libraries/logic/resources/Resource.cpp | 155 - libraries/logic/resources/Resource.h | 132 - libraries/logic/resources/ResourceHandler.cpp | 28 - libraries/logic/resources/ResourceHandler.h | 36 - libraries/logic/resources/ResourceObserver.cpp | 55 - libraries/logic/resources/ResourceObserver.h | 73 - libraries/logic/resources/ResourceProxyModel.cpp | 89 - libraries/logic/resources/ResourceProxyModel.h | 39 - libraries/logic/screenshots/ImgurAlbumCreation.cpp | 90 - libraries/logic/screenshots/ImgurAlbumCreation.h | 44 - libraries/logic/screenshots/ImgurUpload.cpp | 114 - libraries/logic/screenshots/ImgurUpload.h | 33 - libraries/logic/screenshots/Screenshot.h | 19 - libraries/logic/settings/INIFile.cpp | 151 - libraries/logic/settings/INIFile.h | 38 - libraries/logic/settings/INISettingsObject.cpp | 107 - libraries/logic/settings/INISettingsObject.h | 66 - libraries/logic/settings/OverrideSetting.cpp | 54 - libraries/logic/settings/OverrideSetting.h | 46 - libraries/logic/settings/PassthroughSetting.cpp | 66 - libraries/logic/settings/PassthroughSetting.h | 45 - libraries/logic/settings/Setting.cpp | 53 - libraries/logic/settings/Setting.h | 119 - libraries/logic/settings/SettingsObject.cpp | 142 - libraries/logic/settings/SettingsObject.h | 214 - libraries/logic/status/StatusChecker.cpp | 153 - libraries/logic/status/StatusChecker.h | 60 - libraries/logic/tasks/SequentialTask.cpp | 55 - libraries/logic/tasks/SequentialTask.h | 31 - libraries/logic/tasks/Task.cpp | 88 - libraries/logic/tasks/Task.h | 96 - libraries/logic/tasks/ThreadTask.cpp | 41 - libraries/logic/tasks/ThreadTask.h | 25 - libraries/logic/tools/BaseExternalTool.cpp | 41 - libraries/logic/tools/BaseExternalTool.h | 60 - libraries/logic/tools/BaseProfiler.cpp | 35 - libraries/logic/tools/BaseProfiler.h | 38 - libraries/logic/tools/JProfiler.cpp | 116 - libraries/logic/tools/JProfiler.h | 15 - libraries/logic/tools/JVisualVM.cpp | 103 - libraries/logic/tools/JVisualVM.h | 15 - libraries/logic/tools/MCEditTool.cpp | 124 - libraries/logic/tools/MCEditTool.h | 26 - libraries/logic/trans/TranslationDownloader.cpp | 53 - libraries/logic/trans/TranslationDownloader.h | 32 - libraries/logic/updater/DownloadTask.cpp | 169 - libraries/logic/updater/DownloadTask.h | 95 - libraries/logic/updater/GoUpdate.cpp | 216 - libraries/logic/updater/GoUpdate.h | 133 - libraries/logic/updater/UpdateChecker.cpp | 269 -- libraries/logic/updater/UpdateChecker.h | 121 - libraries/logic/wonko/BaseWonkoEntity.cpp | 39 - libraries/logic/wonko/BaseWonkoEntity.h | 51 - libraries/logic/wonko/WonkoIndex.cpp | 147 - libraries/logic/wonko/WonkoIndex.h | 68 - libraries/logic/wonko/WonkoReference.cpp | 44 - libraries/logic/wonko/WonkoReference.h | 41 - libraries/logic/wonko/WonkoUtil.cpp | 47 - libraries/logic/wonko/WonkoUtil.h | 31 - libraries/logic/wonko/WonkoVersion.cpp | 102 - libraries/logic/wonko/WonkoVersion.h | 83 - libraries/logic/wonko/WonkoVersionList.cpp | 283 -- libraries/logic/wonko/WonkoVersionList.h | 92 - libraries/logic/wonko/format/WonkoFormat.cpp | 80 - libraries/logic/wonko/format/WonkoFormat.h | 54 - libraries/logic/wonko/format/WonkoFormatV1.cpp | 156 - libraries/logic/wonko/format/WonkoFormatV1.h | 30 - .../wonko/tasks/BaseWonkoEntityLocalLoadTask.cpp | 117 - .../wonko/tasks/BaseWonkoEntityLocalLoadTask.h | 81 - .../wonko/tasks/BaseWonkoEntityRemoteLoadTask.cpp | 126 - .../wonko/tasks/BaseWonkoEntityRemoteLoadTask.h | 85 - libraries/pack200/CMakeLists.txt | 39 + libraries/pack200/LICENSE | 347 ++ libraries/pack200/anti200.cpp | 43 + libraries/pack200/include/unpack200.h | 36 + libraries/pack200/src/bands.cpp | 423 ++ libraries/pack200/src/bands.h | 489 ++ libraries/pack200/src/bytes.cpp | 217 + libraries/pack200/src/bytes.h | 286 ++ libraries/pack200/src/coding.cpp | 1044 +++++ libraries/pack200/src/coding.h | 247 + libraries/pack200/src/constants.h | 442 ++ libraries/pack200/src/defines.h | 65 + libraries/pack200/src/unpack.cpp | 4793 ++++++++++++++++++++ libraries/pack200/src/unpack.h | 547 +++ libraries/pack200/src/unpack200.cpp | 162 + libraries/pack200/src/utils.cpp | 71 + libraries/pack200/src/utils.h | 53 + libraries/pack200/src/zip.cpp | 589 +++ libraries/pack200/src/zip.h | 110 + libraries/rainbow/CMakeLists.txt | 15 + libraries/rainbow/COPYING.LIB | 0 libraries/rainbow/include/rainbow.h | 160 + libraries/rainbow/include/rainbow_config.h | 26 + libraries/rainbow/src/rainbow.cpp | 365 ++ libraries/xz-embedded/CMakeLists.txt | 26 + libraries/xz-embedded/include/xz.h | 321 ++ libraries/xz-embedded/src/xz_config.h | 119 + libraries/xz-embedded/src/xz_crc32.c | 61 + libraries/xz-embedded/src/xz_crc64.c | 52 + libraries/xz-embedded/src/xz_dec_bcj.c | 588 +++ libraries/xz-embedded/src/xz_dec_lzma2.c | 1231 +++++ libraries/xz-embedded/src/xz_dec_stream.c | 860 ++++ libraries/xz-embedded/src/xz_lzma2.h | 204 + libraries/xz-embedded/src/xz_private.h | 150 + libraries/xz-embedded/src/xz_stream.h | 62 + libraries/xz-embedded/xzminidec.c | 144 + 364 files changed, 25004 insertions(+), 33688 deletions(-) create mode 100644 libraries/README.md create mode 100644 libraries/classparser/CMakeLists.txt create mode 100644 libraries/classparser/include/classparser_config.h create mode 100644 libraries/classparser/include/javautils.h create mode 100644 libraries/classparser/src/annotations.cpp create mode 100644 libraries/classparser/src/annotations.h create mode 100644 libraries/classparser/src/classfile.h create mode 100644 libraries/classparser/src/constants.h create mode 100644 libraries/classparser/src/errors.h create mode 100644 libraries/classparser/src/javaendian.h create mode 100644 libraries/classparser/src/javautils.cpp create mode 100644 libraries/classparser/src/membuffer.h delete mode 100644 libraries/gui/CMakeLists.txt delete mode 100644 libraries/gui/DesktopServices.cpp delete mode 100644 libraries/gui/DesktopServices.h delete mode 100644 libraries/gui/SkinUtils.cpp delete mode 100644 libraries/gui/SkinUtils.h delete mode 100644 libraries/gui/icons/IconList.cpp delete mode 100644 libraries/gui/icons/IconList.h delete mode 100644 libraries/gui/icons/MMCIcon.cpp delete mode 100644 libraries/gui/icons/MMCIcon.h create mode 100644 libraries/hoedown/CMakeLists.txt create mode 100644 libraries/hoedown/LICENSE create mode 100644 libraries/hoedown/README.md create mode 100644 libraries/hoedown/include/hoedown/autolink.h create mode 100644 libraries/hoedown/include/hoedown/buffer.h create mode 100644 libraries/hoedown/include/hoedown/document.h create mode 100644 libraries/hoedown/include/hoedown/escape.h create mode 100644 libraries/hoedown/include/hoedown/html.h create mode 100644 libraries/hoedown/include/hoedown/stack.h create mode 100644 libraries/hoedown/include/hoedown/version.h create mode 100644 libraries/hoedown/src/autolink.c create mode 100644 libraries/hoedown/src/buffer.c create mode 100644 libraries/hoedown/src/document.c create mode 100644 libraries/hoedown/src/escape.c create mode 100644 libraries/hoedown/src/html.c create mode 100644 libraries/hoedown/src/html_blocks.c create mode 100644 libraries/hoedown/src/html_smartypants.c create mode 100644 libraries/hoedown/src/stack.c create mode 100644 libraries/hoedown/src/version.c create mode 100644 libraries/iconfix/CMakeLists.txt create mode 100644 libraries/iconfix/internal/qhexstring_p.h create mode 100644 libraries/iconfix/internal/qiconloader.cpp create mode 100644 libraries/iconfix/internal/qiconloader_p.h create mode 100644 libraries/iconfix/xdgicon.cpp create mode 100644 libraries/iconfix/xdgicon.h create mode 100644 libraries/javacheck/.gitignore create mode 100644 libraries/javacheck/CMakeLists.txt create mode 100644 libraries/javacheck/JavaCheck.java create mode 100644 libraries/launcher/.gitignore create mode 100644 libraries/launcher/CMakeLists.txt create mode 100644 libraries/launcher/net/minecraft/Launcher.java create mode 100644 libraries/launcher/org/multimc/EntryPoint.java create mode 100644 libraries/launcher/org/multimc/IconLoader.java create mode 100644 libraries/launcher/org/multimc/Launcher.java create mode 100644 libraries/launcher/org/multimc/LegacyFrame.java create mode 100644 libraries/launcher/org/multimc/NotFoundException.java create mode 100644 libraries/launcher/org/multimc/ParamBucket.java create mode 100644 libraries/launcher/org/multimc/ParseException.java create mode 100644 libraries/launcher/org/multimc/Utils.java create mode 100644 libraries/launcher/org/multimc/legacy/LegacyLauncher.java create mode 100644 libraries/launcher/org/multimc/onesix/OneSixLauncher.java create mode 100644 libraries/launcher/org/simplericity/macify/eawt/Application.java create mode 100644 libraries/launcher/org/simplericity/macify/eawt/ApplicationAdapter.java create mode 100644 libraries/launcher/org/simplericity/macify/eawt/ApplicationEvent.java create mode 100644 libraries/launcher/org/simplericity/macify/eawt/ApplicationListener.java create mode 100644 libraries/launcher/org/simplericity/macify/eawt/DefaultApplication.java create mode 160000 libraries/libnbtplusplus delete mode 100644 libraries/logic/AbstractCommonModel.cpp delete mode 100644 libraries/logic/AbstractCommonModel.h delete mode 100644 libraries/logic/BaseConfigObject.cpp delete mode 100644 libraries/logic/BaseConfigObject.h delete mode 100644 libraries/logic/BaseInstaller.cpp delete mode 100644 libraries/logic/BaseInstaller.h delete mode 100644 libraries/logic/BaseInstance.cpp delete mode 100644 libraries/logic/BaseInstance.h delete mode 100644 libraries/logic/BaseVersion.h delete mode 100644 libraries/logic/BaseVersionList.cpp delete mode 100644 libraries/logic/BaseVersionList.h delete mode 100644 libraries/logic/CMakeLists.txt delete mode 100644 libraries/logic/Commandline.cpp delete mode 100644 libraries/logic/Commandline.h delete mode 100644 libraries/logic/DefaultVariable.h delete mode 100644 libraries/logic/Env.cpp delete mode 100644 libraries/logic/Env.h delete mode 100644 libraries/logic/Exception.h delete mode 100644 libraries/logic/FileSystem.cpp delete mode 100644 libraries/logic/FileSystem.h delete mode 100644 libraries/logic/GZip.cpp delete mode 100644 libraries/logic/GZip.h delete mode 100644 libraries/logic/InstanceList.cpp delete mode 100644 libraries/logic/InstanceList.h delete mode 100644 libraries/logic/Json.cpp delete mode 100644 libraries/logic/Json.h delete mode 100644 libraries/logic/MMCStrings.cpp delete mode 100644 libraries/logic/MMCStrings.h delete mode 100644 libraries/logic/MMCZip.cpp delete mode 100644 libraries/logic/MMCZip.h delete mode 100644 libraries/logic/NullInstance.h delete mode 100644 libraries/logic/QObjectPtr.h delete mode 100644 libraries/logic/RWStorage.h delete mode 100644 libraries/logic/RecursiveFileSystemWatcher.cpp delete mode 100644 libraries/logic/RecursiveFileSystemWatcher.h delete mode 100644 libraries/logic/SeparatorPrefixTree.h delete mode 100644 libraries/logic/TypeMagic.h delete mode 100644 libraries/logic/Version.cpp delete mode 100644 libraries/logic/Version.h delete mode 100644 libraries/logic/java/JavaChecker.cpp delete mode 100644 libraries/logic/java/JavaChecker.h delete mode 100644 libraries/logic/java/JavaCheckerJob.cpp delete mode 100644 libraries/logic/java/JavaCheckerJob.h delete mode 100644 libraries/logic/java/JavaInstall.cpp delete mode 100644 libraries/logic/java/JavaInstall.h delete mode 100644 libraries/logic/java/JavaInstallList.cpp delete mode 100644 libraries/logic/java/JavaInstallList.h delete mode 100644 libraries/logic/java/JavaUtils.cpp delete mode 100644 libraries/logic/java/JavaUtils.h delete mode 100644 libraries/logic/java/JavaVersion.cpp delete mode 100644 libraries/logic/java/JavaVersion.h delete mode 100644 libraries/logic/launch/LaunchStep.cpp delete mode 100644 libraries/logic/launch/LaunchStep.h delete mode 100644 libraries/logic/launch/LaunchTask.cpp delete mode 100644 libraries/logic/launch/LaunchTask.h delete mode 100644 libraries/logic/launch/LoggedProcess.cpp delete mode 100644 libraries/logic/launch/LoggedProcess.h delete mode 100644 libraries/logic/launch/MessageLevel.cpp delete mode 100644 libraries/logic/launch/MessageLevel.h delete mode 100644 libraries/logic/launch/steps/CheckJava.cpp delete mode 100644 libraries/logic/launch/steps/CheckJava.h delete mode 100644 libraries/logic/launch/steps/LaunchMinecraft.cpp delete mode 100644 libraries/logic/launch/steps/LaunchMinecraft.h delete mode 100644 libraries/logic/launch/steps/ModMinecraftJar.cpp delete mode 100644 libraries/logic/launch/steps/ModMinecraftJar.h delete mode 100644 libraries/logic/launch/steps/PostLaunchCommand.cpp delete mode 100644 libraries/logic/launch/steps/PostLaunchCommand.h delete mode 100644 libraries/logic/launch/steps/PreLaunchCommand.cpp delete mode 100644 libraries/logic/launch/steps/PreLaunchCommand.h delete mode 100644 libraries/logic/launch/steps/TextPrint.cpp delete mode 100644 libraries/logic/launch/steps/TextPrint.h delete mode 100644 libraries/logic/launch/steps/Update.cpp delete mode 100644 libraries/logic/launch/steps/Update.h delete mode 100644 libraries/logic/minecraft/AssetsUtils.cpp delete mode 100644 libraries/logic/minecraft/AssetsUtils.h delete mode 100644 libraries/logic/minecraft/GradleSpecifier.h delete mode 100644 libraries/logic/minecraft/JarMod.h delete mode 100644 libraries/logic/minecraft/Library.cpp delete mode 100644 libraries/logic/minecraft/Library.h delete mode 100644 libraries/logic/minecraft/MinecraftInstance.cpp delete mode 100644 libraries/logic/minecraft/MinecraftInstance.h delete mode 100644 libraries/logic/minecraft/MinecraftProfile.cpp delete mode 100644 libraries/logic/minecraft/MinecraftProfile.h delete mode 100644 libraries/logic/minecraft/MinecraftVersion.cpp delete mode 100644 libraries/logic/minecraft/MinecraftVersion.h delete mode 100644 libraries/logic/minecraft/MinecraftVersionList.cpp delete mode 100644 libraries/logic/minecraft/MinecraftVersionList.h delete mode 100644 libraries/logic/minecraft/Mod.cpp delete mode 100644 libraries/logic/minecraft/Mod.h delete mode 100644 libraries/logic/minecraft/ModList.cpp delete mode 100644 libraries/logic/minecraft/ModList.h delete mode 100644 libraries/logic/minecraft/MojangDownloadInfo.h delete mode 100644 libraries/logic/minecraft/MojangVersionFormat.cpp delete mode 100644 libraries/logic/minecraft/MojangVersionFormat.h delete mode 100644 libraries/logic/minecraft/OpSys.cpp delete mode 100644 libraries/logic/minecraft/OpSys.h delete mode 100644 libraries/logic/minecraft/ParseUtils.cpp delete mode 100644 libraries/logic/minecraft/ParseUtils.h delete mode 100644 libraries/logic/minecraft/ProfilePatch.h delete mode 100644 libraries/logic/minecraft/ProfileStrategy.h delete mode 100644 libraries/logic/minecraft/ProfileUtils.cpp delete mode 100644 libraries/logic/minecraft/ProfileUtils.h delete mode 100644 libraries/logic/minecraft/Rule.cpp delete mode 100644 libraries/logic/minecraft/Rule.h delete mode 100644 libraries/logic/minecraft/VersionBuildError.h delete mode 100644 libraries/logic/minecraft/VersionFile.cpp delete mode 100644 libraries/logic/minecraft/VersionFile.h delete mode 100644 libraries/logic/minecraft/VersionFilterData.cpp delete mode 100644 libraries/logic/minecraft/VersionFilterData.h delete mode 100644 libraries/logic/minecraft/World.cpp delete mode 100644 libraries/logic/minecraft/World.h delete mode 100644 libraries/logic/minecraft/WorldList.cpp delete mode 100644 libraries/logic/minecraft/WorldList.h delete mode 100644 libraries/logic/minecraft/auth/AuthSession.cpp delete mode 100644 libraries/logic/minecraft/auth/AuthSession.h delete mode 100644 libraries/logic/minecraft/auth/MojangAccount.cpp delete mode 100644 libraries/logic/minecraft/auth/MojangAccount.h delete mode 100644 libraries/logic/minecraft/auth/MojangAccountList.cpp delete mode 100644 libraries/logic/minecraft/auth/MojangAccountList.h delete mode 100644 libraries/logic/minecraft/auth/YggdrasilTask.cpp delete mode 100644 libraries/logic/minecraft/auth/YggdrasilTask.h delete mode 100644 libraries/logic/minecraft/auth/flows/AuthenticateTask.cpp delete mode 100644 libraries/logic/minecraft/auth/flows/AuthenticateTask.h delete mode 100644 libraries/logic/minecraft/auth/flows/RefreshTask.cpp delete mode 100644 libraries/logic/minecraft/auth/flows/RefreshTask.h delete mode 100644 libraries/logic/minecraft/auth/flows/ValidateTask.cpp delete mode 100644 libraries/logic/minecraft/auth/flows/ValidateTask.h delete mode 100644 libraries/logic/minecraft/forge/ForgeInstaller.cpp delete mode 100644 libraries/logic/minecraft/forge/ForgeInstaller.h delete mode 100644 libraries/logic/minecraft/forge/ForgeVersion.cpp delete mode 100644 libraries/logic/minecraft/forge/ForgeVersion.h delete mode 100644 libraries/logic/minecraft/forge/ForgeVersionList.cpp delete mode 100644 libraries/logic/minecraft/forge/ForgeVersionList.h delete mode 100644 libraries/logic/minecraft/forge/ForgeXzDownload.cpp delete mode 100644 libraries/logic/minecraft/forge/ForgeXzDownload.h delete mode 100644 libraries/logic/minecraft/forge/LegacyForge.cpp delete mode 100644 libraries/logic/minecraft/forge/LegacyForge.h delete mode 100644 libraries/logic/minecraft/ftb/FTBPlugin.cpp delete mode 100644 libraries/logic/minecraft/ftb/FTBPlugin.h delete mode 100644 libraries/logic/minecraft/ftb/FTBProfileStrategy.cpp delete mode 100644 libraries/logic/minecraft/ftb/FTBProfileStrategy.h delete mode 100644 libraries/logic/minecraft/ftb/FTBVersion.h delete mode 100644 libraries/logic/minecraft/ftb/LegacyFTBInstance.cpp delete mode 100644 libraries/logic/minecraft/ftb/LegacyFTBInstance.h delete mode 100644 libraries/logic/minecraft/ftb/OneSixFTBInstance.cpp delete mode 100644 libraries/logic/minecraft/ftb/OneSixFTBInstance.h delete mode 100644 libraries/logic/minecraft/legacy/LegacyInstance.cpp delete mode 100644 libraries/logic/minecraft/legacy/LegacyInstance.h delete mode 100644 libraries/logic/minecraft/legacy/LegacyUpdate.cpp delete mode 100644 libraries/logic/minecraft/legacy/LegacyUpdate.h delete mode 100644 libraries/logic/minecraft/legacy/LwjglVersionList.cpp delete mode 100644 libraries/logic/minecraft/legacy/LwjglVersionList.h delete mode 100644 libraries/logic/minecraft/liteloader/LiteLoaderInstaller.cpp delete mode 100644 libraries/logic/minecraft/liteloader/LiteLoaderInstaller.h delete mode 100644 libraries/logic/minecraft/liteloader/LiteLoaderVersionList.cpp delete mode 100644 libraries/logic/minecraft/liteloader/LiteLoaderVersionList.h delete mode 100644 libraries/logic/minecraft/onesix/OneSixInstance.cpp delete mode 100644 libraries/logic/minecraft/onesix/OneSixInstance.h delete mode 100644 libraries/logic/minecraft/onesix/OneSixProfileStrategy.cpp delete mode 100644 libraries/logic/minecraft/onesix/OneSixProfileStrategy.h delete mode 100644 libraries/logic/minecraft/onesix/OneSixUpdate.cpp delete mode 100644 libraries/logic/minecraft/onesix/OneSixUpdate.h delete mode 100644 libraries/logic/minecraft/onesix/OneSixVersionFormat.cpp delete mode 100644 libraries/logic/minecraft/onesix/OneSixVersionFormat.h delete mode 100644 libraries/logic/net/ByteArrayDownload.cpp delete mode 100644 libraries/logic/net/ByteArrayDownload.h delete mode 100644 libraries/logic/net/CacheDownload.cpp delete mode 100644 libraries/logic/net/CacheDownload.h delete mode 100644 libraries/logic/net/HttpMetaCache.cpp delete mode 100644 libraries/logic/net/HttpMetaCache.h delete mode 100644 libraries/logic/net/MD5EtagDownload.cpp delete mode 100644 libraries/logic/net/MD5EtagDownload.h delete mode 100644 libraries/logic/net/NetAction.h delete mode 100644 libraries/logic/net/NetJob.cpp delete mode 100644 libraries/logic/net/NetJob.h delete mode 100644 libraries/logic/net/PasteUpload.cpp delete mode 100644 libraries/logic/net/PasteUpload.h delete mode 100644 libraries/logic/net/URLConstants.cpp delete mode 100644 libraries/logic/net/URLConstants.h delete mode 100644 libraries/logic/news/NewsChecker.cpp delete mode 100644 libraries/logic/news/NewsChecker.h delete mode 100644 libraries/logic/news/NewsEntry.cpp delete mode 100644 libraries/logic/news/NewsEntry.h delete mode 100644 libraries/logic/notifications/NotificationChecker.cpp delete mode 100644 libraries/logic/notifications/NotificationChecker.h delete mode 100644 libraries/logic/pathmatcher/FSTreeMatcher.h delete mode 100644 libraries/logic/pathmatcher/IPathMatcher.h delete mode 100644 libraries/logic/pathmatcher/MultiMatcher.h delete mode 100644 libraries/logic/pathmatcher/RegexpMatcher.h delete mode 100644 libraries/logic/resources/Resource.cpp delete mode 100644 libraries/logic/resources/Resource.h delete mode 100644 libraries/logic/resources/ResourceHandler.cpp delete mode 100644 libraries/logic/resources/ResourceHandler.h delete mode 100644 libraries/logic/resources/ResourceObserver.cpp delete mode 100644 libraries/logic/resources/ResourceObserver.h delete mode 100644 libraries/logic/resources/ResourceProxyModel.cpp delete mode 100644 libraries/logic/resources/ResourceProxyModel.h delete mode 100644 libraries/logic/screenshots/ImgurAlbumCreation.cpp delete mode 100644 libraries/logic/screenshots/ImgurAlbumCreation.h delete mode 100644 libraries/logic/screenshots/ImgurUpload.cpp delete mode 100644 libraries/logic/screenshots/ImgurUpload.h delete mode 100644 libraries/logic/screenshots/Screenshot.h delete mode 100644 libraries/logic/settings/INIFile.cpp delete mode 100644 libraries/logic/settings/INIFile.h delete mode 100644 libraries/logic/settings/INISettingsObject.cpp delete mode 100644 libraries/logic/settings/INISettingsObject.h delete mode 100644 libraries/logic/settings/OverrideSetting.cpp delete mode 100644 libraries/logic/settings/OverrideSetting.h delete mode 100644 libraries/logic/settings/PassthroughSetting.cpp delete mode 100644 libraries/logic/settings/PassthroughSetting.h delete mode 100644 libraries/logic/settings/Setting.cpp delete mode 100644 libraries/logic/settings/Setting.h delete mode 100644 libraries/logic/settings/SettingsObject.cpp delete mode 100644 libraries/logic/settings/SettingsObject.h delete mode 100644 libraries/logic/status/StatusChecker.cpp delete mode 100644 libraries/logic/status/StatusChecker.h delete mode 100644 libraries/logic/tasks/SequentialTask.cpp delete mode 100644 libraries/logic/tasks/SequentialTask.h delete mode 100644 libraries/logic/tasks/Task.cpp delete mode 100644 libraries/logic/tasks/Task.h delete mode 100644 libraries/logic/tasks/ThreadTask.cpp delete mode 100644 libraries/logic/tasks/ThreadTask.h delete mode 100644 libraries/logic/tools/BaseExternalTool.cpp delete mode 100644 libraries/logic/tools/BaseExternalTool.h delete mode 100644 libraries/logic/tools/BaseProfiler.cpp delete mode 100644 libraries/logic/tools/BaseProfiler.h delete mode 100644 libraries/logic/tools/JProfiler.cpp delete mode 100644 libraries/logic/tools/JProfiler.h delete mode 100644 libraries/logic/tools/JVisualVM.cpp delete mode 100644 libraries/logic/tools/JVisualVM.h delete mode 100644 libraries/logic/tools/MCEditTool.cpp delete mode 100644 libraries/logic/tools/MCEditTool.h delete mode 100644 libraries/logic/trans/TranslationDownloader.cpp delete mode 100644 libraries/logic/trans/TranslationDownloader.h delete mode 100644 libraries/logic/updater/DownloadTask.cpp delete mode 100644 libraries/logic/updater/DownloadTask.h delete mode 100644 libraries/logic/updater/GoUpdate.cpp delete mode 100644 libraries/logic/updater/GoUpdate.h delete mode 100644 libraries/logic/updater/UpdateChecker.cpp delete mode 100644 libraries/logic/updater/UpdateChecker.h delete mode 100644 libraries/logic/wonko/BaseWonkoEntity.cpp delete mode 100644 libraries/logic/wonko/BaseWonkoEntity.h delete mode 100644 libraries/logic/wonko/WonkoIndex.cpp delete mode 100644 libraries/logic/wonko/WonkoIndex.h delete mode 100644 libraries/logic/wonko/WonkoReference.cpp delete mode 100644 libraries/logic/wonko/WonkoReference.h delete mode 100644 libraries/logic/wonko/WonkoUtil.cpp delete mode 100644 libraries/logic/wonko/WonkoUtil.h delete mode 100644 libraries/logic/wonko/WonkoVersion.cpp delete mode 100644 libraries/logic/wonko/WonkoVersion.h delete mode 100644 libraries/logic/wonko/WonkoVersionList.cpp delete mode 100644 libraries/logic/wonko/WonkoVersionList.h delete mode 100644 libraries/logic/wonko/format/WonkoFormat.cpp delete mode 100644 libraries/logic/wonko/format/WonkoFormat.h delete mode 100644 libraries/logic/wonko/format/WonkoFormatV1.cpp delete mode 100644 libraries/logic/wonko/format/WonkoFormatV1.h delete mode 100644 libraries/logic/wonko/tasks/BaseWonkoEntityLocalLoadTask.cpp delete mode 100644 libraries/logic/wonko/tasks/BaseWonkoEntityLocalLoadTask.h delete mode 100644 libraries/logic/wonko/tasks/BaseWonkoEntityRemoteLoadTask.cpp delete mode 100644 libraries/logic/wonko/tasks/BaseWonkoEntityRemoteLoadTask.h create mode 100644 libraries/pack200/CMakeLists.txt create mode 100644 libraries/pack200/LICENSE create mode 100644 libraries/pack200/anti200.cpp create mode 100644 libraries/pack200/include/unpack200.h create mode 100644 libraries/pack200/src/bands.cpp create mode 100644 libraries/pack200/src/bands.h create mode 100644 libraries/pack200/src/bytes.cpp create mode 100644 libraries/pack200/src/bytes.h create mode 100644 libraries/pack200/src/coding.cpp create mode 100644 libraries/pack200/src/coding.h create mode 100644 libraries/pack200/src/constants.h create mode 100644 libraries/pack200/src/defines.h create mode 100644 libraries/pack200/src/unpack.cpp create mode 100644 libraries/pack200/src/unpack.h create mode 100644 libraries/pack200/src/unpack200.cpp create mode 100644 libraries/pack200/src/utils.cpp create mode 100644 libraries/pack200/src/utils.h create mode 100644 libraries/pack200/src/zip.cpp create mode 100644 libraries/pack200/src/zip.h create mode 100644 libraries/rainbow/CMakeLists.txt create mode 100644 libraries/rainbow/COPYING.LIB create mode 100644 libraries/rainbow/include/rainbow.h create mode 100644 libraries/rainbow/include/rainbow_config.h create mode 100644 libraries/rainbow/src/rainbow.cpp create mode 100644 libraries/xz-embedded/CMakeLists.txt create mode 100644 libraries/xz-embedded/include/xz.h create mode 100644 libraries/xz-embedded/src/xz_config.h create mode 100644 libraries/xz-embedded/src/xz_crc32.c create mode 100644 libraries/xz-embedded/src/xz_crc64.c create mode 100644 libraries/xz-embedded/src/xz_dec_bcj.c create mode 100644 libraries/xz-embedded/src/xz_dec_lzma2.c create mode 100644 libraries/xz-embedded/src/xz_dec_stream.c create mode 100644 libraries/xz-embedded/src/xz_lzma2.h create mode 100644 libraries/xz-embedded/src/xz_private.h create mode 100644 libraries/xz-embedded/src/xz_stream.h create mode 100644 libraries/xz-embedded/xzminidec.c (limited to 'libraries') diff --git a/libraries/README.md b/libraries/README.md new file mode 100644 index 00000000..809acb16 --- /dev/null +++ b/libraries/README.md @@ -0,0 +1,145 @@ +# Third-party libraries + +This folder has third-party or otherwise external libraries needed for other parts to work. + +## classparser +A simplistic parser for Java class files. + +This library has served as a base for some (much more full-featured and advanced) work under NDA for AVG. It, however, should NOT be confused with that work. + +Copyright belongs to Petr Mrázek, unless explicitly stated otherwise in the source files. Available under the Apache 2.0 license. + +## hoedown +Hoedown is a revived fork of Sundown, the Markdown parser based on the original code of the Upskirt library by Natacha Porté. + +See [github repo](https://github.com/hoedown/hoedown). + +## iconfix +This was originally part of the razor-qt project and the Qt toolkit, respecitvely. Its sole purpose is to reimplement Qt's icon loading logic to prevent it from using any platform plugins that could break icon loading. + +Licensed under LGPL 2.1 + +## javacheck +Simple Java tool that prints the JVM details - version and platform bitness. + +Do what you want with it. It is so trivial that noone cares. + +## launcher +Java launcher part for Minecraft. + +It: +* Starts a process +* Waits for a launch script on stdin +* Consumes the launch script you feed it +* Proceeds with launch when it gets the `launcher` command + +This means the process is essentially idle until the final command is sent. You can, for example, attach a profiler before you send it. + +A `legacy` and `onesix` launchers are available. + +* `legacy` is intended for use with Minecraft versions < 1.6 and is deprecated. +* `onesix` can handle launching any Minecraft version, at the cost of some extra features `legacy` enables (custom window icon and title). + +Example (some parts have been censored): +``` +mod legacyjavafixer-1.0 +mainClass net.minecraft.launchwrapper.Launch +param --username +param CENSORED +param --version +param MultiMC5 +param --gameDir +param /home/peterix/minecraft/FTB/17ForgeTest/minecraft +param --assetsDir +param /home/peterix/minecraft/mmc5/assets +param --assetIndex +param 1.7.10 +param --uuid +param CENSORED +param --accessToken +param CENSORED +param --userProperties +param {} +param --userType +param mojang +param --tweakClass +param cpw.mods.fml.common.launcher.FMLTweaker +windowTitle MultiMC: 172ForgeTest +windowParams 854x480 +userName CENSORED +sessionId token:CENSORED:CENSORED +cp /home/peterix/minecraft/FTB/libraries/com/mojang/realms/1.3.5/realms-1.3.5.jar +cp /home/peterix/minecraft/FTB/libraries/org/apache/commons/commons-compress/1.8.1/commons-compress-1.8.1.jar +cp /home/peterix/minecraft/FTB/libraries/org/apache/httpcomponents/httpclient/4.3.3/httpclient-4.3.3.jar +cp /home/peterix/minecraft/FTB/libraries/commons-logging/commons-logging/1.1.3/commons-logging-1.1.3.jar +cp /home/peterix/minecraft/FTB/libraries/org/apache/httpcomponents/httpcore/4.3.2/httpcore-4.3.2.jar +cp /home/peterix/minecraft/FTB/libraries/java3d/vecmath/1.3.1/vecmath-1.3.1.jar +cp /home/peterix/minecraft/FTB/libraries/net/sf/trove4j/trove4j/3.0.3/trove4j-3.0.3.jar +cp /home/peterix/minecraft/FTB/libraries/com/ibm/icu/icu4j-core-mojang/51.2/icu4j-core-mojang-51.2.jar +cp /home/peterix/minecraft/FTB/libraries/net/sf/jopt-simple/jopt-simple/4.5/jopt-simple-4.5.jar +cp /home/peterix/minecraft/FTB/libraries/com/paulscode/codecjorbis/20101023/codecjorbis-20101023.jar +cp /home/peterix/minecraft/FTB/libraries/com/paulscode/codecwav/20101023/codecwav-20101023.jar +cp /home/peterix/minecraft/FTB/libraries/com/paulscode/libraryjavasound/20101123/libraryjavasound-20101123.jar +cp /home/peterix/minecraft/FTB/libraries/com/paulscode/librarylwjglopenal/20100824/librarylwjglopenal-20100824.jar +cp /home/peterix/minecraft/FTB/libraries/com/paulscode/soundsystem/20120107/soundsystem-20120107.jar +cp /home/peterix/minecraft/FTB/libraries/io/netty/netty-all/4.0.10.Final/netty-all-4.0.10.Final.jar +cp /home/peterix/minecraft/FTB/libraries/com/google/guava/guava/16.0/guava-16.0.jar +cp /home/peterix/minecraft/FTB/libraries/org/apache/commons/commons-lang3/3.2.1/commons-lang3-3.2.1.jar +cp /home/peterix/minecraft/FTB/libraries/commons-io/commons-io/2.4/commons-io-2.4.jar +cp /home/peterix/minecraft/FTB/libraries/commons-codec/commons-codec/1.9/commons-codec-1.9.jar +cp /home/peterix/minecraft/FTB/libraries/net/java/jinput/jinput/2.0.5/jinput-2.0.5.jar +cp /home/peterix/minecraft/FTB/libraries/net/java/jutils/jutils/1.0.0/jutils-1.0.0.jar +cp /home/peterix/minecraft/FTB/libraries/com/google/code/gson/gson/2.2.4/gson-2.2.4.jar +cp /home/peterix/minecraft/FTB/libraries/com/mojang/authlib/1.5.16/authlib-1.5.16.jar +cp /home/peterix/minecraft/FTB/libraries/org/apache/logging/log4j/log4j-api/2.0-beta9/log4j-api-2.0-beta9.jar +cp /home/peterix/minecraft/FTB/libraries/org/apache/logging/log4j/log4j-core/2.0-beta9/log4j-core-2.0-beta9.jar +cp /home/peterix/minecraft/FTB/libraries/org/lwjgl/lwjgl/lwjgl/2.9.1/lwjgl-2.9.1.jar +cp /home/peterix/minecraft/FTB/libraries/org/lwjgl/lwjgl/lwjgl_util/2.9.1/lwjgl_util-2.9.1.jar +cp /home/peterix/minecraft/FTB/libraries/tv/twitch/twitch/5.16/twitch-5.16.jar +cp /home/peterix/minecraft/FTB/libraries/net/minecraftforge/forge/1.7.10-10.13.0.1178/forge-1.7.10-10.13.0.1178.jar +cp /home/peterix/minecraft/FTB/libraries/net/minecraft/launchwrapper/1.9/launchwrapper-1.9.jar +cp /home/peterix/minecraft/FTB/libraries/org/ow2/asm/asm-all/4.1/asm-all-4.1.jar +cp /home/peterix/minecraft/FTB/libraries/com/typesafe/akka/akka-actor_2.11/2.3.3/akka-actor_2.11-2.3.3.jar +cp /home/peterix/minecraft/FTB/libraries/com/typesafe/config/1.2.1/config-1.2.1.jar +cp /home/peterix/minecraft/FTB/libraries/org/scala-lang/scala-actors-migration_2.11/1.1.0/scala-actors-migration_2.11-1.1.0.jar +cp /home/peterix/minecraft/FTB/libraries/org/scala-lang/scala-compiler/2.11.1/scala-compiler-2.11.1.jar +cp /home/peterix/minecraft/FTB/libraries/org/scala-lang/plugins/scala-continuations-library_2.11/1.0.2/scala-continuations-library_2.11-1.0.2.jar +cp /home/peterix/minecraft/FTB/libraries/org/scala-lang/plugins/scala-continuations-plugin_2.11.1/1.0.2/scala-continuations-plugin_2.11.1-1.0.2.jar +cp /home/peterix/minecraft/FTB/libraries/org/scala-lang/scala-library/2.11.1/scala-library-2.11.1.jar +cp /home/peterix/minecraft/FTB/libraries/org/scala-lang/scala-parser-combinators_2.11/1.0.1/scala-parser-combinators_2.11-1.0.1.jar +cp /home/peterix/minecraft/FTB/libraries/org/scala-lang/scala-reflect/2.11.1/scala-reflect-2.11.1.jar +cp /home/peterix/minecraft/FTB/libraries/org/scala-lang/scala-swing_2.11/1.0.1/scala-swing_2.11-1.0.1.jar +cp /home/peterix/minecraft/FTB/libraries/org/scala-lang/scala-xml_2.11/1.0.2/scala-xml_2.11-1.0.2.jar +cp /home/peterix/minecraft/FTB/libraries/lzma/lzma/0.0.1/lzma-0.0.1.jar +ext /home/peterix/minecraft/FTB/libraries/org/lwjgl/lwjgl/lwjgl-platform/2.9.1/lwjgl-platform-2.9.1-natives-linux.jar +ext /home/peterix/minecraft/FTB/libraries/net/java/jinput/jinput-platform/2.0.5/jinput-platform-2.0.5-natives-linux.jar +natives /home/peterix/minecraft/FTB/17ForgeTest/natives +cp /home/peterix/minecraft/FTB/versions/1.7.10/1.7.10.jar +launcher onesix +``` + +Available under the Apache 2.0 license. + +## libnbtplusplus +libnbt++ is a free C++ library for Minecraft's file format Named Binary Tag (NBT). It can read and write compressed and uncompressed NBT files and provides a code interface for working with NBT data. + +See [github repo](https://github.com/ljfa-ag/libnbtplusplus). + +Available either under LGPL version 3 or later. + +## pack200 +Unpacks pack200 archives (squished, compression-optimized Java jars). This format is only used by Forge to save bandwidth. + +A horrible little thing extracted from the depths of the OpenJDK codebase. Please don't look at it, or you will praise Cthulhu for his clean code for the rest of your days. + +Available under GPL 2 with classpath exception. + +## rainbow +Color functions extracted from [KGuiAddons](https://inqlude.org/libraries/kguiaddons.html). Used for adaptive text coloring. + +Available either under LGPL version 2.1 or later. + +## xz-embedded +Tiny implementation of LZMA2 de/compression. This format is only used by Forge to save bandwidth. + +Public domain. \ No newline at end of file diff --git a/libraries/classparser/CMakeLists.txt b/libraries/classparser/CMakeLists.txt new file mode 100644 index 00000000..a6c3fa14 --- /dev/null +++ b/libraries/classparser/CMakeLists.txt @@ -0,0 +1,41 @@ +project(classparser) + +set(CMAKE_AUTOMOC ON) + +######## Check endianness ######## +include(TestBigEndian) +test_big_endian(BIGENDIAN) +if(${BIGENDIAN}) + add_definitions(-DMULTIMC_BIG_ENDIAN) +endif(${BIGENDIAN}) + +# Find Qt +find_package(Qt5Core REQUIRED) + +# Include Qt headers. +include_directories(${Qt5Base_INCLUDE_DIRS}) + +set(CLASSPARSER_HEADERS +# Public headers +include/classparser_config.h +include/javautils.h + +# Private headers +src/annotations.h +src/classfile.h +src/constants.h +src/errors.h +src/javaendian.h +src/membuffer.h +) + +set(CLASSPARSER_SOURCES +src/javautils.cpp +src/annotations.cpp +) + +add_definitions(-DCLASSPARSER_LIBRARY) + +add_library(classparser SHARED ${CLASSPARSER_SOURCES} ${CLASSPARSER_HEADERS}) +target_include_directories(classparser PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/include") +qt5_use_modules(classparser Core) diff --git a/libraries/classparser/include/classparser_config.h b/libraries/classparser/include/classparser_config.h new file mode 100644 index 00000000..bfd4dcb4 --- /dev/null +++ b/libraries/classparser/include/classparser_config.h @@ -0,0 +1,22 @@ +/* Copyright 2013-2015 MultiMC Contributors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include + +#ifdef CLASSPARSER_LIBRARY +#define CLASSPARSER_EXPORT Q_DECL_EXPORT +#else +#define CLASSPARSER_EXPORT Q_DECL_IMPORT +#endif diff --git a/libraries/classparser/include/javautils.h b/libraries/classparser/include/javautils.h new file mode 100644 index 00000000..43cca4bc --- /dev/null +++ b/libraries/classparser/include/javautils.h @@ -0,0 +1,29 @@ +/* Copyright 2013-2015 MultiMC Contributors + * + * Authors: Orochimarufan + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#pragma once +#include +#include "classparser_config.h" + +#define MCVer_Unknown "Unknown" + +namespace javautils +{ +/** + * @brief Get the version from a minecraft.jar by parsing its class files. Expensive! + */ +QString GetMinecraftJarVersion(QString jar); +} diff --git a/libraries/classparser/src/annotations.cpp b/libraries/classparser/src/annotations.cpp new file mode 100644 index 00000000..d1a7c046 --- /dev/null +++ b/libraries/classparser/src/annotations.cpp @@ -0,0 +1,85 @@ +#include "classfile.h" +#include "annotations.h" +#include + +namespace java +{ +std::string annotation::toString() +{ + std::ostringstream ss; + ss << "Annotation type : " << type_index << " - " << pool[type_index].str_data << std::endl; + ss << "Contains " << name_val_pairs.size() << " pairs:" << std::endl; + for (unsigned i = 0; i < name_val_pairs.size(); i++) + { + std::pair &val = name_val_pairs[i]; + auto name_idx = val.first; + ss << pool[name_idx].str_data << "(" << name_idx << ")" + << " = " << val.second->toString() << std::endl; + } + return ss.str(); +} + +annotation *annotation::read(util::membuffer &input, constant_pool &pool) +{ + uint16_t type_index = 0; + input.read_be(type_index); + annotation *ann = new annotation(type_index, pool); + + uint16_t num_pairs = 0; + input.read_be(num_pairs); + while (num_pairs) + { + uint16_t name_idx = 0; + // read name index + input.read_be(name_idx); + auto elem = element_value::readElementValue(input, pool); + // read value + ann->add_pair(name_idx, elem); + num_pairs--; + } + return ann; +} + +element_value *element_value::readElementValue(util::membuffer &input, + java::constant_pool &pool) +{ + element_value_type type = INVALID; + input.read(type); + uint16_t index = 0; + uint16_t index2 = 0; + std::vector vals; + switch (type) + { + case PRIMITIVE_BYTE: + case PRIMITIVE_CHAR: + case PRIMITIVE_DOUBLE: + case PRIMITIVE_FLOAT: + case PRIMITIVE_INT: + case PRIMITIVE_LONG: + case PRIMITIVE_SHORT: + case PRIMITIVE_BOOLEAN: + case STRING: + input.read_be(index); + return new element_value_simple(type, index, pool); + case ENUM_CONSTANT: + input.read_be(index); + input.read_be(index2); + return new element_value_enum(type, index, index2, pool); + case CLASS: // Class + input.read_be(index); + return new element_value_class(type, index, pool); + case ANNOTATION: // Annotation + // FIXME: runtime visibility info needs to be passed from parent + return new element_value_annotation(ANNOTATION, annotation::read(input, pool), pool); + case ARRAY: // Array + input.read_be(index); + for (int i = 0; i < index; i++) + { + vals.push_back(element_value::readElementValue(input, pool)); + } + return new element_value_array(ARRAY, vals, pool); + default: + throw new java::classfile_exception(); + } +} +} \ No newline at end of file diff --git a/libraries/classparser/src/annotations.h b/libraries/classparser/src/annotations.h new file mode 100644 index 00000000..aa25d241 --- /dev/null +++ b/libraries/classparser/src/annotations.h @@ -0,0 +1,277 @@ +#pragma once +#include "classfile.h" +#include +#include + +namespace java +{ +enum element_value_type : uint8_t +{ + INVALID = 0, + STRING = 's', + ENUM_CONSTANT = 'e', + CLASS = 'c', + ANNOTATION = '@', + ARRAY = '[', // one array dimension + PRIMITIVE_INT = 'I', // integer + PRIMITIVE_BYTE = 'B', // signed byte + PRIMITIVE_CHAR = 'C', // Unicode character code point in the Basic Multilingual Plane, + // encoded with UTF-16 + PRIMITIVE_DOUBLE = 'D', // double-precision floating-point value + PRIMITIVE_FLOAT = 'F', // single-precision floating-point value + PRIMITIVE_LONG = 'J', // long integer + PRIMITIVE_SHORT = 'S', // signed short + PRIMITIVE_BOOLEAN = 'Z' // true or false +}; +/** + * The element_value structure is a discriminated union representing the value of an + *element-value pair. + * It is used to represent element values in all attributes that describe annotations + * - RuntimeVisibleAnnotations + * - RuntimeInvisibleAnnotations + * - RuntimeVisibleParameterAnnotations + * - RuntimeInvisibleParameterAnnotations). + * + * The element_value structure has the following format: + */ +class element_value +{ +protected: + element_value_type type; + constant_pool &pool; + +public: + element_value(element_value_type type, constant_pool &pool) : type(type), pool(pool) {}; + + element_value_type getElementValueType() + { + return type; + } + + virtual std::string toString() = 0; + + static element_value *readElementValue(util::membuffer &input, constant_pool &pool); +}; + +/** + * Each value of the annotations table represents a single runtime-visible annotation on a + * program element. + * The annotation structure has the following format: + */ +class annotation +{ +public: + typedef std::vector> value_list; + +protected: + /** + * The value of the type_index item must be a valid index into the constant_pool table. + * The constant_pool entry at that index must be a CONSTANT_Utf8_info (§4.4.7) structure + * representing a field descriptor representing the annotation type corresponding + * to the annotation represented by this annotation structure. + */ + uint16_t type_index; + /** + * map between element_name_index and value. + * + * The value of the element_name_index item must be a valid index into the constant_pool + *table. + * The constant_pool entry at that index must be a CONSTANT_Utf8_info (§4.4.7) structure + *representing + * a valid field descriptor (§4.3.2) that denotes the name of the annotation type element + *represented + * by this element_value_pairs entry. + */ + value_list name_val_pairs; + /** + * Reference to the parent constant pool + */ + constant_pool &pool; + +public: + annotation(uint16_t type_index, constant_pool &pool) + : type_index(type_index), pool(pool) {}; + ~annotation() + { + for (unsigned i = 0; i < name_val_pairs.size(); i++) + { + delete name_val_pairs[i].second; + } + } + void add_pair(uint16_t key, element_value *value) + { + name_val_pairs.push_back(std::make_pair(key, value)); + } + ; + value_list::const_iterator begin() + { + return name_val_pairs.cbegin(); + } + value_list::const_iterator end() + { + return name_val_pairs.cend(); + } + std::string toString(); + static annotation *read(util::membuffer &input, constant_pool &pool); +}; +typedef std::vector annotation_table; + +/// type for simple value annotation elements +class element_value_simple : public element_value +{ +protected: + /// index of the constant in the constant pool + uint16_t index; + +public: + element_value_simple(element_value_type type, uint16_t index, constant_pool &pool) + : element_value(type, pool), index(index) { + // TODO: verify consistency + }; + uint16_t getIndex() + { + return index; + } + virtual std::string toString() + { + return pool[index].toString(); + } + ; +}; +/// The enum_const_value item is used if the tag item is 'e'. +class element_value_enum : public element_value +{ +protected: + /** + * The value of the type_name_index item must be a valid index into the constant_pool table. + * The constant_pool entry at that index must be a CONSTANT_Utf8_info (§4.4.7) structure + * representing a valid field descriptor (§4.3.2) that denotes the internal form of the + * binary + * name (§4.2.1) of the type of the enum constant represented by this element_value + * structure. + */ + uint16_t typeIndex; + /** + * The value of the const_name_index item must be a valid index into the constant_pool + * table. + * The constant_pool entry at that index must be a CONSTANT_Utf8_info (§4.4.7) structure + * representing the simple name of the enum constant represented by this element_value + * structure. + */ + uint16_t valueIndex; + +public: + element_value_enum(element_value_type type, uint16_t typeIndex, uint16_t valueIndex, + constant_pool &pool) + : element_value(type, pool), typeIndex(typeIndex), valueIndex(valueIndex) + { + // TODO: verify consistency + } + uint16_t getValueIndex() + { + return valueIndex; + } + uint16_t getTypeIndex() + { + return typeIndex; + } + virtual std::string toString() + { + return "enum value"; + } + ; +}; + +class element_value_class : public element_value +{ +protected: + /** + * The class_info_index item must be a valid index into the constant_pool table. + * The constant_pool entry at that index must be a CONSTANT_Utf8_info (§4.4.7) structure + * representing the return descriptor (§4.3.3) of the type that is reified by the class + * represented by this element_value structure. + * + * For example, 'V' for Void.class, 'Ljava/lang/Object;' for Object, etc. + * + * Or in plain english, you can store type information in annotations. Yay. + */ + uint16_t classIndex; + +public: + element_value_class(element_value_type type, uint16_t classIndex, constant_pool &pool) + : element_value(type, pool), classIndex(classIndex) + { + // TODO: verify consistency + } + uint16_t getIndex() + { + return class