[Mobies-commit] [commit] r4380 - in UDM/trunk/src/UIntWizVS: . Scripts/1033 Templates/1033

ksmyth at redhat3.isis.vanderbilt.edu ksmyth at redhat3.isis.vanderbilt.edu
Thu Jul 21 16:36:25 CDT 2016


Author: ksmyth
Date: Thu Jul 21 16:36:25 2016
New Revision: 4380

Log:
Interpreter wizard: support Visual Studio 2015. Use Unicode

Added:
   UDM/trunk/src/UIntWizVS/setup140.js
      - copied, changed from r4379, UDM/trunk/src/UIntWizVS/setup120.js
Modified:
   UDM/trunk/src/UIntWizVS/Scripts/1033/default.js
   UDM/trunk/src/UIntWizVS/Templates/1033/ComponentConfig.h
   UDM/trunk/src/UIntWizVS/Templates/1033/RawComponent.cpp
   UDM/trunk/src/UIntWizVS/Templates/1033/UdmApp.cpp
   UDM/trunk/src/UIntWizVS/Templates/1033/UdmConsole.cpp
   UDM/trunk/src/UIntWizVS/Templates/1033/UdmConsole.h
   UDM/trunk/src/UIntWizVS/setup120.js

Modified: UDM/trunk/src/UIntWizVS/Scripts/1033/default.js
==============================================================================
--- UDM/trunk/src/UIntWizVS/Scripts/1033/default.js	Thu Jul 21 16:36:20 2016	(r4379)
+++ UDM/trunk/src/UIntWizVS/Scripts/1033/default.js	Thu Jul 21 16:36:25 2016	(r4380)
@@ -2,19 +2,11 @@
 {
     try
     {
-        if (dte.Version == '12.0') {
-            // reuse OnFinish100 function
-		    OnFinish100(selProj, selObj);
+        if (dte.Version == '9.0') {
+		    OnFinish90(selProj, selObj);
 		}
-		else if (dte.Version == '11.0') {
-			// reuse OnFinish100 function
+		else {
 		    OnFinish100(selProj, selObj);
-		}
-        else if (dte.Version == '10.0') {
-		    OnFinish100(selProj, selObj);
-		}
-		else {
-		    OnFinish90(selProj, selObj);
 		}
     }
     catch(e)
@@ -247,7 +239,7 @@
 		    var config = proj.Object.Configurations('Debug');
 		    config.ConfigurationType = ConfigurationTypes.typeDynamicLibrary;
             config.useOfMfc = useOfMfc.useMfcDynamic;
-            config.CharacterSet = charSet.charSetMBCS;
+            config.CharacterSet = charSet.charSetUnicode;
 		    if (dte.Version == '10.0' || dte.Version == '12.0') {
 		    	var rule = config.Rules.Item("ConfigurationGeneral");
 		    	rule.SetPropertyValue("TargetName", "$(ProjectName)D");
@@ -259,7 +251,7 @@
 		    MIDLTool.MkTypLibCompatible="false";
 		    MIDLTool.ValidateParameters="true";
 		    MIDLTool.TypeLibraryName = ".\\ComponentLib.tlb";
-		    if (dte.Version == '10.0' || dte.Version == '12.0')
+		    if (dte.Version != '9.0')
 		    	MIDLTool.HeaderFileName = "%(Filename).h";
 		    else
 		    	MIDLTool.HeaderFileName = "$(InputName).h";
@@ -290,7 +282,7 @@
 		    LinkTool.SubSystem = subSystemOption.subSystemWindows;
 		    LinkTool.ModuleDefinitionFile = 'Component.def';
 			LinkTool.RegisterOutput = true;
-		    if (dte.Version != '10.0' && dte.Version != '12.0')
+		    if (dte.Version == '9.0')
 		    	LinkTool.OutputFile = "$(OutDir)/$(ProjectName)D.dll"
             LinkTool.AdditionalLibraryDirectories = ".;$(UDM_PATH)\\lib";
 
@@ -311,7 +303,7 @@
 		    config = proj.Object.Configurations('Release');
 	        config.ConfigurationType = ConfigurationTypes.typeDynamicLibrary;
 	        config.useOfMfc  = useOfMfc.useMfcDynamic;
-	        config.CharacterSet = charSet.charSetMBCS;
+	        config.CharacterSet = charSet.charSetUnicode;
     	    
             // RELEASE MIDL SETTINGS
             var MIDLTool = config.Tools('VCMIDLTool');
@@ -319,7 +311,7 @@
 		    MIDLTool.MkTypLibCompatible = "false";
 		    MIDLTool.ValidateParameters = "true";
 		    MIDLTool.TypeLibraryName = ".\\ComponentLib.tlb";
-		    if (dte.Version == '10.0' || dte.Version == '12.0')
+		    if (dte.Version != '9.0')
 		    	MIDLTool.HeaderFileName = "%(Filename).h";
 		    else
 		    	MIDLTool.HeaderFileName = "$(InputName).h";
@@ -350,7 +342,7 @@
 		    LinkTool.SubSystem = subSystemOption.subSystemWindows;
 		    LinkTool.ModuleDefinitionFile = 'Component.def';
 			LinkTool.RegisterOutput = true;
-		    if (dte.Version != '10.0' && dte.Version != '12.0')
+		    if (dte.Version == '9.0')
 		    	LinkTool.OutputFile = "$(OutDir)/$(ProjectName).dll"
             LinkTool.AdditionalLibraryDirectories = ".;$(UDM_PATH)\\lib";
 
@@ -529,7 +521,7 @@
 				var strFile = '$(GME_ROOT)\\SDK\\BON\\Common\\' + strTpl;
 				vcfile = proj.Object.AddFile(strFile);
 				
-				if (dte.Version != '10.0' && dte.Version != '12.0') {
+				if (dte.Version == '9.0') {
 				    // This is needed to remove the '.' from the beginning of the relative path (added by default)
 				    vcfile.RelativePath = '$(GME_ROOT)\\SDK\\BON\\Common\\' + strTpl;
 				}

Modified: UDM/trunk/src/UIntWizVS/Templates/1033/ComponentConfig.h
==============================================================================
--- UDM/trunk/src/UIntWizVS/Templates/1033/ComponentConfig.h	Thu Jul 21 16:36:20 2016	(r4379)
+++ UDM/trunk/src/UIntWizVS/Templates/1033/ComponentConfig.h	Thu Jul 21 16:36:25 2016	(r4380)
@@ -19,7 +19,7 @@
 #define TYPELIB_UUID "[!output TYPELIB_UUID]"
 #define TYPELIB_NAME "[!output TYPELIB_NAME]"
 #define COCLASS_UUID "[!output COCLASS_UUID]"
-#define COCLASS_NAME "[!output COCLASS_NAME]"
+#define COCLASS_NAME L"[!output COCLASS_NAME]"
 #define COCLASS_PROGID "[!output COCLASS_PROGID]"
 
 #define COCLASS_UUID_EXPLODED1  [!output COCLASS_UUID_EXPLODED1]

Modified: UDM/trunk/src/UIntWizVS/Templates/1033/RawComponent.cpp
==============================================================================
--- UDM/trunk/src/UIntWizVS/Templates/1033/RawComponent.cpp	Thu Jul 21 16:36:20 2016	(r4379)
+++ UDM/trunk/src/UIntWizVS/Templates/1033/RawComponent.cpp	Thu Jul 21 16:36:25 2016	(r4380)
@@ -9,11 +9,12 @@
 #include <ComHelp.h>
 #include <GMECOM.h>
 #include "ComponentConfig.h"
-#ifndef __INTELLISENSE__
-#import "progid:Mga.MgaMetaFolder" no_implementation auto_search no_namespace no_search_namespace
-#import "progid:Mga.MgaFolders" no_implementation auto_search no_namespace no_search_namespace
-#import "progid:Mga.MgaMetaFolder" implementation_only auto_search no_namespace no_search_namespace
-#import "progid:Mga.MgaFolders" implementation_only auto_search no_namespace no_search_namespace
+#if _MSC_VER >= 1900 || !defined(__INTELLISENSE__)
+// #import Meta, Mga, GME libs
+#import "libid:0adeec71-d83a-11d3-b36b-005004d38590" no_implementation auto_search no_namespace no_search_namespace
+#import "libid:270b4f86-b17c-11d3-9ad1-00aa00b6fe26" no_implementation auto_search no_namespace no_search_namespace
+#import "libid:0adeec71-d83a-11d3-b36b-005004d38590" implementation_only auto_search no_namespace no_search_namespace
+#import "libid:270b4f86-b17c-11d3-9ad1-00aa00b6fe26" implementation_only auto_search no_namespace no_search_namespace
 #import "libid:0ADEEC71-D83A-11D3-B36B-005004CC8592" no_implementation auto_search no_namespace no_search_namespace
 #import "libid:0ADEEC71-D83A-11D3-B36B-005004CC8592" implementation_only auto_search no_namespace no_search_namespace
 #else
@@ -99,7 +100,7 @@
 			GMEConsole::Console::SetupConsole(ccpProject);
 
 			CComBSTR projname;
-			CComBSTR focusname = "<nothing>";
+			CComBSTR focusname = L"<nothing>";
 			CComPtr<IMgaTerritory> terr;
 
 			// Setting up Udm
@@ -110,7 +111,7 @@
 				Uml::Diagram theUmlDiagram;
 
 				// Opening the XML meta of the project
-				ddnMeta.OpenExisting(META_PATH,"uml.dtd", Udm::CHANGES_LOST_DEFAULT);
+				ddnMeta.OpenExisting(META_PATH, "uml.dtd", Udm::CHANGES_LOST_DEFAULT);
 
 				// Casting the DataNetwork to diagram
 				theUmlDiagram = Uml::Diagram::Cast(ddnMeta.GetRootObject());

Modified: UDM/trunk/src/UIntWizVS/Templates/1033/UdmApp.cpp
==============================================================================
--- UDM/trunk/src/UIntWizVS/Templates/1033/UdmApp.cpp	Thu Jul 21 16:36:20 2016	(r4379)
+++ UDM/trunk/src/UIntWizVS/Templates/1033/UdmApp.cpp	Thu Jul 21 16:36:25 2016	(r4380)
@@ -6,6 +6,8 @@
 [!if META_LOADING_DYNAMIC && DYNAMIC_META_USER_SELECT]
 #include <afxdlgs.h> // For CFileDialog
 [!endif]
+#include "Gme.h"
+#include "UdmConsole.h"
 
 using namespace std;
 
@@ -56,7 +58,11 @@
 	return 0;
 }
 
-
+#ifdef _UNICODE
+void AfxMessageBox(const char* text) {
+	AfxMessageBox(GMEConsole::BSTRFromUTF8(text));
+}
+#endif
 
 /* 
 Remarks to CUdmApp::UdmMain(...):

Modified: UDM/trunk/src/UIntWizVS/Templates/1033/UdmConsole.cpp
==============================================================================
--- UDM/trunk/src/UIntWizVS/Templates/1033/UdmConsole.cpp	Thu Jul 21 16:36:20 2016	(r4379)
+++ UDM/trunk/src/UIntWizVS/Templates/1033/UdmConsole.cpp	Thu Jul 21 16:36:25 2016	(r4380)
@@ -121,4 +121,8 @@
 				throw udm_exception("Could not set the contents of GME console.");
 	}
 
+	void Console::SetupConsole(::ATL::CComPtr<IMgaProject> project)
+	{
+		Console::setupConsole(project);
+	}
 }
\ No newline at end of file

Modified: UDM/trunk/src/UIntWizVS/Templates/1033/UdmConsole.h
==============================================================================
--- UDM/trunk/src/UIntWizVS/Templates/1033/UdmConsole.h	Thu Jul 21 16:36:20 2016	(r4379)
+++ UDM/trunk/src/UIntWizVS/Templates/1033/UdmConsole.h	Thu Jul 21 16:36:25 2016	(r4380)
@@ -30,7 +30,7 @@
 				gmeoleapp = 0;
 			}
 		}
-		static void SetupConsole(CComPtr<IMgaProject> project) { setupConsole(project); }
+		static void SetupConsole(::ATL::CComPtr<::IMgaProject> project);
 
 		static void writeLine(const std::string& message, msgtype_enum type);
 

Modified: UDM/trunk/src/UIntWizVS/setup120.js
==============================================================================
--- UDM/trunk/src/UIntWizVS/setup120.js	Thu Jul 21 16:36:20 2016	(r4379)
+++ UDM/trunk/src/UIntWizVS/setup120.js	Thu Jul 21 16:36:25 2016	(r4380)
@@ -93,7 +93,7 @@
 			}
 			catch(e)
 			{
-				WScript.Echo("Cannot find where Visual Studio 2010 is installed. UdmInterpreter wizard will be unavailable.");
+				WScript.Echo("Cannot find where Visual Studio 2013 is installed. UdmInterpreter wizard will be unavailable.");
 				return;
 			}
 			WScript.Echo("Visual Studio Express doesn't support Wizards. UdmInterpreter Wizard will be unavailable.");

Copied and modified: UDM/trunk/src/UIntWizVS/setup140.js (from r4379, UDM/trunk/src/UIntWizVS/setup120.js)
==============================================================================
--- UDM/trunk/src/UIntWizVS/setup120.js	Thu Jul 21 16:36:20 2016	(r4379, copy source)
+++ UDM/trunk/src/UIntWizVS/setup140.js	Thu Jul 21 16:36:25 2016	(r4380)
@@ -11,12 +11,12 @@
 // the terms of this license. You must not remove this notice, or
 // any other, from this software.
 
-// Setup program for the UDM Interpreter Wizard for VC++ 12.0 (Visual Studio 2013)
+// Setup program for the UDM Interpreter Wizard for VC++ 14.0 (Visual Studio 2015)
 
 
-main();
+main("14.0", "Visual Studio 2015");
 
-function main()
+function main(vc_ver, vs_ver)
 {
 	// Decode command line arguments
 	var bDebug = false;
@@ -74,26 +74,26 @@
 
 	try
 	{
-		var strVCKey = "HKLM\\Software\\Microsoft\\VisualStudio\\12.0\\Setup\\VC\\ProductDir";
+		var strVCKey = "HKLM\\Software\\Microsoft\\VisualStudio\\" + vc_ver + "\\Setup\\VC\\ProductDir";
 		strValue = WSShell.RegRead(strVCKey);
 	}
 	catch(e)
 	{
 		try
 		{
-			var strVCKey_x64 = "HKLM\\Software\\Wow6432Node\\Microsoft\\VisualStudio\\12.0\\Setup\\VC\\ProductDir";
+			var strVCKey_x64 = "HKLM\\Software\\Wow6432Node\\Microsoft\\VisualStudio\\" + vc_ver + "\\Setup\\VC\\ProductDir";
 			strValue = WSShell.RegRead(strVCKey_x64);
 		}
 		catch(e)
 		{
 			try
 			{
-				var strVCExKey = "HKLM\\Software\\Microsoft\\VCExpress\\12.0\\Setup\\VC\\ProductDir";
+				var strVCExKey = "HKLM\\Software\\Microsoft\\VCExpress\\" + vc_ver + "\\Setup\\VC\\ProductDir";
 				strValue = WSShell.RegRead(strVCExKey);
 			}
 			catch(e)
 			{
-				WScript.Echo("Cannot find where Visual Studio 2010 is installed. UdmInterpreter wizard will be unavailable.");
+				WScript.Echo("Cannot find where " + vs_ver + " is installed. UdmInterpreter wizard will be unavailable.");
 				return;
 			}
 			WScript.Echo("Visual Studio Express doesn't support Wizards. UdmInterpreter Wizard will be unavailable.");
@@ -156,9 +156,9 @@
 		{
 			var strLine = fileSrc.ReadLine();
 			if(strLine.indexOf("Wizard=VsWizard.VsWizardEngine") != -1)
-				strLine = "Wizard=VsWizard.VsWizardEngine.12.0";
+				strLine = "Wizard=VsWizard.VsWizardEngine." + vc_ver;
 			else if(strLine.indexOf("WIZARD_VERSION") != -1)
-				strLine = "Param=\"WIZARD_VERSION = 12.0\"";
+				strLine = "Param=\"WIZARD_VERSION = " + vc_ver + "\"";
 			else if(strLine.indexOf("ABSOLUTE_PATH") != -1)
 				strLine = "Param=\"ABSOLUTE_PATH = " + strSourceFolder + "\"";
 			fileDest.WriteLine(strLine);


More information about the Mobies-commit mailing list