NOISSUE make shared logic library ... shared
This commit is contained in:
parent
cd108fd029
commit
23d0bd8edd
@ -1,4 +1,4 @@
|
|||||||
cmake_minimum_required(VERSION 2.8.9)
|
cmake_minimum_required(VERSION 3.2.0)
|
||||||
|
|
||||||
string(COMPARE EQUAL "${CMAKE_SOURCE_DIR}" "${CMAKE_BUILD_DIR}" IS_IN_SOURCE_BUILD)
|
string(COMPARE EQUAL "${CMAKE_SOURCE_DIR}" "${CMAKE_BUILD_DIR}" IS_IN_SOURCE_BUILD)
|
||||||
if(IS_IN_SOURCE_BUILD)
|
if(IS_IN_SOURCE_BUILD)
|
||||||
@ -34,8 +34,10 @@ set(CMAKE_JAVA_TARGET_OUTPUT_DIR ${PROJECT_BINARY_DIR}/jars)
|
|||||||
######## Set compiler flags ########
|
######## Set compiler flags ########
|
||||||
include(UseCXX14)
|
include(UseCXX14)
|
||||||
include(Coverage)
|
include(Coverage)
|
||||||
|
include(GenerateExportHeader)
|
||||||
set(CMAKE_CXX_FLAGS " -Wall ${CMAKE_CXX_FLAGS}")
|
set(CMAKE_CXX_FLAGS " -Wall ${CMAKE_CXX_FLAGS}")
|
||||||
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Werror=return-type")
|
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Werror=return-type")
|
||||||
|
set(CMAKE_CXX_VISIBILITY_PRESET hidden)
|
||||||
|
|
||||||
# cmake code needed for the coverity scan upload
|
# cmake code needed for the coverity scan upload
|
||||||
include(Coverity)
|
include(Coverity)
|
||||||
|
@ -323,7 +323,7 @@ if(WIN32)
|
|||||||
set(MultiMC_LINK_ADDITIONAL_LIBS ${MultiMC_LINK_ADDITIONAL_LIBS} Qt5::WinMain)
|
set(MultiMC_LINK_ADDITIONAL_LIBS ${MultiMC_LINK_ADDITIONAL_LIBS} Qt5::WinMain)
|
||||||
endif(WIN32)
|
endif(WIN32)
|
||||||
|
|
||||||
include_directories(../logic)
|
include_directories(../logic ${CMAKE_CURRENT_BINARY_DIR}/../logic)
|
||||||
|
|
||||||
# Qt 5 stuff
|
# Qt 5 stuff
|
||||||
qt5_wrap_ui(MULTIMC_UI ${MULTIMC_UIS})
|
qt5_wrap_ui(MULTIMC_UI ${MULTIMC_UIS})
|
||||||
|
@ -1105,6 +1105,8 @@ void MainWindow::instanceFromZipPack(QString instName, QString instGroup, QStrin
|
|||||||
errorMsg += tr("Not an instance");
|
errorMsg += tr("Not an instance");
|
||||||
CustomMessageBox::selectable(this, tr("Error"), errorMsg, QMessageBox::Warning)->show();
|
CustomMessageBox::selectable(this, tr("Error"), errorMsg, QMessageBox::Warning)->show();
|
||||||
return;
|
return;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
newInstance->setName(instName);
|
newInstance->setName(instName);
|
||||||
|
@ -70,7 +70,7 @@ private:
|
|||||||
private:
|
private:
|
||||||
Ui::OtherLogsPage *ui;
|
Ui::OtherLogsPage *ui;
|
||||||
QString m_path;
|
QString m_path;
|
||||||
RecursiveFileSystemWatcher *m_watcher;
|
|
||||||
QString m_currentFile;
|
QString m_currentFile;
|
||||||
IPathMatcher::Ptr m_fileFilter;
|
IPathMatcher::Ptr m_fileFilter;
|
||||||
|
RecursiveFileSystemWatcher *m_watcher;
|
||||||
};
|
};
|
||||||
|
@ -17,6 +17,8 @@
|
|||||||
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
|
#include "multimc_logic_export.h"
|
||||||
|
|
||||||
class OneSixInstance;
|
class OneSixInstance;
|
||||||
class QDir;
|
class QDir;
|
||||||
class QString;
|
class QString;
|
||||||
@ -25,7 +27,7 @@ class Task;
|
|||||||
struct BaseVersion;
|
struct BaseVersion;
|
||||||
typedef std::shared_ptr<BaseVersion> BaseVersionPtr;
|
typedef std::shared_ptr<BaseVersion> BaseVersionPtr;
|
||||||
|
|
||||||
class BaseInstaller
|
class MULTIMC_LOGIC_EXPORT BaseInstaller
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
BaseInstaller();
|
BaseInstaller();
|
||||||
|
@ -28,6 +28,8 @@
|
|||||||
#include "launch/MessageLevel.h"
|
#include "launch/MessageLevel.h"
|
||||||
#include "pathmatcher/IPathMatcher.h"
|
#include "pathmatcher/IPathMatcher.h"
|
||||||
|
|
||||||
|
#include "multimc_logic_export.h"
|
||||||
|
|
||||||
class QDir;
|
class QDir;
|
||||||
class Task;
|
class Task;
|
||||||
class LaunchTask;
|
class LaunchTask;
|
||||||
@ -44,7 +46,7 @@ typedef std::shared_ptr<BaseInstance> InstancePtr;
|
|||||||
* To create a new instance type, create a new class inheriting from this class
|
* To create a new instance type, create a new class inheriting from this class
|
||||||
* and implement the pure virtual functions.
|
* and implement the pure virtual functions.
|
||||||
*/
|
*/
|
||||||
class BaseInstance : public QObject, public std::enable_shared_from_this<BaseInstance>
|
class MULTIMC_LOGIC_EXPORT BaseInstance : public QObject, public std::enable_shared_from_this<BaseInstance>
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
protected:
|
protected:
|
||||||
|
@ -20,8 +20,8 @@
|
|||||||
#include <QAbstractListModel>
|
#include <QAbstractListModel>
|
||||||
|
|
||||||
#include "BaseVersion.h"
|
#include "BaseVersion.h"
|
||||||
|
#include "tasks/Task.h"
|
||||||
class Task;
|
#include "multimc_logic_export.h"
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Class that each instance type's version list derives from.
|
* \brief Class that each instance type's version list derives from.
|
||||||
@ -35,7 +35,7 @@ class Task;
|
|||||||
* all have a default implementation, but they can be overridden by plugins to
|
* all have a default implementation, but they can be overridden by plugins to
|
||||||
* change the behavior of the list.
|
* change the behavior of the list.
|
||||||
*/
|
*/
|
||||||
class BaseVersionList : public QAbstractListModel
|
class MULTIMC_LOGIC_EXPORT BaseVersionList : public QAbstractListModel
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
|
@ -308,7 +308,9 @@ if(WIN32)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Add common library
|
# Add common library
|
||||||
add_library(MultiMC_logic STATIC ${LOGIC_SOURCES})
|
add_library(MultiMC_logic SHARED ${LOGIC_SOURCES})
|
||||||
|
|
||||||
|
generate_export_header(MultiMC_logic)
|
||||||
|
|
||||||
# Use system zlib on unix and Qt ZLIB on Windows
|
# Use system zlib on unix and Qt ZLIB on Windows
|
||||||
if(UNIX)
|
if(UNIX)
|
||||||
@ -328,3 +330,5 @@ target_link_libraries(MultiMC_logic xz-embedded unpack200 iconfix libUtil Logica
|
|||||||
${ZLIB_LIBRARIES} ${MultiMC_LINK_ADDITIONAL_LIBS})
|
${ZLIB_LIBRARIES} ${MultiMC_LINK_ADDITIONAL_LIBS})
|
||||||
|
|
||||||
add_dependencies(MultiMC_logic QuaZIP)
|
add_dependencies(MultiMC_logic QuaZIP)
|
||||||
|
|
||||||
|
include_directories(${CMAKE_CURRENT_BINARY_DIR})
|
||||||
|
@ -4,6 +4,8 @@
|
|||||||
#include <QString>
|
#include <QString>
|
||||||
#include <QMap>
|
#include <QMap>
|
||||||
|
|
||||||
|
#include "multimc_logic_export.h"
|
||||||
|
|
||||||
class IconList;
|
class IconList;
|
||||||
class QNetworkAccessManager;
|
class QNetworkAccessManager;
|
||||||
class HttpMetaCache;
|
class HttpMetaCache;
|
||||||
@ -15,7 +17,7 @@ class BaseVersion;
|
|||||||
#endif
|
#endif
|
||||||
#define ENV (Env::getInstance())
|
#define ENV (Env::getInstance())
|
||||||
|
|
||||||
class Env
|
class MULTIMC_LOGIC_EXPORT Env
|
||||||
{
|
{
|
||||||
friend class MultiMC;
|
friend class MultiMC;
|
||||||
private:
|
private:
|
||||||
|
@ -6,7 +6,9 @@
|
|||||||
#include <QLoggingCategory>
|
#include <QLoggingCategory>
|
||||||
#include <exception>
|
#include <exception>
|
||||||
|
|
||||||
class Exception : public std::exception
|
#include "multimc_logic_export.h"
|
||||||
|
|
||||||
|
class MULTIMC_LOGIC_EXPORT Exception : public std::exception
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
Exception(const QString &message) : std::exception(), m_message(message)
|
Exception(const QString &message) : std::exception(), m_message(message)
|
||||||
@ -30,12 +32,3 @@ public:
|
|||||||
private:
|
private:
|
||||||
QString m_message;
|
QString m_message;
|
||||||
};
|
};
|
||||||
|
|
||||||
#define DECLARE_EXCEPTION(name) \
|
|
||||||
class name##Exception : public ::Exception \
|
|
||||||
{ \
|
|
||||||
public: \
|
|
||||||
name##Exception(const QString &message) : Exception(message) \
|
|
||||||
{ \
|
|
||||||
} \
|
|
||||||
}
|
|
||||||
|
@ -4,10 +4,17 @@
|
|||||||
|
|
||||||
#include "Exception.h"
|
#include "Exception.h"
|
||||||
|
|
||||||
|
#include "multimc_logic_export.h"
|
||||||
|
|
||||||
namespace FS
|
namespace FS
|
||||||
{
|
{
|
||||||
DECLARE_EXCEPTION(FileSystem);
|
|
||||||
|
|
||||||
void write(const QString &filename, const QByteArray &data);
|
class MULTIMC_LOGIC_EXPORT FileSystemException : public ::Exception
|
||||||
QByteArray read(const QString &filename);
|
{
|
||||||
|
public:
|
||||||
|
FileSystemException(const QString &message) : Exception(message) {}
|
||||||
|
};
|
||||||
|
|
||||||
|
void MULTIMC_LOGIC_EXPORT write(const QString &filename, const QByteArray &data);
|
||||||
|
QByteArray MULTIMC_LOGIC_EXPORT read(const QString &filename);
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,9 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
#include <QByteArray>
|
#include <QByteArray>
|
||||||
|
|
||||||
class GZip
|
#include "multimc_logic_export.h"
|
||||||
|
|
||||||
|
class MULTIMC_LOGIC_EXPORT GZip
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
static bool inflate(const QByteArray &compressedBytes, QByteArray &uncompressedBytes);
|
static bool inflate(const QByteArray &compressedBytes, QByteArray &uncompressedBytes);
|
||||||
|
@ -21,10 +21,12 @@
|
|||||||
|
|
||||||
#include "BaseInstance.h"
|
#include "BaseInstance.h"
|
||||||
|
|
||||||
|
#include "multimc_logic_export.h"
|
||||||
|
|
||||||
class BaseInstance;
|
class BaseInstance;
|
||||||
class QDir;
|
class QDir;
|
||||||
|
|
||||||
class InstanceList : public QAbstractListModel
|
class MULTIMC_LOGIC_EXPORT InstanceList : public QAbstractListModel
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
private:
|
private:
|
||||||
|
@ -16,7 +16,11 @@
|
|||||||
|
|
||||||
namespace Json
|
namespace Json
|
||||||
{
|
{
|
||||||
DECLARE_EXCEPTION(Json);
|
class MULTIMC_LOGIC_EXPORT JsonException : public ::Exception
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
JsonException(const QString &message) : Exception(message) {}
|
||||||
|
};
|
||||||
|
|
||||||
/// @throw FileSystemException
|
/// @throw FileSystemException
|
||||||
void write(const QJsonDocument &doc, const QString &filename);
|
void write(const QJsonDocument &doc, const QString &filename);
|
||||||
|
@ -2,7 +2,9 @@
|
|||||||
|
|
||||||
#include <QString>
|
#include <QString>
|
||||||
|
|
||||||
|
#include "multimc_logic_export.h"
|
||||||
|
|
||||||
namespace Strings
|
namespace Strings
|
||||||
{
|
{
|
||||||
int naturalCompare(const QString &s1, const QString &s2, Qt::CaseSensitivity cs);
|
int MULTIMC_LOGIC_EXPORT naturalCompare(const QString &s1, const QString &s2, Qt::CaseSensitivity cs);
|
||||||
}
|
}
|
||||||
|
@ -7,6 +7,8 @@
|
|||||||
#include "SeparatorPrefixTree.h"
|
#include "SeparatorPrefixTree.h"
|
||||||
#include <functional>
|
#include <functional>
|
||||||
|
|
||||||
|
#include "multimc_logic_export.h"
|
||||||
|
|
||||||
class QuaZip;
|
class QuaZip;
|
||||||
|
|
||||||
namespace MMCZip
|
namespace MMCZip
|
||||||
@ -19,7 +21,7 @@ namespace MMCZip
|
|||||||
* \param recursive Whether to pack sub-directories as well or only files.
|
* \param recursive Whether to pack sub-directories as well or only files.
|
||||||
* \return true if success, false otherwise.
|
* \return true if success, false otherwise.
|
||||||
*/
|
*/
|
||||||
bool compressSubDir(QuaZip *zip, QString dir, QString origDir, QSet<QString> &added,
|
bool MULTIMC_LOGIC_EXPORT compressSubDir(QuaZip *zip, QString dir, QString origDir, QSet<QString> &added,
|
||||||
QString prefix = QString(), const SeparatorPrefixTree <'/'> * blacklist = nullptr);
|
QString prefix = QString(), const SeparatorPrefixTree <'/'> * blacklist = nullptr);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -29,23 +31,23 @@ namespace MMCZip
|
|||||||
* \param recursive Whether to pack the subdirectories as well, or just regular files.
|
* \param recursive Whether to pack the subdirectories as well, or just regular files.
|
||||||
* \return true if success, false otherwise.
|
* \return true if success, false otherwise.
|
||||||
*/
|
*/
|
||||||
bool compressDir(QString zipFile, QString dir, QString prefix = QString(), const SeparatorPrefixTree <'/'> * blacklist = nullptr);
|
bool MULTIMC_LOGIC_EXPORT compressDir(QString zipFile, QString dir, QString prefix = QString(), const SeparatorPrefixTree <'/'> * blacklist = nullptr);
|
||||||
|
|
||||||
/// filter function for @mergeZipFiles - passthrough
|
/// filter function for @mergeZipFiles - passthrough
|
||||||
bool noFilter(QString key);
|
bool MULTIMC_LOGIC_EXPORT noFilter(QString key);
|
||||||
|
|
||||||
/// filter function for @mergeZipFiles - ignores METAINF
|
/// filter function for @mergeZipFiles - ignores METAINF
|
||||||
bool metaInfFilter(QString key);
|
bool MULTIMC_LOGIC_EXPORT metaInfFilter(QString key);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Merge two zip files, using a filter function
|
* Merge two zip files, using a filter function
|
||||||
*/
|
*/
|
||||||
bool mergeZipFiles(QuaZip *into, QFileInfo from, QSet<QString> &contained, std::function<bool(QString)> filter);
|
bool MULTIMC_LOGIC_EXPORT mergeZipFiles(QuaZip *into, QFileInfo from, QSet<QString> &contained, std::function<bool(QString)> filter);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* take a source jar, add mods to it, resulting in target jar
|
* take a source jar, add mods to it, resulting in target jar
|
||||||
*/
|
*/
|
||||||
bool createModdedJar(QString sourceJarPath, QString targetJarPath, const QList<Mod>& mods);
|
bool MULTIMC_LOGIC_EXPORT createModdedJar(QString sourceJarPath, QString targetJarPath, const QList<Mod>& mods);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Extract a whole archive.
|
* Extract a whole archive.
|
||||||
@ -55,5 +57,5 @@ namespace MMCZip
|
|||||||
* left empty.
|
* left empty.
|
||||||
* \return The list of the full paths of the files extracted, empty on failure.
|
* \return The list of the full paths of the files extracted, empty on failure.
|
||||||
*/
|
*/
|
||||||
QStringList extractDir(QString fileCompressed, QString dir = QString());
|
QStringList MULTIMC_LOGIC_EXPORT extractDir(QString fileCompressed, QString dir = QString());
|
||||||
}
|
}
|
@ -4,7 +4,9 @@
|
|||||||
#include <QDir>
|
#include <QDir>
|
||||||
#include "pathmatcher/IPathMatcher.h"
|
#include "pathmatcher/IPathMatcher.h"
|
||||||
|
|
||||||
class RecursiveFileSystemWatcher : public QObject
|
#include "multimc_logic_export.h"
|
||||||
|
|
||||||
|
class MULTIMC_LOGIC_EXPORT RecursiveFileSystemWatcher : public QObject
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
|
@ -4,13 +4,15 @@
|
|||||||
#include <QMultiMap>
|
#include <QMultiMap>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
|
#include "multimc_logic_export.h"
|
||||||
|
|
||||||
struct User
|
struct User
|
||||||
{
|
{
|
||||||
QString id;
|
QString id;
|
||||||
QMultiMap<QString, QString> properties;
|
QMultiMap<QString, QString> properties;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct AuthSession
|
struct MULTIMC_LOGIC_EXPORT AuthSession
|
||||||
{
|
{
|
||||||
bool MakeOffline(QString offline_playername);
|
bool MakeOffline(QString offline_playername);
|
||||||
|
|
||||||
|
@ -25,6 +25,9 @@
|
|||||||
#include <memory>
|
#include <memory>
|
||||||
#include "AuthSession.h"
|
#include "AuthSession.h"
|
||||||
|
|
||||||
|
#include "multimc_logic_export.h"
|
||||||
|
MULTIMC_LOGIC_EXPORT
|
||||||
|
|
||||||
class Task;
|
class Task;
|
||||||
class YggdrasilTask;
|
class YggdrasilTask;
|
||||||
class MojangAccount;
|
class MojangAccount;
|
||||||
@ -58,7 +61,7 @@ enum AccountStatus
|
|||||||
* Said information may include things such as that account's username, client token, and access
|
* Said information may include things such as that account's username, client token, and access
|
||||||
* token if the user chose to stay logged in.
|
* token if the user chose to stay logged in.
|
||||||
*/
|
*/
|
||||||
class MojangAccount : public QObject
|
class MULTIMC_LOGIC_EXPORT MojangAccount : public QObject
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public: /* construction */
|
public: /* construction */
|
||||||
|
@ -22,6 +22,8 @@
|
|||||||
|
|
||||||
#include "auth/MojangAccount.h"
|
#include "auth/MojangAccount.h"
|
||||||
|
|
||||||
|
#include "multimc_logic_export.h"
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief List of available Mojang accounts.
|
* \brief List of available Mojang accounts.
|
||||||
* This should be loaded in the background by MultiMC on startup.
|
* This should be loaded in the background by MultiMC on startup.
|
||||||
@ -31,7 +33,7 @@
|
|||||||
* all have a default implementation, but they can be overridden by subclasses to
|
* all have a default implementation, but they can be overridden by subclasses to
|
||||||
* change the behavior of the list.
|
* change the behavior of the list.
|
||||||
*/
|
*/
|
||||||
class MojangAccountList : public QAbstractListModel
|
class MULTIMC_LOGIC_EXPORT MojangAccountList : public QAbstractListModel
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
@ -126,7 +128,7 @@ public:
|
|||||||
* If the username given is an empty string, sets the active account to nothing.
|
* If the username given is an empty string, sets the active account to nothing.
|
||||||
*/
|
*/
|
||||||
virtual void setActiveAccount(const QString &username);
|
virtual void setActiveAccount(const QString &username);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* Returns true if any of the account is at least Validated
|
* Returns true if any of the account is at least Validated
|
||||||
*/
|
*/
|
||||||
|
@ -20,11 +20,13 @@
|
|||||||
#include <QString>
|
#include <QString>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
|
#include "multimc_logic_export.h"
|
||||||
|
|
||||||
class MinecraftProfile;
|
class MinecraftProfile;
|
||||||
class ForgeInstallTask;
|
class ForgeInstallTask;
|
||||||
struct ForgeVersion;
|
struct ForgeVersion;
|
||||||
|
|
||||||
class ForgeInstaller : public BaseInstaller
|
class MULTIMC_LOGIC_EXPORT ForgeInstaller : public BaseInstaller
|
||||||
{
|
{
|
||||||
friend class ForgeInstallTask;
|
friend class ForgeInstallTask;
|
||||||
public:
|
public:
|
||||||
|
@ -25,7 +25,9 @@
|
|||||||
#include "net/NetJob.h"
|
#include "net/NetJob.h"
|
||||||
#include "forge/ForgeVersion.h"
|
#include "forge/ForgeVersion.h"
|
||||||
|
|
||||||
class ForgeVersionList : public BaseVersionList
|
#include "multimc_logic_export.h"
|
||||||
|
|
||||||
|
class MULTIMC_LOGIC_EXPORT ForgeVersionList : public BaseVersionList
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
|
@ -2,8 +2,10 @@
|
|||||||
|
|
||||||
#include <BaseInstance.h>
|
#include <BaseInstance.h>
|
||||||
|
|
||||||
|
#include "multimc_logic_export.h"
|
||||||
|
|
||||||
// Pseudo-plugin for FTB related things. Super derpy!
|
// Pseudo-plugin for FTB related things. Super derpy!
|
||||||
class FTBPlugin
|
class MULTIMC_LOGIC_EXPORT FTBPlugin
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
static void initialize(SettingsObjectPtr globalSettings);
|
static void initialize(SettingsObjectPtr globalSettings);
|
||||||
|
@ -25,9 +25,11 @@
|
|||||||
#include "settings/Setting.h"
|
#include "settings/Setting.h"
|
||||||
#include "Env.h" // there is a global icon list inside Env.
|
#include "Env.h" // there is a global icon list inside Env.
|
||||||
|
|
||||||
|
#include "multimc_logic_export.h"
|
||||||
|
|
||||||
class QFileSystemWatcher;
|
class QFileSystemWatcher;
|
||||||
|
|
||||||
class IconList : public QAbstractListModel
|
class MULTIMC_LOGIC_EXPORT IconList : public QAbstractListModel
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
|
@ -17,7 +17,10 @@
|
|||||||
#include <QString>
|
#include <QString>
|
||||||
#include <QDateTime>
|
#include <QDateTime>
|
||||||
#include <QIcon>
|
#include <QIcon>
|
||||||
struct MMCImage
|
|
||||||
|
#include "multimc_logic_export.h"
|
||||||
|
|
||||||
|
struct MULTIMC_LOGIC_EXPORT MMCImage
|
||||||
{
|
{
|
||||||
QIcon icon;
|
QIcon icon;
|
||||||
QString filename;
|
QString filename;
|
||||||
@ -28,7 +31,7 @@ struct MMCImage
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
struct MMCIcon
|
struct MULTIMC_LOGIC_EXPORT MMCIcon
|
||||||
{
|
{
|
||||||
enum Type : unsigned
|
enum Type : unsigned
|
||||||
{
|
{
|
||||||
|
@ -3,6 +3,8 @@
|
|||||||
#include <QTimer>
|
#include <QTimer>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
|
#include "multimc_logic_export.h"
|
||||||
|
|
||||||
class JavaChecker;
|
class JavaChecker;
|
||||||
|
|
||||||
|
|
||||||
@ -20,7 +22,7 @@ struct JavaCheckResult
|
|||||||
|
|
||||||
typedef std::shared_ptr<QProcess> QProcessPtr;
|
typedef std::shared_ptr<QProcess> QProcessPtr;
|
||||||
typedef std::shared_ptr<JavaChecker> JavaCheckerPtr;
|
typedef std::shared_ptr<JavaChecker> JavaCheckerPtr;
|
||||||
class JavaChecker : public QObject
|
class MULTIMC_LOGIC_EXPORT JavaChecker : public QObject
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
|
@ -27,7 +27,9 @@
|
|||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
class JavaUtils : public QObject
|
#include "multimc_logic_export.h"
|
||||||
|
|
||||||
|
class MULTIMC_LOGIC_EXPORT JavaUtils : public QObject
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
|
@ -22,6 +22,8 @@
|
|||||||
#include "tasks/Task.h"
|
#include "tasks/Task.h"
|
||||||
#include "java/JavaCheckerJob.h"
|
#include "java/JavaCheckerJob.h"
|
||||||
|
|
||||||
|
#include "multimc_logic_export.h"
|
||||||
|
|
||||||
class JavaListLoadTask;
|
class JavaListLoadTask;
|
||||||
|
|
||||||
struct JavaVersion : public BaseVersion
|
struct JavaVersion : public BaseVersion
|
||||||
@ -54,7 +56,7 @@ struct JavaVersion : public BaseVersion
|
|||||||
|
|
||||||
typedef std::shared_ptr<JavaVersion> JavaVersionPtr;
|
typedef std::shared_ptr<JavaVersion> JavaVersionPtr;
|
||||||
|
|
||||||
class JavaVersionList : public BaseVersionList
|
class MULTIMC_LOGIC_EXPORT JavaVersionList : public BaseVersionList
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
|
@ -22,7 +22,9 @@
|
|||||||
#include "LoggedProcess.h"
|
#include "LoggedProcess.h"
|
||||||
#include "LaunchStep.h"
|
#include "LaunchStep.h"
|
||||||
|
|
||||||
class LaunchTask: public Task
|
#include "multimc_logic_export.h"
|
||||||
|
|
||||||
|
class MULTIMC_LOGIC_EXPORT LaunchTask: public Task
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
protected:
|
protected:
|
||||||
|
@ -57,7 +57,6 @@ void CheckJava::executeTask()
|
|||||||
if (javaUnixTime != storedUnixTime)
|
if (javaUnixTime != storedUnixTime)
|
||||||
{
|
{
|
||||||
m_JavaChecker = std::make_shared<JavaChecker>();
|
m_JavaChecker = std::make_shared<JavaChecker>();
|
||||||
bool successful = false;
|
|
||||||
QString errorLog;
|
QString errorLog;
|
||||||
QString version;
|
QString version;
|
||||||
emit logLine(tr("Checking Java version..."), MessageLevel::MultiMC);
|
emit logLine(tr("Checking Java version..."), MessageLevel::MultiMC);
|
||||||
|
@ -81,8 +81,8 @@ void LaunchMinecraft::on_state(LoggedProcess::State state)
|
|||||||
case LoggedProcess::Finished:
|
case LoggedProcess::Finished:
|
||||||
{
|
{
|
||||||
m_parent->setPid(-1);
|
m_parent->setPid(-1);
|
||||||
auto exitCode = m_process.exitCode();
|
|
||||||
//FIXME: make this work again
|
//FIXME: make this work again
|
||||||
|
// auto exitCode = m_process.exitCode();
|
||||||
// m_postlaunchprocess.processEnvironment().insert("INST_EXITCODE", QString(exitCode));
|
// m_postlaunchprocess.processEnvironment().insert("INST_EXITCODE", QString(exitCode));
|
||||||
// run post-exit
|
// run post-exit
|
||||||
emitSucceeded();
|
emitSucceeded();
|
||||||
|
@ -19,7 +19,13 @@
|
|||||||
#include <launch/LoggedProcess.h>
|
#include <launch/LoggedProcess.h>
|
||||||
#include <java/JavaChecker.h>
|
#include <java/JavaChecker.h>
|
||||||
|
|
||||||
class TextPrint: public LaunchStep
|
#include "multimc_logic_export.h"
|
||||||
|
|
||||||
|
/*
|
||||||
|
* FIXME: maybe do not export
|
||||||
|
*/
|
||||||
|
|
||||||
|
class MULTIMC_LOGIC_EXPORT TextPrint: public LaunchStep
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
|
@ -21,7 +21,9 @@
|
|||||||
#include "BaseInstaller.h"
|
#include "BaseInstaller.h"
|
||||||
#include "liteloader/LiteLoaderVersionList.h"
|
#include "liteloader/LiteLoaderVersionList.h"
|
||||||
|
|
||||||
class LiteLoaderInstaller : public BaseInstaller
|
#include "multimc_logic_export.h"
|
||||||
|
|
||||||
|
class MULTIMC_LOGIC_EXPORT LiteLoaderInstaller : public BaseInstaller
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
LiteLoaderInstaller();
|
LiteLoaderInstaller();
|
||||||
|
@ -25,6 +25,8 @@
|
|||||||
#include "net/NetJob.h"
|
#include "net/NetJob.h"
|
||||||
#include <minecraft/RawLibrary.h>
|
#include <minecraft/RawLibrary.h>
|
||||||
|
|
||||||
|
#include "multimc_logic_export.h"
|
||||||
|
|
||||||
class LLListLoadTask;
|
class LLListLoadTask;
|
||||||
class QNetworkReply;
|
class QNetworkReply;
|
||||||
|
|
||||||
@ -65,7 +67,7 @@ public:
|
|||||||
};
|
};
|
||||||
typedef std::shared_ptr<LiteLoaderVersion> LiteLoaderVersionPtr;
|
typedef std::shared_ptr<LiteLoaderVersion> LiteLoaderVersionPtr;
|
||||||
|
|
||||||
class LiteLoaderVersionList : public BaseVersionList
|
class MULTIMC_LOGIC_EXPORT LiteLoaderVersionList : public BaseVersionList
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
|
@ -17,10 +17,12 @@
|
|||||||
|
|
||||||
#include "minecraft/MinecraftInstance.h"
|
#include "minecraft/MinecraftInstance.h"
|
||||||
|
|
||||||
|
#include "multimc_logic_export.h"
|
||||||
|
|
||||||
class ModList;
|
class ModList;
|
||||||
class Task;
|
class Task;
|
||||||
|
|
||||||
class LegacyInstance : public MinecraftInstance
|
class MULTIMC_LOGIC_EXPORT LegacyInstance : public MinecraftInstance
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
|
@ -24,10 +24,12 @@
|
|||||||
#include "BaseVersion.h"
|
#include "BaseVersion.h"
|
||||||
#include "BaseVersionList.h"
|
#include "BaseVersionList.h"
|
||||||
|
|
||||||
|
#include "multimc_logic_export.h"
|
||||||
|
|
||||||
class LWJGLVersion;
|
class LWJGLVersion;
|
||||||
typedef std::shared_ptr<LWJGLVersion> PtrLWJGLVersion;
|
typedef std::shared_ptr<LWJGLVersion> PtrLWJGLVersion;
|
||||||
|
|
||||||
class LWJGLVersion : public BaseVersion
|
class MULTIMC_LOGIC_EXPORT LWJGLVersion : public BaseVersion
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
LWJGLVersion(const QString &name, const QString &url)
|
LWJGLVersion(const QString &name, const QString &url)
|
||||||
@ -60,7 +62,7 @@ protected:
|
|||||||
QString m_url;
|
QString m_url;
|
||||||
};
|
};
|
||||||
|
|
||||||
class LWJGLVersionList : public BaseVersionList
|
class MULTIMC_LOGIC_EXPORT LWJGLVersionList : public BaseVersionList
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
|
@ -3,9 +3,11 @@
|
|||||||
#include "minecraft/Mod.h"
|
#include "minecraft/Mod.h"
|
||||||
#include <QProcess>
|
#include <QProcess>
|
||||||
|
|
||||||
|
#include "multimc_logic_export.h"
|
||||||
|
|
||||||
class ModList;
|
class ModList;
|
||||||
|
|
||||||
class MinecraftInstance: public BaseInstance
|
class MULTIMC_LOGIC_EXPORT MinecraftInstance: public BaseInstance
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
MinecraftInstance(SettingsObjectPtr globalSettings, SettingsObjectPtr settings, const QString &rootDir);
|
MinecraftInstance(SettingsObjectPtr globalSettings, SettingsObjectPtr settings, const QString &rootDir);
|
||||||
|
@ -25,10 +25,13 @@
|
|||||||
#include "VersionFile.h"
|
#include "VersionFile.h"
|
||||||
#include "JarMod.h"
|
#include "JarMod.h"
|
||||||
|
|
||||||
|
#include "multimc_logic_export.h"
|
||||||
|
|
||||||
class ProfileStrategy;
|
class ProfileStrategy;
|
||||||
class OneSixInstance;
|
class OneSixInstance;
|
||||||
|
|
||||||
class MinecraftProfile : public QAbstractListModel
|
|
||||||
|
class MULTIMC_LOGIC_EXPORT MinecraftProfile : public QAbstractListModel
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
friend class ProfileStrategy;
|
friend class ProfileStrategy;
|
||||||
|
@ -24,11 +24,13 @@
|
|||||||
#include "VersionFile.h"
|
#include "VersionFile.h"
|
||||||
#include "VersionSource.h"
|
#include "VersionSource.h"
|
||||||
|
|
||||||
|
#include "multimc_logic_export.h"
|
||||||
|
|
||||||
class MinecraftProfile;
|
class MinecraftProfile;
|
||||||
class MinecraftVersion;
|
class MinecraftVersion;
|
||||||
typedef std::shared_ptr<MinecraftVersion> MinecraftVersionPtr;
|
typedef std::shared_ptr<MinecraftVersion> MinecraftVersionPtr;
|
||||||
|
|
||||||
class MinecraftVersion : public BaseVersion, public ProfilePatch
|
class MULTIMC_LOGIC_EXPORT MinecraftVersion : public BaseVersion, public ProfilePatch
|
||||||
{
|
{
|
||||||
public: /* methods */
|
public: /* methods */
|
||||||
bool usesLegacyLauncher();
|
bool usesLegacyLauncher();
|
||||||
|
@ -24,10 +24,12 @@
|
|||||||
#include "minecraft/MinecraftVersion.h"
|
#include "minecraft/MinecraftVersion.h"
|
||||||
#include <net/NetJob.h>
|
#include <net/NetJob.h>
|
||||||
|
|
||||||
|
#include "multimc_logic_export.h"
|
||||||
|
|
||||||
class MCVListLoadTask;
|
class MCVListLoadTask;
|
||||||
class MCVListVersionUpdateTask;
|
class MCVListVersionUpdateTask;
|
||||||
|
|
||||||
class MinecraftVersionList : public BaseVersionList
|
class MULTIMC_LOGIC_EXPORT MinecraftVersionList : public BaseVersionList
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
private:
|
private:
|
||||||
|
@ -22,6 +22,8 @@
|
|||||||
|
|
||||||
#include "minecraft/Mod.h"
|
#include "minecraft/Mod.h"
|
||||||
|
|
||||||
|
#include "multimc_logic_export.h"
|
||||||
|
|
||||||
class LegacyInstance;
|
class LegacyInstance;
|
||||||
class BaseInstance;
|
class BaseInstance;
|
||||||
class QFileSystemWatcher;
|
class QFileSystemWatcher;
|
||||||
@ -30,7 +32,7 @@ class QFileSystemWatcher;
|
|||||||
* A legacy mod list.
|
* A legacy mod list.
|
||||||
* Backed by a folder.
|
* Backed by a folder.
|
||||||
*/
|
*/
|
||||||
class ModList : public QAbstractListModel
|
class MULTIMC_LOGIC_EXPORT ModList : public QAbstractListModel
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
|
@ -292,7 +292,7 @@ std::shared_ptr<Task> OneSixInstance::createJarModdingTask()
|
|||||||
class JarModTask : public Task
|
class JarModTask : public Task
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
explicit JarModTask(std::shared_ptr<OneSixInstance> inst) : m_inst(inst), Task(nullptr)
|
explicit JarModTask(std::shared_ptr<OneSixInstance> inst) : Task(nullptr), m_inst(inst)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
virtual void executeTask()
|
virtual void executeTask()
|
||||||
|
@ -20,7 +20,9 @@
|
|||||||
#include "minecraft/MinecraftProfile.h"
|
#include "minecraft/MinecraftProfile.h"
|
||||||
#include "minecraft/ModList.h"
|
#include "minecraft/ModList.h"
|
||||||
|
|
||||||
class OneSixInstance : public MinecraftInstance
|
#include "multimc_logic_export.h"
|
||||||
|
|
||||||
|
class MULTIMC_LOGIC_EXPORT OneSixInstance : public MinecraftInstance
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
|
@ -17,7 +17,9 @@
|
|||||||
|
|
||||||
#include <QPixmap>
|
#include <QPixmap>
|
||||||
|
|
||||||
|
#include "multimc_logic_export.h"
|
||||||
|
|
||||||
namespace SkinUtils
|
namespace SkinUtils
|
||||||
{
|
{
|
||||||
QPixmap getFaceFromCache(QString username, int height = 64, int width = 64);
|
QPixmap MULTIMC_LOGIC_EXPORT getFaceFromCache(QString username, int height = 64, int width = 64);
|
||||||
}
|
}
|
||||||
|
@ -4,6 +4,8 @@
|
|||||||
#include <QSet>
|
#include <QSet>
|
||||||
#include <QDateTime>
|
#include <QDateTime>
|
||||||
|
|
||||||
|
#include "multimc_logic_export.h"
|
||||||
|
|
||||||
struct FMLlib
|
struct FMLlib
|
||||||
{
|
{
|
||||||
QString filename;
|
QString filename;
|
||||||
@ -29,4 +31,4 @@ struct VersionFilterData
|
|||||||
// Currently discouraged java version (anything equal and above will be discouraged)
|
// Currently discouraged java version (anything equal and above will be discouraged)
|
||||||
QString discouragedJavaVersion;
|
QString discouragedJavaVersion;
|
||||||
};
|
};
|
||||||
extern VersionFilterData g_VersionFilterData;
|
extern VersionFilterData MULTIMC_LOGIC_EXPORT g_VersionFilterData;
|
||||||
|
@ -16,8 +16,10 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
#include "NetAction.h"
|
#include "NetAction.h"
|
||||||
|
|
||||||
|
#include "multimc_logic_export.h"
|
||||||
|
|
||||||
typedef std::shared_ptr<class ByteArrayDownload> ByteArrayDownloadPtr;
|
typedef std::shared_ptr<class ByteArrayDownload> ByteArrayDownloadPtr;
|
||||||
class ByteArrayDownload : public NetAction
|
class MULTIMC_LOGIC_EXPORT ByteArrayDownload : public NetAction
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
|
@ -20,19 +20,22 @@
|
|||||||
#include <QCryptographicHash>
|
#include <QCryptographicHash>
|
||||||
#include <QSaveFile>
|
#include <QSaveFile>
|
||||||
|
|
||||||
class INetworkValidator
|
#include "multimc_logic_export.h"
|
||||||
|
|
||||||
|
/* FIXME: move to its own file(s) */
|
||||||
|
class MULTIMC_LOGIC_EXPORT INetworkValidator
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
virtual ~INetworkValidator() {}
|
virtual ~INetworkValidator() {}
|
||||||
|
|
||||||
virtual void validate(const QByteArray &data) = 0;
|
virtual void validate(const QByteArray &data) = 0;
|
||||||
};
|
};
|
||||||
class JsonValidator : public INetworkValidator
|
class MULTIMC_LOGIC_EXPORT JsonValidator : public INetworkValidator
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
void validate(const QByteArray &data) override;
|
void validate(const QByteArray &data) override;
|
||||||
};
|
};
|
||||||
class MD5HashValidator : public INetworkValidator
|
class MULTIMC_LOGIC_EXPORT MD5HashValidator : public INetworkValidator
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
explicit MD5HashValidator(const QByteArray &expected)
|
explicit MD5HashValidator(const QByteArray &expected)
|
||||||
@ -44,7 +47,7 @@ private:
|
|||||||
};
|
};
|
||||||
|
|
||||||
typedef std::shared_ptr<class CacheDownload> CacheDownloadPtr;
|
typedef std::shared_ptr<class CacheDownload> CacheDownloadPtr;
|
||||||
class CacheDownload : public NetAction
|
class MULTIMC_LOGIC_EXPORT CacheDownload : public NetAction
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
private:
|
private:
|
||||||
|
@ -19,9 +19,11 @@
|
|||||||
#include <qtimer.h>
|
#include <qtimer.h>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
|
#include "multimc_logic_export.h"
|
||||||
|
|
||||||
class HttpMetaCache;
|
class HttpMetaCache;
|
||||||
|
|
||||||
struct MetaEntry
|
struct MULTIMC_LOGIC_EXPORT MetaEntry
|
||||||
{
|
{
|
||||||
QString base;
|
QString base;
|
||||||
QString path;
|
QString path;
|
||||||
@ -35,7 +37,7 @@ struct MetaEntry
|
|||||||
|
|
||||||
typedef std::shared_ptr<MetaEntry> MetaEntryPtr;
|
typedef std::shared_ptr<MetaEntry> MetaEntryPtr;
|
||||||
|
|
||||||
class HttpMetaCache : public QObject
|
class MULTIMC_LOGIC_EXPORT HttpMetaCache : public QObject
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
|
@ -24,10 +24,12 @@
|
|||||||
#include "tasks/Task.h"
|
#include "tasks/Task.h"
|
||||||
#include "QObjectPtr.h"
|
#include "QObjectPtr.h"
|
||||||
|
|
||||||
|
#include "multimc_logic_export.h"
|
||||||
|
|
||||||
class NetJob;
|
class NetJob;
|
||||||
typedef QObjectPtr<NetJob> NetJobPtr;
|
typedef QObjectPtr<NetJob> NetJobPtr;
|
||||||
|
|
||||||
class NetJob : public Task
|
class MULTIMC_LOGIC_EXPORT NetJob : public Task
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
|
@ -4,7 +4,9 @@
|
|||||||
#include <QNetworkReply>
|
#include <QNetworkReply>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
class PasteUpload : public Task
|
#include "multimc_logic_export.h"
|
||||||
|
|
||||||
|
class MULTIMC_LOGIC_EXPORT PasteUpload : public Task
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
|
@ -17,6 +17,8 @@
|
|||||||
|
|
||||||
#include <QString>
|
#include <QString>
|
||||||
|
|
||||||
|
#include "multimc_logic_export.h"
|
||||||
|
|
||||||
namespace URLConstants
|
namespace URLConstants
|
||||||
{
|
{
|
||||||
extern const QString AWS_DOWNLOAD_BASE;
|
extern const QString AWS_DOWNLOAD_BASE;
|
||||||
@ -26,7 +28,7 @@ extern const QString AWS_DOWNLOAD_INDEXES;
|
|||||||
extern const QString ASSETS_BASE;
|
extern const QString ASSETS_BASE;
|
||||||
extern const QString RESOURCE_BASE;
|
extern const QString RESOURCE_BASE;
|
||||||
extern const QString LIBRARY_BASE;
|
extern const QString LIBRARY_BASE;
|
||||||
extern const QString SKINS_BASE;
|
MULTIMC_LOGIC_EXPORT extern const QString SKINS_BASE;
|
||||||
extern const QString AUTH_BASE;
|
extern const QString AUTH_BASE;
|
||||||
extern const QString FORGE_LEGACY_URL;
|
extern const QString FORGE_LEGACY_URL;
|
||||||
extern const QString FORGE_GRADLE_URL;
|
extern const QString FORGE_GRADLE_URL;
|
||||||
|
@ -23,7 +23,9 @@
|
|||||||
|
|
||||||
#include "NewsEntry.h"
|
#include "NewsEntry.h"
|
||||||
|
|
||||||
class NewsChecker : public QObject
|
#include "multimc_logic_export.h"
|
||||||
|
|
||||||
|
class MULTIMC_LOGIC_EXPORT NewsChecker : public QObject
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
|
@ -5,7 +5,9 @@
|
|||||||
#include "net/NetJob.h"
|
#include "net/NetJob.h"
|
||||||
#include "net/CacheDownload.h"
|
#include "net/CacheDownload.h"
|
||||||
|
|
||||||
class NotificationChecker : public QObject
|
#include "multimc_logic_export.h"
|
||||||
|
|
||||||
|
class MULTIMC_LOGIC_EXPORT NotificationChecker : public QObject
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
|
@ -4,7 +4,9 @@
|
|||||||
|
|
||||||
#include "ResourceHandler.h"
|
#include "ResourceHandler.h"
|
||||||
|
|
||||||
class IconResourceHandler : public ResourceHandler
|
#include "multimc_logic_export.h"
|
||||||
|
|
||||||
|
class MULTIMC_LOGIC_EXPORT IconResourceHandler : public ResourceHandler
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
explicit IconResourceHandler(const QString &key);
|
explicit IconResourceHandler(const QString &key);
|
||||||
|
@ -9,6 +9,8 @@
|
|||||||
#include "ResourceObserver.h"
|
#include "ResourceObserver.h"
|
||||||
#include "TypeMagic.h"
|
#include "TypeMagic.h"
|
||||||
|
|
||||||
|
#include "multimc_logic_export.h"
|
||||||
|
|
||||||
class ResourceHandler;
|
class ResourceHandler;
|
||||||
|
|
||||||
/** Frontend class for resources
|
/** Frontend class for resources
|
||||||
@ -27,7 +29,7 @@ class ResourceHandler;
|
|||||||
*
|
*
|
||||||
* @note Always pass resource around using Resource::Ptr! Copy and move constructors are disabled for a reason.
|
* @note Always pass resource around using Resource::Ptr! Copy and move constructors are disabled for a reason.
|
||||||
*/
|
*/
|
||||||
class Resource : public std::enable_shared_from_this<Resource>
|
class MULTIMC_LOGIC_EXPORT Resource : public std::enable_shared_from_this<Resource>
|
||||||
{
|
{
|
||||||
// only allow creation from Resource::create and disallow passing around non-pointers
|
// only allow creation from Resource::create and disallow passing around non-pointers
|
||||||
explicit Resource(const QString &resource);
|
explicit Resource(const QString &resource);
|
||||||
|
@ -3,6 +3,8 @@
|
|||||||
#include <QVariant>
|
#include <QVariant>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
|
#include "multimc_logic_export.h"
|
||||||
|
|
||||||
class Resource;
|
class Resource;
|
||||||
|
|
||||||
/** Base class for things that can retrieve a resource.
|
/** Base class for things that can retrieve a resource.
|
||||||
@ -11,7 +13,7 @@ class Resource;
|
|||||||
* call Resource::registerHandler<MyResourceHandler>("<id>"), where <id> is the
|
* call Resource::registerHandler<MyResourceHandler>("<id>"), where <id> is the
|
||||||
* prefix of the resource ("web", "icon", etc.)
|
* prefix of the resource ("web", "icon", etc.)
|
||||||
*/
|
*/
|
||||||
class ResourceHandler
|
class MULTIMC_LOGIC_EXPORT ResourceHandler
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
virtual ~ResourceHandler() {}
|
virtual ~ResourceHandler() {}
|
||||||
|
@ -5,12 +5,13 @@
|
|||||||
|
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
#include <QMetaProperty>
|
#include <QMetaProperty>
|
||||||
|
#include "multimc_logic_export.h"
|
||||||
|
|
||||||
class QVariant;
|
class QVariant;
|
||||||
class Resource;
|
class Resource;
|
||||||
|
|
||||||
/// Base class for things that can use a resource
|
/// Base class for things that can use a resource
|
||||||
class ResourceObserver
|
class MULTIMC_LOGIC_EXPORT ResourceObserver
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
virtual ~ResourceObserver();
|
virtual ~ResourceObserver();
|
||||||
@ -39,7 +40,7 @@ private:
|
|||||||
*
|
*
|
||||||
* If no name is given an attempt to find a default property for some common classes is done.
|
* If no name is given an attempt to find a default property for some common classes is done.
|
||||||
*/
|
*/
|
||||||
class QObjectResourceObserver : public QObject, public ResourceObserver
|
class MULTIMC_LOGIC_EXPORT QObjectResourceObserver : public QObject, public ResourceObserver
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
explicit QObjectResourceObserver(QObject *target, const char *property = nullptr);
|
explicit QObjectResourceObserver(QObject *target, const char *property = nullptr);
|
||||||
@ -57,7 +58,7 @@ private:
|
|||||||
* * We need Func in order to std::forward the function
|
* * We need Func in order to std::forward the function
|
||||||
*/
|
*/
|
||||||
template <typename Ret, typename Arg, typename Func>
|
template <typename Ret, typename Arg, typename Func>
|
||||||
class FunctionResourceObserver : public ResourceObserver
|
class MULTIMC_LOGIC_EXPORT FunctionResourceObserver : public ResourceObserver
|
||||||
{
|
{
|
||||||
std::function<Ret(Arg)> m_function;
|
std::function<Ret(Arg)> m_function;
|
||||||
public:
|
public:
|
||||||
|
@ -2,8 +2,10 @@
|
|||||||
#include "net/NetAction.h"
|
#include "net/NetAction.h"
|
||||||
#include "Screenshot.h"
|
#include "Screenshot.h"
|
||||||
|
|
||||||
|
#include "multimc_logic_export.h"
|
||||||
|
|
||||||
typedef std::shared_ptr<class ImgurAlbumCreation> ImgurAlbumCreationPtr;
|
typedef std::shared_ptr<class ImgurAlbumCreation> ImgurAlbumCreationPtr;
|
||||||
class ImgurAlbumCreation : public NetAction
|
class MULTIMC_LOGIC_EXPORT ImgurAlbumCreation : public NetAction
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
explicit ImgurAlbumCreation(QList<ScreenshotPtr> screenshots);
|
explicit ImgurAlbumCreation(QList<ScreenshotPtr> screenshots);
|
||||||
|
@ -2,8 +2,10 @@
|
|||||||
#include "net/NetAction.h"
|
#include "net/NetAction.h"
|
||||||
#include "Screenshot.h"
|
#include "Screenshot.h"
|
||||||
|
|
||||||
|
#include "multimc_logic_export.h"
|
||||||
|
|
||||||
typedef std::shared_ptr<class ImgurUpload> ImgurUploadPtr;
|
typedef std::shared_ptr<class ImgurUpload> ImgurUploadPtr;
|
||||||
class ImgurUpload : public NetAction
|
class MULTIMC_LOGIC_EXPORT ImgurUpload : public NetAction
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
explicit ImgurUpload(ScreenshotPtr shot);
|
explicit ImgurUpload(ScreenshotPtr shot);
|
||||||
|
@ -19,8 +19,10 @@
|
|||||||
#include <QVariant>
|
#include <QVariant>
|
||||||
#include <QIODevice>
|
#include <QIODevice>
|
||||||
|
|
||||||
|
#include "multimc_logic_export.h"
|
||||||
|
|
||||||
// Sectionless INI parser (for instance config files)
|
// Sectionless INI parser (for instance config files)
|
||||||
class INIFile : public QMap<QString, QVariant>
|
class MULTIMC_LOGIC_EXPORT INIFile : public QMap<QString, QVariant>
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
explicit INIFile();
|
explicit INIFile();
|
||||||
|
@ -21,10 +21,12 @@
|
|||||||
|
|
||||||
#include "settings/SettingsObject.h"
|
#include "settings/SettingsObject.h"
|
||||||
|
|
||||||
|
#include "multimc_logic_export.h"
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief A settings object that stores its settings in an INIFile.
|
* \brief A settings object that stores its settings in an INIFile.
|
||||||
*/
|
*/
|
||||||
class INISettingsObject : public SettingsObject
|
class MULTIMC_LOGIC_EXPORT INISettingsObject : public SettingsObject
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
|
@ -20,21 +20,23 @@
|
|||||||
#include <QStringList>
|
#include <QStringList>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
|
#include "multimc_logic_export.h"
|
||||||
|
|
||||||
class SettingsObject;
|
class SettingsObject;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
class Setting : public QObject
|
class MULTIMC_LOGIC_EXPORT Setting : public QObject
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
/**
|
/**
|
||||||
* Construct a Setting
|
* Construct a Setting
|
||||||
*
|
*
|
||||||
* Synonyms are all the possible names used in the settings object, in order of preference.
|
* Synonyms are all the possible names used in the settings object, in order of preference.
|
||||||
* First synonym is the ID, which identifies the setting in MultiMC.
|
* First synonym is the ID, which identifies the setting in MultiMC.
|
||||||
*
|
*
|
||||||
* defVal is the default value that will be returned when the settings object
|
* defVal is the default value that will be returned when the settings object
|
||||||
* doesn't have any value for this setting.
|
* doesn't have any value for this setting.
|
||||||
*/
|
*/
|
||||||
|
@ -21,6 +21,8 @@
|
|||||||
#include <QVariant>
|
#include <QVariant>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
|
#include "multimc_logic_export.h"
|
||||||
|
|
||||||
class Setting;
|
class Setting;
|
||||||
class SettingsObject;
|
class SettingsObject;
|
||||||
|
|
||||||
@ -38,7 +40,7 @@ typedef std::shared_ptr<SettingsObject> SettingsObjectPtr;
|
|||||||
*
|
*
|
||||||
* \sa Setting
|
* \sa Setting
|
||||||
*/
|
*/
|
||||||
class SettingsObject : public QObject
|
class MULTIMC_LOGIC_EXPORT SettingsObject : public QObject
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
|
@ -21,7 +21,9 @@
|
|||||||
|
|
||||||
#include <net/NetJob.h>
|
#include <net/NetJob.h>
|
||||||
|
|
||||||
class StatusChecker : public QObject
|
#include "multimc_logic_export.h"
|
||||||
|
|
||||||
|
class MULTIMC_LOGIC_EXPORT StatusChecker : public QObject
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
|
@ -5,7 +5,9 @@
|
|||||||
#include <QQueue>
|
#include <QQueue>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
class SequentialTask : public Task
|
#include "multimc_logic_export.h"
|
||||||
|
|
||||||
|
class MULTIMC_LOGIC_EXPORT SequentialTask : public Task
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
|
@ -18,7 +18,9 @@
|
|||||||
#include <QObject>
|
#include <QObject>
|
||||||
#include <QString>
|
#include <QString>
|
||||||
|
|
||||||
class Task : public QObject
|
#include "multimc_logic_export.h"
|
||||||
|
|
||||||
|
class MULTIMC_LOGIC_EXPORT Task : public QObject
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
|
@ -3,11 +3,13 @@
|
|||||||
#include <QObject>
|
#include <QObject>
|
||||||
#include <BaseInstance.h>
|
#include <BaseInstance.h>
|
||||||
|
|
||||||
|
#include "multimc_logic_export.h"
|
||||||
|
|
||||||
class BaseInstance;
|
class BaseInstance;
|
||||||
class SettingsObject;
|
class SettingsObject;
|
||||||
class QProcess;
|
class QProcess;
|
||||||
|
|
||||||
class BaseExternalTool : public QObject
|
class MULTIMC_LOGIC_EXPORT BaseExternalTool : public QObject
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
@ -19,7 +21,7 @@ protected:
|
|||||||
SettingsObjectPtr globalSettings;
|
SettingsObjectPtr globalSettings;
|
||||||
};
|
};
|
||||||
|
|
||||||
class BaseDetachedTool : public BaseExternalTool
|
class MULTIMC_LOGIC_EXPORT BaseDetachedTool : public BaseExternalTool
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
@ -33,7 +35,7 @@ protected:
|
|||||||
virtual void runImpl() = 0;
|
virtual void runImpl() = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
class BaseExternalToolFactory
|
class MULTIMC_LOGIC_EXPORT BaseExternalToolFactory
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
virtual ~BaseExternalToolFactory();
|
virtual ~BaseExternalToolFactory();
|
||||||
@ -51,7 +53,7 @@ protected:
|
|||||||
SettingsObjectPtr globalSettings;
|
SettingsObjectPtr globalSettings;
|
||||||
};
|
};
|
||||||
|
|
||||||
class BaseDetachedToolFactory : public BaseExternalToolFactory
|
class MULTIMC_LOGIC_EXPORT BaseDetachedToolFactory : public BaseExternalToolFactory
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
virtual BaseDetachedTool *createDetachedTool(InstancePtr instance, QObject *parent = 0);
|
virtual BaseDetachedTool *createDetachedTool(InstancePtr instance, QObject *parent = 0);
|
||||||
|
@ -2,12 +2,14 @@
|
|||||||
|
|
||||||
#include "BaseExternalTool.h"
|
#include "BaseExternalTool.h"
|
||||||
|
|
||||||
|
#include "multimc_logic_export.h"
|
||||||
|
|
||||||
class BaseInstance;
|
class BaseInstance;
|
||||||
class SettingsObject;
|
class SettingsObject;
|
||||||
class LaunchTask;
|
class LaunchTask;
|
||||||
class QProcess;
|
class QProcess;
|
||||||
|
|
||||||
class BaseProfiler : public BaseExternalTool
|
class MULTIMC_LOGIC_EXPORT BaseProfiler : public BaseExternalTool
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
@ -29,7 +31,7 @@ signals:
|
|||||||
void abortLaunch(const QString &message);
|
void abortLaunch(const QString &message);
|
||||||
};
|
};
|
||||||
|
|
||||||
class BaseProfilerFactory : public BaseExternalToolFactory
|
class MULTIMC_LOGIC_EXPORT BaseProfilerFactory : public BaseExternalToolFactory
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
virtual BaseProfiler *createProfiler(InstancePtr instance, QObject *parent = 0);
|
virtual BaseProfiler *createProfiler(InstancePtr instance, QObject *parent = 0);
|
||||||
|
@ -2,7 +2,9 @@
|
|||||||
|
|
||||||
#include "BaseProfiler.h"
|
#include "BaseProfiler.h"
|
||||||
|
|
||||||
class JProfilerFactory : public BaseProfilerFactory
|
#include "multimc_logic_export.h"
|
||||||
|
|
||||||
|
class MULTIMC_LOGIC_EXPORT JProfilerFactory : public BaseProfilerFactory
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
QString name() const override { return "JProfiler"; }
|
QString name() const override { return "JProfiler"; }
|
||||||
|
@ -2,7 +2,9 @@
|
|||||||
|
|
||||||
#include "BaseProfiler.h"
|
#include "BaseProfiler.h"
|
||||||
|
|
||||||
class JVisualVMFactory : public BaseProfilerFactory
|
#include "multimc_logic_export.h"
|
||||||
|
|
||||||
|
class MULTIMC_LOGIC_EXPORT JVisualVMFactory : public BaseProfilerFactory
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
QString name() const override { return "JVisualVM"; }
|
QString name() const override { return "JVisualVM"; }
|
||||||
|
@ -2,7 +2,9 @@
|
|||||||
|
|
||||||
#include "BaseExternalTool.h"
|
#include "BaseExternalTool.h"
|
||||||
|
|
||||||
class MCEditTool : public BaseDetachedTool
|
#include "multimc_logic_export.h"
|
||||||
|
|
||||||
|
class MULTIMC_LOGIC_EXPORT MCEditTool : public BaseDetachedTool
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
@ -13,7 +15,7 @@ protected:
|
|||||||
void runImpl() override;
|
void runImpl() override;
|
||||||
};
|
};
|
||||||
|
|
||||||
class MCEditFactory : public BaseDetachedToolFactory
|
class MULTIMC_LOGIC_EXPORT MCEditFactory : public BaseDetachedToolFactory
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
QString name() const override { return "MCEdit"; }
|
QString name() const override { return "MCEdit"; }
|
||||||
|
@ -5,11 +5,12 @@
|
|||||||
#include <memory>
|
#include <memory>
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
#include <net/NetJob.h>
|
#include <net/NetJob.h>
|
||||||
|
#include "multimc_logic_export.h"
|
||||||
|
|
||||||
class ByteArrayDownload;
|
class ByteArrayDownload;
|
||||||
class NetJob;
|
class NetJob;
|
||||||
|
|
||||||
class TranslationDownloader : public QObject
|
class MULTIMC_LOGIC_EXPORT TranslationDownloader : public QObject
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
|
@ -19,13 +19,15 @@
|
|||||||
#include "net/NetJob.h"
|
#include "net/NetJob.h"
|
||||||
#include "GoUpdate.h"
|
#include "GoUpdate.h"
|
||||||
|
|
||||||
|
#include "multimc_logic_export.h"
|
||||||
|
|
||||||
namespace GoUpdate
|
namespace GoUpdate
|
||||||
{
|
{
|
||||||
/*!
|
/*!
|
||||||
* The DownloadTask is a task that takes a given version ID and repository URL,
|
* The DownloadTask is a task that takes a given version ID and repository URL,
|
||||||
* downloads that version's files from the repository, and prepares to install them.
|
* downloads that version's files from the repository, and prepares to install them.
|
||||||
*/
|
*/
|
||||||
class DownloadTask : public Task
|
class MULTIMC_LOGIC_EXPORT DownloadTask : public Task
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
|
@ -2,13 +2,15 @@
|
|||||||
#include <QByteArray>
|
#include <QByteArray>
|
||||||
#include <net/NetJob.h>
|
#include <net/NetJob.h>
|
||||||
|
|
||||||
|
#include "multimc_logic_export.h"
|
||||||
|
|
||||||
namespace GoUpdate
|
namespace GoUpdate
|
||||||
{
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A temporary object exchanged between updated checker and the actual update task
|
* A temporary object exchanged between updated checker and the actual update task
|
||||||
*/
|
*/
|
||||||
struct Status
|
struct MULTIMC_LOGIC_EXPORT Status
|
||||||
{
|
{
|
||||||
bool updateAvailable = false;
|
bool updateAvailable = false;
|
||||||
|
|
||||||
@ -25,7 +27,7 @@ struct Status
|
|||||||
/**
|
/**
|
||||||
* Struct that describes an entry in a VersionFileEntry's `Sources` list.
|
* Struct that describes an entry in a VersionFileEntry's `Sources` list.
|
||||||
*/
|
*/
|
||||||
struct FileSource
|
struct MULTIMC_LOGIC_EXPORT FileSource
|
||||||
{
|
{
|
||||||
FileSource(QString type, QString url, QString compression="")
|
FileSource(QString type, QString url, QString compression="")
|
||||||
{
|
{
|
||||||
@ -48,7 +50,7 @@ typedef QList<FileSource> FileSourceList;
|
|||||||
/**
|
/**
|
||||||
* Structure that describes an entry in a GoUpdate version's `Files` list.
|
* Structure that describes an entry in a GoUpdate version's `Files` list.
|
||||||
*/
|
*/
|
||||||
struct VersionFileEntry
|
struct MULTIMC_LOGIC_EXPORT VersionFileEntry
|
||||||
{
|
{
|
||||||
QString path;
|
QString path;
|
||||||
int mode;
|
int mode;
|
||||||
@ -64,7 +66,7 @@ typedef QList<VersionFileEntry> VersionFileList;
|
|||||||
/**
|
/**
|
||||||
* Structure that describes an operation to perform when installing updates.
|
* Structure that describes an operation to perform when installing updates.
|
||||||
*/
|
*/
|
||||||
struct Operation
|
struct MULTIMC_LOGIC_EXPORT Operation
|
||||||
{
|
{
|
||||||
static Operation CopyOp(QString fsource, QString fdest, int fmode=0644)
|
static Operation CopyOp(QString fsource, QString fdest, int fmode=0644)
|
||||||
{
|
{
|
||||||
@ -102,13 +104,13 @@ typedef QList<Operation> OperationList;
|
|||||||
/**
|
/**
|
||||||
* Loads the file list from the given version info JSON object into the given list.
|
* Loads the file list from the given version info JSON object into the given list.
|
||||||
*/
|
*/
|
||||||
bool parseVersionInfo(const QByteArray &data, VersionFileList& list, QString &error);
|
bool MULTIMC_LOGIC_EXPORT parseVersionInfo(const QByteArray &data, VersionFileList& list, QString &error);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* Takes a list of file entries for the current version's files and the new version's files
|
* Takes a list of file entries for the current version's files and the new version's files
|
||||||
* and populates the downloadList and operationList with information about how to download and install the update.
|
* and populates the downloadList and operationList with information about how to download and install the update.
|
||||||
*/
|
*/
|
||||||
bool processFileLists
|
bool MULTIMC_LOGIC_EXPORT processFileLists
|
||||||
(
|
(
|
||||||
const VersionFileList ¤tVersion,
|
const VersionFileList ¤tVersion,
|
||||||
const VersionFileList &newVersion,
|
const VersionFileList &newVersion,
|
||||||
@ -125,7 +127,7 @@ bool processFileLists
|
|||||||
*
|
*
|
||||||
* @return false if the path couldn't be fixed (is invalid)
|
* @return false if the path couldn't be fixed (is invalid)
|
||||||
*/
|
*/
|
||||||
bool fixPathForOSX(QString &path);
|
bool MULTIMC_LOGIC_EXPORT fixPathForOSX(QString &path);
|
||||||
|
|
||||||
}
|
}
|
||||||
Q_DECLARE_METATYPE(GoUpdate::Status);
|
Q_DECLARE_METATYPE(GoUpdate::Status);
|
@ -20,7 +20,9 @@
|
|||||||
|
|
||||||
#include <QUrl>
|
#include <QUrl>
|
||||||
|
|
||||||
class UpdateChecker : public QObject
|
#include "multimc_logic_export.h"
|
||||||
|
|
||||||
|
class MULTIMC_LOGIC_EXPORT UpdateChecker : public QObject
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
# run the unit tests with `make test`
|
# run the unit tests with `make test`
|
||||||
find_package(Qt5 COMPONENTS Test Core Network)
|
find_package(Qt5 COMPONENTS Test Core Network)
|
||||||
|
|
||||||
include_directories(../logic)
|
include_directories(../logic ${CMAKE_CURRENT_BINARY_DIR}/../logic)
|
||||||
include_directories(../depends/util/include/)
|
include_directories(../depends/util/include/)
|
||||||
|
|
||||||
unset(MultiMC_TESTS)
|
unset(MultiMC_TESTS)
|
||||||
|
Loading…
Reference in New Issue
Block a user