diff options
author | Petr Mrázek <peterix@gmail.com> | 2016-03-26 16:56:57 +0100 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2016-03-27 22:35:06 +0200 |
commit | f032e32133023ed8396fc2b6ead7eadc2816a25b (patch) | |
tree | 10ce52261bf06dd9f000896b4e993fb45cd7e3fc /logic/minecraft/onesix/OneSixInstance.cpp | |
parent | d587720010036e3335e321f192449808a75e958b (diff) | |
download | MultiMC-f032e32133023ed8396fc2b6ead7eadc2816a25b.tar MultiMC-f032e32133023ed8396fc2b6ead7eadc2816a25b.tar.gz MultiMC-f032e32133023ed8396fc2b6ead7eadc2816a25b.tar.lz MultiMC-f032e32133023ed8396fc2b6ead7eadc2816a25b.tar.xz MultiMC-f032e32133023ed8396fc2b6ead7eadc2816a25b.zip |
NOISSUE finalize support for new mojang version format
Diffstat (limited to 'logic/minecraft/onesix/OneSixInstance.cpp')
-rw-r--r-- | logic/minecraft/onesix/OneSixInstance.cpp | 56 |
1 files changed, 33 insertions, 23 deletions
diff --git a/logic/minecraft/onesix/OneSixInstance.cpp b/logic/minecraft/onesix/OneSixInstance.cpp index 328c3b38..8d46eefc 100644 --- a/logic/minecraft/onesix/OneSixInstance.cpp +++ b/logic/minecraft/onesix/OneSixInstance.cpp @@ -180,24 +180,6 @@ QString OneSixInstance::createLaunchScript(AuthSessionPtr session) launchScript += "jarmod " + jarmod->originalName + " (" + jarmod->name + ")\n"; } - // libraries and class path. - { - auto libs = m_profile->getLibraries(); - for (auto lib : libs) - { - launchScript += "cp " + QFileInfo(lib->storagePath()).absoluteFilePath() + "\n"; - } - auto jarMods = getJarMods(); - if (!jarMods.isEmpty()) - { - launchScript += "cp " + QDir(instanceRoot()).absoluteFilePath("minecraft.jar") + "\n"; - } - else - { - QString relpath = m_profile->getMinecraftVersion() + "/" + m_profile->getMinecraftVersion() + ".jar"; - launchScript += "cp " + versionsPath().absoluteFilePath(relpath) + "\n"; - } - } auto mainClass = m_profile->getMainClass(); if (!mainClass.isEmpty()) { @@ -234,15 +216,43 @@ QString OneSixInstance::createLaunchScript(AuthSessionPtr session) launchScript += "sessionId " + session->session + "\n"; } - // native libraries (mostly LWJGL) + // libraries and class path. { - QDir natives_dir(FS::PathCombine(instanceRoot(), "natives/")); - for (auto native : m_profile->getNativeLibraries()) + auto libs = m_profile->getLibraries(); + + QStringList jar, native, native32, native64; + for (auto lib : libs) + { + lib->getApplicableFiles(currentSystem, jar, native, native32, native64); + } + for(auto file: jar) + { + launchScript += "cp " + file + "\n"; + } + for(auto file: native) { - QFileInfo finfo(native->storagePath()); - launchScript += "ext " + finfo.absoluteFilePath() + "\n"; + launchScript += "ext " + file + "\n"; } + for(auto file: native32) + { + launchScript += "ext32 " + file + "\n"; + } + for(auto file: native64) + { + launchScript += "ext64 " + file + "\n"; + } + QDir natives_dir(FS::PathCombine(instanceRoot(), "natives/")); launchScript += "natives " + natives_dir.absolutePath() + "\n"; + auto jarMods = getJarMods(); + if (!jarMods.isEmpty()) + { + launchScript += "cp " + QDir(instanceRoot()).absoluteFilePath("minecraft.jar") + "\n"; + } + else + { + QString relpath = m_profile->getMinecraftVersion() + "/" + m_profile->getMinecraftVersion() + ".jar"; + launchScript += "cp " + versionsPath().absoluteFilePath(relpath) + "\n"; + } } // traits. including legacyLaunch and others ;) |