Skip to content

Commit ab54f5a

Browse files
committed
Fix win/ files to be stored with LF in repository
On Windows, the files get checked out with CRLF thanks to .gitattributes.
1 parent 5ae8d06 commit ab54f5a

16 files changed

+1896
-1896
lines changed

win/packaging/COPYING.rtf

Lines changed: 61 additions & 61 deletions
Large diffs are not rendered by default.

win/packaging/CPackWixConfig.cmake

Lines changed: 121 additions & 121 deletions
Original file line numberDiff line numberDiff line change
@@ -1,121 +1,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-
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+

win/packaging/ca/CustomAction.cpp

Lines changed: 42 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -104,48 +104,48 @@ static void EscapeCommandLine(const wchar_t *in, wchar_t *out, size_t buflen)
104104
}
105105

106106
pos= 0;
107-
for(int i = 0 ; ; i++)
108-
{
109-
size_t n_backslashes = 0;
110-
wchar_t c;
111-
while (in[i] == L'\\')
112-
{
113-
i++;
114-
n_backslashes++;
115-
}
116-
117-
c= in[i];
118-
if (c == 0)
119-
{
120-
/*
121-
Escape all backslashes, but let the terminating double quotation mark
122-
that caller adds be interpreted as a metacharacter.
123-
*/
124-
for(size_t j= 0; j < 2*n_backslashes;j++)
125-
{
126-
out[pos++]=L'\\';
127-
}
128-
break;
129-
}
130-
else if (c == L'"')
131-
{
132-
/*
133-
Escape all backslashes and the following double quotation mark.
134-
*/
135-
for(size_t j= 0; j < 2*n_backslashes + 1; j++)
136-
{
137-
out[pos++]=L'\\';
138-
}
139-
out[pos++]= L'"';
140-
}
141-
else
142-
{
143-
/* Backslashes aren't special here. */
144-
for (size_t j=0; j < n_backslashes; j++)
145-
out[pos++] = L'\\';
146-
147-
out[pos++]= c;
148-
}
107+
for(int i = 0 ; ; i++)
108+
{
109+
size_t n_backslashes = 0;
110+
wchar_t c;
111+
while (in[i] == L'\\')
112+
{
113+
i++;
114+
n_backslashes++;
115+
}
116+
117+
c= in[i];
118+
if (c == 0)
119+
{
120+
/*
121+
Escape all backslashes, but let the terminating double quotation mark
122+
that caller adds be interpreted as a metacharacter.
123+
*/
124+
for(size_t j= 0; j < 2*n_backslashes;j++)
125+
{
126+
out[pos++]=L'\\';
127+
}
128+
break;
129+
}
130+
else if (c == L'"')
131+
{
132+
/*
133+
Escape all backslashes and the following double quotation mark.
134+
*/
135+
for(size_t j= 0; j < 2*n_backslashes + 1; j++)
136+
{
137+
out[pos++]=L'\\';
138+
}
139+
out[pos++]= L'"';
140+
}
141+
else
142+
{
143+
/* Backslashes aren't special here. */
144+
for (size_t j=0; j < n_backslashes; j++)
145+
out[pos++] = L'\\';
146+
147+
out[pos++]= c;
148+
}
149149
}
150150
out[pos++]= 0;
151151
}

0 commit comments

Comments
 (0)