aboutsummaryrefslogtreecommitdiff
path: root/launcher/minecraft/launch
diff options
context:
space:
mode:
authorSefa Eyeoglu <contact@scrumplex.net>2022-09-05 17:21:58 +0200
committerSefa Eyeoglu <contact@scrumplex.net>2022-09-05 17:37:10 +0200
commit1b559c777680278bfcf78eda6ee2870a852a7833 (patch)
tree154ad0b3a22df3d4a22cad324e82c2044a07096f /launcher/minecraft/launch
parent2f167b1512dc0c3b80731ae412d55ee897da14fd (diff)
downloadPrismLauncher-1b559c777680278bfcf78eda6ee2870a852a7833.tar.gz
PrismLauncher-1b559c777680278bfcf78eda6ee2870a852a7833.tar.bz2
PrismLauncher-1b559c777680278bfcf78eda6ee2870a852a7833.zip
Revert "Move classpath definition into NewLaunch itself"
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
Diffstat (limited to 'launcher/minecraft/launch')
-rw-r--r--launcher/minecraft/launch/LauncherPartLaunch.cpp25
1 files changed, 22 insertions, 3 deletions
diff --git a/launcher/minecraft/launch/LauncherPartLaunch.cpp b/launcher/minecraft/launch/LauncherPartLaunch.cpp
index 3b905bf5..63e4d90f 100644
--- a/launcher/minecraft/launch/LauncherPartLaunch.cpp
+++ b/launcher/minecraft/launch/LauncherPartLaunch.cpp
@@ -95,8 +95,8 @@ bool fitsInLocal8bit(const QString & string)
void LauncherPartLaunch::executeTask()
{
- QString newLaunchJar = APPLICATION->getJarPath("NewLaunch.jar");
- if (newLaunchJar.isEmpty())
+ QString jarPath = APPLICATION->getJarPath("NewLaunch.jar");
+ if (jarPath.isEmpty())
{
const char *reason = QT_TR_NOOP("Launcher library could not be found. Please check your installation.");
emit logLine(tr(reason), MessageLevel::Fatal);
@@ -119,6 +119,9 @@ void LauncherPartLaunch::executeTask()
// make detachable - this will keep the process running even if the object is destroyed
m_process.setDetachable(true);
+ auto classPath = minecraftInstance->getClassPath();
+ classPath.prepend(jarPath);
+
auto natPath = minecraftInstance->getNativePath();
#ifdef Q_OS_WIN
if (!fitsInLocal8bit(natPath))
@@ -134,7 +137,23 @@ void LauncherPartLaunch::executeTask()
#endif
args << "-cp";
- args << newLaunchJar;
+#ifdef Q_OS_WIN
+ QStringList processed;
+ for(auto & item: classPath)
+ {
+ if (!fitsInLocal8bit(item))
+ {
+ processed << shortPathName(item);
+ }
+ else
+ {
+ processed << item;
+ }
+ }
+ args << processed.join(';');
+#else
+ args << classPath.join(':');
+#endif
args << "org.polymc.EntryPoint";
qDebug() << args.join(' ');