2015-09-29 00:23:46 +05:30
project ( application )
2015-02-09 06:21:14 +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." )
######## Set version numbers ########
set ( MultiMC_VERSION_MAJOR 0 )
2017-01-08 09:30:24 +05:30
set ( MultiMC_VERSION_MINOR 5 )
set ( MultiMC_VERSION_HOTFIX 0 )
2015-02-09 06:21:14 +05:30
# Build number
set ( MultiMC_VERSION_BUILD -1 CACHE STRING "Build number. -1 for no build number." )
# 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." )
# Channel list URL
set ( MultiMC_CHANLIST_URL "" CACHE STRING "URL for the channel list." )
# Notification URL
set ( MultiMC_NOTIFICATION_URL "" CACHE STRING "URL for checking for notifications." )
2015-10-02 03:42:53 +05:30
# paste.ee API key
set ( MultiMC_PASTE_EE_API_KEY "" CACHE STRING "API key you can get from paste.ee when you register an account" )
2016-11-21 01:10:59 +05:30
# Google analytics ID
set ( MultiMC_ANALYTICS_ID "" CACHE STRING "ID you can get from Google analytics" )
2015-12-28 09:15:49 +05:30
#### Check the current Git commit and branch
include ( GetGitRevisionDescription )
get_git_head_revision ( MultiMC_GIT_REFSPEC MultiMC_GIT_COMMIT )
2016-04-07 02:39:30 +05:30
2015-02-10 01:30:45 +05:30
message ( STATUS "Git commit: ${MultiMC_GIT_COMMIT}" )
2015-12-28 09:15:49 +05:30
message ( STATUS "Git refspec: ${MultiMC_GIT_REFSPEC}" )
2015-02-10 01:30:45 +05:30
2017-01-14 22:42:15 +05:30
set ( MultiMC_RELEASE_VERSION_NAME "${MultiMC_VERSION_MAJOR}.${MultiMC_VERSION_MINOR}.${MultiMC_VERSION_HOTFIX}" )
2015-02-09 06:21:14 +05:30
2015-02-10 01:30:45 +05:30
#### Custom target to just print the version.
2015-12-28 09:15:49 +05:30
add_custom_target ( version echo "Version: ${MultiMC_RELEASE_VERSION_NAME}" )
2015-02-09 06:21:14 +05:30
######## Configure header ########
configure_file ( "${PROJECT_SOURCE_DIR}/BuildConfig.cpp.in" "${PROJECT_BINARY_DIR}/BuildConfig.cpp" )
################################ FILES ################################
######## Sources and headers ########
SET ( MULTIMC_SOURCES
# Application base
m a i n . c p p
M u l t i M C . h
M u l t i M C . c p p
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
2016-11-18 20:34:08 +05:30
U p d a t e C o n t r o l l e r . c p p
U p d a t e C o n t r o l l e r . h
2015-02-09 06:21:14 +05:30
# GUI - general utilities
G u i U t i l . h
G u i U t i l . c p p
C o l u m n R e s i z e r . h
C o l u m n R e s i z e r . c p p
I n s t a n c e P r o x y M o d e l . h
I n s t a n c e P r o x y M o d e l . c p p
2015-04-28 12:31:37 +05:30
V e r s i o n P r o x y M o d e l . h
V e r s i o n P r o x y M o d e l . c p p
2015-08-20 05:19:03 +05:30
C o l o r C a c h e . h
C o l o r C a c h e . c p p
2017-05-06 21:57:47 +05:30
H o e D o w n . h
2015-02-09 06:21:14 +05:30
# GUI - windows
M a i n W i n d o w . h
M a i n W i n d o w . c p p
2016-08-06 19:09:29 +05:30
I n s t a n c e W i n d o w . h
I n s t a n c e W i n d o w . c p p
2015-02-09 06:21:14 +05:30
2016-12-01 06:47:27 +05:30
# GUI - setup wizard
s e t u p w i z a r d / S e t u p W i z a r d . h
s e t u p w i z a r d / S e t u p W i z a r d . c p p
2017-01-05 08:35:08 +05:30
s e t u p w i z a r d / A n a l y t i c s W i z a r d P a g e . c p p
s e t u p w i z a r d / A n a l y t i c s W i z a r d P a g e . h
s e t u p w i z a r d / B a s e W i z a r d P a g e . h
s e t u p w i z a r d / J a v a W i z a r d P a g e . c p p
s e t u p w i z a r d / J a v a W i z a r d P a g e . h
s e t u p w i z a r d / L a n g u a g e W i z a r d P a g e . c p p
s e t u p w i z a r d / L a n g u a g e W i z a r d P a g e . h
2016-12-01 06:47:27 +05:30
2016-10-21 12:37:26 +05:30
# GUI - themes
2016-11-05 20:21:51 +05:30
t h e m e s / F u s i o n T h e m e . c p p
t h e m e s / F u s i o n T h e m e . h
2016-11-01 13:20:23 +05:30
t h e m e s / B r i g h t T h e m e . c p p
t h e m e s / B r i g h t T h e m e . h
2016-11-06 08:59:12 +05:30
t h e m e s / C u s t o m T h e m e . c p p
t h e m e s / C u s t o m T h e m e . h
2016-10-21 12:37:26 +05:30
t h e m e s / D a r k T h e m e . c p p
t h e m e s / D a r k T h e m e . h
2016-11-06 08:59:12 +05:30
t h e m e s / I T h e m e . c p p
2016-10-21 12:37:26 +05:30
t h e m e s / I T h e m e . h
t h e m e s / S y s t e m T h e m e . c p p
t h e m e s / S y s t e m T h e m e . h
2015-07-05 05:59:41 +05:30
# GUI - settings-specific wrappers for paged dialog
S e t t i n g s U I . h
2015-07-05 05:24:30 +05:30
# Processes
2016-08-11 04:14:01 +05:30
L a u n c h C o n t r o l l e r . h
L a u n c h C o n t r o l l e r . c p p
2015-07-05 05:24:30 +05:30
2015-02-09 06:21:14 +05:30
# page provider for instances
I n s t a n c e P a g e P r o v i d e r . h
I n s t a n c e P a g e P r o v i d e r . c p p
2015-05-04 04:50:48 +05:30
# Common java checking UI
J a v a C o m m o n . h
J a v a C o m m o n . c p p
2015-02-09 06:21:14 +05:30
# GUI - page dialog pages
p a g e s / B a s e P a g e . h
2015-05-29 05:52:02 +05:30
p a g e s / B a s e P a g e C o n t a i n e r . h
2015-02-09 06:21:14 +05:30
p a g e s / V e r s i o n P a g e . c p p
p a g e s / V e r s i o n P a g e . h
p a g e s / T e x t u r e P a c k P a g e . h
p a g e s / R e s o u r c e P a c k P a g e . h
p a g e s / M o d F o l d e r P a g e . c p p
p a g e s / M o d F o l d e r P a g e . h
p a g e s / N o t e s P a g e . c p p
p a g e s / N o t e s P a g e . h
p a g e s / L o g P a g e . c p p
p a g e s / L o g P a g e . h
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
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
p a g e s / S c r e e n s h o t s P a g e . c p p
p a g e s / S c r e e n s h o t s P a g e . h
p a g e s / O t h e r L o g s P a g e . c p p
p a g e s / O t h e r L o g s P a g e . h
2015-04-06 01:30:32 +05:30
p a g e s / L e g a c y J a r M o d P a g e . c p p
p a g e s / L e g a c y J a r M o d P a g e . h
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
p a g e s / L e g a c y U p g r a d e P a g e . h
2015-08-19 04:40:17 +05:30
p a g e s / W o r l d L i s t P a g e . c p p
p a g e s / W o r l d L i s t P a g e . h
2015-02-09 06:21:14 +05:30
# GUI - global settings pages
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
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
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
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
p a g e s / g l o b a l / J a v a P a g e . c p p
p a g e s / g l o b a l / J a v a P a g e . h
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
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
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
p a g e s / g l o b a l / M u l t i M C P a g e . h
p a g e s / g l o b a l / P r o x y P a g e . c p p
p a g e s / g l o b a l / P r o x y P a g e . h
2015-10-02 03:42:53 +05:30
p a g e s / g l o b a l / P a s t e E E P a g e . c p p
p a g e s / g l o b a l / P a s t e E E P a g e . h
2017-03-12 20:30:06 +05:30
p a g e s / g l o b a l / P a c k a g e s P a g e . c p p
p a g e s / g l o b a l / P a c k a g e s P a g e . h
2015-02-09 06:21:14 +05:30
# GUI - dialogs
d i a l o g s / A b o u t D i a l o g . c p p
d i a l o g s / A b o u t D i a l o g . h
2016-08-11 04:14:01 +05:30
d i a l o g s / P r o f i l e S e l e c t D i a l o g . c p p
d i a l o g s / P r o f i l e S e l e c t D i a l o g . h
2015-02-09 06:21:14 +05:30
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
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
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
d i a l o g s / C u s t o m M e s s a g e B o x . h
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
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
2015-04-19 07:49:29 +05:30
d i a l o g s / E x p o r t I n s t a n c e D i a l o g . c p p
d i a l o g s / E x p o r t I n s t a n c e D i a l o g . h
2015-02-09 06:21:14 +05:30
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
d i a l o g s / I c o n P i c k e r D i a l o g . h
d i a l o g s / L o g i n D i a l o g . c p p
d i a l o g s / L o g i n D i a l o g . h
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
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
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
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
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
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
p a g e d i a l o g / P a g e D i a l o g . c p p
p a g e d i a l o g / P a g e D i a l o g . h
d i a l o g s / P r o g r e s s D i a l o g . c p p
d i a l o g s / P r o g r e s s D i a l o g . h
d i a l o g s / U p d a t e D i a l o g . c p p
d i a l o g s / U p d a t e D i a l o g . h
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
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
2016-05-13 02:21:25 +05:30
d i a l o g s / S k i n U p l o a d D i a l o g . c p p
d i a l o g s / S k i n U p l o a d D i a l o g . h
2015-02-09 06:21:14 +05:30
# GUI - widgets
w i d g e t s / C o m m o n . c p p
w i d g e t s / C o m m o n . h
2016-01-12 09:07:30 +05:30
w i d g e t s / F o c u s L i n e E d i t . c p p
w i d g e t s / F o c u s L i n e E d i t . h
2015-02-09 06:21:14 +05:30
w i d g e t s / I c o n L a b e l . c p p
w i d g e t s / I c o n L a b e l . h
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
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
w i d g e t s / L i n e S e p a r a t o r . c p p
w i d g e t s / L i n e S e p a r a t o r . h
2016-08-19 01:01:37 +05:30
w i d g e t s / L o g V i e w . c p p
w i d g e t s / L o g V i e w . h
2015-02-09 06:21:14 +05:30
w i d g e t s / M C M o d I n f o F r a m e . c p p
w i d g e t s / M C M o d I n f o F r a m e . h
w i d g e t s / M o d L i s t V i e w . c p p
w i d g e t s / M o d L i s t V i e w . h
w i d g e t s / P a g e C o n t a i n e r . c p p
w i d g e t s / P a g e C o n t a i n e r . h
w i d g e t s / P a g e C o n t a i n e r _ p . h
w i d g e t s / S e r v e r S t a t u s . c p p
w i d g e t s / S e r v e r S t a t u s . h
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
w i d g e t s / V e r s i o n L i s t V i e w . h
2017-01-05 08:35:08 +05:30
w i d g e t s / V e r s i o n S e l e c t W i d g e t . c p p
w i d g e t s / V e r s i o n S e l e c t W i d g e t . h
2015-05-28 23:08:29 +05:30
w i d g e t s / P r o g r e s s W i d g e t . h
w i d g e t s / P r o g r e s s W i d g e t . c p p
2015-02-09 06:21:14 +05:30
# GUI - instance group view
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 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 r o u p v i e w / G r o u p V i e w . c p p
g r o u p v i e w / G r o u p V i e w . h
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 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
g r o u p v i e w / V i s u a l G r o u p . c p p
g r o u p v i e w / V i s u a l G r o u p . h
2016-05-13 02:21:25 +05:30
)
2015-02-09 06:21:14 +05:30
######## UIs ########
SET ( MULTIMC_UIS
# Option pages
p a g e s / V e r s i o n P a g e . u i
p a g e s / M o d F o l d e r P a g e . u i
p a g e s / L o g P a g e . 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
p a g e s / N o t e s P a g e . u i
p a g e s / S c r e e n s h o t s P a g e . u i
p a g e s / O t h e r L o g s P a g e . u i
2015-04-06 01:30:32 +05:30
p a g e s / L e g a c y J a r M o d P a g e . 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
2015-08-19 04:40:17 +05:30
p a g e s / W o r l d L i s t P a g e . u i
2015-02-09 06:21:14 +05:30
# Global settings pages
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
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
p a g e s / g l o b a l / J a v a P a g e . 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
p a g e s / g l o b a l / M u l t i M C P a g e . u i
p a g e s / g l o b a l / P r o x y P a g e . u i
2015-10-02 03:42:53 +05:30
p a g e s / g l o b a l / P a s t e E E P a g e . u i
2017-03-12 20:30:06 +05:30
p a g e s / g l o b a l / P a c k a g e s P a g e . u i
2015-02-09 06:21:14 +05:30
# Dialogs
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
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
d i a l o g s / A b o u t D i a l o 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
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
2016-08-11 04:14:01 +05:30
d i a l o g s / P r o f i l e S e l e c t D i a l o g . u i
2015-02-09 06:21:14 +05:30
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
2015-04-19 07:49:29 +05:30
d i a l o g s / E x p o r t I n s t a n c e D i a l o g . u i
2015-02-09 06:21:14 +05:30
d i a l o g s / L o g i n D i a l o g . u i
d i a l o g s / U p d a t e D i a l o 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
2016-05-13 02:21:25 +05:30
d i a l o g s / S k i n U p l o a d D i a l o g . u i
2015-02-09 06:21:14 +05:30
# Widgets/other
w i d g e t s / M C M o d I n f o F r a m e . u i
)
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 / 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
r e s o u r c e s / p e _ c o l o r e d / p e _ c o l o r e d . q r c
r e s o u r c e s / p e _ b l u e / p e _ b l u e . q r c
r e s o u r c e s / O S X / O S X . q r c
r e s o u r c e s / i O S / i O S . q r c
2017-05-06 21:57:47 +05:30
r e s o u r c e s / d o c u m e n t s / d o c u m e n t s . q r c
2015-02-09 06:21:14 +05:30
)
######## Windows resource files ########
if ( WIN32 )
set ( MULTIMC_RCS resources/multimc.rc )
endif ( )
# Qt 5 stuff
qt5_wrap_ui ( MULTIMC_UI ${ MULTIMC_UIS } )
qt5_add_resources ( MULTIMC_RESOURCES ${ MULTIMC_QRCS } )
# Add executable
add_executable ( MultiMC MACOSX_BUNDLE WIN32 ${ MULTIMC_SOURCES } ${ MULTIMC_UI } ${ MULTIMC_RESOURCES } ${ MULTIMC_RCS } )
2016-12-28 21:53:48 +05:30
target_link_libraries ( MultiMC MultiMC_gui ${ QUAZIP_LIBRARIES } hoedown MultiMC_rainbow LocalPeer ganalytics )
2015-09-29 00:23:46 +05:30
2015-02-09 06:21:14 +05:30
################################ INSTALLATION AND PACKAGING ################################
2017-05-06 06:41:38 +05:30
######## Packaging/install paths setup ########
# How to install the build results
set ( MultiMC_LAYOUT "auto" CACHE STRING "The layout for MultiMC installation (auto, win-bundle, lin-bundle, mac-bundle, lin-nodeps)" )
set_property ( CACHE MultiMC_LAYOUT PROPERTY STRINGS auto win-bundle lin-bundle mac-bundle lin-nodeps )
if ( MultiMC_LAYOUT STREQUAL "auto" )
if ( UNIX AND APPLE )
set ( MultiMC_LAYOUT_REAL "mac-bundle" )
elseif ( UNIX )
set ( MultiMC_LAYOUT_REAL "lin-bundle" )
elseif ( WIN32 )
set ( MultiMC_LAYOUT_REAL "win-bundle" )
else ( )
message ( FATAL_ERROR "Cannot choose a sensible install layout for your platform." )
endif ( )
else ( )
set ( MultiMC_LAYOUT_REAL ${ MultiMC_LAYOUT } )
endif ( )
2015-02-09 06:21:14 +05:30
2017-05-06 06:41:38 +05:30
if ( MultiMC_LAYOUT_REAL STREQUAL "mac-bundle" )
set ( BINARY_DEST_DIR "MultiMC.app/Contents/MacOS" )
set ( LIBRARY_DEST_DIR "MultiMC.app/Contents/MacOS" )
set ( PLUGIN_DEST_DIR "MultiMC.app/Contents/MacOS" )
set ( RESOURCES_DEST_DIR "MultiMC.app/Contents/Resources" )
2015-02-09 06:21:14 +05:30
2017-05-06 06:41:38 +05:30
set ( BUNDLE_DEST_DIR "." )
2015-02-09 06:21:14 +05:30
2017-05-06 06:41:38 +05:30
# Apps to bundle
set ( APPS "\${CMAKE_INSTALL_PREFIX}/MultiMC.app" )
# Mac bundle settings
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_HOTFIX}.${MultiMC_VERSION_BUILD}" )
set ( MACOSX_BUNDLE_SHORT_VERSION_STRING "${MultiMC_VERSION_MAJOR}.${MultiMC_VERSION_MINOR}.${MultiMC_VERSION_HOTFIX}.${MultiMC_VERSION_BUILD}" )
set ( MACOSX_BUNDLE_LONG_VERSION_STRING "${MultiMC_VERSION_MAJOR}.${MultiMC_VERSION_MINOR}.${MultiMC_VERSION_HOTFIX}.${MultiMC_VERSION_BUILD}" )
set ( MACOSX_BUNDLE_ICON_FILE MultiMC.icns )
set ( MACOSX_BUNDLE_COPYRIGHT "Copyright 2015-2017 MultiMC Contributors" )
# directories to look for dependencies
set ( DIRS ${ QT_LIBS_DIR } ${ QT_LIBEXECS_DIR } ${ CMAKE_LIBRARY_OUTPUT_DIRECTORY } ${ CMAKE_RUNTIME_OUTPUT_DIRECTORY } )
# install as bundle
set ( INSTALL_BUNDLE TRUE )
# Add the icon
install ( FILES resources/MultiMC.icns DESTINATION ${ RESOURCES_DEST_DIR } )
2017-05-06 07:09:54 +05:30
2017-05-06 06:41:38 +05:30
elseif ( MultiMC_LAYOUT_REAL STREQUAL "lin-bundle" )
set ( BINARY_DEST_DIR "bin" )
set ( LIBRARY_DEST_DIR "bin" )
set ( PLUGIN_DEST_DIR "plugins" )
set ( BUNDLE_DEST_DIR "." )
set ( RESOURCES_DEST_DIR "." )
# Apps to bundle
set ( APPS "\${CMAKE_INSTALL_PREFIX}/bin/MultiMC" )
# directories to look for dependencies
set ( DIRS ${ QT_LIBS_DIR } ${ QT_LIBEXECS_DIR } ${ CMAKE_LIBRARY_OUTPUT_DIRECTORY } ${ CMAKE_RUNTIME_OUTPUT_DIRECTORY } )
# install as bundle
set ( INSTALL_BUNDLE TRUE )
# Set RPATH
SET_TARGET_PROPERTIES ( MultiMC PROPERTIES INSTALL_RPATH "$ORIGIN/" )
# Install basic runner script
install ( PROGRAMS package/linux/MultiMC DESTINATION ${ BUNDLE_DEST_DIR } )
elseif ( MultiMC_LAYOUT_REAL STREQUAL "lin-nodeps" )
set ( BINARY_DEST_DIR "bin" )
set ( LIBRARY_DEST_DIR "bin" )
set ( PLUGIN_DEST_DIR "plugins" )
set ( BUNDLE_DEST_DIR "." )
set ( RESOURCES_DEST_DIR "." )
# do not install as bundle
set ( INSTALL_BUNDLE FALSE )
# Set RPATH
SET_TARGET_PROPERTIES ( MultiMC PROPERTIES INSTALL_RPATH "$ORIGIN/" )
# Install basic runner script
install ( PROGRAMS package/linux/MultiMC DESTINATION ${ BUNDLE_DEST_DIR } )
elseif ( MultiMC_LAYOUT_REAL STREQUAL "win-bundle" )
set ( BINARY_DEST_DIR "." )
set ( LIBRARY_DEST_DIR "." )
set ( PLUGIN_DEST_DIR "." )
set ( BUNDLE_DEST_DIR "." )
set ( RESOURCES_DEST_DIR "." )
# Apps to bundle
set ( APPS "\${CMAKE_INSTALL_PREFIX}/MultiMC.exe" )
# directories to look for dependencies
set ( DIRS ${ QT_LIBS_DIR } ${ QT_LIBEXECS_DIR } ${ CMAKE_LIBRARY_OUTPUT_DIRECTORY } ${ CMAKE_RUNTIME_OUTPUT_DIRECTORY } )
# install as bundle
set ( INSTALL_BUNDLE TRUE )
else ( )
message ( FATAL_ERROR "No sensible install layout set." )
2015-02-09 06:21:14 +05:30
endif ( )
2017-05-06 20:52:14 +05:30
######## Install files ########
2017-05-06 06:41:38 +05:30
#### Executable ####
install ( TARGETS MultiMC
B U N D L E D E S T I N A T I O N $ { B U N D L E _ D E S T _ D I R } 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 $ { L I B R A R Y _ D E S T _ D I R } 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 A R Y _ D E S T _ D I R } C O M P O N E N T R u n t i m e
)
#### jars needed for testing java and launching Minecraft ####
2015-02-09 06:21:14 +05:30
install_jar ( JavaCheck "${BINARY_DEST_DIR}/jars" )
install_jar ( NewLaunch "${BINARY_DEST_DIR}/jars" )
2017-05-06 06:41:38 +05:30
#### Shared libraries and dependencies ####
if ( NOT INSTALL_BUNDLE )
# Just our own stuff
2017-05-06 20:52:14 +05:30
# FIXME: this does not remove RPATH.
2015-02-09 06:21:14 +05:30
install (
2017-05-06 06:41:38 +05:30
F I L E S
$ < T A R G E T _ F I L E : M u l t i M C _ g u i >
$ < T A R G E T _ F I L E : M u l t i M C _ l o g i c >
$ < T A R G E T _ F I L E : M u l t i M C _ r a i n b o w >
2017-05-06 20:52:14 +05:30
$ < T A R G E T _ F I L E : M u l t i M C _ q u a z i p >
2017-05-06 06:41:38 +05:30
$ < T A R G E T _ F I L E : M u l t i M C _ i c o n f i x >
$ < T A R G E T _ F I L E : M u l t i M C _ u n p a c k 2 0 0 >
$ < T A R G E T _ F I L E : M u l t i M C _ n b t + + >
D E S T I N A T I O N
$ { L I B R A R Y _ D E S T _ D I R }
2015-02-09 06:21:14 +05:30
)
else ( )
2017-05-08 01:49:01 +05:30
# Add qt.conf - this makes Qt stop looking for things outside the bundle
install (
2017-05-08 03:37:20 +05:30
C O D E " file ( WRITE \"\${CMAKE_INSTALL_PREFIX}/${RESOURCES_DEST_DIR}/qt.conf\" \" \")"
2017-05-08 01:49:01 +05:30
C O M P O N E N T R u n t i m e
)
# Bundle plugins
2017-05-06 06:41:38 +05:30
if ( CMAKE_BUILD_TYPE STREQUAL "Debug" OR CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo" )
# Image formats
install (
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 | t i f f | m n g " E X C L U D E
)
# 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
)
# Platform plugins
install (
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
)
else ( )
# Image formats
install (
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 | 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
2017-05-06 15:28:57 +05:30
R E G E X " \ \ . d S Y M " E X C L U D E
2017-05-06 06:41:38 +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
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
2017-05-06 15:28:57 +05:30
R E G E X " \ \ . d S Y M " E X C L U D E
2017-05-06 06:41:38 +05:30
)
# Platform plugins
install (
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
2017-05-06 15:28:57 +05:30
R E G E X " \ \ . d S Y M " E X C L U D E
2017-05-06 06:41:38 +05:30
)
endif ( )
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 "
@ O N L Y
2015-02-09 06:21:14 +05:30
)
2017-05-06 06:41:38 +05:30
install ( SCRIPT "${CMAKE_CURRENT_BINARY_DIR}/install_prereqs.cmake" COMPONENT Runtime )
2015-02-09 06:21:14 +05:30
endif ( )