You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

96 lines
3.4 KiB

Bug#24732 Executables do not include Vista manifests - Added script to generate application specific manifest. - Added new CMake MACRO to add customer build events which will first generate a manifest and then embeds that manifest into an executable. BitKeeper/etc/ignore: Bug#24732 Executables do not include Vista manifests - Revise ignore rules to disallow auto-generated cmake files but to allow custom macros defined in a .cmake file. 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. myisam/CMakeLists.txt: Bug#24732 Executables do not include Vista manifests - Embed manifest with custom CMake MACRO for myisam executables. 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. 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. win/create_manifest.js: Bug#24732 Executables do not include Vista manifests - Manifest generator. This script generates a basic manifest. win/mysql_manifest.cmake: Bug#24732 Executables do not include Vista manifests - Define new CMake MACRO for adding Windows manifests to executables.
19 years ago
Bug#24732 Executables do not include Vista manifests - Added script to generate application specific manifest. - Added new CMake MACRO to add customer build events which will first generate a manifest and then embeds that manifest into an executable. BitKeeper/etc/ignore: Bug#24732 Executables do not include Vista manifests - Revise ignore rules to disallow auto-generated cmake files but to allow custom macros defined in a .cmake file. 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. myisam/CMakeLists.txt: Bug#24732 Executables do not include Vista manifests - Embed manifest with custom CMake MACRO for myisam executables. 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. 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. win/create_manifest.js: Bug#24732 Executables do not include Vista manifests - Manifest generator. This script generates a basic manifest. win/mysql_manifest.cmake: Bug#24732 Executables do not include Vista manifests - Define new CMake MACRO for adding Windows manifests to executables.
19 years ago
Bug#24732 Executables do not include Vista manifests - Added script to generate application specific manifest. - Added new CMake MACRO to add customer build events which will first generate a manifest and then embeds that manifest into an executable. BitKeeper/etc/ignore: Bug#24732 Executables do not include Vista manifests - Revise ignore rules to disallow auto-generated cmake files but to allow custom macros defined in a .cmake file. 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. myisam/CMakeLists.txt: Bug#24732 Executables do not include Vista manifests - Embed manifest with custom CMake MACRO for myisam executables. 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. 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. win/create_manifest.js: Bug#24732 Executables do not include Vista manifests - Manifest generator. This script generates a basic manifest. win/mysql_manifest.cmake: Bug#24732 Executables do not include Vista manifests - Define new CMake MACRO for adding Windows manifests to executables.
19 years ago
Bug#24732 Executables do not include Vista manifests - Added script to generate application specific manifest. - Added new CMake MACRO to add customer build events which will first generate a manifest and then embeds that manifest into an executable. BitKeeper/etc/ignore: Bug#24732 Executables do not include Vista manifests - Revise ignore rules to disallow auto-generated cmake files but to allow custom macros defined in a .cmake file. 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. myisam/CMakeLists.txt: Bug#24732 Executables do not include Vista manifests - Embed manifest with custom CMake MACRO for myisam executables. 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. 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. win/create_manifest.js: Bug#24732 Executables do not include Vista manifests - Manifest generator. This script generates a basic manifest. win/mysql_manifest.cmake: Bug#24732 Executables do not include Vista manifests - Define new CMake MACRO for adding Windows manifests to executables.
19 years ago
Bug#24732 Executables do not include Vista manifests - Added script to generate application specific manifest. - Added new CMake MACRO to add customer build events which will first generate a manifest and then embeds that manifest into an executable. BitKeeper/etc/ignore: Bug#24732 Executables do not include Vista manifests - Revise ignore rules to disallow auto-generated cmake files but to allow custom macros defined in a .cmake file. 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. myisam/CMakeLists.txt: Bug#24732 Executables do not include Vista manifests - Embed manifest with custom CMake MACRO for myisam executables. 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. 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. win/create_manifest.js: Bug#24732 Executables do not include Vista manifests - Manifest generator. This script generates a basic manifest. win/mysql_manifest.cmake: Bug#24732 Executables do not include Vista manifests - Define new CMake MACRO for adding Windows manifests to executables.
19 years ago
  1. /*
  2. manifest.js - Writes a custom XML manifest for each executable/library
  3. 5 command line options must be supplied:
  4. name - Name of the executable/library into which the mainfest will be
  5. embedded.
  6. version - Version of the executable
  7. arch - Architecture intended.
  8. exe_level - Application execution level.
  9. [asInvoker|highestAvailable|requireAdministrator]
  10. outfile - Final destination where mainfest will be written.
  11. Example:
  12. cscript manifest.js name=mysql version=5.0.32 arch=X86 type=win32
  13. exe_level=asInvoker outfile=out.xml
  14. */
  15. try
  16. {
  17. var args = WScript.Arguments
  18. for (i=0; i < args.Count(); i++)
  19. {
  20. var parts = args.Item(i).split('=');
  21. switch (parts[0])
  22. {
  23. case "name":
  24. var app_name= parts[1];
  25. break;
  26. case "version":
  27. var supp_version= parts[1];
  28. // Clean up the supplied version string.
  29. var end= supp_version.indexOf("-");
  30. if (end == -1) end= supp_version.length;
  31. var app_version= supp_version.substring(0, end);
  32. var fourth_element= 0;
  33. if(app_version.match(/[a-z]$/)) {
  34. fourth_element+= (1 + app_version.charCodeAt(end-1) - "a".charCodeAt(0));
  35. app_version= app_version.substring(0,--end);
  36. }
  37. if(app_version.match(/sp[1-9]$/)) {
  38. fourth_element+= 100*(app_version.charCodeAt(end-1) - "0".charCodeAt(0));
  39. app_version= app_version.substring(0, end-3);
  40. end-= 3;
  41. }
  42. app_version+= "." + fourth_element;
  43. break;
  44. case "arch":
  45. var app_arch= parts[1];
  46. break;
  47. case "exe_level":
  48. var app_exe_level= parts[1];
  49. break;
  50. case "outfile":
  51. var manifest_file= parts[1];
  52. break;
  53. default:
  54. WScript.echo("Invalid argument supplied.");
  55. }
  56. }
  57. if (i != 5)
  58. throw new Error(1, "Incorrect number of arguments.");
  59. var manifest_xml= "<?xml version=\'1.0\' encoding=\'UTF-8\' standalone=\'yes\'?>\r\n";
  60. manifest_xml+= "<assembly xmlns=\'urn:schemas-microsoft-com:asm.v1\'";
  61. manifest_xml+= " manifestVersion=\'1.0\'>\r\n";
  62. // Application Information
  63. manifest_xml+= "\t<assemblyIdentity name=\'" + app_name + "\'";
  64. manifest_xml+= " version=\'" + app_version + "\'";
  65. manifest_xml+= " processorArchitecture=\'" + app_arch + "\'";
  66. manifest_xml+= " publicKeyToken=\'02ad33b422233ae3\'";
  67. manifest_xml+= " type=\'win32\' />\r\n";
  68. // Identify the application security requirements.
  69. manifest_xml+= "\t<trustInfo xmlns=\'urn:schemas-microsoft-com:asm.v2\'>\r\n";
  70. manifest_xml+= "\t\t<security>\r\n\t\t\t<requestedPrivileges>\r\n\t\t\t\t";
  71. manifest_xml+= "<requestedExecutionLevel level=\'" + app_exe_level + "\'";
  72. manifest_xml+= " uiAccess=\'false\'/>\r\n";
  73. manifest_xml+= "\t\t\t</requestedPrivileges>\r\n\t\t</security>\r\n";
  74. manifest_xml+= "\t</trustInfo>\r\n</assembly>\r\n";
  75. // Write the valid XML to it's final destination.
  76. var outfileXML = WScript.CreateObject("Msxml2.DOMDocument.3.0");
  77. outfileXML.async = false;
  78. if (!outfileXML.loadXML(manifest_xml))
  79. {
  80. WScript.Echo(manifest_xml);
  81. throw new Error(2, "Invalid XML");
  82. }
  83. outfileXML.save(manifest_file);
  84. WScript.Echo("Success, created custom manifest!");
  85. WScript.Quit(0);
  86. }
  87. catch (e)
  88. {
  89. WScript.Echo("Error: " + e.description);
  90. WScript.Quit(1);
  91. }