NOISSUE reorganize and document libraries
This commit is contained in:
.gitmodulesCMakeLists.txt
api
gui
logic
AbstractCommonModel.cppAbstractCommonModel.hBaseConfigObject.cppBaseConfigObject.hBaseInstaller.cppBaseInstaller.hBaseInstance.cppBaseInstance.hBaseVersion.hBaseVersionList.cppBaseVersionList.hCMakeLists.txtCommandline.cppCommandline.hDefaultVariable.hEnv.cppEnv.hException.hFileSystem.cppFileSystem.hGZip.cppGZip.hInstanceList.cppInstanceList.hJson.cppJson.hMMCStrings.cppMMCStrings.hMMCZip.cppMMCZip.hNullInstance.hQObjectPtr.hRWStorage.hRecursiveFileSystemWatcher.cppRecursiveFileSystemWatcher.hSeparatorPrefixTree.hTypeMagic.hVersion.cppVersion.h
java
JavaChecker.cppJavaChecker.hJavaCheckerJob.cppJavaCheckerJob.hJavaInstall.cppJavaInstall.hJavaInstallList.cppJavaInstallList.hJavaUtils.cppJavaUtils.hJavaVersion.cppJavaVersion.h
launch
LaunchStep.cppLaunchStep.hLaunchTask.cppLaunchTask.hLoggedProcess.cppLoggedProcess.hMessageLevel.cppMessageLevel.h
steps
minecraft
AssetsUtils.cppAssetsUtils.hGradleSpecifier.hJarMod.hLibrary.cppLibrary.hMinecraftInstance.cppMinecraftInstance.hMinecraftProfile.cppMinecraftProfile.hMinecraftVersion.cppMinecraftVersion.hMinecraftVersionList.cppMinecraftVersionList.hMod.cppMod.hModList.cppModList.hMojangDownloadInfo.hMojangVersionFormat.cppMojangVersionFormat.hOpSys.cppOpSys.hParseUtils.cppParseUtils.hProfilePatch.hProfileStrategy.hProfileUtils.cppProfileUtils.hRule.cppRule.hVersionBuildError.hVersionFile.cppVersionFile.hVersionFilterData.cppVersionFilterData.hWorld.cppWorld.hWorldList.cppWorldList.h
auth
AuthSession.cppAuthSession.hMojangAccount.cppMojangAccount.hMojangAccountList.cppMojangAccountList.hYggdrasilTask.cppYggdrasilTask.h
flows
forge
ForgeInstaller.cppForgeInstaller.hForgeVersion.cppForgeVersion.hForgeVersionList.cppForgeVersionList.hForgeXzDownload.cppForgeXzDownload.hLegacyForge.cppLegacyForge.h
ftb
FTBPlugin.cppFTBPlugin.hFTBProfileStrategy.cppFTBProfileStrategy.hFTBVersion.hLegacyFTBInstance.cppLegacyFTBInstance.hOneSixFTBInstance.cppOneSixFTBInstance.h
legacy
LegacyInstance.cppLegacyInstance.hLegacyUpdate.cppLegacyUpdate.hLwjglVersionList.cppLwjglVersionList.h
liteloader
onesix
net
ByteArrayDownload.cppByteArrayDownload.hCacheDownload.cppCacheDownload.hHttpMetaCache.cppHttpMetaCache.hMD5EtagDownload.cppMD5EtagDownload.hNetAction.hNetJob.cppNetJob.hPasteUpload.cppPasteUpload.hURLConstants.cppURLConstants.h
news
notifications
pathmatcher
resources
Resource.cppResource.hResourceHandler.cppResourceHandler.hResourceObserver.cppResourceObserver.hResourceProxyModel.cppResourceProxyModel.h
screenshots
settings
INIFile.cppINIFile.hINISettingsObject.cppINISettingsObject.hOverrideSetting.cppOverrideSetting.hPassthroughSetting.cppPassthroughSetting.hSetting.cppSetting.hSettingsObject.cppSettingsObject.h
status
tasks
tools
BaseExternalTool.cppBaseExternalTool.hBaseProfiler.cppBaseProfiler.hJProfiler.cppJProfiler.hJVisualVM.cppJVisualVM.hMCEditTool.cppMCEditTool.h
trans
updater
wonko
depends/LogicalGui
libraries
README.md
classparser
hoedown
iconfix
javacheck
launcher
.gitignoreCMakeLists.txt
libnbtplusplusnet
minecraft
org
pack200
rainbow
xz-embedded
54
api/logic/java/JavaChecker.h
Normal file
54
api/logic/java/JavaChecker.h
Normal file
@@ -0,0 +1,54 @@
|
||||
#pragma once
|
||||
#include <QProcess>
|
||||
#include <QTimer>
|
||||
#include <memory>
|
||||
|
||||
#include "multimc_logic_export.h"
|
||||
|
||||
#include "JavaVersion.h"
|
||||
|
||||
class JavaChecker;
|
||||
|
||||
struct MULTIMC_LOGIC_EXPORT JavaCheckResult
|
||||
{
|
||||
QString path;
|
||||
QString mojangPlatform;
|
||||
QString realPlatform;
|
||||
JavaVersion javaVersion;
|
||||
QString errorLog;
|
||||
bool valid = false;
|
||||
bool is_64bit = false;
|
||||
int id;
|
||||
};
|
||||
|
||||
typedef std::shared_ptr<QProcess> QProcessPtr;
|
||||
typedef std::shared_ptr<JavaChecker> JavaCheckerPtr;
|
||||
class MULTIMC_LOGIC_EXPORT JavaChecker : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit JavaChecker(QObject *parent = 0);
|
||||
void performCheck();
|
||||
|
||||
QString m_path;
|
||||
QString m_args;
|
||||
int m_id = 0;
|
||||
int m_minMem = 0;
|
||||
int m_maxMem = 0;
|
||||
int m_permGen = 64;
|
||||
|
||||
signals:
|
||||
void checkFinished(JavaCheckResult result);
|
||||
private:
|
||||
QProcessPtr process;
|
||||
QTimer killTimer;
|
||||
QString m_stdout;
|
||||
QString m_stderr;
|
||||
public
|
||||
slots:
|
||||
void timeout();
|
||||
void finished(int exitcode, QProcess::ExitStatus);
|
||||
void error(QProcess::ProcessError);
|
||||
void stdoutReady();
|
||||
void stderrReady();
|
||||
};
|
Reference in New Issue
Block a user