diff options
Diffstat (limited to 'launcher/minecraft/LaunchProfile.h')
-rw-r--r-- | launcher/minecraft/LaunchProfile.h | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/launcher/minecraft/LaunchProfile.h b/launcher/minecraft/LaunchProfile.h index c1752531..b55cf661 100644 --- a/launcher/minecraft/LaunchProfile.h +++ b/launcher/minecraft/LaunchProfile.h @@ -1,6 +1,42 @@ +// SPDX-License-Identifier: GPL-3.0-only +/* + * PolyMC - Minecraft Launcher + * Copyright (C) 2022 Sefa Eyeoglu <contact@scrumplex.net> + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, version 3. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + * + * This file incorporates work covered by the following copyright and + * permission notice: + * + * Copyright 2013-2021 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. + */ + #pragma once #include <QString> #include "Library.h" +#include "Agent.h" #include <ProblemProvider.h> class LaunchProfile: public ProblemProvider @@ -13,6 +49,7 @@ public: /* application of profile variables from patches */ void applyMainClass(const QString& mainClass); void applyAppletClass(const QString& appletClass); void applyMinecraftArguments(const QString& minecraftArguments); + void applyAddnJvmArguments(const QStringList& minecraftArguments); void applyMinecraftVersionType(const QString& type); void applyMinecraftAssets(MojangAssetIndexInfo::Ptr assets); void applyTraits(const QSet<QString> &traits); @@ -21,6 +58,8 @@ public: /* application of profile variables from patches */ void applyMods(const QList<LibraryPtr> &jarMods); void applyLibrary(LibraryPtr library); void applyMavenFile(LibraryPtr library); + void applyAgent(AgentPtr agent); + void applyCompatibleJavaMajors(QList<int>& javaMajor); void applyMainJar(LibraryPtr jar); void applyProblemSeverity(ProblemSeverity severity); /// clear the profile @@ -33,12 +72,15 @@ public: /* getters for profile variables */ QString getMinecraftVersionType() const; MojangAssetIndexInfo::Ptr getMinecraftAssets() const; QString getMinecraftArguments() const; + const QStringList & getAddnJvmArguments() const; const QSet<QString> & getTraits() const; const QStringList & getTweakers() const; const QList<LibraryPtr> & getJarMods() const; const QList<LibraryPtr> & getLibraries() const; const QList<LibraryPtr> & getNativeLibraries() const; const QList<LibraryPtr> & getMavenFiles() const; + const QList<AgentPtr> & getAgents() const; + const QList<int> & getCompatibleJavaMajors() const; const LibraryPtr getMainJar() const; void getLibraryFiles( const QString & architecture, @@ -69,6 +111,12 @@ private: */ QString m_minecraftArguments; + /** + * Additional arguments to pass to the JVM in addition to those the user has configured, + * memory settings, etc. + */ + QStringList m_addnJvmArguments; + /// A list of all tweaker classes QStringList m_tweakers; @@ -84,6 +132,9 @@ private: /// the list of maven files to be placed in the libraries folder, but not acted upon QList<LibraryPtr> m_mavenFiles; + /// the list of java agents to add to JVM arguments + QList<AgentPtr> m_agents; + /// the main jar LibraryPtr m_mainJar; @@ -99,6 +150,9 @@ private: /// the list of mods QList<LibraryPtr> m_mods; + /// compatible java major versions + QList<int> m_compatibleJavaMajors; + ProblemSeverity m_problemSeverity = ProblemSeverity::None; }; |