Compare commits
1 Commits
develop
...
update_fla
Author | SHA1 | Date | |
---|---|---|---|
|
e4da6284cf |
39
flake.lock
generated
39
flake.lock
generated
@ -1,21 +1,5 @@
|
|||||||
{
|
{
|
||||||
"nodes": {
|
"nodes": {
|
||||||
"flake-compat": {
|
|
||||||
"flake": false,
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1733328505,
|
|
||||||
"narHash": "sha256-NeCCThCEP3eCl2l/+27kNNK7QrwZB1IJCrXfrbv5oqU=",
|
|
||||||
"owner": "edolstra",
|
|
||||||
"repo": "flake-compat",
|
|
||||||
"rev": "ff81ac966bb2cae68946d5ed5fc4994f96d0ffec",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "edolstra",
|
|
||||||
"repo": "flake-compat",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"libnbtplusplus": {
|
"libnbtplusplus": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
@ -32,28 +16,13 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nix-filter": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1731533336,
|
|
||||||
"narHash": "sha256-oRam5PS1vcrr5UPgALW0eo1m/5/pls27Z/pabHNy2Ms=",
|
|
||||||
"owner": "numtide",
|
|
||||||
"repo": "nix-filter",
|
|
||||||
"rev": "f7653272fd234696ae94229839a99b73c9ab7de0",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "numtide",
|
|
||||||
"repo": "nix-filter",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1739866667,
|
"lastModified": 1744463964,
|
||||||
"narHash": "sha256-EO1ygNKZlsAC9avfcwHkKGMsmipUk1Uc0TbrEZpkn64=",
|
"narHash": "sha256-LWqduOgLHCFxiTNYi3Uj5Lgz0SR+Xhw3kr/3Xd0GPTM=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "73cf49b8ad837ade2de76f87eb53fc85ed5d4680",
|
"rev": "2631b0b7abcea6e640ce31cd78ea58910d31e650",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -65,9 +34,7 @@
|
|||||||
},
|
},
|
||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-compat": "flake-compat",
|
|
||||||
"libnbtplusplus": "libnbtplusplus",
|
"libnbtplusplus": "libnbtplusplus",
|
||||||
"nix-filter": "nix-filter",
|
|
||||||
"nixpkgs": "nixpkgs"
|
"nixpkgs": "nixpkgs"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
25
launcher/Application.cpp
Executable file → Normal file
25
launcher/Application.cpp
Executable file → Normal file
@ -160,14 +160,13 @@
|
|||||||
|
|
||||||
#if defined Q_OS_WIN32
|
#if defined Q_OS_WIN32
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
|
#include <QStyleHints>
|
||||||
#include "WindowsConsole.h"
|
#include "WindowsConsole.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define STRINGIFY(x) #x
|
#define STRINGIFY(x) #x
|
||||||
#define TOSTRING(x) STRINGIFY(x)
|
#define TOSTRING(x) STRINGIFY(x)
|
||||||
|
|
||||||
#include "onimai.h"
|
|
||||||
|
|
||||||
static const QLatin1String liveCheckFile("live.check");
|
static const QLatin1String liveCheckFile("live.check");
|
||||||
|
|
||||||
PixmapCache* PixmapCache::s_instance = nullptr;
|
PixmapCache* PixmapCache::s_instance = nullptr;
|
||||||
@ -233,7 +232,7 @@ Application::Application(int& argc, char** argv) : QApplication(argc, argv)
|
|||||||
setApplicationDisplayName(QString("%1 %2").arg(BuildConfig.LAUNCHER_DISPLAYNAME, BuildConfig.printableVersionString()));
|
setApplicationDisplayName(QString("%1 %2").arg(BuildConfig.LAUNCHER_DISPLAYNAME, BuildConfig.printableVersionString()));
|
||||||
setApplicationVersion(BuildConfig.printableVersionString() + "\n" + BuildConfig.GIT_COMMIT);
|
setApplicationVersion(BuildConfig.printableVersionString() + "\n" + BuildConfig.GIT_COMMIT);
|
||||||
setDesktopFileName(BuildConfig.LAUNCHER_DESKTOPFILENAME);
|
setDesktopFileName(BuildConfig.LAUNCHER_DESKTOPFILENAME);
|
||||||
startTime = QDateTime::currentDateTime();
|
m_startTime = QDateTime::currentDateTime();
|
||||||
|
|
||||||
// Don't quit on hiding the last window
|
// Don't quit on hiding the last window
|
||||||
this->setQuitOnLastWindowClosed(false);
|
this->setQuitOnLastWindowClosed(false);
|
||||||
@ -934,8 +933,6 @@ Application::Application(int& argc, char** argv) : QApplication(argc, argv)
|
|||||||
connect(this, &Application::clickedOnDock, [this]() { this->showMainWindow(); });
|
connect(this, &Application::clickedOnDock, [this]() { this->showMainWindow(); });
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
onimaiLoadLauncher(this);
|
|
||||||
|
|
||||||
connect(this, &Application::aboutToQuit, [this]() {
|
connect(this, &Application::aboutToQuit, [this]() {
|
||||||
if (m_instances) {
|
if (m_instances) {
|
||||||
// save any remaining instance state
|
// save any remaining instance state
|
||||||
@ -1128,8 +1125,16 @@ bool Application::createSetupWizard()
|
|||||||
// set default theme after going into theme wizard
|
// set default theme after going into theme wizard
|
||||||
if (!validIcons)
|
if (!validIcons)
|
||||||
settings()->set("IconTheme", QString("pe_colored"));
|
settings()->set("IconTheme", QString("pe_colored"));
|
||||||
if (!validWidgets)
|
if (!validWidgets) {
|
||||||
settings()->set("ApplicationTheme", QString("system"));
|
#if defined(Q_OS_WIN32) && QT_VERSION >= QT_VERSION_CHECK(6, 5, 0)
|
||||||
|
const QString style =
|
||||||
|
QGuiApplication::styleHints()->colorScheme() == Qt::ColorScheme::Dark ? QStringLiteral("dark") : QStringLiteral("bright");
|
||||||
|
#else
|
||||||
|
const QString style = QStringLiteral("system");
|
||||||
|
#endif
|
||||||
|
|
||||||
|
settings()->set("ApplicationTheme", style);
|
||||||
|
}
|
||||||
|
|
||||||
m_themeManager->applyCurrentlySelectedTheme(true);
|
m_themeManager->applyCurrentlySelectedTheme(true);
|
||||||
|
|
||||||
@ -1196,6 +1201,9 @@ bool Application::event(QEvent* event)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (event->type() == QEvent::FileOpen) {
|
if (event->type() == QEvent::FileOpen) {
|
||||||
|
if (!m_mainWindow) {
|
||||||
|
showMainWindow(false);
|
||||||
|
}
|
||||||
auto ev = static_cast<QFileOpenEvent*>(event);
|
auto ev = static_cast<QFileOpenEvent*>(event);
|
||||||
m_mainWindow->processURLs({ ev->url() });
|
m_mainWindow->processURLs({ ev->url() });
|
||||||
}
|
}
|
||||||
@ -1354,6 +1362,9 @@ void Application::messageReceived(const QByteArray& message)
|
|||||||
qWarning() << "Received" << command << "message without a zip path/URL.";
|
qWarning() << "Received" << command << "message without a zip path/URL.";
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (!m_mainWindow) {
|
||||||
|
showMainWindow(false);
|
||||||
|
}
|
||||||
m_mainWindow->processURLs({ normalizeImportUrl(url) });
|
m_mainWindow->processURLs({ normalizeImportUrl(url) });
|
||||||
} else if (command == "launch") {
|
} else if (command == "launch") {
|
||||||
QString id = received.args["id"];
|
QString id = received.args["id"];
|
||||||
|
4
launcher/Application.h
Executable file → Normal file
4
launcher/Application.h
Executable file → Normal file
@ -112,7 +112,7 @@ class Application : public QApplication {
|
|||||||
|
|
||||||
std::shared_ptr<SettingsObject> settings() const { return m_settings; }
|
std::shared_ptr<SettingsObject> settings() const { return m_settings; }
|
||||||
|
|
||||||
qint64 timeSinceStart() const { return startTime.msecsTo(QDateTime::currentDateTime()); }
|
qint64 timeSinceStart() const { return m_startTime.msecsTo(QDateTime::currentDateTime()); }
|
||||||
|
|
||||||
QIcon getThemedIcon(const QString& name);
|
QIcon getThemedIcon(const QString& name);
|
||||||
|
|
||||||
@ -236,7 +236,7 @@ class Application : public QApplication {
|
|||||||
bool shouldExitNow() const;
|
bool shouldExitNow() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QDateTime startTime;
|
QDateTime m_startTime;
|
||||||
|
|
||||||
shared_qobject_ptr<QNetworkAccessManager> m_network;
|
shared_qobject_ptr<QNetworkAccessManager> m_network;
|
||||||
|
|
||||||
|
0
launcher/ApplicationMessage.cpp
Executable file → Normal file
0
launcher/ApplicationMessage.cpp
Executable file → Normal file
0
launcher/ApplicationMessage.h
Executable file → Normal file
0
launcher/ApplicationMessage.h
Executable file → Normal file
0
launcher/BaseInstaller.cpp
Executable file → Normal file
0
launcher/BaseInstaller.cpp
Executable file → Normal file
0
launcher/BaseInstaller.h
Executable file → Normal file
0
launcher/BaseInstaller.h
Executable file → Normal file
2
launcher/BaseInstance.cpp
Executable file → Normal file
2
launcher/BaseInstance.cpp
Executable file → Normal file
@ -58,8 +58,6 @@ BaseInstance::BaseInstance(SettingsObjectPtr globalSettings, SettingsObjectPtr s
|
|||||||
m_global_settings = globalSettings;
|
m_global_settings = globalSettings;
|
||||||
m_rootDir = rootDir;
|
m_rootDir = rootDir;
|
||||||
|
|
||||||
qDebug() << "BaseInstance: " << rootDir;
|
|
||||||
|
|
||||||
m_settings->registerSetting("name", "Unnamed Instance");
|
m_settings->registerSetting("name", "Unnamed Instance");
|
||||||
m_settings->registerSetting("iconKey", "default");
|
m_settings->registerSetting("iconKey", "default");
|
||||||
m_settings->registerSetting("notes", "");
|
m_settings->registerSetting("notes", "");
|
||||||
|
0
launcher/BaseInstance.h
Executable file → Normal file
0
launcher/BaseInstance.h
Executable file → Normal file
0
launcher/BaseVersion.h
Executable file → Normal file
0
launcher/BaseVersion.h
Executable file → Normal file
0
launcher/BaseVersionList.cpp
Executable file → Normal file
0
launcher/BaseVersionList.cpp
Executable file → Normal file
0
launcher/BaseVersionList.h
Executable file → Normal file
0
launcher/BaseVersionList.h
Executable file → Normal file
10
launcher/CMakeLists.txt
Executable file → Normal file
10
launcher/CMakeLists.txt
Executable file → Normal file
@ -5,7 +5,6 @@ project(application)
|
|||||||
######## Sources and headers ########
|
######## Sources and headers ########
|
||||||
|
|
||||||
set(CORE_SOURCES
|
set(CORE_SOURCES
|
||||||
onimai.cpp
|
|
||||||
# LOGIC - Base classes and infrastructure
|
# LOGIC - Base classes and infrastructure
|
||||||
BaseInstaller.h
|
BaseInstaller.h
|
||||||
BaseInstaller.cpp
|
BaseInstaller.cpp
|
||||||
@ -239,6 +238,8 @@ set(MINECRAFT_SOURCES
|
|||||||
minecraft/auth/AuthFlow.cpp
|
minecraft/auth/AuthFlow.cpp
|
||||||
minecraft/auth/AuthFlow.h
|
minecraft/auth/AuthFlow.h
|
||||||
|
|
||||||
|
minecraft/auth/steps/AuthlibInjectorMetadataStep.cpp
|
||||||
|
minecraft/auth/steps/AuthlibInjectorMetadataStep.h
|
||||||
minecraft/auth/steps/EntitlementsStep.cpp
|
minecraft/auth/steps/EntitlementsStep.cpp
|
||||||
minecraft/auth/steps/EntitlementsStep.h
|
minecraft/auth/steps/EntitlementsStep.h
|
||||||
minecraft/auth/steps/GetSkinStep.cpp
|
minecraft/auth/steps/GetSkinStep.cpp
|
||||||
@ -386,6 +387,10 @@ set(MINECRAFT_SOURCES
|
|||||||
minecraft/AssetsUtils.cpp
|
minecraft/AssetsUtils.cpp
|
||||||
|
|
||||||
# Minecraft skins
|
# Minecraft skins
|
||||||
|
minecraft/skins/AuthlibInjectorTextureDelete.cpp
|
||||||
|
minecraft/skins/AuthlibInjectorTextureDelete.h
|
||||||
|
minecraft/skins/AuthlibInjectorTextureUpload.cpp
|
||||||
|
minecraft/skins/AuthlibInjectorTextureUpload.h
|
||||||
minecraft/skins/CapeChange.cpp
|
minecraft/skins/CapeChange.cpp
|
||||||
minecraft/skins/CapeChange.h
|
minecraft/skins/CapeChange.h
|
||||||
minecraft/skins/SkinUpload.cpp
|
minecraft/skins/SkinUpload.cpp
|
||||||
@ -1061,8 +1066,6 @@ SET(LAUNCHER_SOURCES
|
|||||||
ui/dialogs/CopyInstanceDialog.h
|
ui/dialogs/CopyInstanceDialog.h
|
||||||
ui/dialogs/CustomMessageBox.cpp
|
ui/dialogs/CustomMessageBox.cpp
|
||||||
ui/dialogs/CustomMessageBox.h
|
ui/dialogs/CustomMessageBox.h
|
||||||
ui/dialogs/EditAccountDialog.cpp
|
|
||||||
ui/dialogs/EditAccountDialog.h
|
|
||||||
ui/dialogs/ExportInstanceDialog.cpp
|
ui/dialogs/ExportInstanceDialog.cpp
|
||||||
ui/dialogs/ExportInstanceDialog.h
|
ui/dialogs/ExportInstanceDialog.h
|
||||||
ui/dialogs/ExportPackDialog.cpp
|
ui/dialogs/ExportPackDialog.cpp
|
||||||
@ -1252,7 +1255,6 @@ qt_wrap_ui(LAUNCHER_UI
|
|||||||
ui/dialogs/OfflineLoginDialog.ui
|
ui/dialogs/OfflineLoginDialog.ui
|
||||||
ui/dialogs/AuthlibInjectorLoginDialog.ui
|
ui/dialogs/AuthlibInjectorLoginDialog.ui
|
||||||
ui/dialogs/AboutDialog.ui
|
ui/dialogs/AboutDialog.ui
|
||||||
ui/dialogs/EditAccountDialog.ui
|
|
||||||
ui/dialogs/ReviewMessageBox.ui
|
ui/dialogs/ReviewMessageBox.ui
|
||||||
ui/dialogs/ScrollMessageBox.ui
|
ui/dialogs/ScrollMessageBox.ui
|
||||||
ui/dialogs/BlockedModsDialog.ui
|
ui/dialogs/BlockedModsDialog.ui
|
||||||
|
0
launcher/Commandline.cpp
Executable file → Normal file
0
launcher/Commandline.cpp
Executable file → Normal file
0
launcher/Commandline.h
Executable file → Normal file
0
launcher/Commandline.h
Executable file → Normal file
0
launcher/DataMigrationTask.cpp
Executable file → Normal file
0
launcher/DataMigrationTask.cpp
Executable file → Normal file
0
launcher/DataMigrationTask.h
Executable file → Normal file
0
launcher/DataMigrationTask.h
Executable file → Normal file
0
launcher/DefaultVariable.h
Executable file → Normal file
0
launcher/DefaultVariable.h
Executable file → Normal file
0
launcher/DesktopServices.cpp
Executable file → Normal file
0
launcher/DesktopServices.cpp
Executable file → Normal file
0
launcher/DesktopServices.h
Executable file → Normal file
0
launcher/DesktopServices.h
Executable file → Normal file
0
launcher/Exception.h
Executable file → Normal file
0
launcher/Exception.h
Executable file → Normal file
0
launcher/ExponentialSeries.h
Executable file → Normal file
0
launcher/ExponentialSeries.h
Executable file → Normal file
0
launcher/FastFileIconProvider.cpp
Executable file → Normal file
0
launcher/FastFileIconProvider.cpp
Executable file → Normal file
0
launcher/FastFileIconProvider.h
Executable file → Normal file
0
launcher/FastFileIconProvider.h
Executable file → Normal file
0
launcher/FileIgnoreProxy.cpp
Executable file → Normal file
0
launcher/FileIgnoreProxy.cpp
Executable file → Normal file
0
launcher/FileIgnoreProxy.h
Executable file → Normal file
0
launcher/FileIgnoreProxy.h
Executable file → Normal file
0
launcher/FileSystem.cpp
Executable file → Normal file
0
launcher/FileSystem.cpp
Executable file → Normal file
0
launcher/FileSystem.h
Executable file → Normal file
0
launcher/FileSystem.h
Executable file → Normal file
0
launcher/Filter.cpp
Executable file → Normal file
0
launcher/Filter.cpp
Executable file → Normal file
0
launcher/Filter.h
Executable file → Normal file
0
launcher/Filter.h
Executable file → Normal file
0
launcher/GZip.cpp
Executable file → Normal file
0
launcher/GZip.cpp
Executable file → Normal file
0
launcher/GZip.h
Executable file → Normal file
0
launcher/GZip.h
Executable file → Normal file
3
launcher/GetAuthlibInjectorApiLocation.cpp
Executable file → Normal file
3
launcher/GetAuthlibInjectorApiLocation.cpp
Executable file → Normal file
@ -72,7 +72,8 @@ auto GetAuthlibInjectorApiLocation::Sink::finalize(QNetworkReply& reply) -> Task
|
|||||||
qDebug() << "X-Authlib-Injector-API-Location header not found!";
|
qDebug() << "X-Authlib-Injector-API-Location header not found!";
|
||||||
}
|
}
|
||||||
|
|
||||||
m_outer.m_account.reset(MinecraftAccount::createFromUsernameAuthlibInjector(m_outer.m_username, url.toString()));
|
const auto& encodedUrl = url.toEncoded(QUrl::FullyEncoded);
|
||||||
|
m_outer.m_account.reset(MinecraftAccount::createFromUsernameAuthlibInjector(m_outer.m_username, encodedUrl));
|
||||||
return Task::State::Succeeded;
|
return Task::State::Succeeded;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
0
launcher/GetAuthlibInjectorApiLocation.h
Executable file → Normal file
0
launcher/GetAuthlibInjectorApiLocation.h
Executable file → Normal file
0
launcher/InstanceCopyPrefs.cpp
Executable file → Normal file
0
launcher/InstanceCopyPrefs.cpp
Executable file → Normal file
0
launcher/InstanceCopyPrefs.h
Executable file → Normal file
0
launcher/InstanceCopyPrefs.h
Executable file → Normal file
0
launcher/InstanceCopyTask.cpp
Executable file → Normal file
0
launcher/InstanceCopyTask.cpp
Executable file → Normal file
0
launcher/InstanceCopyTask.h
Executable file → Normal file
0
launcher/InstanceCopyTask.h
Executable file → Normal file
0
launcher/InstanceCreationTask.cpp
Executable file → Normal file
0
launcher/InstanceCreationTask.cpp
Executable file → Normal file
0
launcher/InstanceCreationTask.h
Executable file → Normal file
0
launcher/InstanceCreationTask.h
Executable file → Normal file
8
launcher/InstanceImportTask.cpp
Executable file → Normal file
8
launcher/InstanceImportTask.cpp
Executable file → Normal file
@ -159,7 +159,7 @@ void InstanceImportTask::processZipPack()
|
|||||||
}
|
}
|
||||||
|
|
||||||
QuaZipDir packZipDir(packZip.get());
|
QuaZipDir packZipDir(packZip.get());
|
||||||
qDebug() << "Attempting to determine instance type ";
|
qDebug() << "Attempting to determine instance type";
|
||||||
|
|
||||||
QString root;
|
QString root;
|
||||||
|
|
||||||
@ -244,8 +244,6 @@ void InstanceImportTask::extractFinished()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
qDebug() << "extractFinished " << static_cast<int>(m_modpackType);
|
|
||||||
|
|
||||||
switch (m_modpackType) {
|
switch (m_modpackType) {
|
||||||
case ModpackType::MultiMC:
|
case ModpackType::MultiMC:
|
||||||
processMultiMC();
|
processMultiMC();
|
||||||
@ -328,8 +326,6 @@ void InstanceImportTask::processMultiMC()
|
|||||||
QString configPath = FS::PathCombine(m_stagingPath, "instance.cfg");
|
QString configPath = FS::PathCombine(m_stagingPath, "instance.cfg");
|
||||||
auto instanceSettings = std::make_shared<INISettingsObject>(configPath);
|
auto instanceSettings = std::make_shared<INISettingsObject>(configPath);
|
||||||
|
|
||||||
qDebug() << "processMultiMC: " << m_stagingPath;
|
|
||||||
|
|
||||||
NullInstance instance(m_globalSettings, instanceSettings, m_stagingPath);
|
NullInstance instance(m_globalSettings, instanceSettings, m_stagingPath);
|
||||||
|
|
||||||
// reset time played on import... because packs.
|
// reset time played on import... because packs.
|
||||||
@ -338,8 +334,6 @@ void InstanceImportTask::processMultiMC()
|
|||||||
// set a new nice name
|
// set a new nice name
|
||||||
instance.setName(name());
|
instance.setName(name());
|
||||||
|
|
||||||
qDebug() << "processMultiMC2 " << instance.instanceRoot() << name();
|
|
||||||
|
|
||||||
// if the icon was specified by user, use that. otherwise pull icon from the pack
|
// if the icon was specified by user, use that. otherwise pull icon from the pack
|
||||||
if (m_instIcon != "default") {
|
if (m_instIcon != "default") {
|
||||||
instance.setIconKey(m_instIcon);
|
instance.setIconKey(m_instIcon);
|
||||||
|
0
launcher/InstanceImportTask.h
Executable file → Normal file
0
launcher/InstanceImportTask.h
Executable file → Normal file
5
launcher/InstanceList.cpp
Executable file → Normal file
5
launcher/InstanceList.cpp
Executable file → Normal file
@ -449,7 +449,6 @@ QList<InstanceId> InstanceList::discoverInstances()
|
|||||||
out.append(id);
|
out.append(id);
|
||||||
qDebug() << "Found instance ID" << id;
|
qDebug() << "Found instance ID" << id;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)
|
#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)
|
||||||
instanceSet = QSet<QString>(out.begin(), out.end());
|
instanceSet = QSet<QString>(out.begin(), out.end());
|
||||||
#else
|
#else
|
||||||
@ -978,7 +977,6 @@ QString InstanceList::getStagedInstancePath()
|
|||||||
#ifdef Q_OS_WIN32
|
#ifdef Q_OS_WIN32
|
||||||
SetFileAttributesA(tempRoot.toStdString().c_str(), FILE_ATTRIBUTE_HIDDEN | FILE_ATTRIBUTE_NOT_CONTENT_INDEXED);
|
SetFileAttributesA(tempRoot.toStdString().c_str(), FILE_ATTRIBUTE_HIDDEN | FILE_ATTRIBUTE_NOT_CONTENT_INDEXED);
|
||||||
#endif
|
#endif
|
||||||
qDebug() << "get Debug" << result;
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -996,7 +994,7 @@ bool InstanceList::commitStagedInstance(const QString& path,
|
|||||||
auto should_override = commiting.shouldOverride();
|
auto should_override = commiting.shouldOverride();
|
||||||
|
|
||||||
if (should_override) {
|
if (should_override) {
|
||||||
instID = instanceName.modifiedName();
|
instID = commiting.originalInstanceID();
|
||||||
} else {
|
} else {
|
||||||
instID = FS::DirNameFromString(instanceName.modifiedName(), m_instDir);
|
instID = FS::DirNameFromString(instanceName.modifiedName(), m_instDir);
|
||||||
}
|
}
|
||||||
@ -1012,7 +1010,6 @@ bool InstanceList::commitStagedInstance(const QString& path,
|
|||||||
qWarning() << "Failed to override" << path << "to" << destination;
|
qWarning() << "Failed to override" << path << "to" << destination;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
FS::deletePath(path);
|
|
||||||
} else {
|
} else {
|
||||||
if (!FS::move(path, destination)) {
|
if (!FS::move(path, destination)) {
|
||||||
qWarning() << "Failed to move" << path << "to" << destination;
|
qWarning() << "Failed to move" << path << "to" << destination;
|
||||||
|
0
launcher/InstanceList.h
Executable file → Normal file
0
launcher/InstanceList.h
Executable file → Normal file
0
launcher/InstancePageProvider.h
Executable file → Normal file
0
launcher/InstancePageProvider.h
Executable file → Normal file
0
launcher/InstanceTask.cpp
Executable file → Normal file
0
launcher/InstanceTask.cpp
Executable file → Normal file
31
launcher/InstanceTask.h
Executable file → Normal file
31
launcher/InstanceTask.h
Executable file → Normal file
@ -30,31 +30,26 @@ struct InstanceName {
|
|||||||
};
|
};
|
||||||
|
|
||||||
class InstanceTask : public Task, public InstanceName {
|
class InstanceTask : public Task, public InstanceName {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
InstanceTask();
|
InstanceTask();
|
||||||
~InstanceTask() override = default;
|
~InstanceTask() override = default;
|
||||||
|
|
||||||
void setParentSettings(SettingsObjectPtr settings) { m_globalSettings = settings; }
|
void setParentSettings(SettingsObjectPtr settings) { m_globalSettings = settings; }
|
||||||
|
|
||||||
void setStagingPath(const QString& stagingPath) { m_stagingPath = stagingPath; }
|
void setStagingPath(const QString& stagingPath) { m_stagingPath = stagingPath; }
|
||||||
|
|
||||||
void setIcon(const QString& icon) { m_instIcon = icon; }
|
void setIcon(const QString& icon) { m_instIcon = icon; }
|
||||||
|
|
||||||
void setGroup(const QString& group) { m_instGroup = group; }
|
void setGroup(const QString& group) { m_instGroup = group; }
|
||||||
QString group() const { return m_instGroup; }
|
QString group() const { return m_instGroup; }
|
||||||
|
|
||||||
[[nodiscard]] bool shouldConfirmUpdate() const { return m_confirm_update; }
|
[[nodiscard]] bool shouldConfirmUpdate() const { return m_confirm_update; }
|
||||||
void setConfirmUpdate(bool confirm) { m_confirm_update = confirm; }
|
void setConfirmUpdate(bool confirm) { m_confirm_update = confirm; }
|
||||||
|
|
||||||
bool shouldOverride() const { return m_override_existing; }
|
bool shouldOverride() const { return m_override_existing; }
|
||||||
|
|
||||||
[[nodiscard]] QString originalInstanceID() const { return m_original_instance_id; };
|
[[nodiscard]] QString originalInstanceID() const { return m_original_instance_id; };
|
||||||
|
|
||||||
void setShouldOverride(bool should)
|
|
||||||
{
|
|
||||||
m_override_existing = should;
|
|
||||||
}
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void setOverride(bool override, QString instance_id_to_override = {})
|
void setOverride(bool override, QString instance_id_to_override = {})
|
||||||
|
0
launcher/JavaCommon.cpp
Executable file → Normal file
0
launcher/JavaCommon.cpp
Executable file → Normal file
0
launcher/JavaCommon.h
Executable file → Normal file
0
launcher/JavaCommon.h
Executable file → Normal file
0
launcher/Json.cpp
Executable file → Normal file
0
launcher/Json.cpp
Executable file → Normal file
0
launcher/Json.h
Executable file → Normal file
0
launcher/Json.h
Executable file → Normal file
0
launcher/KonamiCode.cpp
Executable file → Normal file
0
launcher/KonamiCode.cpp
Executable file → Normal file
0
launcher/KonamiCode.h
Executable file → Normal file
0
launcher/KonamiCode.h
Executable file → Normal file
0
launcher/LaunchController.cpp
Executable file → Normal file
0
launcher/LaunchController.cpp
Executable file → Normal file
0
launcher/LaunchController.h
Executable file → Normal file
0
launcher/LaunchController.h
Executable file → Normal file
0
launcher/LoggedProcess.cpp
Executable file → Normal file
0
launcher/LoggedProcess.cpp
Executable file → Normal file
0
launcher/LoggedProcess.h
Executable file → Normal file
0
launcher/LoggedProcess.h
Executable file → Normal file
@ -1,7 +0,0 @@
|
|||||||
// This file was generated by ecm_qt_declare_logging_category(): DO NOT EDIT!
|
|
||||||
|
|
||||||
#include "Logging.h"
|
|
||||||
|
|
||||||
|
|
||||||
Q_LOGGING_CATEGORY(authCredentials, "launcher.auth.credentials", QtWarningMsg)
|
|
||||||
|
|
@ -1,11 +0,0 @@
|
|||||||
// This file was generated by ecm_qt_declare_logging_category(): DO NOT EDIT!
|
|
||||||
|
|
||||||
#ifndef ECM_QLOGGINGCATEGORY_AUTHCREDENTIALS_LOGGING_H
|
|
||||||
#define ECM_QLOGGINGCATEGORY_AUTHCREDENTIALS_LOGGING_H
|
|
||||||
|
|
||||||
#include <QLoggingCategory>
|
|
||||||
|
|
||||||
Q_DECLARE_LOGGING_CATEGORY(authCredentials)
|
|
||||||
|
|
||||||
|
|
||||||
#endif
|
|
0
launcher/MMCTime.cpp
Executable file → Normal file
0
launcher/MMCTime.cpp
Executable file → Normal file
0
launcher/MMCTime.h
Executable file → Normal file
0
launcher/MMCTime.h
Executable file → Normal file
0
launcher/MMCZip.cpp
Executable file → Normal file
0
launcher/MMCZip.cpp
Executable file → Normal file
0
launcher/MMCZip.h
Executable file → Normal file
0
launcher/MMCZip.h
Executable file → Normal file
0
launcher/MTPixmapCache.h
Executable file → Normal file
0
launcher/MTPixmapCache.h
Executable file → Normal file
10388
launcher/Makefile
10388
launcher/Makefile
File diff suppressed because it is too large
Load Diff
0
launcher/MangoHud.cpp
Executable file → Normal file
0
launcher/MangoHud.cpp
Executable file → Normal file
0
launcher/MangoHud.h
Executable file → Normal file
0
launcher/MangoHud.h
Executable file → Normal file
0
launcher/Manifest.cpp
Executable file → Normal file
0
launcher/Manifest.cpp
Executable file → Normal file
0
launcher/Manifest.h
Executable file → Normal file
0
launcher/Manifest.h
Executable file → Normal file
0
launcher/Markdown.cpp
Executable file → Normal file
0
launcher/Markdown.cpp
Executable file → Normal file
0
launcher/Markdown.h
Executable file → Normal file
0
launcher/Markdown.h
Executable file → Normal file
0
launcher/MessageLevel.cpp
Executable file → Normal file
0
launcher/MessageLevel.cpp
Executable file → Normal file
0
launcher/MessageLevel.h
Executable file → Normal file
0
launcher/MessageLevel.h
Executable file → Normal file
0
launcher/NullInstance.h
Executable file → Normal file
0
launcher/NullInstance.h
Executable file → Normal file
0
launcher/PSaveFile.h
Executable file → Normal file
0
launcher/PSaveFile.h
Executable file → Normal file
0
launcher/ProblemProvider.h
Executable file → Normal file
0
launcher/ProblemProvider.h
Executable file → Normal file
0
launcher/QObjectPtr.h
Executable file → Normal file
0
launcher/QObjectPtr.h
Executable file → Normal file
0
launcher/QVariantUtils.h
Executable file → Normal file
0
launcher/QVariantUtils.h
Executable file → Normal file
0
launcher/RWStorage.h
Executable file → Normal file
0
launcher/RWStorage.h
Executable file → Normal file
0
launcher/RecursiveFileSystemWatcher.cpp
Executable file → Normal file
0
launcher/RecursiveFileSystemWatcher.cpp
Executable file → Normal file
0
launcher/RecursiveFileSystemWatcher.h
Executable file → Normal file
0
launcher/RecursiveFileSystemWatcher.h
Executable file → Normal file
0
launcher/ResourceDownloadTask.cpp
Executable file → Normal file
0
launcher/ResourceDownloadTask.cpp
Executable file → Normal file
0
launcher/ResourceDownloadTask.h
Executable file → Normal file
0
launcher/ResourceDownloadTask.h
Executable file → Normal file
0
launcher/RuntimeContext.h
Executable file → Normal file
0
launcher/RuntimeContext.h
Executable file → Normal file
0
launcher/SeparatorPrefixTree.h
Executable file → Normal file
0
launcher/SeparatorPrefixTree.h
Executable file → Normal file
0
launcher/StringUtils.cpp
Executable file → Normal file
0
launcher/StringUtils.cpp
Executable file → Normal file
0
launcher/StringUtils.h
Executable file → Normal file
0
launcher/StringUtils.h
Executable file → Normal file
0
launcher/SysInfo.cpp
Executable file → Normal file
0
launcher/SysInfo.cpp
Executable file → Normal file
0
launcher/SysInfo.h
Executable file → Normal file
0
launcher/SysInfo.h
Executable file → Normal file
0
launcher/Untar.cpp
Executable file → Normal file
0
launcher/Untar.cpp
Executable file → Normal file
0
launcher/Untar.h
Executable file → Normal file
0
launcher/Untar.h
Executable file → Normal file
0
launcher/Usable.h
Executable file → Normal file
0
launcher/Usable.h
Executable file → Normal file
0
launcher/Version.cpp
Executable file → Normal file
0
launcher/Version.cpp
Executable file → Normal file
0
launcher/Version.h
Executable file → Normal file
0
launcher/Version.h
Executable file → Normal file
1
launcher/VersionProxyModel.cpp
Executable file → Normal file
1
launcher/VersionProxyModel.cpp
Executable file → Normal file
@ -307,6 +307,7 @@ void VersionProxyModel::setSourceModel(QAbstractItemModel* replacingRaw)
|
|||||||
if (!replacing) {
|
if (!replacing) {
|
||||||
roles.clear();
|
roles.clear();
|
||||||
filterModel->setSourceModel(replacing);
|
filterModel->setSourceModel(replacing);
|
||||||
|
endResetModel();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
0
launcher/VersionProxyModel.h
Executable file → Normal file
0
launcher/VersionProxyModel.h
Executable file → Normal file
0
launcher/WatchLock.h
Executable file → Normal file
0
launcher/WatchLock.h
Executable file → Normal file
0
launcher/WindowsConsole.cpp
Executable file → Normal file
0
launcher/WindowsConsole.cpp
Executable file → Normal file
0
launcher/WindowsConsole.h
Executable file → Normal file
0
launcher/WindowsConsole.h
Executable file → Normal file
0
launcher/filelink/FileLink.cpp
Executable file → Normal file
0
launcher/filelink/FileLink.cpp
Executable file → Normal file
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user