2013-01-11 06:55:40 +05:30
cmake_minimum_required ( VERSION 2.8.9 )
2013-09-26 17:19:58 +05:30
2013-10-06 05:39:21 +05:30
IF ( WIN32 )
2014-02-24 02:44:24 +05:30
# In Qt 5.1+ we have our own main() function, don't autolink to qtmain on Windows
cmake_policy ( SET CMP0020 OLD )
2013-10-06 05:39:21 +05:30
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 ########
SET ( CMAKE_AUTOMOC ON )
SET ( CMAKE_INCLUDE_CURRENT_DIR ON )
2013-09-08 23:48:55 +05:30
SET ( FILES_TO_TRANSLATE )
2013-01-11 06:55:40 +05:30
2013-11-24 11:06:16 +05:30
######## Set module path ########
SET ( CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake/" )
SET ( MMC_SRC "${PROJECT_SOURCE_DIR}" )
SET ( MMC_BIN "${PROJECT_BINARY_DIR}" )
2013-02-21 22:02:13 +05:30
# Output all executables and shared libs in the main build folder, not in subfolders.
2013-02-21 06:40:09 +05:30
SET ( CMAKE_RUNTIME_OUTPUT_DIRECTORY ${ PROJECT_BINARY_DIR } )
2013-01-11 06:55:40 +05:30
2013-02-22 02:22:23 +05:30
IF ( UNIX )
2014-02-24 02:44:24 +05:30
SET ( CMAKE_LIBRARY_OUTPUT_DIRECTORY ${ PROJECT_BINARY_DIR } )
2013-02-22 02:22:23 +05:30
ENDIF ( )
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 ########
IF ( APPLE )
2014-02-24 02:44:24 +05:30
message ( STATUS "Using APPLE CMAKE_CXX_FLAGS" )
SET ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall" )
2013-02-22 00:05:33 +05:30
ELSEIF ( UNIX )
2014-02-24 02:44:24 +05:30
# assume GCC, add C++0x/C++11 stuff
MESSAGE ( STATUS "Using UNIX CMAKE_CXX_FLAGS" )
SET ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall" )
2013-02-22 00:05:33 +05:30
ELSEIF ( MINGW )
2014-02-24 02:44:24 +05:30
MESSAGE ( STATUS "Using MINGW CMAKE_CXX_FLAGS" )
SET ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++11 -Wall" )
2013-02-22 00:05:33 +05:30
ENDIF ( )
2013-02-21 22:02:13 +05:30
2014-03-23 23:37:13 +05:30
SET ( CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Werror=return-type" )
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 )
find_package ( Qt5Network REQUIRED )
2013-12-17 06:39:58 +05:30
find_package ( Qt5Test REQUIRED )
2014-01-01 23:51:58 +05:30
find_package ( Qt5Concurrent REQUIRED )
2013-09-08 23:48:55 +05:30
find_package ( Qt5LinguistTools REQUIRED )
2013-01-11 06:55:40 +05:30
2013-12-17 06:39:58 +05:30
include_directories (
2014-02-24 02:44:24 +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 N e t w o r k _ 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 }
2013-12-17 06:39:58 +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.
get_target_property ( QMAKE_EXECUTABLE Qt5::qmake LOCATION )
function ( QUERY_QMAKE VAR RESULT )
2014-02-24 02:44:24 +05:30
exec_program ( ${ QMAKE_EXECUTABLE } ARGS "-query ${VAR}" RETURN_VALUE return_code OUTPUT_VARIABLE output )
if ( NOT return_code )
file ( TO_CMAKE_PATH "${output}" output )
set ( ${ RESULT } ${ output } PARENT_SCOPE )
endif ( NOT return_code )
2013-12-01 21:04:51 +05:30
endfunction ( QUERY_QMAKE )
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 ########
INCLUDE ( TestBigEndian )
TEST_BIG_ENDIAN ( BIGENDIAN )
IF ( ${ BIGENDIAN } )
2014-02-24 02:44:24 +05:30
ADD_DEFINITIONS ( -DMULTIMC_BIG_ENDIAN )
2013-02-21 22:02:13 +05:30
ENDIF ( ${ BIGENDIAN } )
2013-12-16 02:18:58 +05:30
######## Set URLs ########
SET ( MultiMC_NEWS_RSS_URL "http://multimc.org/rss.xml" CACHE STRING "URL to fetch MultiMC's news RSS feed from." )
2013-02-21 22:02:13 +05:30
######## Set version numbers ########
2014-01-05 09:14:18 +05:30
SET ( MultiMC_VERSION_MAJOR 0 )
2014-03-24 03:55:55 +05:30
SET ( MultiMC_VERSION_MINOR 3 )
SET ( MultiMC_VERSION_HOTFIX 0 )
2013-01-11 06:55:40 +05:30
2013-10-02 03:31:41 +05:30
# Build number
2013-12-02 01:57:36 +05:30
SET ( MultiMC_VERSION_BUILD -1 CACHE STRING "Build number. -1 for no build number." )
2014-01-08 05:39:05 +05:30
# Version type
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." )
# Build platform.
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
SET ( MultiMC_VERSION_CHANNEL "" CACHE STRING "The current build's channel. Included in the version string." )
# Channel list URL
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?
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
SET ( MultiMC_NOTIFICATION_URL "" CACHE STRING "URL for checking for notifications." )
2013-12-05 00:04:12 +05:30
2014-01-08 05:39:05 +05:30
SET ( MultiMC_RELEASE_VERSION_NAME "${MultiMC_VERSION_MAJOR}.${MultiMC_VERSION_MINOR}" )
IF ( MultiMC_VERSION_HOTFIX GREATER 0 )
2014-02-24 02:44:24 +05:30
SET ( MultiMC_RELEASE_VERSION_NAME "${MultiMC_RELEASE_VERSION_NAME}.${MultiMC_VERSION_HOTFIX}" )
2014-01-08 05:39:05 +05:30
ENDIF ( )
2013-12-05 00:04:12 +05:30
# Build a version string to display in the configure logs.
2014-01-08 07:00:08 +05:30
IF ( MultiMC_VERSION_TYPE STREQUAL "Custom" )
2014-02-24 02:44:24 +05:30
MESSAGE ( STATUS "Version Type: Custom" )
SET ( MultiMC_VERSION_STRING "${MultiMC_RELEASE_VERSION_NAME}" )
2014-01-08 07:00:08 +05:30
ELSEIF ( MultiMC_VERSION_TYPE STREQUAL "Release" )
2014-02-24 02:44:24 +05:30
MESSAGE ( STATUS "Version Type: Stable Release" )
SET ( MultiMC_VERSION_STRING "${MultiMC_RELEASE_VERSION_NAME}" )
2014-01-08 05:39:05 +05:30
ELSEIF ( MultiMC_VERSION_TYPE STREQUAL "ReleaseCandidate" )
2014-02-24 02:44:24 +05:30
MESSAGE ( STATUS "Version Type: Release Candidate" )
SET ( MultiMC_VERSION_STRING "${MultiMC_RELEASE_VERSION_NAME}-rc${MultiMC_VERSION_BUILD}" )
2014-01-08 05:39:05 +05:30
ELSEIF ( MultiMC_VERSION_TYPE STREQUAL "Development" )
2014-02-24 02:44:24 +05:30
MESSAGE ( STATUS "Version Type: Development" )
SET ( MultiMC_VERSION_STRING "${MultiMC_RELEASE_VERSION_NAME}-dev${MultiMC_VERSION_BUILD}" )
2014-01-08 05:39:05 +05:30
ELSE ( )
2014-02-24 02:44:24 +05:30
MESSAGE ( ERROR "Invalid build type." )
2013-12-02 01:57:36 +05:30
ENDIF ( )
2014-01-08 07:00:08 +05:30
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.
IF ( MultiMC_UPDATER )
2014-02-24 02:44:24 +05:30
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}" )
2013-12-05 00:04:12 +05:30
ENDIF ( )
2013-12-02 05:25:24 +05:30
#### Custom target to just print the version.
2013-12-02 01:57:36 +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
2013-02-21 22:32:48 +05:30
execute_process ( COMMAND git rev-parse HEAD
2014-02-24 02:44:24 +05:30
W O R K I N G _ D I R E C T O R Y $ { C M A K E _ S O U R C E _ D I R }
R E S U L T _ V A R I A B L E G I T _ C O M M I T _ C H E C K _ R E S U L T V A R
O U T P U T _ V A R I A B L E G I T _ C O M M I T _ C H E C K _ O U T V A R
O U T P U T _ S T R I P _ T R A I L I N G _ W H I T E S P A C E
2013-02-21 22:32:48 +05:30
)
IF ( GIT_COMMIT_CHECK_RESULTVAR EQUAL 0 )
2014-02-24 02:44:24 +05:30
SET ( MultiMC_GIT_COMMIT "${GIT_COMMIT_CHECK_OUTVAR}" )
MESSAGE ( STATUS "Git commit: ${MultiMC_GIT_COMMIT}" )
2013-02-21 22:32:48 +05:30
ELSE ( )
2014-02-24 02:44:24 +05:30
SET ( MultiMC_GIT_COMMIT "Unknown" )
MESSAGE ( STATUS "Failed to check Git commit. ${GIT_COMMIT_CHECK_RESULTVAR}" )
2013-02-21 22:32:48 +05:30
ENDIF ( )
2013-02-21 22:02:13 +05:30
######## Configure header ########
2013-12-02 05:25:24 +05:30
configure_file ( "${PROJECT_SOURCE_DIR}/config.h.in" "${PROJECT_BINARY_DIR}/include/config.h" )
2013-01-11 06:55:40 +05:30
2013-02-21 22:02:13 +05:30
2013-04-01 22:34:40 +05:30
######## Other Stuff ########
ADD_DEFINITIONS ( -DQUAZIP_STATIC )
2013-08-26 06:23:29 +05:30
ADD_DEFINITIONS ( -DLIBSETTINGS_STATIC )
ADD_DEFINITIONS ( -DLIBUTIL_STATIC )
2013-04-01 22:34:40 +05:30
2014-01-08 05:57:40 +05:30
######## Packaging/install paths setup ########
IF ( UNIX AND APPLE )
2014-02-24 02:44:24 +05:30
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" )
2014-01-08 05:57:40 +05:30
ELSEIF ( UNIX )
2014-02-24 02:44:24 +05:30
SET ( BINARY_DEST_DIR bin )
SET ( PLUGIN_DEST_DIR plugins )
SET ( QTCONF_DEST_DIR . )
SET ( APPS "\${CMAKE_INSTALL_PREFIX}/bin/MultiMC" )
2014-01-08 05:57:40 +05:30
ELSEIF ( WIN32 )
2014-02-24 02:44:24 +05:30
SET ( BINARY_DEST_DIR . )
SET ( PLUGIN_DEST_DIR . )
SET ( QTCONF_DEST_DIR . )
SET ( APPS "\${CMAKE_INSTALL_PREFIX}/MultiMC.exe" )
2014-01-08 05:57:40 +05:30
ENDIF ( )
# directories to look for dependencies
SET ( DIRS "${QT_LIBS_DIR}" )
################################ Included Libs ################################
# Add quazip
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.
add_subdirectory ( depends/util )
include_directories ( ${ LIBUTIL_INCLUDE_DIR } )
# Add the settings library.
add_subdirectory ( depends/settings )
include_directories ( ${ LIBSETTINGS_INCLUDE_DIR } )
# Add the updater
add_subdirectory ( mmc_updater )
2013-02-21 22:02:13 +05:30
################################ FILES ################################
2013-09-22 07:51:36 +05:30
######## Sources and headers ########
SET ( MULTIMC_SOURCES
# Application base
2013-09-07 07:30:58 +05:30
M u l t i M C . h
2013-09-22 07:51:36 +05:30
M u l t i M C . c p p
2013-09-07 07:30:58 +05:30
M u l t i M C V e r s i o n . h
2014-03-02 23:42:04 +05:30
M M C E r r o r . h
2013-07-29 04:29:35 +05:30
2013-10-06 04:43:40 +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
2013-11-04 07:23:05 +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
# GUI - dialogs
g u i / d i a l o g s / S e t t i n g s D i a l o g . h
g u i / d i a l o g s / S e t t i n g s 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
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 / 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 / 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 / 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 / A b o u t D i a l o g . h
g u i / d i a l o g s / A b o u 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
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 / 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 / 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 / I n s t a n c e S e t t i n g s . h
g u i / d i a l o g s / I n s t a n c e S e t t i n g s . 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
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 / L e g a c y M o d E d i t D i a l o g . h
g u i / d i a l o g s / L e g a c y M o d E d i t D i a l o g . c p p
g u i / d i a l o g s / O n e S i x M o d E d i t D i a l o g . h
g u i / d i a l o g s / O n e S i x M o d E d i t D i a l o g . 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 / 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 / E d i t N o t e s D i a l o g . h
g u i / d i a l o g s / E d i t N o t e s D i a l o g . c p p
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
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
2013-11-29 09:10:40 +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 / E d i t A c c o u n t D i a l o g . c p p
2013-11-18 23:35:35 +05:30
g u i / d i a l o g s / A c c o u n t L i s 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 L i s t D i a l o g . c p p
2013-11-28 03:44:18 +05:30
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 / A c c o u n t S e l e c t D i a l o g . c p p
2013-12-02 05:25:24 +05:30
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 / U p d a t e D i a l o g . c p p
2014-02-24 02:44:24 +05:30
g u i / d i a l o g s / S c r e e n s h o t D i a l o g . h
g u i / d i a l o g s / S c r e e n s h o t D i a l o g . c p p
2014-03-15 18:48:29 +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
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
2013-11-04 07:23:05 +05:30
# GUI - widgets
2014-01-29 05:50:19 +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 / C o m m o n . c p p
2013-11-04 07:23:05 +05:30
g u i / w i d g e t s / M o d L i s t V i e w . 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
2014-01-29 05:50:19 +05:30
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
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
2013-11-04 07:23:05 +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 a b e l e d T o o l B u t t o n . c p p
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 C M o d I n f o F r a m e . c p p
2013-08-17 17:10:51 +05:30
2014-02-04 06:10:51 +05:30
# GUI - instance group view
g u i / g r o u p v i e w / G r o u p . c p p
g u i / g r o u p v i e w / G r o u p . h
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
2013-08-17 17:10:51 +05:30
# Base classes and infrastructure
2013-09-16 04:24:39 +05:30
l o g i c / B a s e V e r s i o n . h
2013-08-17 17:10:51 +05:30
l o g i c / M i n e c r a f t 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
2013-09-22 07:51:36 +05:30
l o g i c / I n s t a n c e F a c t o r y . c p p
2013-08-17 17:10:51 +05:30
l o g i c / B a s e I n s t a n c e . h
2013-09-22 07:51:36 +05:30
l o g i c / B a s e I n s t a n c e . c p p
2013-08-17 17:10:51 +05:30
l o g i c / B a s e I n s t a n c e _ p . h
2013-09-22 07:51:36 +05:30
2013-08-17 17:10:51 +05:30
l o g i c / M i n e c r a f t P r o c e s s . h
2013-09-22 07:51:36 +05:30
l o g i c / M i n e c r a f t P r o c e s s . c p p
2013-08-17 17:10:51 +05:30
l o g i c / M o d . h
2013-09-22 07:51:36 +05:30
l o g i c / M o d . c p p
2013-08-17 17:10:51 +05:30
l o g i c / M o d L i s t . h
2013-09-22 07:51:36 +05:30
l o g i c / M o d L i s t . c p p
2013-08-17 17:10:51 +05:30
2013-09-07 07:30:58 +05:30
# Basic instance launcher for starting from terminal
l o g i c / I n s t a n c e L a u n c h e r . h
2013-09-22 07:51:36 +05:30
l o g i c / I n s t a n c e L a u n c h e r . c p p
2013-09-07 07:30:58 +05:30
2014-03-02 23:42:04 +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
2013-08-17 17:10:51 +05:30
# network stuffs
2013-10-26 23:25:48 +05:30
l o g i c / n e t / N e t A c t i o n . h
2013-12-10 11:42:52 +05:30
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
2013-09-08 05:45:20 +05:30
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
2013-09-22 07:51:36 +05:30
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
2013-09-08 05:45:20 +05:30
l o g i c / n e t / C a c h e D o w n l o a d . h
2013-09-22 07:51:36 +05:30
l o g i c / n e t / C a c h e D o w n l o a d . c p p
2013-11-17 16:14:18 +05:30
l o g i c / n e t / F o r g e M i r r o r s . h
l o g i c / n e t / F o r g e M i r r o r s . c p p
2013-09-30 06:04:46 +05:30
l o g i c / n e t / F o r g e X z D o w n l o a d . h
l o g i c / n e t / F o r g e X z D o w n l o a d . c p p
2013-10-26 23:25:48 +05:30
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
2013-09-07 01:28:51 +05:30
l o g i c / n e t / H t t p M e t a C a c h e . h
2013-09-22 07:51:36 +05:30
l o g i c / n e t / H t t p M e t a C a c h e . c p p
2013-12-07 04:07:12 +05:30
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
2013-12-13 20:28:11 +05:30
l o g i c / n e t / U R L C o n s t a n t s . h
2014-02-25 06:22:58 +05:30
l o g i c / n e t / U R L C o n s t a n t s . c p p
2013-10-26 23:25:48 +05:30
2013-11-12 00:29:59 +05:30
# Yggdrasil login stuff
2014-01-27 07:30:49 +05:30
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
2013-12-13 07:17:59 +05:30
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
2013-11-12 00:29:59 +05:30
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
2013-11-14 00:08:28 +05:30
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
2013-12-01 06:30:42 +05:30
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
2013-08-17 17:10:51 +05:30
2013-12-05 00:04:12 +05:30
# 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
2013-12-06 01:22:55 +05:30
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
2014-01-03 23:49:27 +05:30
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
2013-12-05 00:04:12 +05:30
2013-12-16 02:18:58 +05:30
# 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
2014-01-12 23:58:42 +05:30
# 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
2013-08-17 17:10:51 +05:30
# legacy instances
l o g i c / L e g a c y I n s t a n c e . h
2013-09-22 07:51:36 +05:30
l o g i c / L e g a c y I n s t a n c e . c p p
2013-08-17 17:10:51 +05:30
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
2013-09-22 07:51:36 +05:30
l o g i c / L e g a c y U p d a t e . c p p
2014-03-02 03:36:47 +05:30
2013-08-17 17:10:51 +05:30
l o g i c / L e g a c y F o r g e . h
2013-09-22 07:51:36 +05:30
l o g i c / L e g a c y F o r g e . c p p
2013-08-17 17:10:51 +05:30
2014-01-24 22:42:02 +05:30
# OneSix instances
2013-08-17 17:10:51 +05:30
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
2014-03-02 03:36:47 +05:30
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
l o g i c / O n e S i x V e r s i o n B u i l d e r . h
l o g i c / O n e S i x V e r s i o n B u i l d e r . c p p
l o g i c / V e r s i o n F i l e . h
l o g i c / V e r s i o n F i l e . c p p
l o g i c / V e r s i o n F i n a l . h
l o g i c / V e r s i o n F i n a l . c p p
2013-09-22 07:51:36 +05:30
l o g i c / O n e S i x L i b r a r y . h
2013-09-12 03:13:17 +05:30
l o g i c / O n e S i x L i b r a r y . c p p
2013-09-22 07:51:36 +05:30
l o g i c / O n e S i x R u l e . h
2013-09-12 03:13:17 +05:30
l o g i c / O n e S i x R u l e . c p p
2013-09-22 07:51:36 +05:30
l o g i c / O p S y s . h
2013-09-12 03:13:17 +05:30
l o g i c / O p S y s . c p p
2014-03-02 03:36:47 +05:30
# Mod installers
2014-01-24 02:01:41 +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
2013-09-22 07:51:36 +05:30
l o g i c / 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 I n s t a l l e r . c p p
2013-12-28 18:52:36 +05:30
l o g i c / 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 I n s t a l l e r . c p p
2013-08-17 17:10:51 +05:30
# Nostalgia
2013-09-22 07:51:36 +05:30
l o g i c / N o s t a l g i a I n s t a n c e . h
2013-08-17 17:10:51 +05:30
l o g i c / N o s t a l g i a I n s t a n c e . c p p
2013-12-20 19:17:26 +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
2013-08-17 17:10:51 +05:30
# Lists
2013-09-22 07:51:36 +05:30
l o g i c / l i s t s / I n s t a n c e L i s t . h
2013-08-17 17:10:51 +05:30
l o g i c / l i s t s / I n s t a n c e L i s t . c p p
2013-09-22 07:51:36 +05:30
l o g i c / l i s t s / B a s e V e r s i o n L i s t . h
2013-09-16 04:24:39 +05:30
l o g i c / l i s t s / B a s e V e r s i o n L i s t . c p p
2013-09-22 07:51:36 +05:30
l o g i c / l i s t s / M i n e c r a f t V e r s i o n L i s t . h
2013-08-17 17:10:51 +05:30
l o g i c / l i s t s / M i n e c r a f t V e r s i o n L i s t . c p p
2013-09-22 07:51:36 +05:30
l o g i c / l i s t s / L w j g l V e r s i o n L i s t . h
2013-08-17 17:10:51 +05:30
l o g i c / l i s t s / L w j g l V e r s i o n L i s t . c p p
2013-09-22 07:51:36 +05:30
l o g i c / l i s t s / F o r g e V e r s i o n L i s t . h
2013-09-16 04:24:39 +05:30
l o g i c / l i s t s / F o r g e V e r s i o n L i s t . c p p
2013-10-14 07:29:21 +05:30
l o g i c / l i s t s / J a v a V e r s i o n L i s t . h
l o g i c / l i s t s / J a v a V e r s i o n L i s t . c p p
2014-02-20 03:04:17 +05:30
l o g i c / l i s t s / 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 s t s / 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-09-16 04:24:39 +05:30
2014-02-25 05:21:24 +05:30
# 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
2014-02-25 05:51:46 +05:30
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 . c p p
2014-02-25 05:21:24 +05:30
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 L i s t . h
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 L i s t . c p p
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
2013-09-16 04:24:39 +05:30
2013-12-31 05:54:28 +05:30
# 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
2013-09-16 04:24:39 +05:30
# misc model/view
2013-09-22 07:51:36 +05:30
l o g i c / E n a b l e d I t e m F i l t e r . h
2013-09-16 04:24:39 +05:30
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
2013-08-17 17:10:51 +05:30
# Tasks
2013-09-22 07:51:36 +05:30
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
2013-08-17 17:10:51 +05:30
l o g i c / t a s k s / T a s k . c p p
2014-01-01 23:51:58 +05:30
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
2013-12-20 19:17:26 +05:30
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
2013-09-23 03:53:50 +05:30
2013-10-05 05:38:13 +05:30
# Utilities
2013-11-24 11:06:16 +05:30
l o g i c / J a v a C h e c k e r . h
l o g i c / J a v a C h e c k e r . c p p
2013-10-05 05:38:13 +05:30
l o g i c / J a v a U t i l s . h
l o g i c / J a v a U t i l s . c p p
2013-11-03 20:50:26 +05:30
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
2013-11-27 22:26:15 +05:30
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
2013-12-11 09:24:39 +05:30
l o g i c / J a v a C h e c k e r J o b . h
l o g i c / J a v a C h e c k e r J o b . c p p
2013-09-22 07:51:36 +05:30
2013-12-08 08:28:44 +05:30
# Assets
2014-01-01 20:26:26 +05:30
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
2013-12-08 08:28:44 +05:30
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
2014-02-15 18:49:35 +05:30
2014-02-16 17:22:35 +05:30
# 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
2013-02-21 06:40:09 +05:30
)
2013-02-21 22:02:13 +05:30
######## UIs ########
SET ( MULTIMC_UIS
2013-11-04 07:23:05 +05:30
# Windows
g u i / M a i n W i n d o w . u i
g u i / C o n s o l e W i n d o w . u i
# Dialogs
g u i / d i a l o g s / S e t t i n g s D i a l o g . u i
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 / I n s t a n c e S e t t i n g s . 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 / L e g a c y M o d E d i t D i a l o g . u i
g u i / d i a l o g s / O n e S i x M o d E d i t D i a l o g . u i
g u i / d i a l o g s / E d i t N o t e s D i a l o g . u i
2013-11-18 23:35:35 +05:30
g u i / d i a l o g s / A c c o u n t L i s t D i a l o g . u i
2013-11-28 03:44:18 +05:30
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
2013-11-29 09:10:40 +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 . u i
2013-12-02 05:25:24 +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
2014-02-24 02:44:24 +05:30
g u i / d i a l o g s / S c r e e n s h o t D i a l o g . u i
2014-03-15 18:48:29 +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 . u i
2013-11-04 07:23:05 +05:30
# 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
)
2013-09-22 07:51:36 +05:30
set ( FILES_TO_TRANSLATE ${ FILES_TO_TRANSLATE } ${ MULTIMC_SOURCES } ${ MULTIMC_UIS } )
2013-09-08 23:48:55 +05:30
2014-01-19 09:22:34 +05:30
SET ( MULTIMC_QRCS
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
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
)
2013-02-19 00:29:01 +05:30
2013-02-21 22:02:13 +05:30
######## Windows resource files ########
IF ( WIN32 )
2014-01-19 09:51:09 +05:30
SET ( MULTIMC_RCS resources/multimc.rc )
2013-02-21 22:02:13 +05:30
ENDIF ( )
2013-10-18 22:12:41 +05:30
####### X11 Stuff #######
IF ( UNIX AND NOT APPLE )
2014-02-24 02:44:24 +05:30
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 )
2013-10-18 22:12:41 +05:30
ELSE ( )
2014-02-24 02:44:24 +05:30
LIST ( APPEND MULTIMC_SOURCES gui/Platform_Other.cpp )
2013-10-18 22:12:41 +05:30
ENDIF ( )
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
IF ( WIN32 )
2014-02-24 02:44:24 +05:30
SET ( MultiMC_LINK_ADDITIONAL_LIBS ${ MultiMC_LINK_ADDITIONAL_LIBS }
Q t 5 : : W i n M a i n # Link WinMain
)
2013-02-21 22:02:13 +05:30
ENDIF ( WIN32 )
2013-02-05 23:39:20 +05:30
2014-01-05 18:54:33 +05:30
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 )
2014-01-05 04:36:55 +05:30
2013-12-02 15:39:56 +05:30
OPTION ( MultiMC_CODE_COVERAGE "Compiles for code coverage" OFF )
IF ( MultiMC_CODE_COVERAGE )
2014-02-24 02:44:24 +05:30
SET ( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -O0 --coverage" )
SET ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -O0 --coverage" )
SET ( CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -g -O0 --coverage" )
SET ( CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -g -O0 --coverage" )
SET ( CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -O0 --coverage" )
2013-12-02 15:39:56 +05:30
ENDIF ( MultiMC_CODE_COVERAGE )
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
QT5_WRAP_UI ( MULTIMC_UI ${ MULTIMC_UIS } )
2014-01-19 09:22:34 +05:30
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-01-19 09:22:34 +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-01-08 05:57:40 +05:30
ADD_EXECUTABLE ( MultiMC MACOSX_BUNDLE WIN32 main.cpp ${ MULTIMC_RCS } )
2013-02-21 22:02:13 +05:30
# Link
2013-12-02 15:39:56 +05:30
TARGET_LINK_LIBRARIES ( MultiMC MultiMC_common )
2014-02-04 06:10:51 +05:30
TARGET_LINK_LIBRARIES ( MultiMC_common xz-embedded unpack200 quazip libUtil libSettings ${ MultiMC_LINK_ADDITIONAL_LIBS } )
2014-01-03 02:07:56 +05:30
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-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 ####
2013-12-01 21:04:51 +05:30
IF ( APPLE AND UNIX ) ## OSX
2014-02-24 02:44:24 +05:30
INSTALL ( TARGETS MultiMC
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
)
2013-02-05 23:39:20 +05:30
2013-12-01 21:04:51 +05:30
ELSEIF ( UNIX ) ## LINUX and similar
2014-02-24 02:44:24 +05:30
INSTALL ( TARGETS MultiMC
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
)
INSTALL ( PROGRAMS package/linux/MultiMC DESTINATION . )
2013-02-21 22:02:13 +05:30
2013-12-01 21:04:51 +05:30
ELSEIF ( WIN32 ) ## WINDOWS
2014-02-24 02:44:24 +05:30
INSTALL ( TARGETS MultiMC
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
)
2013-12-01 21:04:51 +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
2013-12-01 22:03:40 +05:30
if ( CMAKE_BUILD_TYPE STREQUAL "Debug" OR CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo" )
# Image formats
INSTALL (
2014-02-24 02:44:24 +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
R E G E X " t g a | s v g | t i f f | m n g " E X C L U D E
2013-12-01 22:03:40 +05:30
)
2013-09-19 22:49:01 +05:30
2013-12-01 22:03:40 +05:30
# Platform plugins
INSTALL (
2014-02-24 02:44:24 +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
2013-12-01 22:03:40 +05:30
)
else ( )
2013-12-01 21:04:51 +05:30
# Image formats
INSTALL (
2014-02-24 02:44:24 +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
R E G E X " t g a | s v g | t i f f | m n g " 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
2013-12-01 21:04:51 +05:30
)
2013-09-19 22:49:01 +05:30
2013-12-01 21:04:51 +05:30
# Platform plugins
INSTALL (
2014-02-24 02:44:24 +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
2013-12-01 21:04:51 +05:30
)
2014-01-02 19:52:57 +05:30
IF ( APPLE )
2014-02-24 02:44:24 +05:30
# Accessible plugin to make buttons look decent on osx
INSTALL (
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-01-02 19:52:57 +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
INSTALL (
2014-02-24 02:44:24 +05:30
C O D E "
2013-12-01 21:04:51 +05:30
FILE ( WRITE \"\${CMAKE_INSTALL_PREFIX}/${QTCONF_DEST_DIR}/qt.conf\" \"\")
"
2014-02-24 02:44:24 +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
IF ( APPLE )
2014-02-24 02:44:24 +05:30
INSTALL ( FILES resources/MultiMC.icns DESTINATION MultiMC.app/Contents/Resources )
2014-01-09 01:36:31 +05:30
ENDIF ( )
2013-12-11 01:07:15 +05:30
CONFIGURE_FILE (
2014-02-24 02:44:24 +05:30
" $ { 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 "
@ O N L Y )
2013-12-11 01:07:15 +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
IF ( UNIX )
2014-02-24 02:44:24 +05:30
if ( APPLE )
SET ( CPACK_GENERATOR "ZIP" )
else ( )
SET ( CPACK_GENERATOR "TGZ" )
endif ( )
2013-02-05 23:39:20 +05:30
ELSEIF ( WIN32 )
2014-02-24 02:44:24 +05:30
SET ( CPACK_GENERATOR "ZIP" )
2013-02-05 23:39:20 +05:30
ENDIF ( )
2013-02-12 23:27:18 +05:30
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 ( )
IF ( WIN32 )
SET ( CPACK_PACKAGE_INSTALL_DIRECTORY "MultiMC 5" )
ENDIF ( )
2013-02-05 23:39:20 +05:30
INCLUDE ( CPack )
2013-03-20 01:47:35 +05:30
include_directories ( ${ PROJECT_BINARY_DIR } /include )
2013-09-08 23:48:55 +05:30
2014-02-25 23:16:50 +05:30
# Translations
add_subdirectory ( translations )
2013-12-02 15:39:56 +05:30
# Tests
add_subdirectory ( tests )