2013-01-11 01:25:40 +00:00
cmake_minimum_required ( VERSION 2.8.9 )
2013-09-26 12:49:58 +01:00
2014-04-06 17:12:48 +01:00
string ( COMPARE EQUAL "${CMAKE_SOURCE_DIR}" "${CMAKE_BUILD_DIR}" IS_IN_SOURCE_BUILD )
if ( IS_IN_SOURCE_BUILD )
2014-04-06 18:43:09 +01:00
message ( AUTHOR_WARNING "You are building MultiMC in-source. This is NOT recommended!" )
2014-04-06 17:12:48 +01:00
endif ( )
2014-04-06 18:43:09 +01:00
if ( WIN32 )
# In Qt 5.1+ we have our own main() function, don't autolink to qtmain on Windows
cmake_policy ( SET CMP0020 OLD )
endif ( )
2013-09-26 12:49:58 +01:00
2013-02-05 18:09:20 +00:00
project ( MultiMC )
2013-12-14 13:17:59 +00:00
enable_testing ( )
2013-01-11 01:25:40 +00:00
2013-02-21 16:32:13 +00:00
######## Set CMake options ########
2014-04-06 18:43:09 +01:00
set ( CMAKE_AUTOMOC ON )
set ( CMAKE_INCLUDE_CURRENT_DIR ON )
set ( FILES_TO_TRANSLATE )
2013-01-11 01:25:40 +00:00
2013-11-24 05:36:16 +00:00
######## Set module path ########
2014-04-06 18:43:09 +01:00
set ( CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake/" )
set ( MMC_SRC "${PROJECT_SOURCE_DIR}" )
set ( MMC_BIN "${PROJECT_BINARY_DIR}" )
2013-11-24 05:36:16 +00:00
2013-02-21 16:32:13 +00:00
# Output all executables and shared libs in the main build folder, not in subfolders.
2014-04-06 18:43:09 +01:00
set ( CMAKE_RUNTIME_OUTPUT_DIRECTORY ${ PROJECT_BINARY_DIR } )
2013-01-11 01:25:40 +00:00
2014-04-06 18:43:09 +01:00
if ( UNIX )
set ( CMAKE_LIBRARY_OUTPUT_DIRECTORY ${ PROJECT_BINARY_DIR } )
endif ( )
2013-02-21 20:52:23 +00:00
2014-01-11 01:06:22 +00:00
set ( CMAKE_JAVA_TARGET_OUTPUT_DIR ${ PROJECT_BINARY_DIR } /jars )
2013-02-21 18:35:33 +00:00
######## Set compiler flags ########
2014-04-06 17:12:48 +01:00
include ( UseCXX11 )
2014-04-07 16:44:52 +01:00
include ( Coverage )
2014-07-12 16:58:23 +01:00
set ( CMAKE_CXX_FLAGS " -Wall ${CMAKE_CXX_FLAGS}" )
2014-04-06 17:12:48 +01:00
set ( CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Werror=return-type" )
2013-02-21 16:32:13 +00:00
2014-01-08 00:27:40 +00:00
################################ 3rd Party Libs ################################
2013-02-21 16:32:13 +00:00
# Find the required Qt parts
2013-12-17 01:09:58 +00:00
find_package ( Qt5Core REQUIRED )
2013-02-20 14:32:26 +00:00
find_package ( Qt5Widgets REQUIRED )
2014-08-14 23:01:55 +01:00
find_package ( Qt5Concurrent REQUIRED )
2013-02-20 14:32:26 +00:00
find_package ( Qt5Network REQUIRED )
2013-12-17 01:09:58 +00:00
find_package ( Qt5Test REQUIRED )
2014-08-14 23:01:55 +01:00
find_package ( Qt5Xml REQUIRED )
2013-09-08 19:18:55 +01:00
find_package ( Qt5LinguistTools REQUIRED )
2013-01-11 01:25:40 +00:00
2013-12-17 01:09:58 +00:00
include_directories (
2014-04-09 14:41:49 +01:00
$ { Q t 5 C o r e _ I N C L U D E _ D I R S }
$ { Q t 5 W i d g e t s _ I N C L U D E _ D I R S }
$ { Q t 5 C o n c u r r e n t _ I N C L U D E _ D I R S }
$ { Q t 5 T e s t _ I N C L U D E _ D I R S }
2014-08-14 23:01:55 +01:00
$ { Q t 5 N e t w o r k _ I N C L U D E _ D I R S }
$ { Q t 5 X m l _ I N C L U D E _ D I R S }
2014-04-06 18:43:09 +01:00
)
2013-01-11 01:25:40 +00:00
2013-12-01 15:34:51 +00:00
# The Qt5 cmake files don't provide its install paths, so ask qmake.
2014-04-06 17:12:48 +01:00
include ( QMakeQuery )
2013-12-01 15:34:51 +00:00
query_qmake ( QT_INSTALL_PLUGINS QT_PLUGINS_DIR )
query_qmake ( QT_INSTALL_IMPORTS QT_IMPORTS_DIR )
query_qmake ( QT_INSTALL_LIBS QT_LIBS_DIR )
query_qmake ( QT_HOST_DATA QT_DATA_DIR )
set ( QT_MKSPECS_DIR ${ QT_DATA_DIR } /mkspecs )
2013-02-21 16:32:13 +00:00
################################ SET UP BUILD OPTIONS ################################
######## Check endianness ########
2014-04-06 18:43:09 +01:00
include ( TestBigEndian )
test_big_endian ( BIGENDIAN )
if ( ${ BIGENDIAN } )
add_definitions ( -DMULTIMC_BIG_ENDIAN )
endif ( ${ BIGENDIAN } )
2013-02-21 16:32:13 +00:00
2014-05-09 23:33:32 +01:00
######## Dark magic crash reports ########
option ( MultiMC_HANDLE_SEGV "Handle fatal crashes and generate crash reports." OFF )
set ( CRASH_HANDLER_IMPL "" )
message ( STATUS "Crash dumps are ${MultiMC_HANDLE_SEGV}" )
if ( MultiMC_HANDLE_SEGV )
add_definitions ( -DHANDLE_SEGV )
2014-05-10 20:16:27 +01:00
if ( WIN32 )
find_package ( DbgHelp )
set ( MultiMC_LINK_ADDITIONAL_LIBS "${MultiMC_LINK_ADDITIONAL_LIBS}dbghelp" )
set ( MultiMC_CRASH_HANDLER_EXTRA_H "WinBacktrace.h" )
set ( MultiMC_CRASH_HANDLER_EXTRA_CPP "WinBacktrace.cpp" )
endif ( )
2014-05-09 23:33:32 +01:00
endif ( )
2014-05-10 20:16:27 +01:00
option ( MultiMC_TEST_SEGV "Intentionally segfault sometimes to test crash handling." OFF )
2014-05-09 23:33:32 +01:00
if ( MultiMC_TEST_SEGV )
# TODO: Make this a unit test instead.
2014-05-10 20:16:27 +01:00
message ( WARNING "You have enabled crash handler testing. MULTIMC WILL INTENTIONALLY CRASH ITSELF. Crashes should occur on exit and when the new instance button is pressed." )
2014-05-09 23:33:32 +01:00
add_definitions ( -DTEST_SEGV )
endif ( )
2013-12-15 20:48:58 +00:00
2014-05-09 23:33:32 +01:00
######## Set URLs ########
2014-04-06 18:43:09 +01:00
set ( MultiMC_NEWS_RSS_URL "http://multimc.org/rss.xml" CACHE STRING "URL to fetch MultiMC's news RSS feed from." )
2013-12-15 20:48:58 +00:00
2013-02-21 16:32:13 +00:00
######## Set version numbers ########
2014-04-06 18:43:09 +01:00
set ( MultiMC_VERSION_MAJOR 0 )
2014-08-16 10:32:36 +01:00
set ( MultiMC_VERSION_MINOR 4 )
set ( MultiMC_VERSION_HOTFIX 2 )
2013-01-11 01:25:40 +00:00
2013-10-01 23:01:41 +01:00
# Build number
2014-04-06 18:43:09 +01:00
set ( MultiMC_VERSION_BUILD -1 CACHE STRING "Build number. -1 for no build number." )
2013-12-01 20:27:36 +00:00
2014-01-08 00:09:05 +00:00
# Version type
2014-04-06 18:43:09 +01:00
set ( MultiMC_VERSION_TYPE "Custom" CACHE STRING "MultiMC's version type. This should be one of 'Custom', 'Release', 'ReleaseCandidate', or 'Development', depending on what type of version this is." )
2014-01-08 00:09:05 +00:00
# Build platform.
2014-04-06 18:43:09 +01:00
set ( MultiMC_BUILD_PLATFORM "" CACHE STRING "A short string identifying the platform that this build was built for. Only used by the notification system and to display in the about dialog." )
2013-12-01 20:27:36 +00:00
2013-12-04 18:34:12 +00:00
# Version channel
2014-04-06 18:43:09 +01:00
set ( MultiMC_VERSION_CHANNEL "" CACHE STRING "The current build's channel. Included in the version string." )
2013-12-04 18:34:12 +00:00
# Channel list URL
2014-04-06 18:43:09 +01:00
set ( MultiMC_CHANLIST_URL "" CACHE STRING "URL for the channel list." )
2013-12-01 20:27:36 +00:00
2013-12-04 18:34:12 +00:00
# Updater enabled?
2014-04-06 18:43:09 +01:00
set ( MultiMC_UPDATER false CACHE BOOL "Whether or not the update system is enabled. If this is enabled, you must also set MultiMC_CHANLIST_URL and MultiMC_VERSION_CHANNEL in order for it to work properly." )
2013-12-01 20:27:36 +00:00
2014-01-03 18:19:27 +00:00
# Notification URL
2014-04-06 18:43:09 +01:00
set ( MultiMC_NOTIFICATION_URL "" CACHE STRING "URL for checking for notifications." )
2013-12-04 18:34:12 +00:00
2014-04-06 18:43:09 +01:00
set ( MultiMC_RELEASE_VERSION_NAME "${MultiMC_VERSION_MAJOR}.${MultiMC_VERSION_MINOR}" )
if ( MultiMC_VERSION_HOTFIX GREATER 0 )
set ( MultiMC_RELEASE_VERSION_NAME "${MultiMC_RELEASE_VERSION_NAME}.${MultiMC_VERSION_HOTFIX}" )
endif ( )
2014-01-08 00:09:05 +00:00
2013-12-04 18:34:12 +00:00
# Build a version string to display in the configure logs.
2014-04-06 18:43:09 +01:00
if ( MultiMC_VERSION_TYPE STREQUAL "Custom" )
message ( STATUS "Version Type: Custom" )
set ( MultiMC_VERSION_STRING "${MultiMC_RELEASE_VERSION_NAME}" )
elseif ( MultiMC_VERSION_TYPE STREQUAL "Release" )
message ( STATUS "Version Type: Stable Release" )
set ( MultiMC_VERSION_STRING "${MultiMC_RELEASE_VERSION_NAME}" )
elseif ( MultiMC_VERSION_TYPE STREQUAL "ReleaseCandidate" )
message ( STATUS "Version Type: Release Candidate" )
set ( MultiMC_VERSION_STRING "${MultiMC_RELEASE_VERSION_NAME}-rc${MultiMC_VERSION_BUILD}" )
elseif ( MultiMC_VERSION_TYPE STREQUAL "Development" )
message ( STATUS "Version Type: Development" )
set ( MultiMC_VERSION_STRING "${MultiMC_RELEASE_VERSION_NAME}-dev${MultiMC_VERSION_BUILD}" )
else ( )
message ( ERROR "Invalid build type." )
endif ( )
message ( STATUS "MultiMC 5 Version: ${MultiMC_VERSION_STRING}" )
2013-02-21 16:32:13 +00:00
2013-12-04 18:34:12 +00:00
# If the update system is enabled, make sure MultiMC_CHANLIST_URL and MultiMC_VERSION_CHANNEL are set.
2014-04-06 18:43:09 +01:00
if ( MultiMC_UPDATER )
if ( MultiMC_VERSION_CHANNEL STREQUAL "" )
message ( FATAL_ERROR "Update system is enabled, but MultiMC_VERSION_CHANNEL is not set.\n"
" P l e a s e e n s u r e t h e C M a k e v a r i a b l e s M u l t i M C _ V E R S I O N _ C H A N N E L , M u l t i M C _ C H A N L I S T _ U R L , a n d M u l t i M C _ V E R S I O N _ B U I L D a r e s e t . " )
endif ( )
if ( MultiMC_CHANLIST_URL STREQUAL "" )
message ( FATAL_ERROR "Update system is enabled, but MultiMC_CHANLIST_URL is not set.\n"
" P l e a s e e n s u r e t h e C M a k e v a r i a b l e s M u l t i M C _ V E R S I O N _ C H A N N E L , M u l t i M C _ C H A N L I S T _ U R L , a n d M u l t i M C _ V E R S I O N _ B U I L D a r e s e t . " )
endif ( )
if ( MultiMC_VERSION_BUILD LESS 0 )
message ( FATAL_ERROR "Update system is enabled, but MultiMC_VERSION_BUILD is not set.\n"
" P l e a s e e n s u r e t h e C M a k e v a r i a b l e s M u l t i M C _ V E R S I O N _ C H A N N E L , M u l t i M C _ C H A N L I S T _ U R L , a n d M u l t i M C _ V E R S I O N _ B U I L D a r e s e t . " )
endif ( )
message ( STATUS "Updater is enabled. Channel list URL: ${MultiMC_CHANLIST_URL}" )
endif ( )
2013-12-04 18:34:12 +00:00
2014-04-06 02:48:59 +01:00
#### Updater-related build config options ####
option ( MultiMC_UPDATER_DRY_RUN "Enable updater dry-run mode -- for updater development." OFF )
option ( MultiMC_UPDATER_FORCE_LOCAL "Do not download updated updater -- for updater development." OFF )
if ( MultiMC_UPDATER_DRY_RUN )
set ( MultiMC_UPDATER_DRY_RUN_value "true" )
else ( )
set ( MultiMC_UPDATER_DRY_RUN_value "false" )
endif ( )
if ( MultiMC_UPDATER_FORCE_LOCAL )
set ( MultiMC_UPDATER_FORCE_LOCAL_value "true" )
else ( )
set ( MultiMC_UPDATER_FORCE_LOCAL_value "false" )
endif ( )
2013-12-01 23:55:24 +00:00
#### Custom target to just print the version.
2014-04-06 18:43:09 +01:00
add_custom_target ( version echo "Version: ${MultiMC_VERSION_STRING}" )
2013-10-01 23:01:41 +01:00
2013-12-01 23:55:24 +00:00
#### Check the current Git commit
2014-04-06 17:02:28 +01:00
include ( GitFunctions )
git_run ( COMMAND rev-parse HEAD DEFAULT "Unknown" OUTPUT_VAR MultiMC_GIT_COMMIT )
message ( STATUS "Git commit: ${MultiMC_GIT_COMMIT}" )
2013-02-21 17:02:48 +00:00
2013-02-21 16:32:13 +00:00
######## Configure header ########
2014-04-06 02:59:37 +01:00
configure_file ( "${PROJECT_SOURCE_DIR}/BuildConfig.cpp.in" "${PROJECT_BINARY_DIR}/BuildConfig.cpp" )
2013-01-11 01:25:40 +00:00
2014-01-08 00:27:40 +00:00
######## Packaging/install paths setup ########
2014-04-06 18:43:09 +01:00
if ( UNIX AND APPLE )
set ( BINARY_DEST_DIR MultiMC.app/Contents/MacOS )
set ( PLUGIN_DEST_DIR MultiMC.app/Contents/MacOS )
set ( QTCONF_DEST_DIR MultiMC.app/Contents/Resources )
set ( APPS "\${CMAKE_INSTALL_PREFIX}/MultiMC.app" )
set ( MACOSX_BUNDLE_BUNDLE_NAME "MultiMC" )
set ( MACOSX_BUNDLE_INFO_STRING "MultiMC Minecraft launcher and management utility." )
set ( MACOSX_BUNDLE_GUI_IDENTIFIER "org.multimc.MultiMC5" )
set ( MACOSX_BUNDLE_BUNDLE_VERSION "${MultiMC_VERSION_MAJOR}.${MultiMC_VERSION_MINOR}.${MultiMC_VERSION_REV}.${MultiMC_VERSION_BUILD}" )
set ( MACOSX_BUNDLE_SHORT_VERSION_STRING "${MultiMC_VERSION_MAJOR}.${MultiMC_VERSION_MINOR}.${MultiMC_VERSION_REV}.${MultiMC_VERSION_BUILD}" )
set ( MACOSX_BUNDLE_LONG_VERSION_STRING "${MultiMC_VERSION_MAJOR}.${MultiMC_VERSION_MINOR}.${MultiMC_VERSION_REV}.${MultiMC_VERSION_BUILD}" )
set ( MACOSX_BUNDLE_ICON_FILE MultiMC.icns )
set ( MACOSX_BUNDLE_COPYRIGHT "Copyright 2013 MultiMC Contributors" )
elseif ( UNIX )
set ( BINARY_DEST_DIR bin )
set ( PLUGIN_DEST_DIR plugins )
set ( QTCONF_DEST_DIR . )
set ( APPS "\${CMAKE_INSTALL_PREFIX}/bin/MultiMC" )
elseif ( WIN32 )
set ( BINARY_DEST_DIR . )
set ( PLUGIN_DEST_DIR . )
set ( QTCONF_DEST_DIR . )
set ( APPS "\${CMAKE_INSTALL_PREFIX}/MultiMC.exe" )
endif ( )
2014-01-08 00:27:40 +00:00
# directories to look for dependencies
2014-04-06 18:43:09 +01:00
set ( DIRS "${QT_LIBS_DIR}" )
2014-01-08 00:27:40 +00:00
################################ Included Libs ################################
# Add quazip
2014-04-06 18:43:09 +01:00
add_definitions ( -DQUAZIP_STATIC )
2014-01-08 00:27:40 +00:00
add_subdirectory ( depends/quazip )
include_directories ( depends/quazip )
# Add the java launcher and checker
add_subdirectory ( depends/launcher )
add_subdirectory ( depends/javacheck )
# Add xz decompression
add_subdirectory ( depends/xz-embedded )
include_directories ( ${ XZ_INCLUDE_DIR } )
# Add pack200 decompression
add_subdirectory ( depends/pack200 )
include_directories ( ${ PACK200_INCLUDE_DIR } )
######## MultiMC Libs ########
# Add the util library.
2014-04-06 18:43:09 +01:00
add_definitions ( -DLIBUTIL_STATIC )
2014-01-08 00:27:40 +00:00
add_subdirectory ( depends/util )
include_directories ( ${ LIBUTIL_INCLUDE_DIR } )
# Add the updater
add_subdirectory ( mmc_updater )
2013-02-21 16:32:13 +00:00
################################ FILES ################################
2013-09-22 03:21:36 +01:00
######## Sources and headers ########
SET ( MULTIMC_SOURCES
2014-04-09 14:41:49 +01:00
# Application base
M u l t i M C . h
M u l t i M C . c p p
M M C E r r o r . h
B u i l d C o n f i g . h
$ { P R O J E C T _ B I N A R Y _ D I R } / B u i l d C o n f i g . c p p
2014-05-09 23:33:32 +01:00
# Crash handling
H a n d l e C r a s h . h
2014-05-10 02:08:07 +01:00
H a n d l e C r a s h . c p p
2014-05-10 20:16:27 +01:00
$ { M u l t i M C _ C R A S H _ H A N D L E R _ E X T R A _ H } # Extra platform specific stuff
$ { M u l t i M C _ C R A S H _ H A N D L E R _ E X T R A _ C P P }
2014-05-09 23:33:32 +01:00
2014-04-09 14:41:49 +01:00
# Logging
l o g g e r / Q s D e b u g O u t p u t . c p p
l o g g e r / Q s D e b u g O u t p u t . h
l o g g e r / Q s L o g . c p p
l o g g e r / Q s L o g . h
l o g g e r / Q s L o g D e s t . c p p
l o g g e r / Q s L o g D e s t . h
2014-07-12 16:58:23 +01:00
# GUI - general utilities
g u i / G u i U t i l . h
g u i / G u i U t i l . c p p
2014-07-20 22:47:46 +01:00
g u i / C o l u m n R e s i z e r . h
g u i / C o l u m n R e s i z e r . c p p
2014-07-12 16:58:23 +01:00
2014-04-09 14:41:49 +01:00
# GUI - windows
g u i / M a i n W i n d o w . h
g u i / M a i n W i n d o w . c p p
g u i / C o n s o l e W i n d o w . h
g u i / C o n s o l e W i n d o w . c p p
2014-06-29 18:59:08 +01:00
# GUI - page dialog pages
2014-07-12 16:58:23 +01:00
g u i / p a g e s / B a s e P a g e . h
2014-06-01 23:49:53 +01:00
g u i / p a g e s / V e r s i o n P a g e . c p p
g u i / p a g e s / V e r s i o n P a g e . h
2014-06-08 19:11:09 +01:00
g u i / p a g e s / T e x t u r e P a c k P a g e . h
g u i / p a g e s / R e s o u r c e P a c k P a g e . h
2014-06-01 23:49:53 +01:00
g u i / p a g e s / M o d F o l d e r P a g e . c p p
g u i / p a g e s / M o d F o l d e r P a g e . h
2014-06-18 00:15:01 +01:00
g u i / p a g e s / N o t e s P a g e . c p p
g u i / p a g e s / N o t e s P a g e . h
2014-06-08 17:02:20 +01:00
g u i / p a g e s / L e g a c y U p g r a d e P a g e . c p p
g u i / p a g e s / L e g a c y U p g r a d e P a g e . h
g u i / p a g e s / L e g a c y J a r M o d P a g e . c p p
g u i / p a g e s / L e g a c y J a r M o d P a g e . h
2014-06-30 01:02:57 +01:00
g u i / p a g e s / L o g P a g e . c p p
g u i / p a g e s / L o g P a g e . h
2014-06-09 00:29:18 +01:00
g u i / p a g e s / I n s t a n c e S e t t i n g s P a g e . c p p
g u i / p a g e s / I n s t a n c e S e t t i n g s P a g e . h
2014-06-28 16:07:08 +01:00
g u i / p a g e s / S c r e e n s h o t s P a g e . c p p
g u i / p a g e s / S c r e e n s h o t s P a g e . h
2014-07-12 16:58:23 +01:00
g u i / p a g e s / O t h e r L o g s P a g e . c p p
g u i / p a g e s / O t h e r L o g s P a g e . h
2014-07-20 22:47:46 +01:00
# GUI - global settings pages
2014-07-15 23:13:40 +01:00
g u i / p a g e s / g l o b a l / A c c o u n t L i s t P a g e . c p p
g u i / p a g e s / g l o b a l / A c c o u n t L i s t P a g e . h
2014-07-20 22:47:46 +01:00
g u i / p a g e s / g l o b a l / E x t e r n a l T o o l s P a g e . c p p
g u i / p a g e s / g l o b a l / E x t e r n a l T o o l s P a g e . h
g u i / p a g e s / g l o b a l / J a v a P a g e . c p p
g u i / p a g e s / g l o b a l / J a v a P a g e . h
g u i / p a g e s / g l o b a l / M i n e c r a f t P a g e . c p p
g u i / p a g e s / g l o b a l / M i n e c r a f t P a g e . h
g u i / p a g e s / g l o b a l / M u l t i M C P a g e . c p p
g u i / p a g e s / g l o b a l / M u l t i M C P a g e . h
g u i / p a g e s / g l o b a l / P r o x y P a g e . c p p
g u i / p a g e s / g l o b a l / P r o x y P a g e . h
2014-06-01 23:49:53 +01:00
2014-04-09 14:41:49 +01:00
# GUI - dialogs
g u i / d i a l o g s / A b o u t D i a l o g . c p p
2014-05-11 22:48:01 +01:00
g u i / d i a l o g s / A b o u t D i a l o g . h
g u i / d i a l o g s / A c c o u n t S e l e c t D i a l o g . c p p
g u i / d i a l o g s / A c c o u n t S e l e c t D i a l o g . h
g u i / d i a l o g s / C o p y I n s t a n c e D i a l o g . c p p
g u i / d i a l o g s / C o p y I n s t a n c e D i a l o g . h
2014-04-09 14:41:49 +01:00
g u i / d i a l o g s / C u s t o m M e s s a g e B o x . c p p
2014-05-11 22:48:01 +01:00
g u i / d i a l o g s / C u s t o m M e s s a g e B o x . h
2014-04-09 14:41:49 +01:00
g u i / d i a l o g s / E d i t A c c o u n t D i a l o g . c p p
2014-05-11 22:48:01 +01:00
g u i / d i a l o g s / E d i t A c c o u n t D i a l o g . h
g u i / d i a l o g s / I c o n P i c k e r D i a l o g . c p p
g u i / d i a l o g s / I c o n P i c k e r D i a l o g . h
2014-04-21 22:33:00 +01:00
g u i / d i a l o g s / L o g i n D i a l o g . c p p
2014-05-11 22:48:01 +01:00
g u i / d i a l o g s / L o g i n D i a l o g . h
g u i / d i a l o g s / L w j g l S e l e c t D i a l o g . c p p
g u i / d i a l o g s / L w j g l S e l e c t D i a l o g . h
g u i / d i a l o g s / M o d E d i t D i a l o g C o m m o n . c p p
g u i / d i a l o g s / M o d E d i t D i a l o g C o m m o n . h
g u i / d i a l o g s / N e w I n s t a n c e D i a l o g . c p p
g u i / d i a l o g s / N e w I n s t a n c e D i a l o g . h
2014-04-09 14:41:49 +01:00
g u i / d i a l o g s / N o t i f i c a t i o n D i a l o g . c p p
2014-05-11 22:48:01 +01:00
g u i / d i a l o g s / N o t i f i c a t i o n D i a l o g . h
2014-06-29 18:59:08 +01:00
g u i / p a g e d i a l o g / P a g e D i a l o g . c p p
g u i / p a g e d i a l o g / P a g e D i a l o g . h
2014-05-11 22:48:01 +01:00
g u i / d i a l o g s / P r o g r e s s D i a l o g . c p p
g u i / d i a l o g s / P r o g r e s s D i a l o g . h
g u i / d i a l o g s / U p d a t e D i a l o g . c p p
g u i / d i a l o g s / U p d a t e D i a l o g . h
g u i / d i a l o g s / V e r s i o n S e l e c t D i a l o g . c p p
g u i / d i a l o g s / V e r s i o n S e l e c t D i a l o g . h
2014-04-09 14:41:49 +01:00
# GUI - widgets
g u i / w i d g e t s / C o m m o n . c p p
2014-05-17 15:23:48 +01:00
g u i / w i d g e t s / C o m m o n . h
g u i / w i d g e t s / I c o n L a b e l . c p p
g u i / w i d g e t s / I c o n L a b e l . h
2014-04-09 14:41:49 +01:00
g u i / w i d g e t s / L a b e l e d T o o l B u t t o n . c p p
2014-05-17 15:23:48 +01:00
g u i / w i d g e t s / L a b e l e d T o o l B u t t o n . h
g u i / w i d g e t s / L i n e S e p a r a t o r . c p p
g u i / w i d g e t s / L i n e S e p a r a t o r . h
2014-04-09 14:41:49 +01:00
g u i / w i d g e t s / M C M o d I n f o F r a m e . c p p
2014-05-17 15:23:48 +01:00
g u i / w i d g e t s / M C M o d I n f o F r a m e . h
g u i / w i d g e t s / M o d L i s t V i e w . c p p
g u i / w i d g e t s / M o d L i s t V i e w . h
2014-06-29 18:59:08 +01:00
g u i / w i d g e t s / P a g e C o n t a i n e r . c p p
g u i / w i d g e t s / P a g e C o n t a i n e r . h
g u i / w i d g e t s / P a g e C o n t a i n e r _ p . h
2014-05-17 15:23:48 +01:00
g u i / w i d g e t s / S e r v e r S t a t u s . c p p
g u i / w i d g e t s / S e r v e r S t a t u s . h
g u i / w i d g e t s / V e r s i o n L i s t V i e w . c p p
g u i / w i d g e t s / V e r s i o n L i s t V i e w . h
2014-04-09 14:41:49 +01:00
# GUI - instance group view
g u i / g r o u p v i e w / G r o u p e d P r o x y M o d e l . c p p
g u i / g r o u p v i e w / G r o u p e d P r o x y M o d e l . h
g u i / g r o u p v i e w / G r o u p V i e w . c p p
g u i / g r o u p v i e w / G r o u p V i e w . h
g u i / g r o u p v i e w / I n s t a n c e D e l e g a t e . c p p
g u i / g r o u p v i e w / I n s t a n c e D e l e g a t e . h
2014-07-12 20:13:23 +01:00
g u i / g r o u p v i e w / V i s u a l G r o u p . c p p
g u i / g r o u p v i e w / V i s u a l G r o u p . h
2014-04-09 14:41:49 +01:00
2014-05-08 20:20:10 +01:00
# LOGIC - Base classes and infrastructure
2014-04-09 14:41:49 +01:00
l o g i c / B a s e V e r s i o n . h
l o g i c / I n s t a n c e F a c t o r y . h
l o g i c / I n s t a n c e F a c t o r y . c p p
l o g i c / B a s e I n s t a n c e . h
l o g i c / B a s e I n s t a n c e . c p p
l o g i c / B a s e I n s t a n c e _ p . h
l o g i c / M o d . h
l o g i c / M o d . c p p
l o g i c / M o d L i s t . h
l o g i c / M o d L i s t . c p p
2014-05-04 23:10:59 +01:00
# sets and maps for deciding based on versions
l o g i c / V e r s i o n F i l t e r D a t a . h
l o g i c / V e r s i o n F i l t e r D a t a . c p p
2014-04-09 14:41:49 +01:00
2014-05-08 20:20:10 +01:00
# Instance launch
2014-04-09 14:41:49 +01:00
l o g i c / I n s t a n c e L a u n c h e r . h
l o g i c / I n s t a n c e L a u n c h e r . c p p
2014-05-08 20:20:10 +01:00
l o g i c / M i n e c r a f t P r o c e s s . h
l o g i c / M i n e c r a f t P r o c e s s . c p p
# URN parser/resolver
l o g i c / U R N R e s o l v e r . c p p
l o g i c / U R N R e s o l v e r . h
# Annoying nag screen logic
l o g i c / N a g U t i l s . h
l o g i c / N a g U t i l s . c p p
# Player skin utilities
l o g i c / S k i n U t i l s . h
l o g i c / S k i n U t i l s . c p p
# misc model filter
l o g i c / E n a b l e d I t e m F i l t e r . h
l o g i c / E n a b l e d I t e m F i l t e r . c p p
2014-04-09 14:41:49 +01:00
# JSON parsing helpers
l o g i c / M M C J s o n . h
l o g i c / M M C J s o n . c p p
2014-07-06 10:15:15 +01:00
# RW lock protected map
l o g i c / R W S t o r a g e . h
2014-07-16 01:03:52 +01:00
# A variable that has an implicit default value and keeps track of changes
l o g i c / D e f a u l t V a r i a b l e . h
2014-04-09 14:41:49 +01:00
# network stuffs
l o g i c / n e t / N e t A c t i o n . h
l o g i c / n e t / M D 5 E t a g D o w n l o a d . h
l o g i c / n e t / M D 5 E t a g D o w n l o a d . c p p
l o g i c / n e t / B y t e A r r a y D o w n l o a d . h
l o g i c / n e t / B y t e A r r a y D o w n l o a d . c p p
l o g i c / n e t / C a c h e D o w n l o a d . h
l o g i c / n e t / C a c h e D o w n l o a d . c p p
l o g i c / n e t / N e t J o b . h
l o g i c / n e t / N e t J o b . c p p
l o g i c / n e t / H t t p M e t a C a c h e . h
l o g i c / n e t / H t t p M e t a C a c h e . c p p
l o g i c / n e t / P a s t e U p l o a d . h
l o g i c / n e t / P a s t e U p l o a d . c p p
l o g i c / n e t / U R L C o n s t a n t s . h
l o g i c / n e t / U R L C o n s t a n t s . c p p
# Yggdrasil login stuff
l o g i c / a u t h / A u t h S e s s i o n . h
l o g i c / a u t h / A u t h S e s s i o n . c p p
l o g i c / a u t h / M o j a n g A c c o u n t L i s t . h
l o g i c / a u t h / M o j a n g A c c o u n t L i s t . c p p
l o g i c / a u t h / M o j a n g A c c o u n t . h
l o g i c / a u t h / M o j a n g A c c o u n t . c p p
l o g i c / a u t h / Y g g d r a s i l T a s k . h
l o g i c / a u t h / Y g g d r a s i l T a s k . c p p
l o g i c / a u t h / f l o w s / A u t h e n t i c a t e T a s k . h
l o g i c / a u t h / f l o w s / A u t h e n t i c a t e T a s k . c p p
l o g i c / a u t h / f l o w s / R e f r e s h T a s k . c p p
l o g i c / a u t h / f l o w s / R e f r e s h T a s k . c p p
l o g i c / a u t h / f l o w s / V a l i d a t e T a s k . h
l o g i c / a u t h / f l o w s / V a l i d a t e T a s k . c p p
# Update system
l o g i c / u p d a t e r / U p d a t e C h e c k e r . h
l o g i c / u p d a t e r / U p d a t e C h e c k e r . c p p
l o g i c / u p d a t e r / D o w n l o a d U p d a t e T a s k . h
l o g i c / u p d a t e r / D o w n l o a d U p d a t e T a s k . c p p
l o g i c / u p d a t e r / N o t i f i c a t i o n C h e c k e r . h
l o g i c / u p d a t e r / N o t i f i c a t i o n C h e c k e r . c p p
# News System
l o g i c / n e w s / N e w s C h e c k e r . h
l o g i c / n e w s / N e w s C h e c k e r . c p p
l o g i c / n e w s / N e w s E n t r y . h
l o g i c / n e w s / N e w s E n t r y . c p p
# Status system
l o g i c / s t a t u s / S t a t u s C h e c k e r . h
l o g i c / s t a t u s / S t a t u s C h e c k e r . c p p
# legacy instances
l o g i c / L e g a c y I n s t a n c e . h
l o g i c / L e g a c y I n s t a n c e . c p p
l o g i c / L e g a c y I n s t a n c e _ p . h
l o g i c / L e g a c y U p d a t e . h
l o g i c / L e g a c y U p d a t e . c p p
# OneSix instances
l o g i c / O n e S i x U p d a t e . h
l o g i c / O n e S i x U p d a t e . c p p
l o g i c / O n e S i x I n s t a n c e . h
l o g i c / O n e S i x I n s t a n c e . c p p
l o g i c / O n e S i x I n s t a n c e _ p . h
# OneSix version json infrastructure
2014-07-16 01:03:52 +01:00
l o g i c / m i n e c r a f t / G r a d l e S p e c i f i e r . h
2014-05-19 01:22:09 +01:00
l o g i c / m i n e c r a f t / I n s t a n c e V e r s i o n . c p p
l o g i c / m i n e c r a f t / I n s t a n c e V e r s i o n . h
2014-05-09 16:16:25 +01:00
l o g i c / m i n e c r a f t / J a r M o d . c p p
l o g i c / m i n e c r a f t / J a r M o d . h
l o g i c / m i n e c r a f t / M i n e c r a f t V e r s i o n . c p p
2014-05-08 20:20:10 +01:00
l o g i c / m i n e c r a f t / M i n e c r a f t V e r s i o n . h
2014-05-09 16:16:25 +01:00
l o g i c / m i n e c r a f t / M i n e c r a f t V e r s i o n L i s t . c p p
l o g i c / m i n e c r a f t / M i n e c r a f t V e r s i o n L i s t . h
2014-05-08 20:20:10 +01:00
l o g i c / m i n e c r a f t / O n e S i x L i b r a r y . c p p
2014-05-09 16:16:25 +01:00
l o g i c / m i n e c r a f t / O n e S i x L i b r a r y . h
2014-05-08 20:20:10 +01:00
l o g i c / m i n e c r a f t / O n e S i x R u l e . c p p
2014-05-09 16:16:25 +01:00
l o g i c / m i n e c r a f t / O n e S i x R u l e . h
l o g i c / m i n e c r a f t / O p S y s . c p p
l o g i c / m i n e c r a f t / O p S y s . h
2014-05-10 00:53:32 +01:00
l o g i c / m i n e c r a f t / P a r s e U t i l s . c p p
l o g i c / m i n e c r a f t / P a r s e U t i l s . h
2014-05-09 16:16:25 +01:00
l o g i c / m i n e c r a f t / R a w L i b r a r y . c p p
l o g i c / m i n e c r a f t / R a w L i b r a r y . h
l o g i c / m i n e c r a f t / V e r s i o n B u i l d e r . c p p
l o g i c / m i n e c r a f t / V e r s i o n B u i l d e r . h
2014-05-11 11:37:21 +01:00
l o g i c / m i n e c r a f t / V e r s i o n B u i l d E r r o r . h
2014-05-09 16:16:25 +01:00
l o g i c / m i n e c r a f t / V e r s i o n F i l e . c p p
l o g i c / m i n e c r a f t / V e r s i o n F i l e . h
l o g i c / m i n e c r a f t / V e r s i o n P a t c h . h
2014-05-11 11:37:21 +01:00
l o g i c / m i n e c r a f t / V e r s i o n S o u r c e . h
2014-05-08 20:20:10 +01:00
2014-07-12 16:58:23 +01:00
# A Recursive file system watcher
l o g i c / R e c u r s i v e F i l e S y s t e m W a t c h e r . h
l o g i c / R e c u r s i v e F i l e S y s t e m W a t c h e r . c p p
2014-05-08 20:20:10 +01:00
# Various base classes
2014-04-09 14:41:49 +01:00
l o g i c / B a s e I n s t a l l e r . h
l o g i c / B a s e I n s t a l l e r . c p p
2014-05-08 20:20:10 +01:00
l o g i c / B a s e V e r s i o n L i s t . h
l o g i c / B a s e V e r s i o n L i s t . c p p
l o g i c / I n s t a n c e L i s t . h
l o g i c / I n s t a n c e L i s t . c p p
l o g i c / L w j g l V e r s i o n L i s t . h
l o g i c / L w j g l V e r s i o n L i s t . c p p
2014-04-09 14:41:49 +01:00
# FTB
l o g i c / O n e S i x F T B I n s t a n c e . h
l o g i c / O n e S i x F T B I n s t a n c e . c p p
l o g i c / L e g a c y F T B I n s t a n c e . h
l o g i c / L e g a c y F T B I n s t a n c e . c p p
# the screenshots feature
l o g i c / s c r e e n s h o t s / S c r e e n s h o t . h
l o g i c / s c r e e n s h o t s / I m g u r U p l o a d . h
l o g i c / s c r e e n s h o t s / I m g u r U p l o a d . c p p
l o g i c / s c r e e n s h o t s / I m g u r A l b u m C r e a t i o n . h
l o g i c / s c r e e n s h o t s / I m g u r A l b u m C r e a t i o n . c p p
# Icons
l o g i c / i c o n s / M M C I c o n . h
l o g i c / i c o n s / M M C I c o n . c p p
l o g i c / i c o n s / I c o n L i s t . h
l o g i c / i c o n s / I c o n L i s t . c p p
# Tasks
l o g i c / t a s k s / P r o g r e s s P r o v i d e r . h
l o g i c / t a s k s / T a s k . h
l o g i c / t a s k s / T a s k . c p p
l o g i c / t a s k s / T h r e a d T a s k . h
l o g i c / t a s k s / T h r e a d T a s k . c p p
l o g i c / t a s k s / S e q u e n t i a l T a s k . h
l o g i c / t a s k s / S e q u e n t i a l T a s k . c p p
2014-07-01 00:48:09 +01:00
# Settings
l o g i c / s e t t i n g s / I N I F i l e . c p p
l o g i c / s e t t i n g s / I N I F i l e . h
l o g i c / s e t t i n g s / I N I S e t t i n g s O b j e c t . c p p
l o g i c / s e t t i n g s / I N I S e t t i n g s O b j e c t . h
l o g i c / s e t t i n g s / O v e r r i d e S e t t i n g . c p p
l o g i c / s e t t i n g s / O v e r r i d e S e t t i n g . h
l o g i c / s e t t i n g s / S e t t i n g . c p p
l o g i c / s e t t i n g s / S e t t i n g . h
l o g i c / s e t t i n g s / S e t t i n g s O b j e c t . c p p
l o g i c / s e t t i n g s / S e t t i n g s O b j e c t . h
2014-05-08 20:20:10 +01:00
# Java related code
l o g i c / j a v a / J a v a C h e c k e r . h
l o g i c / j a v a / J a v a C h e c k e r . c p p
l o g i c / j a v a / J a v a U t i l s . h
l o g i c / j a v a / J a v a U t i l s . c p p
l o g i c / j a v a / J a v a V e r s i o n L i s t . h
l o g i c / j a v a / J a v a V e r s i o n L i s t . c p p
l o g i c / j a v a / J a v a C h e c k e r J o b . h
l o g i c / j a v a / J a v a C h e c k e r J o b . c p p
2014-04-09 14:41:49 +01:00
# Assets
l o g i c / a s s e t s / A s s e t s M i g r a t e T a s k . h
l o g i c / a s s e t s / A s s e t s M i g r a t e T a s k . c p p
l o g i c / a s s e t s / A s s e t s U t i l s . h
l o g i c / a s s e t s / A s s e t s U t i l s . c p p
# Tools
l o g i c / t o o l s / B a s e E x t e r n a l T o o l . h
l o g i c / t o o l s / B a s e E x t e r n a l T o o l . c p p
l o g i c / t o o l s / M C E d i t T o o l . h
l o g i c / t o o l s / M C E d i t T o o l . c p p
l o g i c / t o o l s / B a s e P r o f i l e r . h
l o g i c / t o o l s / B a s e P r o f i l e r . c p p
l o g i c / t o o l s / J P r o f i l e r . h
l o g i c / t o o l s / J P r o f i l e r . c p p
l o g i c / t o o l s / J V i s u a l V M . h
l o g i c / t o o l s / J V i s u a l V M . c p p
2014-04-23 01:27:40 +01:00
# Forge and all things forge related
l o g i c / f o r g e / F o r g e V e r s i o n . h
l o g i c / f o r g e / F o r g e V e r s i o n . c p p
l o g i c / f o r g e / F o r g e V e r s i o n L i s t . h
l o g i c / f o r g e / F o r g e V e r s i o n L i s t . c p p
l o g i c / f o r g e / F o r g e M i r r o r . h
l o g i c / f o r g e / F o r g e M i r r o r s . h
l o g i c / f o r g e / F o r g e M i r r o r s . c p p
l o g i c / f o r g e / F o r g e X z D o w n l o a d . h
l o g i c / f o r g e / F o r g e X z D o w n l o a d . c p p
l o g i c / f o r g e / L e g a c y F o r g e . h
l o g i c / f o r g e / L e g a c y F o r g e . c p p
l o g i c / f o r g e / F o r g e I n s t a l l e r . h
l o g i c / f o r g e / F o r g e I n s t a l l e r . c p p
# Liteloader and related things
l o g i c / l i t e l o a d e r / L i t e L o a d e r I n s t a l l e r . h
l o g i c / l i t e l o a d e r / L i t e L o a d e r I n s t a l l e r . c p p
l o g i c / l i t e l o a d e r / L i t e L o a d e r V e r s i o n L i s t . h
l o g i c / l i t e l o a d e r / L i t e L o a d e r V e r s i o n L i s t . c p p
2013-02-21 01:10:09 +00:00
)
2013-02-21 16:32:13 +00:00
######## UIs ########
SET ( MULTIMC_UIS
2014-04-09 14:41:49 +01:00
# Windows
g u i / M a i n W i n d o w . u i
2014-06-01 23:49:53 +01:00
# Option pages
g u i / p a g e s / V e r s i o n P a g e . u i
g u i / p a g e s / M o d F o l d e r P a g e . u i
2014-06-08 17:02:20 +01:00
g u i / p a g e s / L e g a c y U p g r a d e P a g e . u i
g u i / p a g e s / L e g a c y J a r M o d P a g e . u i
2014-06-30 01:02:57 +01:00
g u i / p a g e s / L o g P a g e . u i
2014-06-09 00:29:18 +01:00
g u i / p a g e s / I n s t a n c e S e t t i n g s P a g e . u i
2014-06-18 00:15:01 +01:00
g u i / p a g e s / N o t e s P a g e . u i
2014-06-28 16:07:08 +01:00
g u i / p a g e s / S c r e e n s h o t s P a g e . u i
2014-07-12 16:58:23 +01:00
g u i / p a g e s / O t h e r L o g s P a g e . u i
2014-07-20 22:47:46 +01:00
# Global settings pages
2014-07-15 23:13:40 +01:00
g u i / p a g e s / g l o b a l / A c c o u n t L i s t P a g e . u i
2014-07-20 22:47:46 +01:00
g u i / p a g e s / g l o b a l / E x t e r n a l T o o l s P a g e . u i
g u i / p a g e s / g l o b a l / J a v a P a g e . u i
g u i / p a g e s / g l o b a l / M i n e c r a f t P a g e . u i
g u i / p a g e s / g l o b a l / M u l t i M C P a g e . u i
g u i / p a g e s / g l o b a l / P r o x y P a g e . u i
2014-06-01 23:49:53 +01:00
2014-04-09 14:41:49 +01:00
# Dialogs
g u i / d i a l o g s / C o p y I n s t a n c e D i a l o g . u i
g u i / d i a l o g s / N e w I n s t a n c e D i a l o g . u i
g u i / d i a l o g s / A b o u t D i a l o g . u i
g u i / d i a l o g s / V e r s i o n S e l e c t D i a l o g . u i
g u i / d i a l o g s / L w j g l S e l e c t D i a l o g . u i
g u i / d i a l o g s / P r o g r e s s D i a l o g . u i
g u i / d i a l o g s / I c o n P i c k e r D i a l o g . u i
g u i / d i a l o g s / A c c o u n t S e l e c t D i a l o g . u i
g u i / d i a l o g s / E d i t A c c o u n t D i a l o g . u i
2014-04-21 22:33:00 +01:00
g u i / d i a l o g s / L o g i n D i a l o g . u i
2014-04-09 14:41:49 +01:00
g u i / d i a l o g s / U p d a t e D i a l o g . u i
g u i / d i a l o g s / N o t i f i c a t i o n D i a l o g . u i
# Widgets/other
g u i / w i d g e t s / M C M o d I n f o F r a m e . u i
2013-01-20 00:16:07 +00:00
)
2014-04-06 02:48:59 +01:00
set ( FILES_TO_TRANSLATE )
foreach ( file ${ MULTIMC_SOURCES } )
get_filename_component ( absfile "${file}" ABSOLUTE )
2014-04-06 18:43:09 +01:00
list ( APPEND FILES_TO_TRANSLATE "${absfile}" )
2014-04-06 02:48:59 +01:00
endforeach ( )
foreach ( file ${ MULTIMC_UIS } )
get_filename_component ( absfile "${file}" ABSOLUTE )
2014-04-06 18:43:09 +01:00
list ( APPEND FILES_TO_TRANSLATE "${absfile}" )
2014-04-06 02:48:59 +01:00
endforeach ( )
2013-09-08 19:18:55 +01:00
2014-04-06 18:43:09 +01:00
set ( MULTIMC_QRCS
2014-04-09 14:41:49 +01:00
r e s o u r c e s / b a c k g r o u n d s / b a c k g r o u n d s . q r c
r e s o u r c e s / m u l t i m c / m u l t i m c . q r c
2014-05-25 02:22:17 +01:00
r e s o u r c e s / p e _ d a r k / p e _ d a r k . q r c
r e s o u r c e s / p e _ l i g h t / p e _ l i g h t . q r c
2014-04-09 14:41:49 +01:00
r e s o u r c e s / i n s t a n c e s / i n s t a n c e s . q r c
2014-05-08 18:05:07 +01:00
r e s o u r c e s / v e r s i o n s / v e r s i o n s . q r c
2014-01-19 03:52:34 +00:00
)
2013-02-18 18:59:01 +00:00
2013-02-21 16:32:13 +00:00
######## Windows resource files ########
2014-04-06 18:43:09 +01:00
if ( WIN32 )
set ( MULTIMC_RCS resources/multimc.rc )
endif ( )
2013-02-21 16:32:13 +00:00
2013-10-18 17:42:41 +01:00
####### X11 Stuff #######
2014-04-06 18:43:09 +01:00
if ( UNIX AND NOT APPLE )
set ( MultiMC_QT_ADDITIONAL_MODULES ${ MultiMC_QT_ADDITIONAL_MODULES } X11Extras )
set ( MultiMC_LINK_ADDITIONAL_LIBS ${ MultiMC_LINK_ADDITIONAL_LIBS } xcb )
list ( APPEND MULTIMC_SOURCES gui/Platform_X11.cpp )
else ( )
list ( APPEND MULTIMC_SOURCES gui/Platform_Other.cpp )
endif ( )
2013-10-18 17:42:41 +01:00
2013-02-21 16:32:13 +00:00
################################ COMPILE ################################
2013-02-18 18:59:01 +00:00
2013-02-21 16:32:13 +00:00
# Link additional libraries
2014-04-06 18:43:09 +01:00
if ( WIN32 )
set ( MultiMC_LINK_ADDITIONAL_LIBS ${ MultiMC_LINK_ADDITIONAL_LIBS } Qt5::WinMain )
endif ( WIN32 )
2013-02-05 18:09:20 +00:00
2013-02-21 16:32:13 +00:00
# Tell CMake that MultiMCLauncher.jar is generated.
2014-01-08 00:27:40 +00:00
#SET_SOURCE_FILES_PROPERTIES(${PROJECT_BINARY_DIR}/depends/launcher/MultiMCLauncher.jar GENERATED)
#SET_SOURCE_FILES_PROPERTIES(${PROJECT_BINARY_DIR}/depends/javacheck/JavaCheck.jar GENERATED)
2013-01-11 01:25:40 +00:00
2013-02-21 16:32:13 +00:00
# Qt 5 stuff
2014-04-06 18:43:09 +01:00
qt5_wrap_ui ( MULTIMC_UI ${ MULTIMC_UIS } )
qt5_add_resources ( MULTIMC_RESOURCES ${ MULTIMC_QRCS } )
2013-11-24 05:36:16 +00:00
2013-12-02 10:09:56 +00:00
# Add common library
2014-04-06 18:43:09 +01:00
add_library ( MultiMC_common STATIC ${ MULTIMC_SOURCES } ${ MULTIMC_UI } ${ MULTIMC_RESOURCES } )
2013-12-02 10:09:56 +00:00
2013-02-21 16:32:13 +00:00
# Add executable
2014-04-06 18:43:09 +01:00
add_executable ( MultiMC MACOSX_BUNDLE WIN32 main.cpp ${ MULTIMC_RCS } )
2013-02-21 16:32:13 +00:00
# Link
2014-04-06 18:43:09 +01:00
target_link_libraries ( MultiMC MultiMC_common )
2014-07-01 00:48:09 +01:00
target_link_libraries ( MultiMC_common xz-embedded unpack200 quazip libUtil ${ MultiMC_LINK_ADDITIONAL_LIBS } )
2014-04-06 18:43:09 +01:00
qt5_use_modules ( MultiMC Core Widgets Network Xml Concurrent ${ MultiMC_QT_ADDITIONAL_MODULES } )
qt5_use_modules ( MultiMC_common Core Widgets Network Xml Concurrent ${ MultiMC_QT_ADDITIONAL_MODULES } )
2013-06-30 21:39:57 +01:00
2013-02-21 16:32:13 +00:00
################################ INSTALLATION AND PACKAGING ################################
2013-02-12 16:14:23 +00:00
2013-02-21 16:32:13 +00:00
######## Install ########
2013-02-12 17:57:18 +00:00
2013-02-21 16:32:13 +00:00
#### Executable ####
2014-04-06 18:43:09 +01:00
if ( APPLE AND UNIX ) ## OSX
install ( TARGETS MultiMC
2014-04-09 14:41:49 +01:00
B U N D L E D E S T I N A T I O N . C O M P O N E N T R u n t i m e
R U N T I M E D E S T I N A T I O N M u l t i M C . a p p / C o n t e n t s / M a c O S C O M P O N E N T R u n t i m e
2014-04-06 18:43:09 +01:00
)
elseif ( UNIX ) ## LINUX and similar
install ( TARGETS MultiMC
2014-04-09 14:41:49 +01:00
B U N D L E D E S T I N A T I O N . C O M P O N E N T R u n t i m e
R U N T I M E D E S T I N A T I O N b i n C O M P O N E N T R u n t i m e
2014-04-06 18:43:09 +01:00
)
install ( PROGRAMS package/linux/MultiMC DESTINATION . )
elseif ( WIN32 ) ## WINDOWS
install ( TARGETS MultiMC
2014-04-09 14:41:49 +01:00
B U N D L E D E S T I N A T I O N . C O M P O N E N T R u n t i m e
L I B R A R Y D E S T I N A T I O N . C O M P O N E N T R u n t i m e
R U N T I M E D E S T I N A T I O N . C O M P O N E N T R u n t i m e
2014-04-06 18:43:09 +01:00
)
endif ( )
2013-02-12 16:14:23 +00:00
2013-12-01 15:34:51 +00:00
#### Dist package logic ####
2013-09-19 18:19:01 +01:00
2014-04-06 18:43:09 +01:00
if ( CMAKE_BUILD_TYPE STREQUAL "Debug" OR CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo" )
# Image formats
install (
2014-04-09 14:41:49 +01:00
D I R E C T O R Y " $ { Q T _ P L U G I N S _ D I R } / i m a g e f o r m a t s "
D E S T I N A T I O N $ { P L U G I N _ D E S T _ D I R }
C O M P O N E N T R u n t i m e
2014-05-18 21:50:00 +01:00
R E G E X " t g a | t i f f | m n g " E X C L U D E
2014-04-06 18:43:09 +01:00
)
2014-07-22 11:27:00 +01:00
# Icon engines
install (
D I R E C T O R Y " $ { Q T _ P L U G I N S _ D I R } / i c o n e n g i n e s "
D E S T I N A T I O N $ { P L U G I N _ D E S T _ D I R }
C O M P O N E N T R u n t i m e
R E G E X " f o n t a w e s o m e " E X C L U D E
)
2014-04-06 18:43:09 +01:00
# Platform plugins
install (
2014-04-09 14:41:49 +01:00
D I R E C T O R Y " $ { Q T _ P L U G I N S _ D I R } / p l a t f o r m s "
D E S T I N A T I O N $ { P L U G I N _ D E S T _ D I R }
C O M P O N E N T R u n t i m e
R E G E X " m i n i m a l | l i n u x f b | o f f s c r e e n " E X C L U D E
2014-04-06 18:43:09 +01:00
)
2013-12-01 16:33:40 +00:00
else ( )
2014-04-06 18:43:09 +01:00
# Image formats
install (
2014-04-09 14:41:49 +01:00
D I R E C T O R Y " $ { Q T _ P L U G I N S _ D I R } / i m a g e f o r m a t s "
D E S T I N A T I O N $ { P L U G I N _ D E S T _ D I R }
C O M P O N E N T R u n t i m e
2014-05-18 21:50:00 +01:00
R E G E X " t g a | t i f f | m n g " E X C L U D E
2014-04-09 14:41:49 +01:00
R E G E X " d \ \ . " E X C L U D E
R E G E X " _ d e b u g \ \ . " E X C L U D E
2014-04-06 18:43:09 +01:00
)
2014-07-22 11:27:00 +01:00
# Icon engines
install (
D I R E C T O R Y " $ { Q T _ P L U G I N S _ D I R } / i c o n e n g i n e s "
D E S T I N A T I O N $ { P L U G I N _ D E S T _ D I R }
C O M P O N E N T R u n t i m e
R E G E X " f o n t a w e s o m e " E X C L U D E
2014-07-22 22:19:53 +01:00
R E G E X " d \ \ . " E X C L U D E
R E G E X " _ d e b u g \ \ . " E X C L U D E
2014-07-22 11:27:00 +01:00
)
2014-04-06 18:43:09 +01:00
# Platform plugins
install (
2014-04-09 14:41:49 +01:00
D I R E C T O R Y " $ { Q T _ P L U G I N S _ D I R } / p l a t f o r m s "
D E S T I N A T I O N $ { P L U G I N _ D E S T _ D I R }
C O M P O N E N T R u n t i m e
R E G E X " m i n i m a l | l i n u x f b | o f f s c r e e n " E X C L U D E
R E G E X " d \ \ . " E X C L U D E
R E G E X " _ d e b u g \ \ . " E X C L U D E
2014-04-06 18:43:09 +01:00
)
if ( APPLE )
# Accessible plugin to make buttons look decent on osx
install (
2014-04-09 14:41:49 +01:00
D I R E C T O R Y " $ { Q T _ P L U G I N S _ D I R } / a c c e s s i b l e "
D E S T I N A T I O N $ { P L U G I N _ D E S T _ D I R }
C O M P O N E N T R u n t i m e
R E G E X " q u i c k " E X C L U D E
R E G E X " d \ \ . " E X C L U D E
R E G E X " _ d e b u g \ \ . " E X C L U D E
2014-04-06 18:43:09 +01:00
)
endif ( )
2013-12-01 16:33:40 +00:00
endif ( )
2013-09-19 18:19:01 +01:00
2013-12-01 15:34:51 +00:00
# qtconf
2014-04-06 18:43:09 +01:00
install (
C O D E "
file ( WRITE \"\${CMAKE_INSTALL_PREFIX}/${QTCONF_DEST_DIR}/qt.conf\" \"\")
2013-12-01 15:34:51 +00:00
"
2014-04-06 18:43:09 +01:00
C O M P O N E N T R u n t i m e
2013-12-01 15:34:51 +00:00
)
2013-09-19 18:19:01 +01:00
2014-01-08 20:06:31 +00:00
# ICNS file for OS X
2014-04-06 18:43:09 +01:00
if ( APPLE )
install ( FILES resources/MultiMC.icns DESTINATION MultiMC.app/Contents/Resources )
endif ( )
2014-01-08 20:06:31 +00:00
2014-04-06 18:43:09 +01:00
configure_file (
" $ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } / i n s t a l l _ p r e r e q s . c m a k e . i n "
" $ { C M A K E _ C U R R E N T _ B I N A R Y _ D I R } / i n s t a l l _ p r e r e q s . c m a k e "
2014-04-09 14:41:49 +01:00
@ O N L Y
)
2014-04-06 18:43:09 +01:00
install ( SCRIPT "${CMAKE_CURRENT_BINARY_DIR}/install_prereqs.cmake" COMPONENT Runtime )
2013-09-19 18:19:01 +01:00
2013-02-06 06:37:51 +00:00
2013-02-05 18:09:20 +00:00
2013-02-21 16:32:13 +00:00
######## Package ########
2013-02-05 18:09:20 +00:00
# Package with CPack
2014-04-06 18:43:09 +01:00
if ( UNIX )
if ( APPLE )
set ( CPACK_GENERATOR "ZIP" )
else ( )
set ( CPACK_GENERATOR "TGZ" )
endif ( )
elseif ( WIN32 )
set ( CPACK_GENERATOR "ZIP" )
endif ( )
set ( CPACK_INCLUDE_TOPLEVEL_DIRECTORY 0 )
set ( CPACK_PACKAGE_NAME "MultiMC 5" )
set ( CPACK_PACKAGE_VENDOR "" )
set ( CPACK_PACKAGE_DESCRIPTION_SUMMARY "MultiMC - Minecraft launcher and management tool." )
set ( CPACK_PACKAGE_VERSION "${MultiMC_VERSION_MAJOR}.${MultiMC_VERSION_MINOR}.${MultiMC_VERSION_REV}.${MultiMC_VERSION_BUILD}" )
set ( CPACK_PACKAGE_VERSION_MAJOR ${ MultiMC_VERSION_MAJOR } )
set ( CPACK_PACKAGE_VERSION_MINOR ${ MultiMC_VERSION_MINOR } )
set ( CPACK_PACKAGE_VERSION_PATCH ${ MultiMC_VERSION_REV } )
if ( CPACK_GENERATOR STREQUAL "NSIS" )
set ( CPACK_PACKAGE_FILE_NAME "Setup-MultiMC" )
else ( )
set ( CPACK_PACKAGE_FILE_NAME "MultiMC" )
endif ( )
2013-02-12 17:57:18 +00:00
2014-04-06 18:43:09 +01:00
if ( WIN32 )
set ( CPACK_PACKAGE_INSTALL_DIRECTORY "MultiMC 5" )
endif ( )
2013-02-12 17:57:18 +00:00
2014-04-06 18:43:09 +01:00
include ( CPack )
2013-03-19 20:17:35 +00:00
2014-04-06 17:02:28 +01:00
include ( Coverity )
2014-02-25 17:46:50 +00:00
# Translations
add_subdirectory ( translations )
2013-12-02 10:09:56 +00:00
# Tests
add_subdirectory ( tests )