summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorunknown <iggy@recycle.(none)>2007-04-23 16:23:32 -0400
committerunknown <iggy@recycle.(none)>2007-04-23 16:23:32 -0400
commit7ad5d7c1efdaefc98d1fd9a1943cd70a7b6e835d (patch)
treec97ca12e6aef03d8d4bfc224962e2081cf8ed86f
parent917f89ceb693c4fbaa0d459007d70363db366d8c (diff)
downloadmariadb-git-7ad5d7c1efdaefc98d1fd9a1943cd70a7b6e835d.tar.gz
Bug#24732 Executables do not include Vista manifests
- Post merge cleanup. CMakeLists.txt: Bug#24732 Executables do not include Vista manifests - Added logic for EMBED_MANIFESTS configuration option. client/CMakeLists.txt: Bug#24732 Executables do not include Vista manifests - Embed manifest with custom CMake MACRO for client executables. extra/CMakeLists.txt: Bug#24732 Executables do not include Vista manifests - Embed manifest with custom CMake MACRO for my_print_default executable. libmysql/CMakeLists.txt: Bug#24732 Executables do not include Vista manifests - Embed manifest with custom CMake MACRO for myTest executable. server-tools/instance-manager/CMakeLists.txt: Bug#24732 Executables do not include Vista manifests - Embed manifest with custom CMake MACRO for mysqlmanager executable. sql/CMakeLists.txt: Bug#24732 Executables do not include Vista manifests - Embed manifest with custom CMake MACRO for mysqld executable. storage/myisam/CMakeLists.txt: Bug#24732 Executables do not include Vista manifests - Embed manifest with custom CMake MACRO for myisam executables. win/README: Bug#24732 Executables do not include Vista manifests - Added new configuration option documentation. win/configure.js: Bug#24732 Executables do not include Vista manifests - Added new EMBED_MANIFESTS configuration option.
-rw-r--r--CMakeLists.txt27
-rw-r--r--client/CMakeLists.txt13
-rw-r--r--extra/CMakeLists.txt5
-rw-r--r--libmysql/CMakeLists.txt6
-rw-r--r--server-tools/instance-manager/CMakeLists.txt5
-rw-r--r--sql/CMakeLists.txt5
-rw-r--r--storage/myisam/CMakeLists.txt8
-rw-r--r--win/README4
-rw-r--r--win/configure.js1
9 files changed, 73 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index a46022566d3..02755c5d138 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -134,6 +134,33 @@ ENDIF(CMAKE_GENERATOR MATCHES "Visual Studio 7" OR
ADD_DEFINITIONS("-D_WINDOWS -D__WIN__ -D _CRT_SECURE_NO_DEPRECATE")
+IF(EMBED_MANIFESTS)
+ # Search for the Manifest tool. CMake will first search it's defaults
+ # (CMAKE_FRAMEWORK_PATH, CMAKE_APPBUNDLE_PATH, CMAKE_PROGRAM_PATH and
+ # the system PATH) followed by the listed paths which are the current
+ # possible defaults and should be updated when necessary. The custom
+ # manifests are designed to be compatible with all mt versions.
+ FIND_PROGRAM(HAVE_MANIFEST_TOOL NAMES mt
+ PATHS
+ "$ENV{PROGRAMFILES}/Microsoft Visual Studio 8/VC/bin"
+ "$ENV{PROGRAMFILES}/Microsoft Visual Studio 8/Common7/Tools/Bin"
+ "$ENV{PROGRAMFILES}/Microsoft Visual Studio 8/SDK/v2.0/Bin")
+ IF(HAVE_MANIFEST_TOOL)
+ MESSAGE(STATUS "Found Mainfest Tool. Embedding custom manifests.")
+ ELSE(HAVE_MANIFEST_TOOL)
+ MESSAGE(FATAL_ERROR "Manifest tool, mt.exe, can't be found.")
+ ENDIF(HAVE_MANIFEST_TOOL)
+ # Disable automatic manifest generation.
+ STRING(REPLACE "/MANIFEST" "/MANIFEST:NO" CMAKE_EXE_LINKER_FLAGS
+ ${CMAKE_EXE_LINKER_FLAGS})
+ # Set the processor architecture.
+ IF(CMAKE_GENERATOR MATCHES "Visual Studio 8 2005 Win64")
+ SET(PROCESSOR_ARCH "X64")
+ ELSE(CMAKE_GENERATOR MATCHES "Visual Studio 8 2005 Win64")
+ SET(PROCESSOR_ARCH "X86")
+ ENDIF(CMAKE_GENERATOR MATCHES "Visual Studio 8 2005 Win64")
+ENDIF(EMBED_MANIFESTS)
+
ADD_SUBDIRECTORY(vio)
ADD_SUBDIRECTORY(dbug)
ADD_SUBDIRECTORY(strings)
diff --git a/client/CMakeLists.txt b/client/CMakeLists.txt
index 4c41dc263b0..8ec8b0111b0 100644
--- a/client/CMakeLists.txt
+++ b/client/CMakeLists.txt
@@ -12,6 +12,7 @@
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+INCLUDE("${PROJECT_SOURCE_DIR}/win/mysql_manifest.cmake")
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX")
SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX")
@@ -101,3 +102,15 @@ TARGET_LINK_LIBRARIES(mysqlslap mysqlclient mysys yassl taocrypt zlib wsock32 db
ADD_EXECUTABLE(echo echo.c)
+IF(EMBED_MANIFESTS)
+ MYSQL_EMBED_MANIFEST("mysql" "asInvoker")
+ MYSQL_EMBED_MANIFEST("mysqltest" "asInvoker")
+ MYSQL_EMBED_MANIFEST("mysqlcheck" "asInvoker")
+ MYSQL_EMBED_MANIFEST("mysqldump" "asInvoker")
+ MYSQL_EMBED_MANIFEST("mysqlimport" "asInvoker")
+ MYSQL_EMBED_MANIFEST("mysql_upgrade" "asInvoker")
+ MYSQL_EMBED_MANIFEST("mysqlshow" "asInvoker")
+ MYSQL_EMBED_MANIFEST("mysqlbinlog" "asInvoker")
+ MYSQL_EMBED_MANIFEST("mysqladmin" "asInvoker")
+ MYSQL_EMBED_MANIFEST("echo" "asInvoker")
+ENDIF(EMBED_MANIFESTS)
diff --git a/extra/CMakeLists.txt b/extra/CMakeLists.txt
index a7a5e3e7b66..1722c9da5f2 100644
--- a/extra/CMakeLists.txt
+++ b/extra/CMakeLists.txt
@@ -12,6 +12,7 @@
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+INCLUDE("${PROJECT_SOURCE_DIR}/win/mysql_manifest.cmake")
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX")
SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX")
@@ -45,3 +46,7 @@ TARGET_LINK_LIBRARIES(perror strings mysys dbug wsock32)
ADD_EXECUTABLE(replace replace.c)
TARGET_LINK_LIBRARIES(replace strings mysys dbug wsock32)
+
+IF(EMBED_MANIFESTS)
+ MYSQL_EMBED_MANIFEST("myTest" "asInvoker")
+ENDIF(EMBED_MANIFESTS)
diff --git a/libmysql/CMakeLists.txt b/libmysql/CMakeLists.txt
index db4368a3534..7d4dcc1e919 100644
--- a/libmysql/CMakeLists.txt
+++ b/libmysql/CMakeLists.txt
@@ -15,6 +15,8 @@
# Need to set USE_TLS, since __declspec(thread) approach to thread local
# storage does not work properly in DLLs.
+INCLUDE("${PROJECT_SOURCE_DIR}/win/mysql_manifest.cmake")
+
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX -DUSE_TLS")
SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX -DUSE_TLS")
@@ -67,3 +69,7 @@ TARGET_LINK_LIBRARIES(libmysql mysys strings wsock32)
ADD_EXECUTABLE(myTest mytest.c)
TARGET_LINK_LIBRARIES(myTest libmysql)
+
+IF(EMBED_MANIFESTS)
+ MYSQL_EMBED_MANIFEST("myTest" "asInvoker")
+ENDIF(EMBED_MANIFESTS)
diff --git a/server-tools/instance-manager/CMakeLists.txt b/server-tools/instance-manager/CMakeLists.txt
index 3f02ba88f1d..f8a8a7e57d0 100644
--- a/server-tools/instance-manager/CMakeLists.txt
+++ b/server-tools/instance-manager/CMakeLists.txt
@@ -12,6 +12,7 @@
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+INCLUDE("${PROJECT_SOURCE_DIR}/win/mysql_manifest.cmake")
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX")
SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX")
@@ -31,3 +32,7 @@ ADD_EXECUTABLE(mysqlmanager buffer.cc command.cc commands.cc guardian.cc instanc
ADD_DEPENDENCIES(mysqlmanager GenError)
TARGET_LINK_LIBRARIES(mysqlmanager dbug mysys strings taocrypt vio yassl zlib wsock32)
+
+IF(EMBED_MANIFESTS)
+ MYSQL_EMBED_MANIFEST("mysqlmanager" "asInvoker")
+ENDIF(EMBED_MANIFESTS)
diff --git a/sql/CMakeLists.txt b/sql/CMakeLists.txt
index fe919d6442d..cd1a5527abc 100644
--- a/sql/CMakeLists.txt
+++ b/sql/CMakeLists.txt
@@ -12,6 +12,7 @@
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+INCLUDE("${PROJECT_SOURCE_DIR}/win/mysql_manifest.cmake")
SET(CMAKE_CXX_FLAGS_DEBUG
"${CMAKE_CXX_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX -DUSE_SYMDIR")
@@ -82,6 +83,10 @@ ADD_EXECUTABLE(mysqld ../sql-common/client.c derror.cc des_key_file.cc
${PROJECT_SOURCE_DIR}/sql/lex_hash.h)
TARGET_LINK_LIBRARIES(mysqld heap myisam myisammrg mysys yassl zlib dbug yassl
taocrypt strings vio regex wsock32 ws2_32)
+
+IF(EMBED_MANIFESTS)
+ MYSQL_EMBED_MANIFEST("mysqld" "requireAdministrator")
+ENDIF(EMBED_MANIFESTS)
IF(WITH_ARCHIVE_STORAGE_ENGINE)
TARGET_LINK_LIBRARIES(mysqld archive)
ENDIF(WITH_ARCHIVE_STORAGE_ENGINE)
diff --git a/storage/myisam/CMakeLists.txt b/storage/myisam/CMakeLists.txt
index e1337b2e2ac..ad0efe4a4e4 100644
--- a/storage/myisam/CMakeLists.txt
+++ b/storage/myisam/CMakeLists.txt
@@ -12,6 +12,7 @@
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+INCLUDE("${PROJECT_SOURCE_DIR}/win/mysql_manifest.cmake")
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX")
SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX")
@@ -43,3 +44,10 @@ TARGET_LINK_LIBRARIES(myisamlog myisam mysys dbug strings zlib wsock32)
ADD_EXECUTABLE(myisampack myisampack.c)
TARGET_LINK_LIBRARIES(myisampack myisam mysys dbug strings zlib wsock32)
+
+IF(EMBED_MANIFESTS)
+ MYSQL_EMBED_MANIFEST("myisam_ftdump" "asInvoker")
+ MYSQL_EMBED_MANIFEST("myisamchk" "asInvoker")
+ MYSQL_EMBED_MANIFEST("myisamlog" "asInvoker")
+ MYSQL_EMBED_MANIFEST("myisampack" "asInvoker")
+ENDIF(EMBED_MANIFESTS)
diff --git a/win/README b/win/README
index 88677029e0b..1e45b92abb2 100644
--- a/win/README
+++ b/win/README
@@ -58,7 +58,9 @@ The options right now are
MYSQL_SERVER_SUFFIX=<suffix> Server suffix, default none
COMPILATION_COMMENT=<comment> Server comment, default "Source distribution"
MYSQL_TCP_PORT=<port> Server port, default 3306
- CYBOZU Default character set is UTF8
+ CYBOZU Default character set is UTF8
+ EMBED_MANIFESTS Embed custom manifests into final exes, otherwise VS
+ default will be used.
So the command line could look like:
diff --git a/win/configure.js b/win/configure.js
index 7080c457965..7225fff119b 100644
--- a/win/configure.js
+++ b/win/configure.js
@@ -46,6 +46,7 @@ try
case "WITH_PARTITION_STORAGE_ENGINE":
case "__NT__":
case "CYBOZU":
+ case "EMBED_MANIFESTS":
configfile.WriteLine("SET (" + args.Item(i) + " TRUE)");
break;
case "MYSQL_SERVER_SUFFIX":