Move all the things (YES. Move them.)

Also, implemented some basic modlist logic, to be wired up.
This commit is contained in:
Petr Mrázek 2013-08-17 13:40:51 +02:00
parent 77e8066542
commit 253067c782
184 changed files with 414 additions and 345 deletions

View File

@ -43,33 +43,28 @@ find_package(ZLIB REQUIRED)
######## Included Libs ######## ######## Included Libs ########
# Add quazip # Add quazip
add_subdirectory(quazip) add_subdirectory(depends/quazip)
include_directories(quazip ${ZLIB_INCLUDE_DIRS}) include_directories(depends/quazip ${ZLIB_INCLUDE_DIRS})
# Add bspatch # Add bspatch
add_subdirectory(patchlib) add_subdirectory(depends/patchlib)
include_directories(patchlib) include_directories(depends/patchlib)
# Add the java launcher # Add the java launcher
add_subdirectory(launcher) add_subdirectory(depends/launcher)
######## MultiMC Libs ######## ######## MultiMC Libs ########
# Add the util library. # Add the util library.
add_subdirectory(libutil) add_subdirectory(depends/util)
include_directories(${LIBUTIL_INCLUDE_DIR}) include_directories(${LIBUTIL_INCLUDE_DIR})
# Add the settings library. # Add the settings library.
add_subdirectory(libsettings) add_subdirectory(depends/settings)
include_directories(${LIBSETTINGS_INCLUDE_DIR}) include_directories(${LIBSETTINGS_INCLUDE_DIR})
# Add the instance library.
add_subdirectory(backend)
include_directories(${LIBMULTIMC_INCLUDE_DIR})
# Add the group view library. # Add the group view library.
add_subdirectory(libgroupview) add_subdirectory(depends/groupview)
include_directories(${LIBGROUPVIEW_INCLUDE_DIR}) include_directories(${LIBGROUPVIEW_INCLUDE_DIR})
@ -164,7 +159,6 @@ AppSettings.h
gui/mainwindow.h gui/mainwindow.h
gui/modeditdialog.h gui/modeditdialog.h
gui/legacymodeditdialog.h
gui/settingsdialog.h gui/settingsdialog.h
gui/newinstancedialog.h gui/newinstancedialog.h
gui/logindialog.h gui/logindialog.h
@ -178,14 +172,51 @@ gui/versionselectdialog.h
gui/lwjglselectdialog.h gui/lwjglselectdialog.h
gui/instancesettings.h gui/instancesettings.h
gui/IconPickerDialog.h gui/IconPickerDialog.h
gui/LegacyModEditDialog.h
java/annotations.h # Base classes and infrastructure
java/classfile.h logic/InstanceVersion.h
java/constants.h logic/MinecraftVersion.h
java/javaendian.h logic/InstanceFactory.h
java/errors.h logic/BaseUpdate.h
java/javautils.h logic/BaseInstance.h
java/membuffer.h logic/BaseInstance_p.h
logic/MinecraftProcess.h
logic/Mod.h
logic/ModList.h
# network stuffs
logic/net/DownloadJob.h
logic/net/JobQueue.h
logic/net/NetWorker.h
# legacy instances
logic/LegacyInstance.h
logic/LegacyInstance_p.h
logic/LegacyUpdate.h
logic/LegacyForge.h
# 1.6 instances
logic/OneSixAssets.h
logic/OneSixInstance.h
logic/OneSixInstance_p.h
logic/OneSixUpdate.h
logic/OneSixVersion.h
logic/VersionFactory.h
# Nostalgia
logic/NostalgiaInstance.h
# Lists
logic/lists/InstanceList.h
logic/lists/InstVersionList.h
logic/lists/MinecraftVersionList.h
logic/lists/LwjglVersionList.h
logic/IconListModel.h
# Tasks
logic/tasks/Task.h
logic/tasks/LoginTask.h
) )
@ -197,7 +228,6 @@ AppSettings.cpp
gui/mainwindow.cpp gui/mainwindow.cpp
gui/modeditdialog.cpp gui/modeditdialog.cpp
gui/legacymodeditdialog.cpp
gui/settingsdialog.cpp gui/settingsdialog.cpp
gui/newinstancedialog.cpp gui/newinstancedialog.cpp
gui/logindialog.cpp gui/logindialog.cpp
@ -211,9 +241,45 @@ gui/versionselectdialog.cpp
gui/lwjglselectdialog.cpp gui/lwjglselectdialog.cpp
gui/instancesettings.cpp gui/instancesettings.cpp
gui/IconPickerDialog.cpp gui/IconPickerDialog.cpp
gui/LegacyModEditDialog.cpp
java/javautils.cpp # Base classes and infrastructure
java/annotations.cpp logic/InstanceFactory.cpp
logic/BaseUpdate.cpp
logic/BaseInstance.cpp
logic/MinecraftProcess.cpp
logic/Mod.cpp
logic/ModList.cpp
# network stuffs - to be moved into a depend lib ~_~
logic/net/NetWorker.cpp
logic/net/DownloadJob.cpp
# legacy instances
logic/LegacyInstance.cpp
logic/LegacyUpdate.cpp
logic/LegacyForge.cpp
# 1.6 instances
logic/OneSixAssets.cpp
logic/OneSixInstance.cpp
logic/OneSixVersion.cpp
logic/OneSixUpdate.cpp
logic/VersionFactory.cpp
# Nostalgia
logic/NostalgiaInstance.cpp
# Lists
logic/lists/InstanceList.cpp
logic/lists/InstVersionList.cpp
logic/lists/MinecraftVersionList.cpp
logic/lists/LwjglVersionList.cpp
logic/IconListModel.cpp
# Tasks
logic/tasks/Task.cpp
logic/tasks/LoginTask.cpp
) )
@ -221,7 +287,6 @@ java/annotations.cpp
SET(MULTIMC_UIS SET(MULTIMC_UIS
gui/mainwindow.ui gui/mainwindow.ui
gui/modeditdialog.ui gui/modeditdialog.ui
gui/legacymodeditdialog.ui
gui/settingsdialog.ui gui/settingsdialog.ui
gui/newinstancedialog.ui gui/newinstancedialog.ui
gui/logindialog.ui gui/logindialog.ui
@ -233,6 +298,7 @@ gui/versionselectdialog.ui
gui/lwjglselectdialog.ui gui/lwjglselectdialog.ui
gui/instancesettings.ui gui/instancesettings.ui
gui/IconPickerDialog.ui gui/IconPickerDialog.ui
gui/LegacyModEditDialog.ui
) )
@ -270,11 +336,9 @@ ADD_EXECUTABLE(MultiMC MACOSX_BUNDLE WIN32
${MULTIMC_SOURCES} ${MULTIMC_HEADERS} ${MULTIMC_UI} ${MULTIMC_QRC} ${MULTIMC_RCS}) ${MULTIMC_SOURCES} ${MULTIMC_HEADERS} ${MULTIMC_UI} ${MULTIMC_QRC} ${MULTIMC_RCS})
# Link # Link
QT5_USE_MODULES(MultiMC Widgets Network WebKitWidgets) QT5_USE_MODULES(MultiMC Widgets Network WebKitWidgets Xml)
TARGET_LINK_LIBRARIES(MultiMC quazip patchlib TARGET_LINK_LIBRARIES(MultiMC quazip patchlib libUtil libSettings libGroupView ${MultiMC_LINK_ADDITIONAL_LIBS})
libUtil libSettings backend libGroupView ADD_DEPENDENCIES(MultiMC MultiMCLauncher libUtil libSettings libGroupView)
${MultiMC_LINK_ADDITIONAL_LIBS})
ADD_DEPENDENCIES(MultiMC MultiMCLauncher libUtil libSettings backend libGroupView)
option(BUILD_KEYRING_TEST "Build the simple keyring test binary" OFF) option(BUILD_KEYRING_TEST "Build the simple keyring test binary" OFF)

View File

@ -1,120 +0,0 @@
project(libMultiMC)
set(CMAKE_AUTOMOC ON)
# Find Qt
find_package(Qt5Core REQUIRED)
find_package(Qt5Network REQUIRED)
find_package(Qt5Xml 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
libmmc_config.h
# Base classes and infrastructure
InstanceVersion.h
MinecraftVersion.h
InstanceFactory.h
BaseUpdate.h
BaseInstance.h
BaseInstance_p.h
MinecraftProcess.h
Mod.h
ModList.h
# network stuffs
net/DownloadJob.h
net/JobQueue.h
net/NetWorker.h
# legacy instances
LegacyInstance.h
LegacyInstance_p.h
LegacyUpdate.h
LegacyForge.h
# 1.6 instances
OneSixAssets.h
OneSixInstance.h
OneSixInstance_p.h
OneSixUpdate.h
OneSixVersion.h
VersionFactory.h
# Nostalgia
NostalgiaInstance.h
# Lists
lists/InstanceList.h
lists/InstVersionList.h
lists/MinecraftVersionList.h
lists/LwjglVersionList.h
IconListModel.h
# Tasks
tasks/Task.h
tasks/LoginTask.h
)
SET(LIBINST_SOURCES
# Base classes and infrastructure
InstanceFactory.cpp
BaseUpdate.cpp
BaseInstance.cpp
MinecraftProcess.cpp
Mod.cpp
ModList.cpp
# network stuffs
net/NetWorker.cpp
net/DownloadJob.cpp
# legacy instances
LegacyInstance.cpp
LegacyUpdate.cpp
LegacyForge.cpp
# 1.6 instances
OneSixAssets.cpp
OneSixInstance.cpp
OneSixVersion.cpp
OneSixUpdate.cpp
VersionFactory.cpp
# Nostalgia
NostalgiaInstance.cpp
# Lists
lists/InstanceList.cpp
lists/InstVersionList.cpp
lists/MinecraftVersionList.cpp
lists/LwjglVersionList.cpp
IconListModel.cpp
# Tasks
tasks/Task.cpp
tasks/LoginTask.cpp
)
# Set the include dir path.
SET(LIBMULTIMC_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}" PARENT_SCOPE)
# Include self.
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
include_directories(${CMAKE_BINARY_DIR}/include)
add_definitions(-DLIBMULTIMC_LIBRARY)
add_library(backend SHARED ${LIBINST_SOURCES} ${LIBINST_HEADERS})
qt5_use_modules(backend Core Network Xml)
target_link_libraries(backend libUtil libSettings quazip)

View File

@ -1,10 +0,0 @@
#pragma once
#include <QString>
#include <settingsobject.h>
#include "BaseInstance_p.h"
class BaseInstance;
struct LegacyInstancePrivate: public BaseInstancePrivate
{
};

View File

@ -0,0 +1,41 @@
project(classparser)
set(CMAKE_AUTOMOC ON)
# Find Qt
find_package(Qt5Core REQUIRED)
# Include Qt headers.
include_directories(${Qt5Base_INCLUDE_DIRS})
SET(CLASSPARSER_HEADERS
include/classparser_config.h
# Public headers
include/javautils.h
# Private headers
src/annotations.h
src/classfile.h
src/constants.h
src/errors.h
src/javaendian.h
src/membuffer.h
)
SET(CLASSPARSER_SOURCES
src/javautils.cpp
src/annotations.cpp
)
# Set the include dir path.
SET(LIBGROUPVIEW_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(-DCLASSPARSER_LIBRARY)
add_library(classparser SHARED ${CLASSPARSER_SOURCES} ${CLASSPARSER_HEADERS})
qt5_use_modules(classparser Core)

View File

@ -13,12 +13,11 @@
* limitations under the License. * limitations under the License.
*/ */
#pragma once
#include <QtCore/QtGlobal> #include <QtCore/QtGlobal>
#ifdef LIBMULTIMC_LIBRARY #ifdef CLASSPARSER_LIBRARY
# define LIBMULTIMC_EXPORT Q_DECL_EXPORT # define CLASSPARSER_EXPORT Q_DECL_EXPORT
#else #else
# define LIBMULTIMC_EXPORT Q_DECL_IMPORT # define CLASSPARSER_EXPORT Q_DECL_IMPORT
#endif #endif

View File

@ -16,6 +16,7 @@
*/ */
#pragma once #pragma once
#include <QString> #include <QString>
#include "classparser_config.h"
#define MCVer_Unknown "Unknown" #define MCVer_Unknown "Unknown"

View File

@ -10,7 +10,7 @@ find_package(Qt5Widgets REQUIRED)
include_directories(${Qt5Base_INCLUDE_DIRS}) include_directories(${Qt5Base_INCLUDE_DIRS})
SET(LIBGROUPVIEW_HEADERS SET(LIBGROUPVIEW_HEADERS
include/libgroupview_config.h include/groupview_config.h
# Public headers # Public headers
include/categorizedsortfilterproxymodel.h include/categorizedsortfilterproxymodel.h

View File

@ -24,7 +24,7 @@
#include <QSortFilterProxyModel> #include <QSortFilterProxyModel>
#include <libgroupview_config.h> #include <groupview_config.h>
class QItemSelection; class QItemSelection;

View File

@ -23,7 +23,7 @@
#include <QListView> #include <QListView>
#include <libgroupview_config.h> #include <groupview_config.h>
class KCategoryDrawer; class KCategoryDrawer;

View File

@ -21,7 +21,7 @@
#ifndef KCATEGORYDRAWER_H #ifndef KCATEGORYDRAWER_H
#define KCATEGORYDRAWER_H #define KCATEGORYDRAWER_H
#include <libgroupview_config.h> #include <groupview_config.h>
#include <QtCore/QObject> #include <QtCore/QObject>
#include <QtGui/QMouseEvent> #include <QtGui/QMouseEvent>

View File

@ -7,7 +7,7 @@ find_package(Java 1.6 REQUIRED COMPONENTS Development)
include(UseJava) include(UseJava)
set(CMAKE_JAVA_JAR_ENTRY_POINT MultiMCLauncher) set(CMAKE_JAVA_JAR_ENTRY_POINT MultiMCLauncher)
set(CMAKE_JAVA_COMPILE_FLAGS -target 1.6 -source 1.6 -Xlint:deprecation -Xlint:unchecked) set(CMAKE_JAVA_COMPILE_FLAGS -target 1.6 -source 1.6 -Xlint:deprecation -Xlint:unchecked)
set(CMAKE_JAVA_TARGET_OUTPUT_DIR "${PROJECT_SOURCE_DIR}/../resources") set(CMAKE_JAVA_TARGET_OUTPUT_DIR "${PROJECT_SOURCE_DIR}/../../resources")
set(SRC set(SRC
MultiMCLauncher.java MultiMCLauncher.java

Some files were not shown because too many files have changed in this diff Show More