GH-1502 move launch script generation to the Minecraft launch step
This commit is contained in:
@ -29,6 +29,9 @@ void LaunchMinecraft::executeTask()
|
||||
{
|
||||
auto instance = m_parent->instance();
|
||||
std::shared_ptr<MinecraftInstance> minecraftInstance = std::dynamic_pointer_cast<MinecraftInstance>(instance);
|
||||
|
||||
m_launchScript = minecraftInstance->createLaunchScript(m_session);
|
||||
|
||||
QStringList args = minecraftInstance->javaArguments();
|
||||
|
||||
// HACK: this is a workaround for MCL-3732 - 'server-resource-packs' is created.
|
||||
|
@ -17,6 +17,7 @@
|
||||
|
||||
#include <launch/LaunchStep.h>
|
||||
#include <launch/LoggedProcess.h>
|
||||
#include <minecraft/auth/AuthSession.h>
|
||||
|
||||
class LaunchMinecraft: public LaunchStep
|
||||
{
|
||||
@ -31,9 +32,9 @@ public:
|
||||
return true;
|
||||
}
|
||||
void setWorkingDirectory(const QString &wd);
|
||||
void setLaunchScript(const QString &ls)
|
||||
void setAuthSession(AuthSessionPtr session)
|
||||
{
|
||||
m_launchScript = ls;
|
||||
m_session = session;
|
||||
}
|
||||
private slots:
|
||||
void on_state(LoggedProcess::State state);
|
||||
@ -42,5 +43,6 @@ private:
|
||||
LoggedProcess m_process;
|
||||
QString m_command;
|
||||
QString m_launchScript;
|
||||
AuthSessionPtr m_session;
|
||||
bool mayProceed = false;
|
||||
};
|
||||
|
Reference in New Issue
Block a user