2013-01-11 06:55:40 +05:30
cmake_minimum_required ( VERSION 2.8.9 )
2013-09-26 17:19:58 +05:30
2014-04-06 21:42:48 +05:30
string ( COMPARE EQUAL "${CMAKE_SOURCE_DIR}" "${CMAKE_BUILD_DIR}" IS_IN_SOURCE_BUILD )
if ( IS_IN_SOURCE_BUILD )
2014-04-06 23:13:09 +05:30
message ( AUTHOR_WARNING "You are building MultiMC in-source. This is NOT recommended!" )
2014-04-06 21:42:48 +05:30
endif ( )
2014-04-06 23:13:09 +05:30
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 17:19:58 +05:30
2013-02-05 23:39:20 +05:30
project ( MultiMC )
2013-12-14 18:47:59 +05:30
enable_testing ( )
2013-01-11 06:55:40 +05:30
2013-02-21 22:02:13 +05:30
######## Set CMake options ########
2014-04-06 23:13:09 +05:30
set ( CMAKE_AUTOMOC ON )
set ( CMAKE_INCLUDE_CURRENT_DIR ON )
set ( FILES_TO_TRANSLATE )
2013-01-11 06:55:40 +05:30
2013-11-24 11:06:16 +05:30
######## Set module path ########
2014-04-06 23:13:09 +05:30
set ( CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake/" )
set ( MMC_SRC "${PROJECT_SOURCE_DIR}" )
set ( MMC_BIN "${PROJECT_BINARY_DIR}" )
2013-11-24 11:06:16 +05:30
2013-02-21 22:02:13 +05:30
# Output all executables and shared libs in the main build folder, not in subfolders.
2014-04-06 23:13:09 +05:30
set ( CMAKE_RUNTIME_OUTPUT_DIRECTORY ${ PROJECT_BINARY_DIR } )
2013-01-11 06:55:40 +05:30
2014-04-06 23:13:09 +05:30
if ( UNIX )
set ( CMAKE_LIBRARY_OUTPUT_DIRECTORY ${ PROJECT_BINARY_DIR } )
endif ( )
2013-02-22 02:22:23 +05:30
2014-01-11 06:36:22 +05:30
set ( CMAKE_JAVA_TARGET_OUTPUT_DIR ${ PROJECT_BINARY_DIR } /jars )
2013-02-22 00:05:33 +05:30
######## Set compiler flags ########
2014-04-06 21:42:48 +05:30
include ( UseCXX11 )
2014-04-07 21:14:52 +05:30
include ( Coverage )
2014-07-12 21:28:23 +05:30
set ( CMAKE_CXX_FLAGS " -Wall ${CMAKE_CXX_FLAGS}" )
2014-04-06 21:42:48 +05:30
set ( CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Werror=return-type" )
2013-02-21 22:02:13 +05:30
2014-01-08 05:57:40 +05:30
################################ 3rd Party Libs ################################
2013-02-21 22:02:13 +05:30
# Find the required Qt parts
2013-12-17 06:39:58 +05:30
find_package ( Qt5Core REQUIRED )
2013-02-20 20:02:26 +05:30
find_package ( Qt5Widgets REQUIRED )
2014-08-15 03:31:55 +05:30
find_package ( Qt5Concurrent REQUIRED )
2013-02-20 20:02:26 +05:30
find_package ( Qt5Network REQUIRED )
2013-12-17 06:39:58 +05:30
find_package ( Qt5Test REQUIRED )
2014-08-15 03:31:55 +05:30
find_package ( Qt5Xml REQUIRED )
2013-09-08 23:48:55 +05:30
find_package ( Qt5LinguistTools REQUIRED )
2014-09-07 00:31:23 +05:30
find_package ( Qt5WebKitWidgets REQUIRED )
2013-01-11 06:55:40 +05:30
2013-12-17 06:39:58 +05:30
include_directories (
2014-04-09 19:11:49 +05:30
$ { 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-15 03:31:55 +05:30
$ { 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 23:13:09 +05:30
)
2013-01-11 06:55:40 +05:30
2013-12-01 21:04:51 +05:30
# The Qt5 cmake files don't provide its install paths, so ask qmake.
2014-04-06 21:42:48 +05:30
include ( QMakeQuery )
2013-12-01 21:04:51 +05:30
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 22:02:13 +05:30
################################ SET UP BUILD OPTIONS ################################
######## Check endianness ########
2014-04-06 23:13:09 +05:30
include ( TestBigEndian )
test_big_endian ( BIGENDIAN )
if ( ${ BIGENDIAN } )
add_definitions ( -DMULTIMC_BIG_ENDIAN )
endif ( ${ BIGENDIAN } )
2013-02-21 22:02:13 +05:30
2014-05-10 04:03:32 +05:30
######## 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-11 00:46:27 +05:30
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-10 04:03:32 +05:30
endif ( )
2014-05-11 00:46:27 +05:30
option ( MultiMC_TEST_SEGV "Intentionally segfault sometimes to test crash handling." OFF )
2014-05-10 04:03:32 +05:30
if ( MultiMC_TEST_SEGV )
# TODO: Make this a unit test instead.
2014-05-11 00:46:27 +05:30
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-10 04:03:32 +05:30
add_definitions ( -DTEST_SEGV )
endif ( )
2013-12-16 02:18:58 +05:30
2014-05-10 04:03:32 +05:30
######## Set URLs ########
2014-04-06 23:13:09 +05:30
set ( MultiMC_NEWS_RSS_URL "http://multimc.org/rss.xml" CACHE STRING "URL to fetch MultiMC's news RSS feed from." )
2013-12-16 02:18:58 +05:30
2013-02-21 22:02:13 +05:30
######## Set version numbers ########
2014-04-06 23:13:09 +05:30
set ( MultiMC_VERSION_MAJOR 0 )
2014-09-06 16:35:17 +05:30
set ( MultiMC_VERSION_MINOR 5 )
set ( MultiMC_VERSION_HOTFIX 0 )
2013-01-11 06:55:40 +05:30
2013-10-02 03:31:41 +05:30
# Build number
2014-04-06 23:13:09 +05:30
set ( MultiMC_VERSION_BUILD -1 CACHE STRING "Build number. -1 for no build number." )
2013-12-02 01:57:36 +05:30
2014-01-08 05:39:05 +05:30
# Version type
2014-04-06 23:13:09 +05:30
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 05:39:05 +05:30
# Build platform.
2014-04-06 23:13:09 +05:30
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-02 01:57:36 +05:30
2013-12-05 00:04:12 +05:30
# Version channel
2014-04-06 23:13:09 +05:30
set ( MultiMC_VERSION_CHANNEL "" CACHE STRING "The current build's channel. Included in the version string." )
2013-12-05 00:04:12 +05:30
# Channel list URL
2014-04-06 23:13:09 +05:30
set ( MultiMC_CHANLIST_URL "" CACHE STRING "URL for the channel list." )
2013-12-02 01:57:36 +05:30
2013-12-05 00:04:12 +05:30
# Updater enabled?
2014-04-06 23:13:09 +05:30
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-02 01:57:36 +05:30
2014-01-03 23:49:27 +05:30
# Notification URL
2014-04-06 23:13:09 +05:30
set ( MultiMC_NOTIFICATION_URL "" CACHE STRING "URL for checking for notifications." )
2013-12-05 00:04:12 +05:30
2014-04-06 23:13:09 +05:30
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 05:39:05 +05:30
2013-12-05 00:04:12 +05:30
# Build a version string to display in the configure logs.
2014-04-06 23:13:09 +05:30
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 22:02:13 +05:30
2013-12-05 00:04:12 +05:30
# If the update system is enabled, make sure MultiMC_CHANLIST_URL and MultiMC_VERSION_CHANNEL are set.
2014-04-06 23:13:09 +05:30
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-05 00:04:12 +05:30
2014-04-06 07:18:59 +05:30
#### 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 ( )
2014-09-07 00:31:23 +05:30
#### For QuickMods
option ( MultiMC_WEBKIT_INSPECTOR "Enable the QWebInspector for debugging" OFF )
if ( MultiMC_WEBKIT_INSPECTOR )
add_definitions ( -DWEBKIT_INSPECTOR )
endif ( )
2013-12-02 05:25:24 +05:30
#### Custom target to just print the version.
2014-04-06 23:13:09 +05:30
add_custom_target ( version echo "Version: ${MultiMC_VERSION_STRING}" )
2013-10-02 03:31:41 +05:30
2013-12-02 05:25:24 +05:30
#### Check the current Git commit
2014-04-06 21:32:28 +05:30
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 22:32:48 +05:30
2013-02-21 22:02:13 +05:30
######## Configure header ########
2014-04-06 07:29:37 +05:30
configure_file ( "${PROJECT_SOURCE_DIR}/BuildConfig.cpp.in" "${PROJECT_BINARY_DIR}/BuildConfig.cpp" )
2013-01-11 06:55:40 +05:30
2014-01-08 05:57:40 +05:30
######## Packaging/install paths setup ########
2014-04-06 23:13:09 +05:30
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 05:57:40 +05:30
# directories to look for dependencies
2014-04-06 23:13:09 +05:30
set ( DIRS "${QT_LIBS_DIR}" )
2014-01-08 05:57:40 +05:30
################################ Included Libs ################################
# Add quazip
2014-04-06 23:13:09 +05:30
add_definitions ( -DQUAZIP_STATIC )
2014-01-08 05:57:40 +05:30
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 23:13:09 +05:30
add_definitions ( -DLIBUTIL_STATIC )
2014-01-08 05:57:40 +05:30
add_subdirectory ( depends/util )
include_directories ( ${ LIBUTIL_INCLUDE_DIR } )
# Add the updater
add_subdirectory ( mmc_updater )
2014-09-07 00:31:23 +05:30
# Add the GUI -> Logic connection header
add_subdirectory ( depends/LogicalGui )
include_directories ( ${ LOGICALGUI_INCLUDE_DIR } )
2013-02-21 22:02:13 +05:30
################################ FILES ################################
2013-09-22 07:51:36 +05:30
######## Sources and headers ########
SET ( MULTIMC_SOURCES
2014-04-09 19:11:49 +05:30
# 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-10 04:03:32 +05:30
# Crash handling
H a n d l e C r a s h . h
2014-05-10 06:38:07 +05:30
H a n d l e C r a s h . c p p
2014-05-11 00:46:27 +05:30
$ { 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-10 04:03:32 +05:30
2014-04-09 19:11:49 +05:30
# 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 21:28:23 +05:30
# 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-21 03:17:46 +05:30
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 21:28:23 +05:30
2014-04-09 19:11:49 +05:30
# 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 23:29:08 +05:30
# GUI - page dialog pages
2014-07-12 21:28:23 +05:30
g u i / p a g e s / B a s e P a g e . h
2014-06-02 04:19:53 +05:30
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 23:41:09 +05:30
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-02 04:19:53 +05:30
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 04:45:01 +05:30
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 21:32:20 +05:30
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 05:32:57 +05:30
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 04:59:18 +05:30
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 20:37:08 +05:30
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 21:28:23 +05:30
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-21 03:17:46 +05:30
# GUI - global settings pages
2014-07-16 03:43:40 +05:30
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-21 03:17:46 +05:30
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-02 04:19:53 +05:30
2014-04-09 19:11:49 +05:30
# 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-12 03:18:01 +05:30
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 19:11:49 +05:30
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-12 03:18:01 +05:30
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 19:11:49 +05:30
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-12 03:18:01 +05:30
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-22 03:03:00 +05:30
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-12 03:18:01 +05:30
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 19:11:49 +05:30
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-12 03:18:01 +05:30
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 23:29:08 +05:30
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-12 03:18:01 +05:30
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 19:11:49 +05:30
# GUI - widgets
g u i / w i d g e t s / C o m m o n . c p p
2014-05-17 19:53:48 +05:30
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 19:11:49 +05:30
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 19:53:48 +05:30
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 19:11:49 +05:30
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 19:53:48 +05:30
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 23:29:08 +05:30
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 19:53:48 +05:30
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 19:11:49 +05:30
# 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-13 00:43:23 +05:30
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 19:11:49 +05:30
2014-05-09 00:50:10 +05:30
# LOGIC - Base classes and infrastructure
2014-04-09 19:11:49 +05:30
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-05 03:40:59 +05:30
# 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 19:11:49 +05:30
2014-05-09 00:50:10 +05:30
# Instance launch
2014-04-09 19:11:49 +05:30
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-09 00:50:10 +05:30
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 19:11:49 +05:30
# 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 14:45:15 +05:30
# RW lock protected map
l o g i c / R W S t o r a g e . h
2014-07-16 05:33:52 +05:30
# 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 19:11:49 +05:30
# 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 05:33:52 +05:30
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 05:52:09 +05:30
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 20:46:25 +05:30
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-09 00:50:10 +05:30
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 20:46:25 +05:30
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-09 00:50:10 +05:30
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 20:46:25 +05:30
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-09 00:50:10 +05:30
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 20:46:25 +05:30
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 05:23:32 +05:30
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 20:46:25 +05:30
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 16:07:21 +05:30
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 20:46:25 +05:30
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 16:07:21 +05:30
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-09 00:50:10 +05:30
2014-07-12 21:28:23 +05:30
# 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-09 00:50:10 +05:30
# Various base classes
2014-04-09 19:11:49 +05:30
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-09 00:50:10 +05:30
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 19:11:49 +05:30
# 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 05:18:09 +05:30
# 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-09 00:50:10 +05:30
# 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 19:11:49 +05:30
# 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 05:57:40 +05:30
# 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
2014-09-30 05:35:44 +05:30
# Translations
l o g i c / t r a n s / T r a n s l a t i o n D o w n l o a d e r . h
l o g i c / t r a n s / T r a n s l a t i o n D o w n l o a d e r . c p p
2013-02-21 06:40:09 +05:30
)
2013-02-21 22:02:13 +05:30
######## UIs ########
SET ( MULTIMC_UIS
2014-04-09 19:11:49 +05:30
# Windows
g u i / M a i n W i n d o w . u i
2014-06-02 04:19:53 +05:30
# 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 21:32:20 +05:30
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 05:32:57 +05:30
g u i / p a g e s / L o g P a g e . u i
2014-06-09 04:59:18 +05:30
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 04:45:01 +05:30
g u i / p a g e s / N o t e s P a g e . u i
2014-06-28 20:37:08 +05:30
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 21:28:23 +05:30
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-21 03:17:46 +05:30
# Global settings pages
2014-07-16 03:43:40 +05:30
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-21 03:17:46 +05:30
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-02 04:19:53 +05:30
2014-04-09 19:11:49 +05:30
# 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-22 03:03:00 +05:30
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 19:11:49 +05:30
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 05:46:07 +05:30
)
2014-04-06 07:18:59 +05:30
set ( FILES_TO_TRANSLATE )
foreach ( file ${ MULTIMC_SOURCES } )
get_filename_component ( absfile "${file}" ABSOLUTE )
2014-04-06 23:13:09 +05:30
list ( APPEND FILES_TO_TRANSLATE "${absfile}" )
2014-04-06 07:18:59 +05:30
endforeach ( )
foreach ( file ${ MULTIMC_UIS } )
get_filename_component ( absfile "${file}" ABSOLUTE )
2014-04-06 23:13:09 +05:30
list ( APPEND FILES_TO_TRANSLATE "${absfile}" )
2014-04-06 07:18:59 +05:30
endforeach ( )
2013-09-08 23:48:55 +05:30
2014-04-06 23:13:09 +05:30
set ( MULTIMC_QRCS
2014-04-09 19:11:49 +05:30
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 06:52:17 +05:30
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 19:11:49 +05:30
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 22:35:07 +05:30
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 09:22:34 +05:30
)
2013-02-19 00:29:01 +05:30
2013-02-21 22:02:13 +05:30
######## Windows resource files ########
2014-04-06 23:13:09 +05:30
if ( WIN32 )
set ( MULTIMC_RCS resources/multimc.rc )
endif ( )
2013-02-21 22:02:13 +05:30
2013-10-18 22:12:41 +05:30
####### X11 Stuff #######
2014-04-06 23:13:09 +05:30
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 22:12:41 +05:30
2013-02-21 22:02:13 +05:30
################################ COMPILE ################################
2013-02-19 00:29:01 +05:30
2013-02-21 22:02:13 +05:30
# Link additional libraries
2014-04-06 23:13:09 +05:30
if ( WIN32 )
set ( MultiMC_LINK_ADDITIONAL_LIBS ${ MultiMC_LINK_ADDITIONAL_LIBS } Qt5::WinMain )
endif ( WIN32 )
2013-02-05 23:39:20 +05:30
2013-02-21 22:02:13 +05:30
# Tell CMake that MultiMCLauncher.jar is generated.
2014-01-08 05:57:40 +05:30
#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 06:55:40 +05:30
2013-02-21 22:02:13 +05:30
# Qt 5 stuff
2014-04-06 23:13:09 +05:30
qt5_wrap_ui ( MULTIMC_UI ${ MULTIMC_UIS } )
qt5_add_resources ( MULTIMC_RESOURCES ${ MULTIMC_QRCS } )
2013-11-24 11:06:16 +05:30
2013-12-02 15:39:56 +05:30
# Add common library
2014-04-06 23:13:09 +05:30
add_library ( MultiMC_common STATIC ${ MULTIMC_SOURCES } ${ MULTIMC_UI } ${ MULTIMC_RESOURCES } )
2013-12-02 15:39:56 +05:30
2013-02-21 22:02:13 +05:30
# Add executable
2014-04-06 23:13:09 +05:30
add_executable ( MultiMC MACOSX_BUNDLE WIN32 main.cpp ${ MULTIMC_RCS } )
2013-02-21 22:02:13 +05:30
# Link
2014-04-06 23:13:09 +05:30
target_link_libraries ( MultiMC MultiMC_common )
2014-09-07 00:31:23 +05:30
target_link_libraries ( MultiMC_common xz-embedded unpack200 quazip libUtil LogicalGui ${ MultiMC_LINK_ADDITIONAL_LIBS } )
qt5_use_modules ( MultiMC Core Widgets Network Xml Concurrent WebKitWidgets ${ MultiMC_QT_ADDITIONAL_MODULES } )
qt5_use_modules ( MultiMC_common Core Widgets Network Xml Concurrent WebKitWidgets ${ MultiMC_QT_ADDITIONAL_MODULES } )
2013-07-01 02:09:57 +05:30
2013-02-21 22:02:13 +05:30
################################ INSTALLATION AND PACKAGING ################################
2013-02-12 21:44:23 +05:30
2013-02-21 22:02:13 +05:30
######## Install ########
2013-02-12 23:27:18 +05:30
2013-02-21 22:02:13 +05:30
#### Executable ####
2014-04-06 23:13:09 +05:30
if ( APPLE AND UNIX ) ## OSX
install ( TARGETS MultiMC
2014-04-09 19:11:49 +05:30
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 23:13:09 +05:30
)
elseif ( UNIX ) ## LINUX and similar
install ( TARGETS MultiMC
2014-04-09 19:11:49 +05:30
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 23:13:09 +05:30
)
install ( PROGRAMS package/linux/MultiMC DESTINATION . )
elseif ( WIN32 ) ## WINDOWS
install ( TARGETS MultiMC
2014-04-09 19:11:49 +05:30
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 23:13:09 +05:30
)
endif ( )
2013-02-12 21:44:23 +05:30
2013-12-01 21:04:51 +05:30
#### Dist package logic ####
2013-09-19 22:49:01 +05:30
2014-04-06 23:13:09 +05:30
if ( CMAKE_BUILD_TYPE STREQUAL "Debug" OR CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo" )
# Image formats
install (
2014-04-09 19:11:49 +05:30
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-19 02:20:00 +05:30
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 23:13:09 +05:30
)
2014-07-22 15:57:00 +05:30
# 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 23:13:09 +05:30
# Platform plugins
install (
2014-04-09 19:11:49 +05:30
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 23:13:09 +05:30
)
2013-12-01 22:03:40 +05:30
else ( )
2014-04-06 23:13:09 +05:30
# Image formats
install (
2014-04-09 19:11:49 +05:30
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-19 02:20:00 +05:30
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 19:11:49 +05:30
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 23:13:09 +05:30
)
2014-07-22 15:57:00 +05:30
# 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-23 02:49:53 +05:30
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 15:57:00 +05:30
)
2014-04-06 23:13:09 +05:30
# Platform plugins
install (
2014-04-09 19:11:49 +05:30
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 23:13:09 +05:30
)
if ( APPLE )
# Accessible plugin to make buttons look decent on osx
install (
2014-04-09 19:11:49 +05:30
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 23:13:09 +05:30
)
endif ( )
2013-12-01 22:03:40 +05:30
endif ( )
2013-09-19 22:49:01 +05:30
2013-12-01 21:04:51 +05:30
# qtconf
2014-04-06 23:13:09 +05:30
install (
C O D E "
file ( WRITE \"\${CMAKE_INSTALL_PREFIX}/${QTCONF_DEST_DIR}/qt.conf\" \"\")
2013-12-01 21:04:51 +05:30
"
2014-04-06 23:13:09 +05:30
C O M P O N E N T R u n t i m e
2013-12-01 21:04:51 +05:30
)
2013-09-19 22:49:01 +05:30
2014-01-09 01:36:31 +05:30
# ICNS file for OS X
2014-04-06 23:13:09 +05:30
if ( APPLE )
install ( FILES resources/MultiMC.icns DESTINATION MultiMC.app/Contents/Resources )
endif ( )
2014-01-09 01:36:31 +05:30
2014-04-06 23:13:09 +05:30
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 19:11:49 +05:30
@ O N L Y
)
2014-04-06 23:13:09 +05:30
install ( SCRIPT "${CMAKE_CURRENT_BINARY_DIR}/install_prereqs.cmake" COMPONENT Runtime )
2013-09-19 22:49:01 +05:30
2013-02-06 12:07:51 +05:30
2013-02-05 23:39:20 +05:30
2013-02-21 22:02:13 +05:30
######## Package ########
2013-02-05 23:39:20 +05:30
# Package with CPack
2014-04-06 23:13:09 +05:30
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 23:27:18 +05:30
2014-04-06 23:13:09 +05:30
if ( WIN32 )
set ( CPACK_PACKAGE_INSTALL_DIRECTORY "MultiMC 5" )
endif ( )
2013-02-12 23:27:18 +05:30
2014-04-06 23:13:09 +05:30
include ( CPack )
2013-03-20 01:47:35 +05:30
2014-04-06 21:32:28 +05:30
include ( Coverity )
2014-02-25 23:16:50 +05:30
# Translations
add_subdirectory ( translations )
2013-12-02 15:39:56 +05:30
# Tests
add_subdirectory ( tests )