diff options
author | Jan Dalheimer <jan@dalheimer.de> | 2014-11-02 20:16:29 +0100 |
---|---|---|
committer | Jan Dalheimer <jan@dalheimer.de> | 2014-11-02 20:16:29 +0100 |
commit | add23a9a0b3be7d5b9b4a60db5e34e09d26d8940 (patch) | |
tree | 9020ce02cad9bbf775c4ee1990c79419d1a1a965 | |
parent | d9b2f0ed429843f7dfbf4caffa3b931a28f0f6d6 (diff) | |
download | MultiMC-add23a9a0b3be7d5b9b4a60db5e34e09d26d8940.tar MultiMC-add23a9a0b3be7d5b9b4a60db5e34e09d26d8940.tar.gz MultiMC-add23a9a0b3be7d5b9b4a60db5e34e09d26d8940.tar.lz MultiMC-add23a9a0b3be7d5b9b4a60db5e34e09d26d8940.tar.xz MultiMC-add23a9a0b3be7d5b9b4a60db5e34e09d26d8940.zip |
Fix #220: Use .exe suffix on windows for jprofiler
-rw-r--r-- | logic/tools/JProfiler.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/logic/tools/JProfiler.cpp b/logic/tools/JProfiler.cpp index 2134984e..659d80b6 100644 --- a/logic/tools/JProfiler.cpp +++ b/logic/tools/JProfiler.cpp @@ -19,7 +19,11 @@ void JProfiler::beginProfilingImpl(MinecraftProcess *process) profiler->setArguments(QStringList() << "-d" << QString::number(pid(process)) << "--gui" << "-p" << QString::number(port)); profiler->setProgram(QDir(MMC->settings()->get("JProfilerPath").toString()) +#ifdef Q_OS_WIN + .absoluteFilePath("bin/jpenable.exe")); +#else .absoluteFilePath("bin/jpenable")); +#endif connect(profiler, &QProcess::started, [this, port]() { emit readyToLaunch(tr("Listening on port: %1").arg(port)); }); connect(profiler, @@ -69,7 +73,7 @@ bool JProfilerFactory::check(const QString &path, QString *error) *error = QObject::tr("Path does not exist"); return false; } - if (!dir.exists("bin") || !dir.exists("bin/jprofiler") || !dir.exists("bin/agent.jar")) + if (!dir.exists("bin") || !(dir.exists("bin/jprofiler") || dir.exists("bin/jprofiler.exe")) || !dir.exists("bin/agent.jar")) { *error = QObject::tr("Invalid JProfiler install"); return false; |