mirror of
https://github.com/UltimMC/Launcher.git
synced 2025-12-21 03:07:13 +00:00
Compare commits
7 Commits
feature/me
...
0.6.10
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e6cc65cf69 | ||
|
|
ebb17cb5f8 | ||
|
|
69490535d0 | ||
|
|
95a09ba099 | ||
|
|
6cb956b45b | ||
|
|
47fa7b3f8c | ||
|
|
d58481e0de |
@@ -46,7 +46,7 @@ set(MultiMC_NEWS_RSS_URL "https://multimc.org/rss.xml" CACHE STRING "URL to fetc
|
|||||||
######## Set version numbers ########
|
######## Set version numbers ########
|
||||||
set(MultiMC_VERSION_MAJOR 0)
|
set(MultiMC_VERSION_MAJOR 0)
|
||||||
set(MultiMC_VERSION_MINOR 6)
|
set(MultiMC_VERSION_MINOR 6)
|
||||||
set(MultiMC_VERSION_HOTFIX 8)
|
set(MultiMC_VERSION_HOTFIX 10)
|
||||||
|
|
||||||
# Build number
|
# Build number
|
||||||
set(MultiMC_VERSION_BUILD -1 CACHE STRING "Build number. -1 for no build number.")
|
set(MultiMC_VERSION_BUILD -1 CACHE STRING "Build number. -1 for no build number.")
|
||||||
@@ -88,7 +88,6 @@ find_package(Qt5Concurrent REQUIRED)
|
|||||||
find_package(Qt5Network REQUIRED)
|
find_package(Qt5Network REQUIRED)
|
||||||
find_package(Qt5Test REQUIRED)
|
find_package(Qt5Test REQUIRED)
|
||||||
find_package(Qt5Xml REQUIRED)
|
find_package(Qt5Xml REQUIRED)
|
||||||
find_package(Qt5Multimedia REQUIRED)
|
|
||||||
|
|
||||||
# The Qt5 cmake files don't provide its install paths, so ask qmake.
|
# The Qt5 cmake files don't provide its install paths, so ask qmake.
|
||||||
include(QMakeQuery)
|
include(QMakeQuery)
|
||||||
|
|||||||
@@ -151,6 +151,10 @@ VersionFilePtr OneSixVersionFormat::versionFileFromJson(const QJsonDocument &doc
|
|||||||
QJsonObject libObj = requireObject(libVal);
|
QJsonObject libObj = requireObject(libVal);
|
||||||
// parse the library
|
// parse the library
|
||||||
auto lib = libraryFromJson(libObj, filename);
|
auto lib = libraryFromJson(libObj, filename);
|
||||||
|
if(lib->rawName().artifactId() == "ForgeWrapper") {
|
||||||
|
out->mainClass.clear();
|
||||||
|
out->addProblem(ProblemSeverity::Error, QObject::tr("Forge workarounds have no place in MultiMC."));
|
||||||
|
}
|
||||||
out->libraries.append(lib);
|
out->libraries.append(lib);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -297,7 +297,7 @@ qt5_add_resources(MULTIMC_RESOURCES ${MULTIMC_QRCS})
|
|||||||
|
|
||||||
# Add executable
|
# Add executable
|
||||||
add_executable(MultiMC MACOSX_BUNDLE WIN32 ${MULTIMC_SOURCES} ${MULTIMC_UI} ${MULTIMC_RESOURCES} ${MULTIMC_RCS})
|
add_executable(MultiMC MACOSX_BUNDLE WIN32 ${MULTIMC_SOURCES} ${MULTIMC_UI} ${MULTIMC_RESOURCES} ${MULTIMC_RCS})
|
||||||
target_link_libraries(MultiMC MultiMC_gui ${QUAZIP_LIBRARIES} hoedown MultiMC_rainbow LocalPeer ganalytics Qt5::Multimedia)
|
target_link_libraries(MultiMC MultiMC_gui ${QUAZIP_LIBRARIES} hoedown MultiMC_rainbow LocalPeer ganalytics)
|
||||||
if(DEFINED MultiMC_APP_BINARY_NAME)
|
if(DEFINED MultiMC_APP_BINARY_NAME)
|
||||||
set_target_properties(MultiMC PROPERTIES OUTPUT_NAME "${MultiMC_APP_BINARY_NAME}")
|
set_target_properties(MultiMC PROPERTIES OUTPUT_NAME "${MultiMC_APP_BINARY_NAME}")
|
||||||
endif()
|
endif()
|
||||||
|
|||||||
@@ -1285,7 +1285,7 @@ void MainWindow::downloadUpdates(GoUpdate::Status status)
|
|||||||
|
|
||||||
void MainWindow::onCatToggled(bool state)
|
void MainWindow::onCatToggled(bool state)
|
||||||
{
|
{
|
||||||
setCatBackground(state, false);
|
setCatBackground(state);
|
||||||
MMC->settings()->set("TheCat", state);
|
MMC->settings()->set("TheCat", state);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1299,9 +1299,8 @@ T non_stupid_abs(T in)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::setCatBackground(bool enabled, bool initial)
|
void MainWindow::setCatBackground(bool enabled)
|
||||||
{
|
{
|
||||||
static int currentMeow = 0;
|
|
||||||
if (enabled)
|
if (enabled)
|
||||||
{
|
{
|
||||||
QDateTime now = QDateTime::currentDateTime();
|
QDateTime now = QDateTime::currentDateTime();
|
||||||
@@ -1318,28 +1317,9 @@ GroupView
|
|||||||
background-repeat: none;
|
background-repeat: none;
|
||||||
background-color:palette(base);
|
background-color:palette(base);
|
||||||
})").arg(cat));
|
})").arg(cat));
|
||||||
if(!initial) {
|
|
||||||
const char * sounds[] = {
|
|
||||||
"/home/peterix/meows/Fiona52fixed.wav",
|
|
||||||
"/home/peterix/meows/Fiona72.wav",
|
|
||||||
"/home/peterix/meows/Fiona76.wav",
|
|
||||||
"/home/peterix/meows/Fiona81.wav",
|
|
||||||
"/home/peterix/meows/Fiona85.wav"
|
|
||||||
};
|
|
||||||
qDebug() << "PLAY MEOW" << currentMeow;
|
|
||||||
meow.setSource(QUrl::fromLocalFile(sounds[currentMeow]));
|
|
||||||
meow.setLoopCount(1);
|
|
||||||
meow.play();
|
|
||||||
int newMeow = qrand() % 4;
|
|
||||||
if(newMeow == currentMeow) {
|
|
||||||
newMeow++;
|
|
||||||
}
|
|
||||||
currentMeow = newMeow;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
meow.stop();
|
|
||||||
view->setStyleSheet(QString());
|
view->setStyleSheet(QString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,7 +20,6 @@
|
|||||||
#include <QMainWindow>
|
#include <QMainWindow>
|
||||||
#include <QProcess>
|
#include <QProcess>
|
||||||
#include <QTimer>
|
#include <QTimer>
|
||||||
#include <QtMultimedia/QSoundEffect>
|
|
||||||
|
|
||||||
#include "BaseInstance.h"
|
#include "BaseInstance.h"
|
||||||
#include "minecraft/auth/MojangAccount.h"
|
#include "minecraft/auth/MojangAccount.h"
|
||||||
@@ -58,6 +57,8 @@ public:
|
|||||||
void checkInstancePathForProblems();
|
void checkInstancePathForProblems();
|
||||||
|
|
||||||
void updatesAllowedChanged(bool allowed);
|
void updatesAllowedChanged(bool allowed);
|
||||||
|
|
||||||
|
void droppedURLs(QList<QUrl> urls);
|
||||||
signals:
|
signals:
|
||||||
void isClosing();
|
void isClosing();
|
||||||
|
|
||||||
@@ -181,8 +182,6 @@ private slots:
|
|||||||
*/
|
*/
|
||||||
void downloadUpdates(GoUpdate::Status status);
|
void downloadUpdates(GoUpdate::Status status);
|
||||||
|
|
||||||
void droppedURLs(QList<QUrl> urls);
|
|
||||||
|
|
||||||
void konamiTriggered();
|
void konamiTriggered();
|
||||||
|
|
||||||
void globalSettingsClosed();
|
void globalSettingsClosed();
|
||||||
@@ -190,7 +189,7 @@ private slots:
|
|||||||
private:
|
private:
|
||||||
void addInstance(QString url = QString());
|
void addInstance(QString url = QString());
|
||||||
void activateInstance(InstancePtr instance);
|
void activateInstance(InstancePtr instance);
|
||||||
void setCatBackground(bool enabled, bool initial = true);
|
void setCatBackground(bool enabled);
|
||||||
void updateInstanceToolIcon(QString new_icon);
|
void updateInstanceToolIcon(QString new_icon);
|
||||||
void setSelectedInstanceById(const QString &id);
|
void setSelectedInstanceById(const QString &id);
|
||||||
|
|
||||||
@@ -201,8 +200,6 @@ private:
|
|||||||
private:
|
private:
|
||||||
std::unique_ptr<Ui> ui;
|
std::unique_ptr<Ui> ui;
|
||||||
|
|
||||||
QSoundEffect meow;
|
|
||||||
|
|
||||||
// these are managed by Qt's memory management model!
|
// these are managed by Qt's memory management model!
|
||||||
GroupView *view = nullptr;
|
GroupView *view = nullptr;
|
||||||
InstanceProxyModel *proxymodel = nullptr;
|
InstanceProxyModel *proxymodel = nullptr;
|
||||||
|
|||||||
@@ -34,6 +34,7 @@
|
|||||||
#include <QNetworkAccessManager>
|
#include <QNetworkAccessManager>
|
||||||
#include <QTranslator>
|
#include <QTranslator>
|
||||||
#include <QLibraryInfo>
|
#include <QLibraryInfo>
|
||||||
|
#include <QList>
|
||||||
#include <QStringList>
|
#include <QStringList>
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
#include <QStyleFactory>
|
#include <QStyleFactory>
|
||||||
@@ -173,6 +174,10 @@ MultiMC::MultiMC(int &argc, char **argv) : QApplication(argc, argv)
|
|||||||
// --alive
|
// --alive
|
||||||
parser.addSwitch("alive");
|
parser.addSwitch("alive");
|
||||||
parser.addDocumentation("alive", "Write a small '" + liveCheckFile + "' file after MultiMC starts");
|
parser.addDocumentation("alive", "Write a small '" + liveCheckFile + "' file after MultiMC starts");
|
||||||
|
// --import
|
||||||
|
parser.addOption("import");
|
||||||
|
parser.addShortOpt("import", 'I');
|
||||||
|
parser.addDocumentation("import", "Import instance from specified zip (local path or URL)");
|
||||||
|
|
||||||
// parse the arguments
|
// parse the arguments
|
||||||
try
|
try
|
||||||
@@ -207,6 +212,7 @@ MultiMC::MultiMC(int &argc, char **argv) : QApplication(argc, argv)
|
|||||||
}
|
}
|
||||||
m_instanceIdToLaunch = args["launch"].toString();
|
m_instanceIdToLaunch = args["launch"].toString();
|
||||||
m_liveCheck = args["alive"].toBool();
|
m_liveCheck = args["alive"].toBool();
|
||||||
|
m_zipToImport = args["import"].toUrl();
|
||||||
|
|
||||||
QString origcwdPath = QDir::currentPath();
|
QString origcwdPath = QDir::currentPath();
|
||||||
QString binPath = applicationDirPath();
|
QString binPath = applicationDirPath();
|
||||||
@@ -278,13 +284,20 @@ MultiMC::MultiMC(int &argc, char **argv) : QApplication(argc, argv)
|
|||||||
connect(m_peerInstance, &LocalPeer::messageReceived, this, &MultiMC::messageReceived);
|
connect(m_peerInstance, &LocalPeer::messageReceived, this, &MultiMC::messageReceived);
|
||||||
if(m_peerInstance->isClient())
|
if(m_peerInstance->isClient())
|
||||||
{
|
{
|
||||||
|
int timeout = 2000;
|
||||||
|
|
||||||
if(m_instanceIdToLaunch.isEmpty())
|
if(m_instanceIdToLaunch.isEmpty())
|
||||||
{
|
{
|
||||||
m_peerInstance->sendMessage("activate", 2000);
|
m_peerInstance->sendMessage("activate", timeout);
|
||||||
|
|
||||||
|
if(!m_zipToImport.isEmpty())
|
||||||
|
{
|
||||||
|
m_peerInstance->sendMessage("import " + m_zipToImport.toString(), timeout);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
m_peerInstance->sendMessage(m_instanceIdToLaunch, 2000);
|
m_peerInstance->sendMessage("launch " + m_instanceIdToLaunch, timeout);
|
||||||
}
|
}
|
||||||
m_status = MultiMC::Succeeded;
|
m_status = MultiMC::Succeeded;
|
||||||
return;
|
return;
|
||||||
@@ -812,6 +825,11 @@ void MultiMC::performMainStartupAction()
|
|||||||
showMainWindow(false);
|
showMainWindow(false);
|
||||||
qDebug() << "<> Main window shown.";
|
qDebug() << "<> Main window shown.";
|
||||||
}
|
}
|
||||||
|
if(!m_zipToImport.isEmpty())
|
||||||
|
{
|
||||||
|
qDebug() << "<> Importing instance from zip:" << m_zipToImport;
|
||||||
|
m_mainWindow->droppedURLs({ m_zipToImport });
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void MultiMC::showFatalErrorMessage(const QString& title, const QString& content)
|
void MultiMC::showFatalErrorMessage(const QString& title, const QString& content)
|
||||||
@@ -848,18 +866,40 @@ void MultiMC::messageReceived(const QString& message)
|
|||||||
qDebug() << "Received message" << message << "while still initializing. It will be ignored.";
|
qDebug() << "Received message" << message << "while still initializing. It will be ignored.";
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(message == "activate")
|
|
||||||
|
QStringList args = message.split(' ');
|
||||||
|
QString command = args.takeFirst();
|
||||||
|
|
||||||
|
if(command == "activate")
|
||||||
{
|
{
|
||||||
showMainWindow();
|
showMainWindow();
|
||||||
}
|
}
|
||||||
else
|
else if(command == "import")
|
||||||
{
|
{
|
||||||
auto inst = instances()->getInstanceById(message);
|
if(args.isEmpty())
|
||||||
|
{
|
||||||
|
qWarning() << "Received" << command << "message without a zip path/URL.";
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
m_mainWindow->droppedURLs({ QUrl(args.takeFirst()) });
|
||||||
|
}
|
||||||
|
else if(command == "launch")
|
||||||
|
{
|
||||||
|
if(args.isEmpty())
|
||||||
|
{
|
||||||
|
qWarning() << "Received" << command << "message without an instance ID.";
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
auto inst = instances()->getInstanceById(args.takeFirst());
|
||||||
if(inst)
|
if(inst)
|
||||||
{
|
{
|
||||||
launch(inst, true, nullptr);
|
launch(inst, true, nullptr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
qWarning() << "Received invalid message" << message;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void MultiMC::analyticsSettingChanged(const Setting&, QVariant value)
|
void MultiMC::analyticsSettingChanged(const Setting&, QVariant value)
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
#include <QFlag>
|
#include <QFlag>
|
||||||
#include <QIcon>
|
#include <QIcon>
|
||||||
#include <QDateTime>
|
#include <QDateTime>
|
||||||
|
#include <QUrl>
|
||||||
#include <updater/GoUpdate.h>
|
#include <updater/GoUpdate.h>
|
||||||
|
|
||||||
#include <BaseInstance.h>
|
#include <BaseInstance.h>
|
||||||
@@ -221,5 +222,6 @@ private:
|
|||||||
public:
|
public:
|
||||||
QString m_instanceIdToLaunch;
|
QString m_instanceIdToLaunch;
|
||||||
bool m_liveCheck = false;
|
bool m_liveCheck = false;
|
||||||
|
QUrl m_zipToImport;
|
||||||
std::unique_ptr<QFile> logFile;
|
std::unique_ptr<QFile> logFile;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
[Desktop Entry]
|
[Desktop Entry]
|
||||||
Version=1.0
|
Version=1.0
|
||||||
Name=MultiMC
|
Name=MultiMC
|
||||||
GenericName=MultiMC
|
GenericName=Minecraft Launcher
|
||||||
Comment=Free, open source launcher and instance manager for Minecraft.
|
Comment=Free, open source launcher and instance manager for Minecraft.
|
||||||
Type=Application
|
Type=Application
|
||||||
Terminal=false
|
Terminal=false
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ MultiMC also migrated to a new continuous deployment system, which makes everyth
|
|||||||
|
|
||||||
- GH-2787: "Download All" button works again.
|
- GH-2787: "Download All" button works again.
|
||||||
|
|
||||||
- When dependencies are customized, the la ncher will not try to update them in an infinite loop when something else requires a different version.
|
- When a component is customized, the launcher will not try to update it in an infinite loop when something else requires a different version.
|
||||||
|
|
||||||
# Previous releases
|
# Previous releases
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user