|
1 |
| - |
2 |
| -IF(ESSENTIALS) |
3 |
| - SET(CPACK_COMPONENTS_USED "Server;Client") |
4 |
| - SET(CPACK_WIX_UI "MyWixUI_Mondo") |
5 |
| - IF(CMAKE_SIZEOF_VOID_P MATCHES 8) |
6 |
| - SET(CPACK_PACKAGE_FILE_NAME "mariadb-essential-${MAJOR_VERSION}.${MINOR_VERSION}.${PATCH_VERSION}-winx64") |
7 |
| - ELSE() |
8 |
| - SET(CPACK_PACKAGE_FILE_NAME "mariadb-essential-${MAJOR_VERSION}.${MINOR_VERSION}.${PATCH_VERSION}-win32") |
9 |
| - ENDIF() |
10 |
| -ELSE() |
11 |
| - SET(CPACK_COMPONENTS_USED |
12 |
| - "Server;Client;Development;SharedLibraries;Embedded;Documentation;IniFiles;Readme;Debuginfo;Common;connect-engine") |
13 |
| -ENDIF() |
14 |
| - |
15 |
| -SET( WIX_FEATURE_MySQLServer_EXTRA_FEATURES "DBInstance;SharedClientServerComponents") |
16 |
| -# Some components like Embedded are optional |
17 |
| -# We will build MSI without embedded if it was not selected for build |
18 |
| -#(need to modify CPACK_COMPONENTS_ALL for that) |
19 |
| -SET(CPACK_ALL) |
20 |
| -FOREACH(comp1 ${CPACK_COMPONENTS_USED}) |
21 |
| - SET(found) |
22 |
| - FOREACH(comp2 ${CPACK_COMPONENTS_ALL}) |
23 |
| - IF(comp1 STREQUAL comp2) |
24 |
| - SET(found 1) |
25 |
| - BREAK() |
26 |
| - ENDIF() |
27 |
| - ENDFOREACH() |
28 |
| - IF(found) |
29 |
| - SET(CPACK_ALL ${CPACK_ALL} ${comp1}) |
30 |
| - ENDIF() |
31 |
| -ENDFOREACH() |
32 |
| -SET(CPACK_COMPONENTS_ALL ${CPACK_ALL}) |
33 |
| - |
34 |
| -# Always install (hidden), includes Readme files |
35 |
| -SET(CPACK_COMPONENT_GROUP_ALWAYSINSTALL_HIDDEN 1) |
36 |
| -SET(CPACK_COMPONENT_README_GROUP "AlwaysInstall") |
37 |
| -SET(CPACK_COMPONENT_COMMON_GROUP "AlwaysInstall") |
38 |
| - |
39 |
| -# Feature MySQL Server |
40 |
| -SET(CPACK_COMPONENT_GROUP_MYSQLSERVER_DISPLAY_NAME "MariaDB Server") |
41 |
| -SET(CPACK_COMPONENT_GROUP_MYSQLSERVER_EXPANDED "1") |
42 |
| -SET(CPACK_COMPONENT_GROUP_MYSQLSERVER_DESCRIPTION "Install server") |
43 |
| - # Subfeature "Server" (hidden) |
44 |
| - SET(CPACK_COMPONENT_SERVER_GROUP "MySQLServer") |
45 |
| - SET(CPACK_COMPONENT_SERVER_HIDDEN 1) |
46 |
| - # Subfeature "Client" |
47 |
| - SET(CPACK_COMPONENT_CLIENT_GROUP "MySQLServer") |
48 |
| - SET(CPACK_COMPONENT_CLIENT_DISPLAY_NAME "Client Programs") |
49 |
| - SET(CPACK_COMPONENT_CLIENT_DESCRIPTION |
50 |
| - "Various helpful (commandline) tools including the mysql command line client" ) |
51 |
| - # Subfeature "Debug binaries" |
52 |
| - SET(CPACK_COMPONENT_DEBUGBINARIES_GROUP "MySQLServer") |
53 |
| - SET(CPACK_COMPONENT_DEBUGBINARIES_DISPLAY_NAME "Debug binaries") |
54 |
| - SET(CPACK_COMPONENT_DEBUGBINARIES_DESCRIPTION |
55 |
| - "Debug/trace versions of executables and libraries" ) |
56 |
| - #SET(CPACK_COMPONENT_DEBUGBINARIES_WIX_LEVEL 2) |
57 |
| - |
58 |
| - |
59 |
| - #Subfeature "Data Files" |
60 |
| - SET(CPACK_COMPONENT_DATAFILES_GROUP "MySQLServer") |
61 |
| - SET(CPACK_COMPONENT_DATAFILES_DISPLAY_NAME "Server data files") |
62 |
| - SET(CPACK_COMPONENT_DATAFILES_DESCRIPTION "Server data files" ) |
63 |
| - SET(CPACK_COMPONENT_DATAFILES_HIDDEN 1) |
64 |
| - |
65 |
| - #Subfeature "Connect Engine" |
66 |
| - SET(CPACK_COMPONENT_CONNECT-ENGINE_GROUP "MySQLServer") |
67 |
| - SET(CPACK_COMPONENT_CONNECT-ENGINE_DISPLAY_NAME "Server data files") |
68 |
| - SET(CPACK_COMPONENT_CONNECT-ENGINE_DESCRIPTION "Server data files" ) |
69 |
| - SET(CPACK_COMPONENT_CONNECT-ENGINE_HIDDEN 1) |
70 |
| - |
71 |
| - |
72 |
| -#Feature "Devel" |
73 |
| -SET(CPACK_COMPONENT_GROUP_DEVEL_DISPLAY_NAME "Development Components") |
74 |
| -SET(CPACK_COMPONENT_GROUP_DEVEL_DESCRIPTION "Installs C/C++ header files and libraries") |
75 |
| - #Subfeature "Development" |
76 |
| - SET(CPACK_COMPONENT_DEVELOPMENT_GROUP "Devel") |
77 |
| - SET(CPACK_COMPONENT_DEVELOPMENT_HIDDEN 1) |
78 |
| - |
79 |
| - #Subfeature "Shared libraries" |
80 |
| - SET(CPACK_COMPONENT_SHAREDLIBRARIES_GROUP "Devel") |
81 |
| - SET(CPACK_COMPONENT_SHAREDLIBRARIES_DISPLAY_NAME "Client C API library (shared)") |
82 |
| - SET(CPACK_COMPONENT_SHAREDLIBRARIES_DESCRIPTION "Installs shared client library") |
83 |
| - |
84 |
| - #Subfeature "Embedded" |
85 |
| - SET(CPACK_COMPONENT_EMBEDDED_GROUP "Devel") |
86 |
| - SET(CPACK_COMPONENT_EMBEDDED_DISPLAY_NAME "Embedded server library") |
87 |
| - SET(CPACK_COMPONENT_EMBEDDED_DESCRIPTION "Installs embedded server library") |
88 |
| - SET(CPACK_COMPONENT_EMBEDDED_WIX_LEVEL 2) |
89 |
| - |
90 |
| -#Feature Debug Symbols |
91 |
| -SET(CPACK_COMPONENT_GROUP_DEBUGSYMBOLS_DISPLAY_NAME "Debug Symbols") |
92 |
| -SET(CPACK_COMPONENT_GROUP_DEBUGSYMBOLS_DESCRIPTION "Installs Debug Symbols") |
93 |
| -SET(CPACK_COMPONENT_DEBUGSYMBOLS_WIX_LEVEL 2) |
94 |
| - SET(CPACK_COMPONENT_DEBUGINFO_GROUP "DebugSymbols") |
95 |
| - SET(CPACK_COMPONENT_DEBUGINFO_HIDDEN 1) |
96 |
| - |
97 |
| -#Feature Documentation |
98 |
| -SET(CPACK_COMPONENT_DOCUMENTATION_DISPLAY_NAME "Documentation") |
99 |
| -SET(CPACK_COMPONENT_DOCUMENTATION_DESCRIPTION "Installs documentation") |
100 |
| -SET(CPACK_COMPONENT_DOCUMENTATION_WIX_LEVEL 2) |
101 |
| - |
102 |
| -#Feature tests |
103 |
| -SET(CPACK_COMPONENT_TEST_DISPLAY_NAME "Tests") |
104 |
| -SET(CPACK_COMPONENT_TEST_DESCRIPTION "Installs unittests (requires Perl to run)") |
105 |
| -SET(CPACK_COMPONENT_TEST_WIX_LEVEL 2) |
106 |
| - |
107 |
| - |
108 |
| -#Feature Misc (hidden, installs only if everything is installed) |
109 |
| -SET(CPACK_COMPONENT_GROUP_MISC_HIDDEN 1) |
110 |
| -SET(CPACK_COMPONENT_GROUP_MISC_WIX_LEVEL 100) |
111 |
| - SET(CPACK_COMPONENT_INIFILES_GROUP "Misc") |
112 |
| - SET(CPACK_COMPONENT_SERVER_SCRIPTS_GROUP "Misc") |
113 |
| - |
114 |
| -#Add Firewall exception for mysqld.exe |
115 |
| -SET(bin.mysqld.exe.FILE_EXTRA " |
116 |
| - <FirewallException Id='firewallexception.mysqld.exe' Name='[ProductName]' Scope='any' |
117 |
| - IgnoreFailure='yes' xmlns='http://schemas.microsoft.com/wix/FirewallExtension' |
118 |
| - /> |
119 |
| - " |
120 |
| -) |
121 |
| - |
| 1 | + |
| 2 | +IF(ESSENTIALS) |
| 3 | + SET(CPACK_COMPONENTS_USED "Server;Client") |
| 4 | + SET(CPACK_WIX_UI "MyWixUI_Mondo") |
| 5 | + IF(CMAKE_SIZEOF_VOID_P MATCHES 8) |
| 6 | + SET(CPACK_PACKAGE_FILE_NAME "mariadb-essential-${MAJOR_VERSION}.${MINOR_VERSION}.${PATCH_VERSION}-winx64") |
| 7 | + ELSE() |
| 8 | + SET(CPACK_PACKAGE_FILE_NAME "mariadb-essential-${MAJOR_VERSION}.${MINOR_VERSION}.${PATCH_VERSION}-win32") |
| 9 | + ENDIF() |
| 10 | +ELSE() |
| 11 | + SET(CPACK_COMPONENTS_USED |
| 12 | + "Server;Client;Development;SharedLibraries;Embedded;Documentation;IniFiles;Readme;Debuginfo;Common;connect-engine") |
| 13 | +ENDIF() |
| 14 | + |
| 15 | +SET( WIX_FEATURE_MySQLServer_EXTRA_FEATURES "DBInstance;SharedClientServerComponents") |
| 16 | +# Some components like Embedded are optional |
| 17 | +# We will build MSI without embedded if it was not selected for build |
| 18 | +#(need to modify CPACK_COMPONENTS_ALL for that) |
| 19 | +SET(CPACK_ALL) |
| 20 | +FOREACH(comp1 ${CPACK_COMPONENTS_USED}) |
| 21 | + SET(found) |
| 22 | + FOREACH(comp2 ${CPACK_COMPONENTS_ALL}) |
| 23 | + IF(comp1 STREQUAL comp2) |
| 24 | + SET(found 1) |
| 25 | + BREAK() |
| 26 | + ENDIF() |
| 27 | + ENDFOREACH() |
| 28 | + IF(found) |
| 29 | + SET(CPACK_ALL ${CPACK_ALL} ${comp1}) |
| 30 | + ENDIF() |
| 31 | +ENDFOREACH() |
| 32 | +SET(CPACK_COMPONENTS_ALL ${CPACK_ALL}) |
| 33 | + |
| 34 | +# Always install (hidden), includes Readme files |
| 35 | +SET(CPACK_COMPONENT_GROUP_ALWAYSINSTALL_HIDDEN 1) |
| 36 | +SET(CPACK_COMPONENT_README_GROUP "AlwaysInstall") |
| 37 | +SET(CPACK_COMPONENT_COMMON_GROUP "AlwaysInstall") |
| 38 | + |
| 39 | +# Feature MySQL Server |
| 40 | +SET(CPACK_COMPONENT_GROUP_MYSQLSERVER_DISPLAY_NAME "MariaDB Server") |
| 41 | +SET(CPACK_COMPONENT_GROUP_MYSQLSERVER_EXPANDED "1") |
| 42 | +SET(CPACK_COMPONENT_GROUP_MYSQLSERVER_DESCRIPTION "Install server") |
| 43 | + # Subfeature "Server" (hidden) |
| 44 | + SET(CPACK_COMPONENT_SERVER_GROUP "MySQLServer") |
| 45 | + SET(CPACK_COMPONENT_SERVER_HIDDEN 1) |
| 46 | + # Subfeature "Client" |
| 47 | + SET(CPACK_COMPONENT_CLIENT_GROUP "MySQLServer") |
| 48 | + SET(CPACK_COMPONENT_CLIENT_DISPLAY_NAME "Client Programs") |
| 49 | + SET(CPACK_COMPONENT_CLIENT_DESCRIPTION |
| 50 | + "Various helpful (commandline) tools including the mysql command line client" ) |
| 51 | + # Subfeature "Debug binaries" |
| 52 | + SET(CPACK_COMPONENT_DEBUGBINARIES_GROUP "MySQLServer") |
| 53 | + SET(CPACK_COMPONENT_DEBUGBINARIES_DISPLAY_NAME "Debug binaries") |
| 54 | + SET(CPACK_COMPONENT_DEBUGBINARIES_DESCRIPTION |
| 55 | + "Debug/trace versions of executables and libraries" ) |
| 56 | + #SET(CPACK_COMPONENT_DEBUGBINARIES_WIX_LEVEL 2) |
| 57 | + |
| 58 | + |
| 59 | + #Subfeature "Data Files" |
| 60 | + SET(CPACK_COMPONENT_DATAFILES_GROUP "MySQLServer") |
| 61 | + SET(CPACK_COMPONENT_DATAFILES_DISPLAY_NAME "Server data files") |
| 62 | + SET(CPACK_COMPONENT_DATAFILES_DESCRIPTION "Server data files" ) |
| 63 | + SET(CPACK_COMPONENT_DATAFILES_HIDDEN 1) |
| 64 | + |
| 65 | + #Subfeature "Connect Engine" |
| 66 | + SET(CPACK_COMPONENT_CONNECT-ENGINE_GROUP "MySQLServer") |
| 67 | + SET(CPACK_COMPONENT_CONNECT-ENGINE_DISPLAY_NAME "Server data files") |
| 68 | + SET(CPACK_COMPONENT_CONNECT-ENGINE_DESCRIPTION "Server data files" ) |
| 69 | + SET(CPACK_COMPONENT_CONNECT-ENGINE_HIDDEN 1) |
| 70 | + |
| 71 | + |
| 72 | +#Feature "Devel" |
| 73 | +SET(CPACK_COMPONENT_GROUP_DEVEL_DISPLAY_NAME "Development Components") |
| 74 | +SET(CPACK_COMPONENT_GROUP_DEVEL_DESCRIPTION "Installs C/C++ header files and libraries") |
| 75 | + #Subfeature "Development" |
| 76 | + SET(CPACK_COMPONENT_DEVELOPMENT_GROUP "Devel") |
| 77 | + SET(CPACK_COMPONENT_DEVELOPMENT_HIDDEN 1) |
| 78 | + |
| 79 | + #Subfeature "Shared libraries" |
| 80 | + SET(CPACK_COMPONENT_SHAREDLIBRARIES_GROUP "Devel") |
| 81 | + SET(CPACK_COMPONENT_SHAREDLIBRARIES_DISPLAY_NAME "Client C API library (shared)") |
| 82 | + SET(CPACK_COMPONENT_SHAREDLIBRARIES_DESCRIPTION "Installs shared client library") |
| 83 | + |
| 84 | + #Subfeature "Embedded" |
| 85 | + SET(CPACK_COMPONENT_EMBEDDED_GROUP "Devel") |
| 86 | + SET(CPACK_COMPONENT_EMBEDDED_DISPLAY_NAME "Embedded server library") |
| 87 | + SET(CPACK_COMPONENT_EMBEDDED_DESCRIPTION "Installs embedded server library") |
| 88 | + SET(CPACK_COMPONENT_EMBEDDED_WIX_LEVEL 2) |
| 89 | + |
| 90 | +#Feature Debug Symbols |
| 91 | +SET(CPACK_COMPONENT_GROUP_DEBUGSYMBOLS_DISPLAY_NAME "Debug Symbols") |
| 92 | +SET(CPACK_COMPONENT_GROUP_DEBUGSYMBOLS_DESCRIPTION "Installs Debug Symbols") |
| 93 | +SET(CPACK_COMPONENT_DEBUGSYMBOLS_WIX_LEVEL 2) |
| 94 | + SET(CPACK_COMPONENT_DEBUGINFO_GROUP "DebugSymbols") |
| 95 | + SET(CPACK_COMPONENT_DEBUGINFO_HIDDEN 1) |
| 96 | + |
| 97 | +#Feature Documentation |
| 98 | +SET(CPACK_COMPONENT_DOCUMENTATION_DISPLAY_NAME "Documentation") |
| 99 | +SET(CPACK_COMPONENT_DOCUMENTATION_DESCRIPTION "Installs documentation") |
| 100 | +SET(CPACK_COMPONENT_DOCUMENTATION_WIX_LEVEL 2) |
| 101 | + |
| 102 | +#Feature tests |
| 103 | +SET(CPACK_COMPONENT_TEST_DISPLAY_NAME "Tests") |
| 104 | +SET(CPACK_COMPONENT_TEST_DESCRIPTION "Installs unittests (requires Perl to run)") |
| 105 | +SET(CPACK_COMPONENT_TEST_WIX_LEVEL 2) |
| 106 | + |
| 107 | + |
| 108 | +#Feature Misc (hidden, installs only if everything is installed) |
| 109 | +SET(CPACK_COMPONENT_GROUP_MISC_HIDDEN 1) |
| 110 | +SET(CPACK_COMPONENT_GROUP_MISC_WIX_LEVEL 100) |
| 111 | + SET(CPACK_COMPONENT_INIFILES_GROUP "Misc") |
| 112 | + SET(CPACK_COMPONENT_SERVER_SCRIPTS_GROUP "Misc") |
| 113 | + |
| 114 | +#Add Firewall exception for mysqld.exe |
| 115 | +SET(bin.mysqld.exe.FILE_EXTRA " |
| 116 | + <FirewallException Id='firewallexception.mysqld.exe' Name='[ProductName]' Scope='any' |
| 117 | + IgnoreFailure='yes' xmlns='http://schemas.microsoft.com/wix/FirewallExtension' |
| 118 | + /> |
| 119 | + " |
| 120 | +) |
| 121 | + |
0 commit comments