Massive re-organization.

This commit is contained in:
Andrew 2013-02-26 16:47:39 -06:00
parent bd64cda672
commit 36396f7c6a
53 changed files with 223 additions and 185 deletions

View File

@ -61,15 +61,15 @@ add_subdirectory(launcher)
# Add the util library.
add_subdirectory(libutil)
include_directories(${LIBMMCUTIL_INCLUDE_DIR})
include_directories(${LIBUTIL_INCLUDE_DIR})
# Add the settings library.
add_subdirectory(libsettings)
include_directories(${LIBMMCSETTINGS_INCLUDE_DIR})
include_directories(${LIBSETTINGS_INCLUDE_DIR})
# Add the instance library.
add_subdirectory(libinstance)
include_directories(${LIBMMCINST_INCLUDE_DIR})
add_subdirectory(libmultimc)
include_directories(${LIBMULTIMC_INCLUDE_DIR})
# Add the stdinstance plugin.
add_subdirectory(plugins/stdinstance)
@ -150,7 +150,7 @@ MESSAGE(STATUS "Job URL: ${MultiMC_JOB_URL}")
######## Configure header ########
configure_file("${PROJECT_SOURCE_DIR}/config.h.in"
"${PROJECT_BINARY_DIR}/config.h")
"${PROJECT_BINARY_DIR}/include/config.h")
################################ FILES ################################
@ -167,14 +167,6 @@ gui/browserdialog.h
gui/aboutdialog.h
gui/consolewindow.h
data/version.h
data/userinfo.h
data/loginresponse.h
data/appsettings.h
data/minecraftprocess.h
data/plugin/pluginmanager.h
multimc_pragma.h
java/annotations.h
@ -184,10 +176,6 @@ java/javaendian.h
java/errors.h
java/javautils.h
java/membuffer.h
tasks/task.h
tasks/logintask.h
tasks/gameupdatetask.h
)
@ -195,14 +183,6 @@ tasks/gameupdatetask.h
SET(MULTIMC_SOURCES
main.cpp
data/version.cpp
data/userinfo.cpp
data/loginresponse.cpp
data/appsettings.cpp
data/plugin/pluginmanager.cpp
data/minecraftprocess.cpp
gui/mainwindow.cpp
gui/modeditwindow.cpp
gui/settingsdialog.cpp
@ -215,10 +195,6 @@ gui/consolewindow.cpp
java/javautils.cpp
java/annotations.cpp
tasks/task.cpp
tasks/logintask.cpp
tasks/gameupdatetask.cpp
)
@ -272,9 +248,9 @@ ADD_EXECUTABLE(MultiMC MACOSX_BUNDLE WIN32
# Link
QT5_USE_MODULES(MultiMC Widgets Network WebKitWidgets)
TARGET_LINK_LIBRARIES(MultiMC quazip patchlib
libmmcutil libmmcsettings libmmcinst
libUtil libSettings libMultiMC
${MultiMC_LINK_ADDITIONAL_LIBS})
ADD_DEPENDENCIES(MultiMC MultiMCLauncher libmmcutil libmmcsettings libmmcinst)
ADD_DEPENDENCIES(MultiMC MultiMCLauncher libUtil libSettings libMultiMC)
################################ INSTALLATION AND PACKAGING ################################

View File

@ -41,10 +41,10 @@
#include "gui/aboutdialog.h"
#include "instancelist.h"
#include "data/appsettings.h"
#include "data/version.h"
#include "appsettings.h"
#include "version.h"
#include "tasks/logintask.h"
#include "logintask.h"
// Opens the given file in the default application.
// TODO: Move this somewhere.

View File

@ -19,7 +19,7 @@
#include <QMainWindow>
#include "instancelist.h"
#include "data/loginresponse.h"
#include "loginresponse.h"
namespace Ui
{

View File

@ -16,7 +16,7 @@
#include "settingsdialog.h"
#include "ui_settingsdialog.h"
#include "data/appsettings.h"
#include "appsettings.h"
#include <QFileDialog>
#include <QMessageBox>

View File

@ -18,7 +18,7 @@
#include <QKeyEvent>
#include "tasks/task.h"
#include "task.h"
TaskDialog::TaskDialog(QWidget *parent) :
QDialog(parent),

View File

@ -1,47 +0,0 @@
project(libmmcinst)
set(CMAKE_AUTOMOC ON)
# Find Qt
find_package(Qt5Core REQUIRED)
# Include Qt headers.
include_directories(${Qt5Base_INCLUDE_DIRS})
include_directories(${Qt5Network_INCLUDE_DIRS})
# Include utility library.
include_directories(${CMAKE_SOURCE_DIR}/libutil/include)
# Include utility library.
include_directories(${CMAKE_SOURCE_DIR}/libsettings/include)
SET(LIBINST_HEADERS
include/libinstance_config.h
include/instancetypeinterface.h
include/instance.h
include/instancelist.h
include/instanceloader.h
include/instversion.h
include/instversionlist.h
)
SET(LIBINST_SOURCES
src/instance.cpp
src/instancelist.cpp
src/instanceloader.cpp
src/instversion.cpp
src/instversionlist.cpp
)
# Set the include dir path.
SET(LIBMMCINST_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/include" PARENT_SCOPE)
add_definitions(-DLIBMMCINST_LIBRARY)
add_library(libmmcinst SHARED ${LIBINST_SOURCES} ${LIBINST_HEADERS})
qt5_use_modules(libmmcinst Core)
target_link_libraries(libmmcinst libmmcutil libmmcsettings)

96
libmultimc/CMakeLists.txt Normal file
View File

@ -0,0 +1,96 @@
project(libMultiMC)
set(CMAKE_AUTOMOC ON)
# Find Qt
find_package(Qt5Core REQUIRED)
find_package(Qt5Network REQUIRED)
# Include Qt headers.
include_directories(${Qt5Base_INCLUDE_DIRS})
include_directories(${Qt5Network_INCLUDE_DIRS})
# Include utility library.
include_directories(${CMAKE_SOURCE_DIR}/libutil/include)
# Include settings library.
include_directories(${CMAKE_SOURCE_DIR}/libsettings/include)
SET(LIBINST_HEADERS
include/libmmc_config.h
# Instance Stuff
include/instance.h
include/instancelist.h
include/instanceloader.h
include/instversion.h
include/instversionlist.h
# Plugin Stuff
include/pluginmanager.h
include/instancetypeinterface.h
# Tasks
include/task.h
include/logintask.h
include/gameupdatetask.h
# Login Data
include/userinfo.h
include/loginresponse.h
# Misc Data
include/version.h
include/appsettings.h
include/minecraftprocess.h
)
SET(LIBINST_SOURCES
# Instance Stuff
src/instance.cpp
src/instancelist.cpp
src/instanceloader.cpp
src/instversion.cpp
src/instversionlist.cpp
# Plugin Stuff
src/pluginmanager.cpp
# Tasks
src/task.cpp
src/logintask.cpp
src/gameupdatetask.cpp
# Login Data
src/userinfo.cpp
src/loginresponse.cpp
# Misc Data
src/version.cpp
src/appsettings.cpp
src/minecraftprocess.cpp
)
# Set the include dir path.
SET(LIBMULTIMC_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/include" PARENT_SCOPE)
# Include self.
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include)
include_directories(${CMAKE_BINARY_DIR}/include)
add_definitions(-DLIBMULTIMC_LIBRARY)
add_library(libMultiMC SHARED ${LIBINST_SOURCES} ${LIBINST_HEADERS})
qt5_use_modules(libMultiMC Core Network)
target_link_libraries(libMultiMC libUtil libSettings)

View File

@ -20,7 +20,9 @@
#include <basicsettingsobject.h>
class AppSettings : public BasicSettingsObject
#include "libmmc_config.h"
class LIBMULTIMC_EXPORT AppSettings : public BasicSettingsObject
{
Q_OBJECT
public:

View File

@ -18,13 +18,15 @@
#include <QObject>
#include <data/loginresponse.h>
#include "loginresponse.h"
#include "libmmc_config.h"
/*!
* \brief The game update task is the task that handles downloading instances.
* Each instance type has its own class inheriting from this base game update task.
*/
class GameUpdateTask : public QObject
class LIBMULTIMC_EXPORT GameUpdateTask : public QObject
{
Q_OBJECT
public:

View File

@ -23,7 +23,7 @@
#include "inifile.h"
#include "libinstance_config.h"
#include "libmmc_config.h"
class InstanceList;
@ -35,7 +35,7 @@ class InstanceList;
* To create a new instance type, create a new class inheriting from this class
* and implement the pure virtual functions.
*/
class LIBMMCINST_EXPORT Instance : public QObject
class LIBMULTIMC_EXPORT Instance : public QObject
{
Q_OBJECT
public:

View File

@ -22,11 +22,11 @@
#include "siglist.h"
#include "libinstance_config.h"
#include "libmmc_config.h"
class Instance;
class LIBMMCINST_EXPORT InstanceList : public QObject, public SigList< QSharedPointer<Instance> >
class LIBMULTIMC_EXPORT InstanceList : public QObject, public SigList< QSharedPointer<Instance> >
{
Q_OBJECT
public:

View File

@ -20,7 +20,7 @@
#include <QMap>
#include <QList>
#include "libinstance_config.h"
#include "libmmc_config.h"
class InstanceTypeInterface;
class Instance;
@ -32,7 +32,7 @@ typedef QList<const InstanceTypeInterface *> InstTypeList;
* Instance types are registered with the instance loader through its registerInstType() function.
* Creating instances is done through the InstanceLoader's createInstance() function. This function takes
*/
class LIBMMCINST_EXPORT InstanceLoader : public QObject
class LIBMULTIMC_EXPORT InstanceLoader : public QObject
{
Q_OBJECT
public:

View File

@ -18,11 +18,11 @@
#include <QObject>
#include "libinstance_config.h"
#include "libmmc_config.h"
class InstVersionList;
class LIBMMCINST_EXPORT InstVersion : public QObject
class LIBMULTIMC_EXPORT InstVersion : public QObject
{
Q_OBJECT
public:

View File

@ -18,7 +18,7 @@
#include <QObject>
#include "libinstance_config.h"
#include "libmmc_config.h"
class InstVersion;
@ -26,7 +26,7 @@ class InstVersion;
// the lists that keep track of the available game versions for that instance.
// This list will not be loaded on startup. It will be loaded when the list's
// load function is called.
class LIBMMCINST_EXPORT InstVersionList : public QObject
class LIBMULTIMC_EXPORT InstVersionList : public QObject
{
Q_OBJECT
public:

View File

@ -18,10 +18,10 @@
#include <QtCore/QtGlobal>
#ifdef LIBMMCINST_LIBRARY
# define LIBMMCINST_EXPORT Q_DECL_EXPORT
#ifdef LIBMULTIMC_LIBRARY
# define LIBMULTIMC_EXPORT Q_DECL_EXPORT
#else
# define LIBMMCINST_EXPORT Q_DECL_IMPORT
# define LIBMULTIMC_EXPORT Q_DECL_IMPORT
#endif
//#endif // LIBINSTANCE_CONFIG_H

View File

@ -18,10 +18,12 @@
#include <QObject>
#include "libmmc_config.h"
/*!
* \brief The LoginResponse class represents a response received from Minecraft's login servers.
*/
class LoginResponse : public QObject
class LIBMULTIMC_EXPORT LoginResponse : public QObject
{
Q_OBJECT
public:

View File

@ -18,13 +18,15 @@
#include "task.h"
#include "data/userinfo.h"
#include "data/loginresponse.h"
#include "userinfo.h"
#include "loginresponse.h"
#include "libmmc_config.h"
//class QNetworkAccessManager;
class QNetworkReply;
class LoginTask : public Task
class LIBMULTIMC_EXPORT LoginTask : public Task
{
Q_OBJECT
public:

View File

@ -19,15 +19,15 @@
#include <QProcess>
#include "gui/consolewindow.h"
#include "instance.h"
#include "libmmc_config.h"
/**
* @file data/minecraftprocess.h
* @brief The MinecraftProcess class
*/
class MinecraftProcess : public QProcess
class LIBMULTIMC_EXPORT MinecraftProcess : public QProcess
{
Q_OBJECT
public:
@ -38,7 +38,7 @@ public:
* @param session the minecraft session id
* @param console the instance console window
*/
MinecraftProcess(InstancePtr inst, QString user, QString session, ConsoleWindow *console);
MinecraftProcess(InstancePtr inst, QString user, QString session);
/**
* @brief launch minecraft
@ -78,7 +78,6 @@ signals:
void ended();
protected:
ConsoleWindow *m_console;
InstancePtr m_instance;
QString m_user;
QString m_session;

View File

@ -20,10 +20,12 @@
#include <QList>
#include <QPluginLoader>
#include "libmmc_config.h"
/*!
* \brief This class is a singleton that manages loading plugins.
*/
class PluginManager : public QObject
class LIBMULTIMC_EXPORT PluginManager : public QObject
{
Q_OBJECT
public:

View File

@ -20,7 +20,9 @@
#include <QThread>
#include <QString>
class Task : public QThread
#include "libmmc_config.h"
class LIBMULTIMC_EXPORT Task : public QThread
{
Q_OBJECT
public:

View File

@ -18,7 +18,9 @@
#include <QObject>
class UserInfo : public QObject
#include "libmmc_config.h"
class LIBMULTIMC_EXPORT UserInfo : public QObject
{
Q_OBJECT
public:

View File

@ -18,10 +18,12 @@
#include <QObject>
#include "libmmc_config.h"
/*!
* \brief The Version class represents a MultiMC version number.
*/
class Version : public QObject
class LIBMULTIMC_EXPORT Version : public QObject
{
Q_OBJECT
public:

View File

@ -18,7 +18,7 @@
#include <setting.h>
#include <QPoint>
#include <QColor>
//#include <QColor>
AppSettings::AppSettings(QObject *parent) :
BasicSettingsObject(parent)
@ -41,9 +41,9 @@ AppSettings::AppSettings(QObject *parent) :
registerSetting(new Setting("InstanceToolbarPosition", QPoint()));
// Console Colors
registerSetting(new Setting("SysMessageColor", QColor(Qt::blue)));
registerSetting(new Setting("StdOutColor", QColor(Qt::black)));
registerSetting(new Setting("StdErrColor", QColor(Qt::red)));
// registerSetting(new Setting("SysMessageColor", QColor(Qt::blue)));
// registerSetting(new Setting("StdOutColor", QColor(Qt::black)));
// registerSetting(new Setting("StdErrColor", QColor(Qt::red)));
// Window Size
registerSetting(new Setting("LaunchCompatMode", false));

View File

@ -20,7 +20,7 @@
#include <QDataStream>
#include <QFile>
#include <QDir>
#include <QImage>
//#include <QImage>
#include <QProcessEnvironment>
#include "instance.h"
@ -75,7 +75,7 @@ QStringList MinecraftProcess::splitArgs(QString args)
// prepare tools
inline void MinecraftProcess::extractIcon(InstancePtr inst, QString destination)
{
QImage(":/icons/instances/" + inst->iconKey()).save(destination);
// QImage(":/icons/instances/" + inst->iconKey()).save(destination);
}
inline void MinecraftProcess::extractLauncher(QString destination)
@ -90,8 +90,8 @@ void MinecraftProcess::prepare(InstancePtr inst)
}
// constructor
MinecraftProcess::MinecraftProcess(InstancePtr inst, QString user, QString session, ConsoleWindow *console) :
m_instance(inst), m_user(user), m_session(session), m_console(console)
MinecraftProcess::MinecraftProcess(InstancePtr inst, QString user, QString session) :
m_instance(inst), m_user(user), m_session(session)
{
connect(this, SIGNAL(finished(int, QProcess::ExitStatus)), SLOT(finish(int, QProcess::ExitStatus)));
@ -125,21 +125,21 @@ MinecraftProcess::MinecraftProcess(InstancePtr inst, QString user, QString sessi
// console window
void MinecraftProcess::on_stdErr()
{
if (m_console != nullptr)
m_console->write(readAllStandardError(), ConsoleWindow::ERROR);
// if (m_console != nullptr)
// m_console->write(readAllStandardError(), ConsoleWindow::ERROR);
}
void MinecraftProcess::on_stdOut()
{
if (m_console != nullptr)
m_console->write(readAllStandardOutput(), ConsoleWindow::DEFAULT);
// if (m_console != nullptr)
// m_console->write(readAllStandardOutput(), ConsoleWindow::DEFAULT);
}
void MinecraftProcess::log(QString text)
{
if (m_console != nullptr)
m_console->write(text);
else
// if (m_console != nullptr)
// m_console->write(text);
// else
qDebug(qPrintable(text));
}
@ -166,8 +166,8 @@ void MinecraftProcess::finish(int code, ExitStatus status)
}
}
if (m_console != nullptr)
m_console->setMayClose(true);
// if (m_console != nullptr)
// m_console->setMayClose(true);
emit ended();
}
@ -200,8 +200,8 @@ void MinecraftProcess::launch()
//TODO: error handling
}
if(m_console != nullptr)
m_console->setMayClose(false);
// if(m_console != nullptr)
// m_console->setMayClose(false);
}
void MinecraftProcess::genArgs()

View File

@ -1,4 +1,4 @@
project(libmmcsettings)
project(libSettings)
# Find Qt
find_package(Qt5Core REQUIRED)
@ -7,12 +7,11 @@ find_package(Qt5Core REQUIRED)
include_directories(${Qt5Base_INCLUDE_DIRS})
include_directories(${Qt5Network_INCLUDE_DIRS})
# Include utils library headers.
include_directories(${CMAKE_SOURCE_DIR}/libutil/include)
SET(LIBSETTINGS_HEADERS
include/libsettings_config.h
include/inifile.h
include/settingsobject.h
include/setting.h
include/overridesetting.h
@ -22,6 +21,8 @@ include/inisettingsobject.h
)
SET(LIBSETTINGS_SOURCES
src/inifile.cpp
src/settingsobject.cpp
src/setting.cpp
src/overridesetting.cpp
@ -31,10 +32,11 @@ src/inisettingsobject.cpp
)
# Set the include dir path.
SET(LIBMMCSETTINGS_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/include" PARENT_SCOPE)
SET(LIBSETTINGS_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/include" PARENT_SCOPE)
include_directories(${LIBSETTINGS_INCLUDE_DIR})
add_definitions(-DLIBMMCSETTINGS_LIBRARY)
add_definitions(-DLIBSETTINGS_LIBRARY)
add_library(libmmcsettings SHARED ${LIBSETTINGS_SOURCES} ${LIBSETTINGS_HEADERS})
qt5_use_modules(libmmcsettings Core)
target_link_libraries(libmmcsettings libmmcutil)
add_library(libSettings SHARED ${LIBSETTINGS_SOURCES} ${LIBSETTINGS_HEADERS})
qt5_use_modules(libSettings Core)
target_link_libraries(libSettings)

View File

@ -26,7 +26,7 @@
/*!
* \brief A settings object that stores its settings in a QSettings object.
*/
class LIBMMCSETTINGS_EXPORT BasicSettingsObject : public SettingsObject
class LIBSETTINGS_EXPORT BasicSettingsObject : public SettingsObject
{
Q_OBJECT
public:

View File

@ -20,10 +20,10 @@
#include <QString>
#include <QVariant>
#include "libutil_config.h"
#include "libsettings_config.h"
// Sectionless INI parser (for instance config files)
class LIBMMCUTIL_EXPORT INIFile : public QMap<QString, QVariant>
class LIBSETTINGS_EXPORT INIFile : public QMap<QString, QVariant>
{
public:
explicit INIFile();

View File

@ -18,7 +18,7 @@
#include <QObject>
#include <inifile.h>
#include "inifile.h"
#include "settingsobject.h"
@ -27,7 +27,7 @@
/*!
* \brief A settings object that stores its settings in an INIFile.
*/
class LIBMMCSETTINGS_EXPORT INISettingsObject : public SettingsObject
class LIBSETTINGS_EXPORT INISettingsObject : public SettingsObject
{
Q_OBJECT
public:

View File

@ -18,10 +18,10 @@
#include <QtCore/QtGlobal>
#ifdef LIBMMCSETTINGS_LIBRARY
# define LIBMMCSETTINGS_EXPORT Q_DECL_EXPORT
#ifdef LIBSETTINGS_LIBRARY
# define LIBSETTINGS_EXPORT Q_DECL_EXPORT
#else
# define LIBMMCSETTINGS_EXPORT Q_DECL_IMPORT
# define LIBSETTINGS_EXPORT Q_DECL_IMPORT
#endif
#endif // LIBINSTANCE_CONFIG_H

View File

@ -28,7 +28,7 @@
* The other setting can be (and usually is) a part of a different SettingsObject
* than this one.
*/
class LIBMMCSETTINGS_EXPORT OverrideSetting : public Setting
class LIBSETTINGS_EXPORT OverrideSetting : public Setting
{
Q_OBJECT
public:

View File

@ -26,7 +26,7 @@ class SettingsObject;
/*!
*
*/
class LIBMMCSETTINGS_EXPORT Setting : public QObject
class LIBSETTINGS_EXPORT Setting : public QObject
{
Q_OBJECT
public:

View File

@ -34,7 +34,7 @@ class Setting;
*
* \sa Setting
*/
class LIBMMCSETTINGS_EXPORT SettingsObject : public QObject
class LIBSETTINGS_EXPORT SettingsObject : public QObject
{
Q_OBJECT
public:
@ -165,6 +165,6 @@ private:
/*!
* \brief A global settings object.
*/
LIBMMCSETTINGS_EXPORT extern SettingsObject *globalSettings;
LIBSETTINGS_EXPORT extern SettingsObject *globalSettings;
#endif // SETTINGSOBJECT_H

View File

@ -1,4 +1,4 @@
project(libmmcutil)
project(libUtil)
######## Set compiler flags ########
IF(APPLE)
@ -32,8 +32,6 @@ include/osutils.h
include/userutils.h
include/cmdutils.h
include/inifile.h
include/siglist.h
include/siglist_impl.h
)
@ -43,15 +41,13 @@ src/pathutils.cpp
src/osutils.cpp
src/userutils.cpp
src/cmdutils.cpp
src/inifile.cpp
)
# Set the include dir path.
SET(LIBMMCUTIL_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/include" PARENT_SCOPE)
SET(LIBUTIL_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/include" PARENT_SCOPE)
add_definitions(-DLIBMMCUTIL_LIBRARY)
add_definitions(-DLIBUTIL_LIBRARY)
add_library(libmmcutil SHARED ${LIBUTIL_SOURCES} ${LIBUTIL_HEADERS})
qt5_use_modules(libmmcutil Core)
target_link_libraries(libmmcutil)
add_library(libUtil SHARED ${LIBUTIL_SOURCES} ${LIBUTIL_HEADERS})
qt5_use_modules(libUtil Core)
target_link_libraries(libUtil)

View File

@ -42,7 +42,7 @@ namespace Commandline {
namespace FlagStyle
{
enum LIBMMCUTIL_EXPORT Enum
enum LIBUTIL_EXPORT Enum
{
GNU, /**< --option and -o (GNU Style) */
Unix, /**< -option and -o (Unix Style) */
@ -60,7 +60,7 @@ enum LIBMMCUTIL_EXPORT Enum
*/
namespace ArgumentStyle
{
enum LIBMMCUTIL_EXPORT Enum
enum LIBUTIL_EXPORT Enum
{
Space, /**< --option=value */
Equals, /**< --option value */
@ -75,7 +75,7 @@ enum LIBMMCUTIL_EXPORT Enum
namespace OptionType
{
enum LIBMMCUTIL_EXPORT Enum
enum LIBUTIL_EXPORT Enum
{
Switch,
Option
@ -85,7 +85,7 @@ enum LIBMMCUTIL_EXPORT Enum
/**
* @brief The ParsingError class
*/
class LIBMMCUTIL_EXPORT ParsingError : public std::exception
class LIBUTIL_EXPORT ParsingError : public std::exception
{
public:
ParsingError(const QString &what);
@ -100,7 +100,7 @@ private:
/**
* @brief The Parser class
*/
class LIBMMCUTIL_EXPORT Parser
class LIBUTIL_EXPORT Parser
{
public:
/**

View File

@ -18,10 +18,10 @@
#include <QtCore/QtGlobal>
#ifdef LIBMMCUTIL_LIBRARY
# define LIBMMCUTIL_EXPORT Q_DECL_EXPORT
#ifdef LIBUTIL_LIBRARY
# define LIBUTIL_EXPORT Q_DECL_EXPORT
#else
# define LIBMMCUTIL_EXPORT Q_DECL_IMPORT
# define LIBUTIL_EXPORT Q_DECL_IMPORT
#endif
#endif // LIBUTIL_CONFIG_H

View File

@ -20,9 +20,9 @@
#include "libutil_config.h"
LIBMMCUTIL_EXPORT QString PathCombine(QString path1, QString path2);
LIBMMCUTIL_EXPORT QString PathCombine(QString path1, QString path2, QString path3);
LIBUTIL_EXPORT QString PathCombine(QString path1, QString path2);
LIBUTIL_EXPORT QString PathCombine(QString path1, QString path2, QString path3);
LIBMMCUTIL_EXPORT QString AbsolutePath(QString path);
LIBUTIL_EXPORT QString AbsolutePath(QString path);
#endif // PATHUTILS_H

View File

@ -8,12 +8,12 @@
namespace Util
{
// Get the Directory representing the User's Desktop
LIBMMCUTIL_EXPORT QString getDesktopDir();
LIBUTIL_EXPORT QString getDesktopDir();
// Create a shortcut at *location*, pointing to *dest* called with the arguments *args*
// call it *name* and assign it the icon *icon*
// return true if operation succeeded
LIBMMCUTIL_EXPORT bool createShortCut(QString location, QString dest, QStringList args, QString name, QString iconLocation);
LIBUTIL_EXPORT bool createShortCut(QString location, QString dest, QStringList args, QString name, QString iconLocation);
}
#endif // USERUTILS_H

View File

@ -26,13 +26,13 @@
#include "gui/taskdialog.h"
#include "gui/consolewindow.h"
#include "data/appsettings.h"
#include "appsettings.h"
#include "instancelist.h"
#include "data/loginresponse.h"
#include "tasks/logintask.h"
#include "data/minecraftprocess.h"
#include "loginresponse.h"
#include "logintask.h"
#include "minecraftprocess.h"
#include "data/plugin/pluginmanager.h"
#include "pluginmanager.h"
#include "pathutils.h"
#include "cmdutils.h"
@ -85,7 +85,7 @@ private slots:
{
// TODO: console
console = new ConsoleWindow();
proc = new MinecraftProcess(instance, response.username(), response.sessionID(), console);
proc = new MinecraftProcess(instance, response.username(), response.sessionID());
//if (instance->getShowConsole())
console->show();
connect(proc, SIGNAL(ended()), SLOT(onTerminated()));

View File

@ -47,7 +47,7 @@ quazip
patchlib
# Link the util, settings, and instance libraries.
libmmcutil
libmmcsettings
libmmcinst
libUtil
libSettings
libMultiMC
)