cross-compile patch
This commit is contained in:
parent
3852dad8c9
commit
67966443bd
src
@ -19,6 +19,6 @@ if(WIN32)
|
|||||||
../resources/app.rc
|
../resources/app.rc
|
||||||
)
|
)
|
||||||
set_target_properties(PunkLauncher PROPERTIES
|
set_target_properties(PunkLauncher PROPERTIES
|
||||||
WIN32_EXECUTABLE ON
|
WIN32_EXECUTABLE OFF
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
@ -83,7 +83,8 @@ void Backend::sendPostRequest(const QString &url, const QJsonObject &payload, st
|
|||||||
|
|
||||||
|
|
||||||
void Backend::authWithPassword(
|
void Backend::authWithPassword(
|
||||||
QString &username, QString &password, bool &session_save_flag,
|
QString &username,
|
||||||
|
QString &password,
|
||||||
std::function<void(QString, QString, QString)> callback)
|
std::function<void(QString, QString, QString)> callback)
|
||||||
{
|
{
|
||||||
QString url = "https://root-kit.ru:3002/punkcraft/session/auth";
|
QString url = "https://root-kit.ru:3002/punkcraft/session/auth";
|
||||||
@ -91,7 +92,7 @@ void Backend::authWithPassword(
|
|||||||
payload["username"] = username;
|
payload["username"] = username;
|
||||||
payload["password"] = password;
|
payload["password"] = password;
|
||||||
|
|
||||||
sendPostRequest(url, payload, [this, callback, session_save_flag](QJsonObject response) {
|
sendPostRequest(url, payload, [this, callback](QJsonObject response) {
|
||||||
if (response.isEmpty()) {
|
if (response.isEmpty()) {
|
||||||
qWarning() << "Ошибка авторизации: пустой ответ.";
|
qWarning() << "Ошибка авторизации: пустой ответ.";
|
||||||
if (callback) {
|
if (callback) {
|
||||||
@ -104,10 +105,7 @@ void Backend::authWithPassword(
|
|||||||
QString username = response["username"].toString();
|
QString username = response["username"].toString();
|
||||||
QString uuid = response["uuid"].toString();
|
QString uuid = response["uuid"].toString();
|
||||||
QString access_token = response["access_token"].toString();
|
QString access_token = response["access_token"].toString();
|
||||||
|
saveToJson(uuid, access_token);
|
||||||
if (session_save_flag) {
|
|
||||||
saveToJson(uuid, access_token);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
if (callback) {
|
if (callback) {
|
||||||
|
@ -9,9 +9,13 @@
|
|||||||
class Backend {
|
class Backend {
|
||||||
public:
|
public:
|
||||||
Backend();
|
Backend();
|
||||||
|
|
||||||
void authWithPassword(
|
void authWithPassword(
|
||||||
QString &username, QString &password, bool &session_save_flag,
|
QString &username,
|
||||||
std::function<void(QString, QString, QString)> callback);
|
QString &password,
|
||||||
|
std::function<void(QString, QString, QString)> callback
|
||||||
|
);
|
||||||
|
|
||||||
void authWithToken(std::function<void(QString, QString, QString)> callback);
|
void authWithToken(std::function<void(QString, QString, QString)> callback);
|
||||||
QString getStateFilePath();
|
QString getStateFilePath();
|
||||||
|
|
||||||
|
@ -23,9 +23,19 @@ Launcher::Launcher(QObject *parent) :
|
|||||||
mainWindow(qobject_cast<MainWindow *>(parent)),
|
mainWindow(qobject_cast<MainWindow *>(parent)),
|
||||||
app_dir(QDir(QCoreApplication::applicationDirPath()))
|
app_dir(QDir(QCoreApplication::applicationDirPath()))
|
||||||
{
|
{
|
||||||
if (!mainWindow) {
|
if (!mainWindow) {
|
||||||
qCritical() << "Failed to cast parent object to MainWindow";
|
qCritical() << "Failed to cast parent object to MainWindow";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
OS_type = "unix";
|
||||||
|
#ifdef Q_OS_WIN
|
||||||
|
QString vcsBinPath = app_dir.absoluteFilePath(".vcs/bin");
|
||||||
|
QProcessEnvironment env = QProcessEnvironment::systemEnvironment();
|
||||||
|
QString currentPath = env.value("PATH");
|
||||||
|
QString newPath = QString("%1;%2").arg(vcsBinPath, currentPath);
|
||||||
|
_putenv_s("PATH", newPath.toUtf8().constData());
|
||||||
|
OS_type = "win";
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -50,21 +60,22 @@ void Launcher::startProcess(QString &username, QString &uuid, QString &access_to
|
|||||||
garbarge_collector = json_settings["garbarge_collector"].toString();
|
garbarge_collector = json_settings["garbarge_collector"].toString();
|
||||||
|
|
||||||
if (selected_profile == "ZombieExtrieme") {
|
if (selected_profile == "ZombieExtrieme") {
|
||||||
arguments = get_args->getCrossPlatformArgs(RAM, username, uuid, access_token, garbarge_collector);
|
|
||||||
java_path = java_path.isEmpty() ? app_dir.absolutePath() + "/java/zulu8.84.0.15-ca-jre8.0.442-linux_x64/bin/java" : java_path;
|
|
||||||
RAM = RAM.isEmpty() ? "4096M" : RAM;
|
RAM = RAM.isEmpty() ? "4096M" : RAM;
|
||||||
|
arguments = get_args->getCrossPlatformArgs(RAM, username, uuid, access_token, garbarge_collector);
|
||||||
|
java_path = java_path.isEmpty() ? app_dir.absolutePath() + QDir::toNativeSeparators("/java/zulu8.84.0.15-ca-jre8.0.442-linux_x64/bin/java") : java_path;
|
||||||
garbarge_collector = garbarge_collector.isEmpty() ? "default_collector" : garbarge_collector;
|
garbarge_collector = garbarge_collector.isEmpty() ? "default_collector" : garbarge_collector;
|
||||||
version = "1.12.2";
|
version = "1.12.2";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (version == "1.12.2") {
|
if (version == "1.12.2") {
|
||||||
sync_dirs
|
sync_dirs
|
||||||
<< "./java/zulu8.84.0.15-ca-jre8.0.442-linux_x64"
|
<< "java/zulu8.84.0.15-ca-jre8.0.442-linux_x64"
|
||||||
<< "./versions/1.12.2"
|
<< "versions/1.12.2"
|
||||||
<< "./libraries/1.12.2"
|
<< "libraries/1.12.2"
|
||||||
<< "./" + selected_profile;
|
<< selected_profile;
|
||||||
sync_files
|
sync_files
|
||||||
<< "./PunkLauncher";
|
<< "PunkLauncher"
|
||||||
|
<< "PunkLauncher.exe";
|
||||||
}
|
}
|
||||||
|
|
||||||
QEventLoop loop;
|
QEventLoop loop;
|
||||||
@ -82,15 +93,12 @@ void Launcher::startProcess(QString &username, QString &uuid, QString &access_to
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
connect(process,
|
connect(process, QOverload<int, QProcess::ExitStatus>::of(&QProcess::finished), [this](int, QProcess::ExitStatus) {
|
||||||
QOverload<int, QProcess::ExitStatus>::of(&QProcess::finished),
|
this->mainWindow->show();
|
||||||
[this](int, QProcess::ExitStatus) {
|
run_status = false;
|
||||||
this->mainWindow->show();
|
});
|
||||||
run_status = false;
|
|
||||||
});
|
|
||||||
|
|
||||||
this->mainWindow->hide();
|
this->mainWindow->hide();
|
||||||
qDebug() << "Process started successfully";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -98,7 +106,7 @@ void Launcher::update() {
|
|||||||
QProcess *rsyncProcess = new QProcess(this);
|
QProcess *rsyncProcess = new QProcess(this);
|
||||||
rsyncProcess->setWorkingDirectory(app_dir.absolutePath());
|
rsyncProcess->setWorkingDirectory(app_dir.absolutePath());
|
||||||
|
|
||||||
connect(rsyncProcess, &QProcess::readyReadStandardOutput, [rsyncProcess, this]() {
|
connect(rsyncProcess, &QProcess::readyReadStandardOutput, [this, rsyncProcess]() {
|
||||||
QString output = rsyncProcess->readAllStandardOutput();
|
QString output = rsyncProcess->readAllStandardOutput();
|
||||||
QStringList lines = output.split('\n');
|
QStringList lines = output.split('\n');
|
||||||
if (!lines.isEmpty()) {
|
if (!lines.isEmpty()) {
|
||||||
@ -113,33 +121,33 @@ void Launcher::update() {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
connect(rsyncProcess, &QProcess::readyReadStandardError, [rsyncProcess, this]() {
|
connect(rsyncProcess, &QProcess::readyReadStandardError, [this, rsyncProcess]() {
|
||||||
QString errorOutput = rsyncProcess->readAllStandardError();
|
QString errorOutput = rsyncProcess->readAllStandardError();
|
||||||
this->mainWindow->ui->download_bar->setText(errorOutput);
|
this->mainWindow->ui->download_bar->setText(errorOutput);
|
||||||
qDebug() << errorOutput;
|
qDebug() << errorOutput;
|
||||||
});
|
});
|
||||||
|
|
||||||
QStringList rsyncArgs;
|
QStringList rsyncArgs;
|
||||||
rsyncArgs << "-azH" << "--info=progress2";
|
rsyncArgs << "-azH" << "--info=progress2" << "--no-perms" << "--no-owner" << "--no-group";
|
||||||
for (const QString &dir : sync_dirs) { rsyncArgs << "--include" << dir + "/**"; }
|
for (const QString &dir : sync_dirs) { rsyncArgs << "--include=" + dir + "/**"; }
|
||||||
for (const QString &file : sync_files) { rsyncArgs << "--include" << file; }
|
for (const QString &file : sync_files) { rsyncArgs << "--include=" + file; }
|
||||||
|
|
||||||
QStringList excludeFiles = {
|
QStringList excludeFiles = {
|
||||||
QDir::toNativeSeparators("./" + selected_profile + "/options.txt"),
|
"./" + selected_profile + "/options.txt",
|
||||||
QDir::toNativeSeparators("./" + selected_profile + "/optionsof.txt"),
|
"./" + selected_profile + "/optionsof.txt",
|
||||||
QDir::toNativeSeparators("./" + selected_profile + "/optionsshaders.txt")
|
"./" + selected_profile + "/optionsshaders.txt"
|
||||||
};
|
};
|
||||||
|
|
||||||
for (const QString &filePath : excludeFiles) {
|
for (const QString &filePath : excludeFiles) {
|
||||||
QFileInfo fileInfo(filePath);
|
QFileInfo fileInfo(filePath);
|
||||||
if (fileInfo.exists() && fileInfo.isFile()) {
|
if (fileInfo.exists() && fileInfo.isFile()) {
|
||||||
QString relativePath = QDir().relativeFilePath(fileInfo.absoluteFilePath());
|
QString relativePath = QDir().relativeFilePath(fileInfo.absoluteFilePath());
|
||||||
rsyncArgs << "--exclude" << relativePath;
|
rsyncArgs << "--exclude=" + relativePath;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
rsyncArgs << "--exclude" << "./**";
|
rsyncArgs << "--exclude=./*";
|
||||||
rsyncArgs << "punkcraft.ru::PunkCraft/unix/uncompressed/" << "./";
|
rsyncArgs << "punkcraft.ru::PunkCraft/" + OS_type + "/uncompressed/" << "./";
|
||||||
|
|
||||||
rsyncProcess->start("rsync", rsyncArgs);
|
rsyncProcess->start("rsync", rsyncArgs);
|
||||||
if (!rsyncProcess->waitForStarted()) {
|
if (!rsyncProcess->waitForStarted()) {
|
||||||
@ -150,13 +158,13 @@ void Launcher::update() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
connect(rsyncProcess, QOverload<int, QProcess::ExitStatus>::of(&QProcess::finished), [this, rsyncProcess]() {
|
connect(rsyncProcess, QOverload<int, QProcess::ExitStatus>::of(&QProcess::finished), [this, rsyncProcess]() {
|
||||||
|
QProcess *rsyncProcess2 = new QProcess(this);
|
||||||
rsyncProcess->deleteLater();
|
rsyncProcess->deleteLater();
|
||||||
QProcess *rsyncProcess2 = new QProcess(this);
|
|
||||||
rsyncProcess2->setWorkingDirectory(app_dir.absolutePath());
|
rsyncProcess2->setWorkingDirectory(app_dir.absolutePath());
|
||||||
|
|
||||||
QStringList modsArgs;
|
QStringList modsArgs;
|
||||||
modsArgs
|
modsArgs
|
||||||
<< "-azH" << "--info=progress2" << "--delete-after"
|
<< "-azH" << "--info=progress2" << "--no-perms" << "--no-owner" << "--no-group" << "--delete-after"
|
||||||
<< "--include=" + selected_profile
|
<< "--include=" + selected_profile
|
||||||
<< "--include=" + selected_profile + "/mods/"
|
<< "--include=" + selected_profile + "/mods/"
|
||||||
<< "--include=" + selected_profile + "/mods/**"
|
<< "--include=" + selected_profile + "/mods/**"
|
||||||
@ -164,7 +172,7 @@ void Launcher::update() {
|
|||||||
<< "--include=" + selected_profile + "/resourcepacks/**"
|
<< "--include=" + selected_profile + "/resourcepacks/**"
|
||||||
<< "--exclude=*"
|
<< "--exclude=*"
|
||||||
<< "--exclude=" + selected_profile + "/*"
|
<< "--exclude=" + selected_profile + "/*"
|
||||||
<< "punkcraft.ru::PunkCraft/unix/uncompressed/" << "./";
|
<< "punkcraft.ru::PunkCraft/" + OS_type + "/uncompressed/" << "./";
|
||||||
|
|
||||||
rsyncProcess2->start("rsync", modsArgs);
|
rsyncProcess2->start("rsync", modsArgs);
|
||||||
|
|
||||||
|
@ -31,6 +31,8 @@ private:
|
|||||||
MainWindow *mainWindow;
|
MainWindow *mainWindow;
|
||||||
QDir app_dir;
|
QDir app_dir;
|
||||||
QString client_dir;
|
QString client_dir;
|
||||||
|
QString OS_type;
|
||||||
|
|
||||||
|
|
||||||
QStringList sync_dirs;
|
QStringList sync_dirs;
|
||||||
QStringList sync_files;
|
QStringList sync_files;
|
||||||
|
@ -7,78 +7,92 @@
|
|||||||
#include <QCoreApplication>
|
#include <QCoreApplication>
|
||||||
#include <QString>
|
#include <QString>
|
||||||
#include <QList>
|
#include <QList>
|
||||||
|
#include <QOperatingSystemVersion>
|
||||||
|
#include <QStringList>
|
||||||
|
|
||||||
|
|
||||||
forge1_12_2::forge1_12_2() {
|
forge1_12_2::forge1_12_2() {
|
||||||
|
#ifdef Q_OS_WIN
|
||||||
|
classpath_separator = ';';
|
||||||
|
#else
|
||||||
|
classpath_separator = ':';
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
forge1_12_2::~forge1_12_2() {
|
forge1_12_2::~forge1_12_2() {
|
||||||
}
|
}
|
||||||
|
|
||||||
QStringList forge1_12_2::getCrossPlatformArgs(QString &RAM, QString &username, QString &uuid, QString &access_token, QString &garbarge_collector) {
|
QStringList forge1_12_2::getCrossPlatformArgs(QString &RAM, QString &username, QString &uuid, QString &access_token, QString &garbarge_collector) {
|
||||||
|
QStringList jarPaths = {
|
||||||
|
"../libraries/1.12.2/net/minecraftforge/forge/1.12.2-14.23.5.2860/forge-1.12.2-14.23.5.2860.jar",
|
||||||
|
"../libraries/1.12.2/org/ow2/asm/asm-debug-all/5.2/asm-debug-all-5.2.jar",
|
||||||
|
"../libraries/1.12.2/net/minecraft/launchwrapper/1.12/launchwrapper-1.12.jar",
|
||||||
|
"../libraries/1.12.2/org/jline/jline/3.5.1/jline-3.5.1.jar",
|
||||||
|
"../libraries/1.12.2/com/typesafe/akka/akka-actor_2.11/2.3.3/akka-actor_2.11-2.3.3.jar",
|
||||||
|
"../libraries/1.12.2/com/typesafe/config/1.2.1/config-1.2.1.jar",
|
||||||
|
"../libraries/1.12.2/org/scala-lang/scala-actors-migration_2.11/1.1.0/scala-actors-migration_2.11-1.1.0.jar",
|
||||||
|
"../libraries/1.12.2/org/scala-lang/scala-compiler/2.11.1/scala-compiler-2.11.1.jar",
|
||||||
|
"../libraries/1.12.2/org/scala-lang/plugins/scala-continuations-library_2.11/1.0.2_mc/scala-continuations-library_2.11-1.0.2_mc.jar",
|
||||||
|
"../libraries/1.12.2/org/scala-lang/plugins/scala-continuations-plugin_2.11.1/1.0.2_mc/scala-continuations-plugin_2.11.1-1.0.2_mc.jar",
|
||||||
|
"../libraries/1.12.2/org/scala-lang/scala-library/2.11.1/scala-library-2.11.1.jar",
|
||||||
|
"../libraries/1.12.2/org/scala-lang/scala-parser-combinators_2.11/1.0.1/scala-parser-combinators_2.11-1.0.1.jar",
|
||||||
|
"../libraries/1.12.2/org/scala-lang/scala-reflect/2.11.1/scala-reflect-2.11.1.jar",
|
||||||
|
"../libraries/1.12.2/org/scala-lang/scala-swing_2.11/1.0.1/scala-swing_2.11-1.0.1.jar",
|
||||||
|
"../libraries/1.12.2/org/scala-lang/scala-xml_2.11/1.0.2/scala-xml_2.11-1.0.2.jar",
|
||||||
|
"../libraries/1.12.2/lzma/lzma/0.0.1/lzma-0.0.1.jar",
|
||||||
|
"../libraries/1.12.2/java3d/vecmath/1.5.2/vecmath-1.5.2.jar",
|
||||||
|
"../libraries/1.12.2/net/sf/trove4j/trove4j/3.0.3/trove4j-3.0.3.jar",
|
||||||
|
"../libraries/1.12.2/org/apache/maven/maven-artifact/3.5.3/maven-artifact-3.5.3.jar",
|
||||||
|
"../libraries/1.12.2/net/sf/jopt-simple/jopt-simple/5.0.3/jopt-simple-5.0.3.jar",
|
||||||
|
"../libraries/1.12.2/org/apache/logging/log4j/log4j-api/2.15.0/log4j-api-2.15.0.jar",
|
||||||
|
"../libraries/1.12.2/org/apache/logging/log4j/log4j-core/2.15.0/log4j-core-2.15.0.jar",
|
||||||
|
"../libraries/1.12.2/com/mojang/patchy/1.3.9/patchy-1.3.9.jar",
|
||||||
|
"../libraries/1.12.2/oshi-project/oshi-core/1.1/oshi-core-1.1.jar",
|
||||||
|
"../libraries/1.12.2/net/java/dev/jna/jna/4.4.0/jna-4.4.0.jar",
|
||||||
|
"../libraries/1.12.2/net/java/dev/jna/platform/3.4.0/platform-3.4.0.jar",
|
||||||
|
"../libraries/1.12.2/com/ibm/icu/icu4j-core-mojang/51.2/icu4j-core-mojang-51.2.jar",
|
||||||
|
"../libraries/1.12.2/com/paulscode/codecjorbis/20101023/codecjorbis-20101023.jar",
|
||||||
|
"../libraries/1.12.2/com/paulscode/codecwav/20101023/codecwav-20101023.jar",
|
||||||
|
"../libraries/1.12.2/com/paulscode/libraryjavasound/20101123/libraryjavasound-20101123.jar",
|
||||||
|
"../libraries/1.12.2/com/paulscode/librarylwjglopenal/20100824/librarylwjglopenal-20100824.jar",
|
||||||
|
"../libraries/1.12.2/com/paulscode/soundsystem/20120107/soundsystem-20120107.jar",
|
||||||
|
"../libraries/1.12.2/io/netty/netty-all/4.1.9.Final/netty-all-4.1.9.Final.jar",
|
||||||
|
"../libraries/1.12.2/com/google/guava/guava/21.0/guava-21.0.jar",
|
||||||
|
"../libraries/1.12.2/org/apache/commons/commons-lang3/3.5/commons-lang3-3.5.jar",
|
||||||
|
"../libraries/1.12.2/commons-io/commons-io/2.5/commons-io-2.5.jar",
|
||||||
|
"../libraries/1.12.2/commons-codec/commons-codec/1.10/commons-codec-1.10.jar",
|
||||||
|
"../libraries/1.12.2/net/java/jinput/jinput/2.0.5/jinput-2.0.5.jar",
|
||||||
|
"../libraries/1.12.2/net/java/jutils/jutils/1.0.0/jutils-1.0.0.jar",
|
||||||
|
"../libraries/1.12.2/com/google/code/gson/gson/2.8.0/gson-2.8.0.jar",
|
||||||
|
"../libraries/1.12.2/com/mojang/authlib/1.5.25/authlib-1.5.25.jar",
|
||||||
|
"../libraries/1.12.2/com/mojang/realms/1.10.22/realms-1.10.22.jar",
|
||||||
|
"../libraries/1.12.2/org/apache/commons/commons-compress/1.8.1/commons-compress-1.8.1.jar",
|
||||||
|
"../libraries/1.12.2/org/apache/httpcomponents/httpclient/4.3.3/httpclient-4.3.3.jar",
|
||||||
|
"../libraries/1.12.2/commons-logging/commons-logging/1.1.3/commons-logging-1.1.3.jar",
|
||||||
|
"../libraries/1.12.2/org/apache/httpcomponents/httpcore/4.3.2/httpcore-4.3.2.jar",
|
||||||
|
"../libraries/1.12.2/it/unimi/dsi/fastutil/7.1.0/fastutil-7.1.0.jar",
|
||||||
|
"../libraries/1.12.2/org/lwjgl/lwjgl/lwjgl/2.9.4-nightly-20150209/lwjgl-2.9.4-nightly-20150209.jar",
|
||||||
|
"../libraries/1.12.2/org/lwjgl/lwjgl/lwjgl_util/2.9.4-nightly-20150209/lwjgl_util-2.9.4-nightly-20150209.jar",
|
||||||
|
"../libraries/1.12.2/com/mojang/text2speech/1.10.3/text2speech-1.10.3.jar",
|
||||||
|
"../versions/1.12.2-forge-14.23.5.2860/1.12.2-forge-14.23.5.2860.jar"
|
||||||
|
};
|
||||||
|
|
||||||
|
QStringList nativePaths;
|
||||||
|
for (const QString &path : jarPaths) { nativePaths << QDir::toNativeSeparators(path); }
|
||||||
|
QString classPath = nativePaths.join(classpath_separator);
|
||||||
|
|
||||||
QStringList arguments;
|
QStringList arguments;
|
||||||
arguments
|
arguments
|
||||||
<< "-Djava.library.path=../versions/1.12.2-forge-14.23.5.2860/natives"
|
<< "-Djava.library.path=" + QDir::toNativeSeparators("../versions/1.12.2-forge-14.23.5.2860/natives")
|
||||||
<< "-Xmx" + RAM
|
<< "-Xmx" + RAM
|
||||||
<< "-cp"
|
<< "-cp"
|
||||||
<< "../libraries/1.12.2/net/minecraftforge/forge/1.12.2-14.23.5.2860/forge-1.12.2-14.23.5.2860.jar:"
|
<< classPath
|
||||||
"../libraries/1.12.2/org/ow2/asm/asm-debug-all/5.2/asm-debug-all-5.2.jar:"
|
|
||||||
"../libraries/1.12.2/net/minecraft/launchwrapper/1.12/launchwrapper-1.12.jar:"
|
|
||||||
"../libraries/1.12.2/org/jline/jline/3.5.1/jline-3.5.1.jar:"
|
|
||||||
"../libraries/1.12.2/com/typesafe/akka/akka-actor_2.11/2.3.3/akka-actor_2.11-2.3.3.jar:"
|
|
||||||
"../libraries/1.12.2/com/typesafe/config/1.2.1/config-1.2.1.jar:"
|
|
||||||
"../libraries/1.12.2/org/scala-lang/scala-actors-migration_2.11/1.1.0/scala-actors-migration_2.11-1.1.0.jar:"
|
|
||||||
"../libraries/1.12.2/org/scala-lang/scala-compiler/2.11.1/scala-compiler-2.11.1.jar:"
|
|
||||||
"../libraries/1.12.2/org/scala-lang/plugins/scala-continuations-library_2.11/1.0.2_mc/scala-continuations-library_2.11-1.0.2_mc.jar:"
|
|
||||||
"../libraries/1.12.2/org/scala-lang/plugins/scala-continuations-plugin_2.11.1/1.0.2_mc/scala-continuations-plugin_2.11.1-1.0.2_mc.jar:"
|
|
||||||
"../libraries/1.12.2/org/scala-lang/scala-library/2.11.1/scala-library-2.11.1.jar:"
|
|
||||||
"../libraries/1.12.2/org/scala-lang/scala-parser-combinators_2.11/1.0.1/scala-parser-combinators_2.11-1.0.1.jar:"
|
|
||||||
"../libraries/1.12.2/org/scala-lang/scala-reflect/2.11.1/scala-reflect-2.11.1.jar:"
|
|
||||||
"../libraries/1.12.2/org/scala-lang/scala-swing_2.11/1.0.1/scala-swing_2.11-1.0.1.jar:"
|
|
||||||
"../libraries/1.12.2/org/scala-lang/scala-xml_2.11/1.0.2/scala-xml_2.11-1.0.2.jar:"
|
|
||||||
"../libraries/1.12.2/lzma/lzma/0.0.1/lzma-0.0.1.jar:"
|
|
||||||
"../libraries/1.12.2/java3d/vecmath/1.5.2/vecmath-1.5.2.jar:"
|
|
||||||
"../libraries/1.12.2/net/sf/trove4j/trove4j/3.0.3/trove4j-3.0.3.jar:"
|
|
||||||
"../libraries/1.12.2/org/apache/maven/maven-artifact/3.5.3/maven-artifact-3.5.3.jar:"
|
|
||||||
"../libraries/1.12.2/net/sf/jopt-simple/jopt-simple/5.0.3/jopt-simple-5.0.3.jar:"
|
|
||||||
"../libraries/1.12.2/org/apache/logging/log4j/log4j-api/2.15.0/log4j-api-2.15.0.jar:"
|
|
||||||
"../libraries/1.12.2/org/apache/logging/log4j/log4j-core/2.15.0/log4j-core-2.15.0.jar:"
|
|
||||||
"../libraries/1.12.2/com/mojang/patchy/1.3.9/patchy-1.3.9.jar:"
|
|
||||||
"../libraries/1.12.2/oshi-project/oshi-core/1.1/oshi-core-1.1.jar:"
|
|
||||||
"../libraries/1.12.2/net/java/dev/jna/jna/4.4.0/jna-4.4.0.jar:"
|
|
||||||
"../libraries/1.12.2/net/java/dev/jna/platform/3.4.0/platform-3.4.0.jar:"
|
|
||||||
"../libraries/1.12.2/com/ibm/icu/icu4j-core-mojang/51.2/icu4j-core-mojang-51.2.jar:"
|
|
||||||
"../libraries/1.12.2/com/paulscode/codecjorbis/20101023/codecjorbis-20101023.jar:"
|
|
||||||
"../libraries/1.12.2/com/paulscode/codecwav/20101023/codecwav-20101023.jar:"
|
|
||||||
"../libraries/1.12.2/com/paulscode/libraryjavasound/20101123/libraryjavasound-20101123.jar:"
|
|
||||||
"../libraries/1.12.2/com/paulscode/librarylwjglopenal/20100824/librarylwjglopenal-20100824.jar:"
|
|
||||||
"../libraries/1.12.2/com/paulscode/soundsystem/20120107/soundsystem-20120107.jar:"
|
|
||||||
"../libraries/1.12.2/io/netty/netty-all/4.1.9.Final/netty-all-4.1.9.Final.jar:"
|
|
||||||
"../libraries/1.12.2/com/google/guava/guava/21.0/guava-21.0.jar:"
|
|
||||||
"../libraries/1.12.2/org/apache/commons/commons-lang3/3.5/commons-lang3-3.5.jar:"
|
|
||||||
"../libraries/1.12.2/commons-io/commons-io/2.5/commons-io-2.5.jar:"
|
|
||||||
"../libraries/1.12.2/commons-codec/commons-codec/1.10/commons-codec-1.10.jar:"
|
|
||||||
"../libraries/1.12.2/net/java/jinput/jinput/2.0.5/jinput-2.0.5.jar:"
|
|
||||||
"../libraries/1.12.2/net/java/jutils/jutils/1.0.0/jutils-1.0.0.jar:"
|
|
||||||
"../libraries/1.12.2/com/google/code/gson/gson/2.8.0/gson-2.8.0.jar:"
|
|
||||||
"../libraries/1.12.2/com/mojang/authlib/1.5.25/authlib-1.5.25.jar:"
|
|
||||||
"../libraries/1.12.2/com/mojang/realms/1.10.22/realms-1.10.22.jar:"
|
|
||||||
"../libraries/1.12.2/org/apache/commons/commons-compress/1.8.1/commons-compress-1.8.1.jar:"
|
|
||||||
"../libraries/1.12.2/org/apache/httpcomponents/httpclient/4.3.3/httpclient-4.3.3.jar:"
|
|
||||||
"../libraries/1.12.2/commons-logging/commons-logging/1.1.3/commons-logging-1.1.3.jar:"
|
|
||||||
"../libraries/1.12.2/org/apache/httpcomponents/httpcore/4.3.2/httpcore-4.3.2.jar:"
|
|
||||||
"../libraries/1.12.2/it/unimi/dsi/fastutil/7.1.0/fastutil-7.1.0.jar:"
|
|
||||||
"../libraries/1.12.2/org/lwjgl/lwjgl/lwjgl/2.9.4-nightly-20150209/lwjgl-2.9.4-nightly-20150209.jar:"
|
|
||||||
"../libraries/1.12.2/org/lwjgl/lwjgl/lwjgl_util/2.9.4-nightly-20150209/lwjgl_util-2.9.4-nightly-20150209.jar:"
|
|
||||||
"../libraries/1.12.2/com/mojang/text2speech/1.10.3/text2speech-1.10.3.jar:"
|
|
||||||
"../versions/1.12.2-forge-14.23.5.2860/1.12.2-forge-14.23.5.2860.jar"
|
|
||||||
|
|
||||||
<< "-Dfml.ignoreInvalidMinecraftCertificates=true"
|
<< "-Dfml.ignoreInvalidMinecraftCertificates=true"
|
||||||
<< "-Dfml.ignorePatchDiscrepancies=true"
|
<< "-Dfml.ignorePatchDiscrepancies=true"
|
||||||
<< "-Djava.net.preferIPv4Stack=true"
|
<< "-Djava.net.preferIPv4Stack=true"
|
||||||
<< "-Dminecraft.applet.TargetDirectory=./"
|
<< "-Dminecraft.applet.TargetDirectory=" + QDir::toNativeSeparators("./")
|
||||||
<< "-DlibraryDirectory=../libraries/1.12.2"
|
<< "-DlibraryDirectory=" + QDir::toNativeSeparators("../libraries/1.12.2")
|
||||||
<< "-Dlog4j.configurationFile=./assets/1.12.2/log_configs/client-1.12.xml"
|
<< "-Dlog4j.configurationFile=" + QDir::toNativeSeparators("./assets/1.12.2/log_configs/client-1.12.xml")
|
||||||
// Garbarge Collector общие настройки
|
// Garbarge Collector общие настройки
|
||||||
<< "-XX:+UnlockExperimentalVMOptions"
|
<< "-XX:+UnlockExperimentalVMOptions"
|
||||||
//<< "-XX:+UnlockDiagnosticVMOptions"
|
//<< "-XX:+UnlockDiagnosticVMOptions"
|
||||||
@ -122,8 +136,8 @@ QStringList forge1_12_2::getCrossPlatformArgs(QString &RAM, QString &username, Q
|
|||||||
<< "net.minecraft.launchwrapper.Launch"
|
<< "net.minecraft.launchwrapper.Launch"
|
||||||
<< "--username" << username
|
<< "--username" << username
|
||||||
<< "--version" << "1.12.2-forge-14.23.5.2860"
|
<< "--version" << "1.12.2-forge-14.23.5.2860"
|
||||||
<< "--gameDir" << "./"
|
<< "--gameDir" << QDir::toNativeSeparators("./")
|
||||||
<< "--assetsDir" << "../assets/1.12.2"
|
<< "--assetsDir" << QDir::toNativeSeparators("../assets/1.12.2")
|
||||||
<< "--assetIndex" << "1.12"
|
<< "--assetIndex" << "1.12"
|
||||||
<< "--uuid" << uuid
|
<< "--uuid" << uuid
|
||||||
<< "--accessToken" << access_token
|
<< "--accessToken" << access_token
|
||||||
|
@ -16,6 +16,8 @@ public:
|
|||||||
~forge1_12_2();
|
~forge1_12_2();
|
||||||
|
|
||||||
QStringList getCrossPlatformArgs(QString &RAM, QString &username, QString &uuid, QString &access_token, QString &garbarge_collector);
|
QStringList getCrossPlatformArgs(QString &RAM, QString &username, QString &uuid, QString &access_token, QString &garbarge_collector);
|
||||||
|
private:
|
||||||
|
QChar classpath_separator;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -31,8 +31,8 @@ MainWindow::MainWindow(QWidget *parent) :
|
|||||||
// Инициализация
|
// Инициализация
|
||||||
setWindowFlags(Qt::FramelessWindowHint);
|
setWindowFlags(Qt::FramelessWindowHint);
|
||||||
setAttribute(Qt::WA_TranslucentBackground);
|
setAttribute(Qt::WA_TranslucentBackground);
|
||||||
ui->StackedWidget->setCurrentWidget(ui->load); // Окно по умолчанию
|
ui->StackedWidget->setCurrentWidget(ui->load);
|
||||||
on_selected_profile_currentTextChanged(ui->selected_profile->currentText()); // Обновление ui->selected_profile
|
on_selected_profile_currentTextChanged(ui->selected_profile->currentText());
|
||||||
|
|
||||||
|
|
||||||
backend->authWithToken([this](QString username, QString uuid, QString access_token) {
|
backend->authWithToken([this](QString username, QString uuid, QString access_token) {
|
||||||
@ -83,12 +83,9 @@ void MainWindow::on_auth_login_btn_clicked() {
|
|||||||
QString username = ui->auth_login_line->text();
|
QString username = ui->auth_login_line->text();
|
||||||
QString password = ui->auth_pass_line->text();
|
QString password = ui->auth_pass_line->text();
|
||||||
|
|
||||||
bool flag = ui->auth_save_session_check_btn->isChecked();
|
|
||||||
|
|
||||||
backend->authWithPassword(
|
backend->authWithPassword(
|
||||||
username,
|
username,
|
||||||
password,
|
password,
|
||||||
flag,
|
|
||||||
[this](QString username, QString uuid, QString access_token)
|
[this](QString username, QString uuid, QString access_token)
|
||||||
{
|
{
|
||||||
if (!username.isEmpty() && !uuid.isEmpty() && !access_token.isEmpty()) {
|
if (!username.isEmpty() && !uuid.isEmpty() && !access_token.isEmpty()) {
|
||||||
@ -117,7 +114,6 @@ void MainWindow::on_selected_profile_currentTextChanged(QString text) {
|
|||||||
int comboBoxWidth = ui->selected_profile->width();
|
int comboBoxWidth = ui->selected_profile->width();
|
||||||
int paddingLeft = (comboBoxWidth - textWidth) / 2;
|
int paddingLeft = (comboBoxWidth - textWidth) / 2;
|
||||||
|
|
||||||
// Обновление stylesheet заменой
|
|
||||||
QString currentStyleSheet = ui->selected_profile->styleSheet();
|
QString currentStyleSheet = ui->selected_profile->styleSheet();
|
||||||
QString newStyleSheet = currentStyleSheet;
|
QString newStyleSheet = currentStyleSheet;
|
||||||
if (currentStyleSheet.contains("padding-left:")) {
|
if (currentStyleSheet.contains("padding-left:")) {
|
||||||
@ -132,7 +128,6 @@ void MainWindow::on_selected_profile_currentTextChanged(QString text) {
|
|||||||
void MainWindow::on_settings_btn_clicked() {
|
void MainWindow::on_settings_btn_clicked() {
|
||||||
ui->StackedWidget->setCurrentWidget(ui->settings);
|
ui->StackedWidget->setCurrentWidget(ui->settings);
|
||||||
|
|
||||||
// Обновление значений
|
|
||||||
QString selected_profile = ui->selected_profile->currentText();
|
QString selected_profile = ui->selected_profile->currentText();
|
||||||
json_settings = settings->loadFromJson(selected_profile);
|
json_settings = settings->loadFromJson(selected_profile);
|
||||||
|
|
||||||
@ -152,6 +147,8 @@ void MainWindow::on_logout_btn_clicked() {
|
|||||||
ui->StackedWidget->setCurrentWidget(ui->auth);
|
ui->StackedWidget->setCurrentWidget(ui->auth);
|
||||||
QString session_cache = backend->getStateFilePath();
|
QString session_cache = backend->getStateFilePath();
|
||||||
QFile::remove(session_cache);
|
QFile::remove(session_cache);
|
||||||
|
ui->auth_login_line->setText("");
|
||||||
|
ui->auth_pass_line->setText("");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -253,341 +253,172 @@ QLineEdit::placeholder {
|
|||||||
</spacer>
|
</spacer>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
<widget class="QFrame" name="frame">
|
||||||
<item>
|
<property name="sizePolicy">
|
||||||
<widget class="QLabel" name="label">
|
<sizepolicy hsizetype="Maximum" vsizetype="Maximum">
|
||||||
<property name="sizePolicy">
|
<horstretch>0</horstretch>
|
||||||
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
|
<verstretch>0</verstretch>
|
||||||
<horstretch>0</horstretch>
|
</sizepolicy>
|
||||||
<verstretch>0</verstretch>
|
</property>
|
||||||
</sizepolicy>
|
<property name="minimumSize">
|
||||||
</property>
|
<size>
|
||||||
<property name="minimumSize">
|
<width>300</width>
|
||||||
<size>
|
<height>0</height>
|
||||||
<width>0</width>
|
</size>
|
||||||
<height>50</height>
|
</property>
|
||||||
</size>
|
<property name="maximumSize">
|
||||||
</property>
|
<size>
|
||||||
<property name="font">
|
<width>16777215</width>
|
||||||
<font>
|
<height>16777215</height>
|
||||||
<pointsize>16</pointsize>
|
</size>
|
||||||
<weight>50</weight>
|
</property>
|
||||||
<bold>false</bold>
|
<property name="styleSheet">
|
||||||
</font>
|
<string notr="true">QLineEdit {
|
||||||
</property>
|
border: 2px solid rgb(66, 68, 70);
|
||||||
<property name="toolTipDuration">
|
border-radius: 4px;
|
||||||
<number>6</number>
|
background-color: rgb(36, 38, 41);
|
||||||
</property>
|
padding-left: 15px;
|
||||||
<property name="styleSheet">
|
color: rgb(200, 200, 200);
|
||||||
<string notr="true">background-color: rgba(255, 255, 255, 0);</string>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Авторизация</string>
|
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignBottom|Qt::AlignHCenter</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QFrame" name="verticalFrame">
|
|
||||||
<property name="styleSheet">
|
|
||||||
<string notr="true">QFrame {
|
|
||||||
border: 0px solid rgba(255, 255, 255, 0.5);
|
|
||||||
background-color: rgba(255, 255, 255, 0);
|
|
||||||
border-radius: 10px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QFrame > QFrame {
|
QPushButton {
|
||||||
border: none; /* Убираем бордер у дочерних фреймов */
|
border: 1px solid rgb(66, 68, 70);
|
||||||
border-radius: 0; /* Убираем закругление у дочерних фреймов */
|
border-radius: 4px;
|
||||||
|
background-color: rgb(48, 50, 53);
|
||||||
|
color: rgb(200, 200, 200);
|
||||||
|
padding: 5px 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
QLineEdit {
|
QPushButton:hover {
|
||||||
padding-left: 10px; /* Отступ слева для вводимого текста */
|
background-color: rgb(46, 48, 51);
|
||||||
border: 1px solid #ccc; /* Граница */
|
|
||||||
border-radius: 5px; /* Закругленные углы */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QLineEdit::placeholder {
|
QPushButton:pressed {
|
||||||
color: gray; /* Цвет placeholder */
|
background-color: rgb(41, 43, 46);
|
||||||
padding-left: 10px; /* Отступ слева для placeholder */
|
|
||||||
}</string>
|
}</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout" stretch="0,0,0,0">
|
<layout class="QVBoxLayout" name="verticalLayout_2" stretch="1,1,4">
|
||||||
<property name="leftMargin">
|
<property name="spacing">
|
||||||
<number>0</number>
|
<number>3</number>
|
||||||
|
</property>
|
||||||
|
<property name="leftMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="topMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="rightMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="bottomMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<item>
|
||||||
|
<widget class="QLineEdit" name="auth_login_line">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
<property name="topMargin">
|
<property name="minimumSize">
|
||||||
<number>0</number>
|
<size>
|
||||||
|
<width>0</width>
|
||||||
|
<height>43</height>
|
||||||
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="rightMargin">
|
<property name="maximumSize">
|
||||||
<number>0</number>
|
<size>
|
||||||
|
<width>16777215</width>
|
||||||
|
<height>16777215</height>
|
||||||
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="bottomMargin">
|
<property name="font">
|
||||||
<number>20</number>
|
<font>
|
||||||
|
<family>Noto Sans Cherokee</family>
|
||||||
|
<pointsize>12</pointsize>
|
||||||
|
</font>
|
||||||
</property>
|
</property>
|
||||||
<item>
|
<property name="styleSheet">
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_2" stretch="0,0,0">
|
<string notr="true"/>
|
||||||
<item>
|
</property>
|
||||||
<spacer name="horizontalSpacer_3">
|
<property name="placeholderText">
|
||||||
<property name="orientation">
|
<string>Логин</string>
|
||||||
<enum>Qt::Horizontal</enum>
|
</property>
|
||||||
</property>
|
</widget>
|
||||||
<property name="sizeHint" stdset="0">
|
</item>
|
||||||
<size>
|
<item>
|
||||||
<width>40</width>
|
<widget class="QLineEdit" name="auth_pass_line">
|
||||||
<height>20</height>
|
<property name="sizePolicy">
|
||||||
</size>
|
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
|
||||||
</property>
|
<horstretch>0</horstretch>
|
||||||
</spacer>
|
<verstretch>0</verstretch>
|
||||||
</item>
|
</sizepolicy>
|
||||||
<item>
|
</property>
|
||||||
<widget class="QFrame" name="frame">
|
<property name="minimumSize">
|
||||||
<property name="sizePolicy">
|
<size>
|
||||||
<sizepolicy hsizetype="Maximum" vsizetype="Maximum">
|
<width>0</width>
|
||||||
<horstretch>0</horstretch>
|
<height>43</height>
|
||||||
<verstretch>0</verstretch>
|
</size>
|
||||||
</sizepolicy>
|
</property>
|
||||||
</property>
|
<property name="maximumSize">
|
||||||
<property name="minimumSize">
|
<size>
|
||||||
<size>
|
<width>16777215</width>
|
||||||
<width>280</width>
|
<height>16777215</height>
|
||||||
<height>125</height>
|
</size>
|
||||||
</size>
|
</property>
|
||||||
</property>
|
<property name="font">
|
||||||
<property name="maximumSize">
|
<font>
|
||||||
<size>
|
<family>Noto Sans Cherokee</family>
|
||||||
<width>280</width>
|
<pointsize>12</pointsize>
|
||||||
<height>125</height>
|
</font>
|
||||||
</size>
|
</property>
|
||||||
</property>
|
<property name="echoMode">
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_2" stretch="1,1,4">
|
<enum>QLineEdit::Password</enum>
|
||||||
<property name="spacing">
|
</property>
|
||||||
<number>6</number>
|
<property name="placeholderText">
|
||||||
</property>
|
<string>Пароль</string>
|
||||||
<property name="leftMargin">
|
</property>
|
||||||
<number>0</number>
|
</widget>
|
||||||
</property>
|
</item>
|
||||||
<property name="topMargin">
|
<item>
|
||||||
<number>0</number>
|
<widget class="QPushButton" name="auth_login_btn">
|
||||||
</property>
|
<property name="sizePolicy">
|
||||||
<property name="rightMargin">
|
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
|
||||||
<number>0</number>
|
<horstretch>0</horstretch>
|
||||||
</property>
|
<verstretch>0</verstretch>
|
||||||
<property name="bottomMargin">
|
</sizepolicy>
|
||||||
<number>0</number>
|
</property>
|
||||||
</property>
|
<property name="minimumSize">
|
||||||
<item>
|
<size>
|
||||||
<widget class="QLineEdit" name="auth_login_line">
|
<width>0</width>
|
||||||
<property name="sizePolicy">
|
<height>50</height>
|
||||||
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
|
</size>
|
||||||
<horstretch>0</horstretch>
|
</property>
|
||||||
<verstretch>0</verstretch>
|
<property name="maximumSize">
|
||||||
</sizepolicy>
|
<size>
|
||||||
</property>
|
<width>16777215</width>
|
||||||
<property name="minimumSize">
|
<height>16777215</height>
|
||||||
<size>
|
</size>
|
||||||
<width>0</width>
|
</property>
|
||||||
<height>35</height>
|
<property name="font">
|
||||||
</size>
|
<font>
|
||||||
</property>
|
<family>Source Sans Pro</family>
|
||||||
<property name="maximumSize">
|
<pointsize>16</pointsize>
|
||||||
<size>
|
<weight>50</weight>
|
||||||
<width>16777215</width>
|
<bold>false</bold>
|
||||||
<height>35</height>
|
</font>
|
||||||
</size>
|
</property>
|
||||||
</property>
|
<property name="styleSheet">
|
||||||
<property name="font">
|
<string notr="true">margin-top: 1px;</string>
|
||||||
<font>
|
</property>
|
||||||
<family>Sans Serif</family>
|
<property name="text">
|
||||||
<pointsize>10</pointsize>
|
<string>Войти в аккаунт</string>
|
||||||
</font>
|
</property>
|
||||||
</property>
|
</widget>
|
||||||
<property name="styleSheet">
|
</item>
|
||||||
<string notr="true"/>
|
</layout>
|
||||||
</property>
|
</widget>
|
||||||
<property name="placeholderText">
|
|
||||||
<string>Логин</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QLineEdit" name="auth_pass_line">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>35</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="maximumSize">
|
|
||||||
<size>
|
|
||||||
<width>16777215</width>
|
|
||||||
<height>35</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<family>Serif</family>
|
|
||||||
<pointsize>10</pointsize>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="echoMode">
|
|
||||||
<enum>QLineEdit::Password</enum>
|
|
||||||
</property>
|
|
||||||
<property name="placeholderText">
|
|
||||||
<string>Пароль</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="auth_login_btn">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>40</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="maximumSize">
|
|
||||||
<size>
|
|
||||||
<width>16777215</width>
|
|
||||||
<height>40</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<pointsize>10</pointsize>
|
|
||||||
<weight>50</weight>
|
|
||||||
<bold>false</bold>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="styleSheet">
|
|
||||||
<string notr="true"/>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Войти</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<spacer name="horizontalSpacer_4">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>40</width>
|
|
||||||
<height>20</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
|
||||||
<item>
|
|
||||||
<spacer name="horizontalSpacer">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>40</width>
|
|
||||||
<height>20</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QCheckBox" name="auth_save_session_check_btn">
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<pointsize>10</pointsize>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Не выходить с аккаунта</string>
|
|
||||||
</property>
|
|
||||||
<property name="checked">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<spacer name="horizontalSpacer_2">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>40</width>
|
|
||||||
<height>20</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<spacer name="verticalSpacer">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Vertical</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>20</width>
|
|
||||||
<height>40</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="auth_reg_label">
|
|
||||||
<property name="maximumSize">
|
|
||||||
<size>
|
|
||||||
<width>16777215</width>
|
|
||||||
<height>20</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<pointsize>10</pointsize>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="styleSheet">
|
|
||||||
<string notr="true"/>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string><html><head/><body><p><a href="https://root-kit.ru"><span style=" text-decoration: underline; color:#e9e7ff;">Регистрация</span></a></p></body></html></string>
|
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignCenter</set>
|
|
||||||
</property>
|
|
||||||
<property name="openExternalLinks">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<spacer name="horizontalSpacer_6">
|
<spacer name="horizontalSpacer_6">
|
||||||
@ -604,6 +435,22 @@ QLineEdit::placeholder {
|
|||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<spacer name="verticalSpacer">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Vertical</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeType">
|
||||||
|
<enum>QSizePolicy::Fixed</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>20</width>
|
||||||
|
<height>140</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QWidget" name="main">
|
<widget class="QWidget" name="main">
|
||||||
@ -678,14 +525,14 @@ QLineEdit::placeholder {
|
|||||||
</property>
|
</property>
|
||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>351</width>
|
<width>280</width>
|
||||||
<height>45</height>
|
<height>32</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="maximumSize">
|
<property name="maximumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>351</width>
|
<width>16777215</width>
|
||||||
<height>45</height>
|
<height>16777215</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="font">
|
<property name="font">
|
||||||
@ -719,7 +566,7 @@ QLineEdit::placeholder {
|
|||||||
и styleSheet виджета, поэтому пользуемся :)
|
и styleSheet виджета, поэтому пользуемся :)
|
||||||
Здесь padding-left как затычка чтобы в глаза не бросалось
|
Здесь padding-left как затычка чтобы в глаза не бросалось
|
||||||
*/
|
*/
|
||||||
padding-left: 100px;
|
padding-left: 60px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -1111,15 +958,19 @@ QPushButton:pressed {
|
|||||||
</property>
|
</property>
|
||||||
<property name="styleSheet">
|
<property name="styleSheet">
|
||||||
<string notr="true">QPushButton {
|
<string notr="true">QPushButton {
|
||||||
color: rgba(255,255,255,0.96);
|
border: 1px solid rgb(66, 68, 70);
|
||||||
|
border-radius: 2px;
|
||||||
|
background-color: rgb(48, 50, 53);
|
||||||
|
color: rgb(220, 220, 220);
|
||||||
|
padding: 5px 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
QPushButton:hover {
|
QPushButton:hover {
|
||||||
color: rgba(255,255,255,0.8);
|
background-color: rgb(46, 48, 51);
|
||||||
}
|
}
|
||||||
|
|
||||||
QPushButton:pressed {
|
QPushButton:pressed {
|
||||||
color: rgba(255,255,255,0.96);
|
background-color: rgb(41, 43, 46);
|
||||||
}</string>
|
}</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
|
Loading…
Reference in New Issue
Block a user