[commit] r2000 - in trunk: GME/DotNetPIAs GME/DotNetPIAs_1.0.1.0 GME/Gme GME/Interfaces GME/MgaUtil GME/Parser Install Install/Build Install/PIAs Install/PIAs_1.0.1.0 Install/PIAs_1.1.0.0 Tests/GPyUnit

GMESRC Repository Notifications gme-commit at list.isis.vanderbilt.edu
Mon Aug 13 13:14:26 CDT 2012


Author: ksmyth
Date: Mon Aug 13 13:14:25 2012
New Revision: 2000

Log:
Fix PIAs in installer. ParserLib extensions. Only show progress bar for GME; Center dialog and disable main GME window. Make interface for future progress bar on xme export.

Added:
   trunk/GME/DotNetPIAs_1.0.1.0/
   trunk/GME/DotNetPIAs_1.0.1.0/GME.MGA.Parser.dll
   trunk/Install/PIAs_1.1.0.0/
   trunk/Install/PIAs_1.1.0.0/GME.MGA.Parser.wxi
   trunk/Install/PIAs_1.1.0.0/make
Modified:
   trunk/GME/DotNetPIAs/DotNetPIAs.vcxproj
   trunk/GME/Gme/GMEApp.cpp
   trunk/GME/Gme/GMEOLEApp.cpp
   trunk/GME/Gme/StdAfx.cpp
   trunk/GME/Interfaces/Parser.idl
   trunk/GME/MgaUtil/MgaProgressDlg.cpp
   trunk/GME/Parser/MetaParser.h
   trunk/GME/Parser/MgaDumper.cpp
   trunk/GME/Parser/MgaDumper.h
   trunk/GME/Parser/MgaParser.cpp
   trunk/GME/Parser/MgaParser.h
   trunk/GME/Parser/ParserLib.idl
   trunk/GME/Parser/StdAfx.h
   trunk/Install/Build/build.py
   trunk/Install/Build/tools.py
   trunk/Install/GME_bin.wxs
   trunk/Install/GME_inc.wxi
   trunk/Install/GME_paradigms.wxs
   trunk/Install/PIAs/GME.MGA.Core.wxi
   trunk/Install/PIAs/GME.MGA.Meta.wxi
   trunk/Install/PIAs/GME.MGA.Parser.wxi
   trunk/Install/PIAs/GME.MGA.wxi
   trunk/Install/PIAs/GME.Util.wxi
   trunk/Install/PIAs/GMEPIA.wxi
   trunk/Install/PIAs_1.0.1.0/GME.MGA.Core.wxi
   trunk/Install/PIAs_1.0.1.0/GME.MGA.Meta.wxi
   trunk/Install/PIAs_1.0.1.0/GME.MGA.wxi
   trunk/Install/PIAs_1.0.1.0/GME.Util.wxi
   trunk/Install/PIAs_1.0.1.0/GMEPIA.wxi
   trunk/Tests/GPyUnit/test_PIAs.py
   trunk/Tests/GPyUnit/test_parser.py

Modified: trunk/GME/DotNetPIAs/DotNetPIAs.vcxproj
==============================================================================
--- trunk/GME/DotNetPIAs/DotNetPIAs.vcxproj	Thu Aug  9 12:08:13 2012	(r1999)
+++ trunk/GME/DotNetPIAs/DotNetPIAs.vcxproj	Mon Aug 13 13:14:25 2012	(r2000)
@@ -130,13 +130,14 @@
     <MSBuild Properties="InFile=..\Interfaces\CoreLib.tlb;OutName=GME.MGA.Core;PIAVersion=$(PIAVersion)" Projects="$(MSBuildProjectFullPath)" Targets="CreatePIA;RegisterPIA" />
     <MSBuild Properties="InFile=..\Interfaces\MetaLib.tlb;OutName=GME.MGA.Meta;PIAVersion=$(PIAVersion)" Projects="$(MSBuildProjectFullPath)" Targets="CreatePIA;RegisterPIA" />
     <MSBuild Properties="InFile=..\Interfaces\MgaLib.tlb;OutName=GME.MGA;PIAVersion=$(PIAVersion)" Projects="$(MSBuildProjectFullPath)" Targets="CreatePIA;RegisterPIA" />
-    <MSBuild Properties="InFile=..\Interfaces\ParserLib.tlb;OutName=GME.MGA.Parser;PIAVersion=$(PIAVersion)" Projects="$(MSBuildProjectFullPath)" Targets="CreatePIA;RegisterPIA" />
+    <MSBuild Properties="InFile=..\Interfaces\ParserLib.tlb;OutName=GME.MGA.Parser;PIAVersion=1.1.0.0" Projects="$(MSBuildProjectFullPath)" Targets="CreatePIA;RegisterPIA" />
     <MSBuild Properties="InFile=..\Interfaces\MgaUtilLib.tlb;OutName=GME.Util;PIAVersion=$(PIAVersion)" Projects="$(MSBuildProjectFullPath)" Targets="CreatePIA;RegisterPIA" />
     <MSBuild Properties="InFile=..\Interfaces\GMELib.tlb;OutName=GME;PIAVersion=$(PIAVersion)" Projects="$(MSBuildProjectFullPath)" Targets="CreatePIA;RegisterPIA" />
     <MSBuild Properties="OutName=..\DotNetPIAs_1.0.0.0\GME.MGA.Core;PIAVersion=1.0.0.0" Projects="$(MSBuildProjectFullPath)" Targets="RegisterPIA" />
     <MSBuild Properties="OutName=..\DotNetPIAs_1.0.0.0\GME.MGA.Meta;PIAVersion=1.0.0.0" Projects="$(MSBuildProjectFullPath)" Targets="RegisterPIA" />
     <MSBuild Properties="OutName=..\DotNetPIAs_1.0.0.0\GME.MGA;PIAVersion=1.0.0.0" Projects="$(MSBuildProjectFullPath)" Targets="RegisterPIA" />
     <MSBuild Properties="OutName=..\DotNetPIAs_1.0.0.0\GME.MGA.Parser;PIAVersion=1.0.0.0" Projects="$(MSBuildProjectFullPath)" Targets="RegisterPIA" />
+    <MSBuild Properties="OutName=..\DotNetPIAs_1.0.1.0\GME.MGA.Parser;PIAVersion=1.0.1.0" Projects="$(MSBuildProjectFullPath)" Targets="RegisterPIA" />
     <MSBuild Properties="OutName=..\DotNetPIAs_1.0.0.0\GME.Util;PIAVersion=1.0.0.0" Projects="$(MSBuildProjectFullPath)" Targets="RegisterPIA" />
     <MSBuild Properties="OutName=..\DotNetPIAs_1.0.0.0\GME;PIAVersion=1.0.0.0" Projects="$(MSBuildProjectFullPath)" Targets="RegisterPIA" />
   </Target>

Added: trunk/GME/DotNetPIAs_1.0.1.0/GME.MGA.Parser.dll
==============================================================================
Binary files /dev/null	00:00:00 1970	(empty, because file is newly added) and trunk/GME/DotNetPIAs_1.0.1.0/GME.MGA.Parser.dll	Mon Aug 13 13:14:25 2012	(r2000) differ

Modified: trunk/GME/Gme/GMEApp.cpp
==============================================================================
--- trunk/GME/Gme/GMEApp.cpp	Thu Aug  9 12:08:13 2012	(r1999)
+++ trunk/GME/Gme/GMEApp.cpp	Mon Aug 13 13:14:25 2012	(r2000)
@@ -2020,7 +2020,11 @@
 		CGMEEventLogger::LogGMEEvent(dlg.GetPathName()+_T("\r\n"));
 
 		CWaitCursor wait;
-		COMTHROW( dumper->DumpProject(theApp.mgaProject,PutInBstr(dlg.GetPathName())) );
+		IMgaDumper2Ptr dumper2 = (IMgaDumper*)dumper;
+		if (dumper2 && m_pMainWnd)
+			dumper2->__DumpProject2(theApp.mgaProject, _bstr_t(dlg.GetPathName()), (ULONGLONG)(m_pMainWnd->GetSafeHwnd()));
+		else
+			dumper->__DumpProject(theApp.mgaProject, _bstr_t(dlg.GetPathName()));
 
 		if( CMainFrame::theInstance) CMainFrame::theInstance->m_console.Message( CString( _T("Project successfully exported into ")) + dlg.GetPathName() + _T("."), 1);
 	}
@@ -2225,7 +2229,11 @@
 
 		CString file_name = fullPath;
 		if( CMainFrame::theInstance) CMainFrame::theInstance->m_console.Message( CString( _T("Importing ")) + file_name + _T("..."), 1);
-		COMTHROW(parser->ParseProject(theApp.mgaProject,PutInBstr(fullPath)) );
+		IMgaParser2Ptr parser2 = (IMgaParser*)parser;
+		if (parser2 && m_pMainWnd)
+			COMTHROW(parser2->ParseProject2(theApp.mgaProject,PutInBstr(fullPath), (ULONGLONG)(m_pMainWnd->GetSafeHwnd())));
+		else
+			COMTHROW(parser->ParseProject(theApp.mgaProject,PutInBstr(fullPath)) );
 		
 		// mgaproject has been filled with data, let's update title:
 		UpdateProjectName();
@@ -2333,7 +2341,11 @@
 		COMTHROW( parser.CoCreateInstance(L"Mga.MgaParser") );
 		ASSERT( parser != NULL );
 	    if(mgaConstMgr) COMTHROW(mgaConstMgr->Enable(false));
-	    COMTHROW(parser->ParseProject(mgaProject, PutInBstr(CString(xmlname))) );
+		IMgaParser2Ptr parser2 = (IMgaParser*)parser;
+		if (parser2 && m_pMainWnd)
+			COMTHROW(parser2->ParseProject2(mgaProject,PutInBstr(CString(xmlname)), (ULONGLONG)(m_pMainWnd->GetSafeHwnd())));
+		else
+			COMTHROW(parser->ParseProject(mgaProject,PutInBstr(CString(xmlname))) );
 		{
 			CString buf = CString(_T("The model has been updated\nCurrent ID: "))
 				+ currentguid + L"\nThe original model has been saved to " + backupname;
@@ -2929,7 +2941,12 @@
 		CWaitCursor wait;
 		if(mgaConstMgr) COMTHROW(mgaConstMgr->Enable(false));
 
-		COMTHROW(parser->ParseProject(theApp.mgaProject,PutInBstr(file_name)) );
+
+		IMgaParser2Ptr parser2 = (IMgaParser*)parser;
+		if (parser2 && m_pMainWnd)
+			COMTHROW(parser2->ParseProject2(theApp.mgaProject,PutInBstr(file_name), (ULONGLONG)(m_pMainWnd->GetSafeHwnd())));
+		else
+			COMTHROW(parser->ParseProject(theApp.mgaProject,PutInBstr(file_name)) );
 		
 		// mgaproject has been filled with data, let's update title:
 		UpdateProjectName();

Modified: trunk/GME/Gme/GMEOLEApp.cpp
==============================================================================
--- trunk/GME/Gme/GMEOLEApp.cpp	Thu Aug  9 12:08:13 2012	(r1999)
+++ trunk/GME/Gme/GMEOLEApp.cpp	Mon Aug 13 13:14:25 2012	(r2000)
@@ -295,7 +295,11 @@
 
 		if(theApp.mgaConstMgr) COMTHROW(theApp.mgaConstMgr->Enable(false));
 
-		COMTHROW(parser->ParseProject(theApp.mgaProject,PutInBstr(CString(connstr))) );
+		IMgaParser2Ptr parser2 = (IMgaParser*)parser;
+		if (parser2 && theApp.m_pMainWnd)
+			COMTHROW(parser2->ParseProject2(theApp.mgaProject,PutInBstr(CString(connstr)), (ULONGLONG)(theApp.m_pMainWnd->GetSafeHwnd())));
+		else
+			COMTHROW(parser->ParseProject(theApp.mgaProject,PutInBstr(CString(connstr))) );
 
 	}
 	catch (hresult_exception &){

Modified: trunk/GME/Gme/StdAfx.cpp
==============================================================================
--- trunk/GME/Gme/StdAfx.cpp	Thu Aug  9 12:08:13 2012	(r1999)
+++ trunk/GME/Gme/StdAfx.cpp	Mon Aug 13 13:14:25 2012	(r2000)
@@ -6,5 +6,4 @@
 
 #import "MgaUtilLib.tlb" implementation_only no_namespace raw_method_prefix("") high_method_prefix("__") no_registry
 #import "MetaLib.tlb" implementation_only no_namespace raw_method_prefix("") high_method_prefix("__") no_registry
-
-
+#import "ParserLib.tlb" implementation_only no_namespace raw_method_prefix("") high_method_prefix("__") no_registry

Modified: trunk/GME/Interfaces/Parser.idl
==============================================================================
--- trunk/GME/Interfaces/Parser.idl	Thu Aug  9 12:08:13 2012	(r1999)
+++ trunk/GME/Interfaces/Parser.idl	Mon Aug 13 13:14:25 2012	(r2000)
@@ -55,6 +55,19 @@
 
 [
 	object,
+	uuid(3813768B-5A4C-477D-BCD5-1776089948EC),
+	dual,
+	helpstring("IMgaDumper2 Interface"),
+	pointer_default(unique)
+]
+interface IMgaDumper2 : IMgaDumper
+{
+	HRESULT DumpProject2([in] IMgaProject *p, [in] BSTR xmlfile, ULONGLONG hwndParent);
+	HRESULT DumpFCOs2([in] IMgaProject *proj,[in] IMgaFCOs *p, [in] IMgaFolders *f, [in] IMgaRegNodes *r, [in] BSTR xmlfile, ULONGLONG hwndParent);
+}
+
+[
+	object,
 	uuid(94D6FB53-1F7C-11D4-B3D0-005004D38590),
 	dual,
 	helpstring("IMgaParser Interface"),
@@ -82,3 +95,16 @@
 
 };
 
+[
+	object,
+	uuid("E39BEA37-384D-423B-ADDF-2BB13550F577"),
+	dual,
+	helpstring("IMgaParser2 Interface"),
+	pointer_default(unique)
+]
+interface IMgaParser2 : IMgaParser
+{
+	HRESULT ParseProject2([in] IMgaProject *p, [in] BSTR xmlfile, ULONGLONG hwndParent);
+	HRESULT ParseFCOs2([in] IMgaObject *here, [in] BSTR xmlfile, ULONGLONG hwndParent);
+	HRESULT GetXMLParadigm([in] BSTR xmlfile, [out] BSTR *Paradigm);
+};

Modified: trunk/GME/MgaUtil/MgaProgressDlg.cpp
==============================================================================
--- trunk/GME/MgaUtil/MgaProgressDlg.cpp	Thu Aug  9 12:08:13 2012	(r1999)
+++ trunk/GME/MgaUtil/MgaProgressDlg.cpp	Mon Aug 13 13:14:25 2012	(r2000)
@@ -48,9 +48,6 @@
 
 STDMETHODIMP CMgaProgressDlg::StartProgressDialog(HWND hwndParent)
 {
-	if( dlg.m_hWnd != NULL )
-		COMRETURN(E_INVALID_USAGE);
-
 	AFX_MANAGE_STATE(AfxGetStaticModuleState())
 
 	CWnd *win = hwndParent == NULL ? AfxGetMainWnd() : CWnd::FromHandle(hwndParent);
@@ -63,9 +60,27 @@
 	dlg.GetDlgItem(nIDs[0])->SetWindowText(lines[0]);
 	dlg.GetDlgItem(nIDs[1])->SetWindowText(lines[1]);
 
+	// center the dialog
+	if (win->GetSafeHwnd() != NULL)
+	{
+		CRect rcOwner, rcDlg, rc;
+		dlg.GetWindowRect(rcDlg);
+		win->GetWindowRect(rcOwner);
+		CopyRect(&rc, &rcOwner); 
+
+		OffsetRect(&rcDlg, -rcDlg.left, -rcDlg.top); 
+		OffsetRect(&rc, -rc.left, -rc.top); 
+		OffsetRect(&rc, -rcDlg.right, -rcDlg.bottom); 
+
+		SetWindowPos(dlg.GetSafeHwnd(), HWND_TOP, rcOwner.left + (rc.right / 2), rcOwner.top + (rc.bottom / 2), 0, 0, SWP_NOSIZE); 
+	}
+
 	dlg.ShowWindow(SW_SHOWNORMAL);
 	dlg.UpdateWindow();
 
+	if (hwndParent)
+		dlg.GetParent()->EnableWindow(FALSE);
+
 	return S_OK;
 }
 
@@ -121,6 +136,8 @@
 	if( dlg.m_hWnd == NULL )
 		COMRETURN(E_INVALID_USAGE);
 
+	dlg.GetParent()->EnableWindow(TRUE);
+
 	HWND hwnd = dlg.m_hWnd;
 	dlg.Detach();
 	ASSERT( dlg.m_hWnd == NULL );

Modified: trunk/GME/Parser/MetaParser.h
==============================================================================
--- trunk/GME/Parser/MetaParser.h	Thu Aug  9 12:08:13 2012	(r1999)
+++ trunk/GME/Parser/MetaParser.h	Mon Aug 13 13:14:25 2012	(r2000)
@@ -15,7 +15,7 @@
 	public CComObjectRootEx<CComSingleThreadModel>,
 	public CComCoClass<CMgaMetaParser, &CLSID_MgaMetaParser>,
 	public ISupportErrorInfoImpl<&IID_IMgaMetaParser>,
-	public IDispatchImpl<IMgaMetaParser, &IID_IMgaMetaParser, &LIBID_MGAParserLib>,
+	public IDispatchImpl<IMgaMetaParser, &IID_IMgaMetaParser, &LIBID_MGAParserLib, 1, 1>,
 	public IGMEVersionInfoImpl,
 	public CGenParser
 {

Modified: trunk/GME/Parser/MgaDumper.cpp
==============================================================================
--- trunk/GME/Parser/MgaDumper.cpp	Thu Aug  9 12:08:13 2012	(r1999)
+++ trunk/GME/Parser/MgaDumper.cpp	Mon Aug 13 13:14:25 2012	(r2000)
@@ -136,6 +136,12 @@
 
 STDMETHODIMP CMgaDumper::DumpProject(IMgaProject *p, BSTR xmlfile)
 {
+	return DumpProject2(p, xmlfile, NULL);
+}
+
+STDMETHODIMP CMgaDumper::DumpProject2(IMgaProject *p, BSTR xmlfile, ULONGLONG hwndParent)
+{
+	// TODO: progress bar
 	CHECK_IN(p);
 	m_dumpGuids = true; // dump GUIDs with the whole project
 	m_closureDump = false;
@@ -159,6 +165,11 @@
 
 STDMETHODIMP CMgaDumper::DumpFCOs(IMgaProject *proj, IMgaFCOs *p, IMgaFolders *f, IMgaRegNodes *r, BSTR xmlfile)
 {
+	return DumpFCOs2(proj, p, f, r, xmlfile, NULL);
+}
+
+STDMETHODIMP CMgaDumper::DumpFCOs2(IMgaProject *proj, IMgaFCOs *p, IMgaFolders *f, IMgaRegNodes *r, BSTR xmlfile, ULONGLONG hwndParent)
+{
 	m_dumpGuids = false; // while dumping selected FCOs do NOT dump guids of the fco's
 	m_closureDump = false;
 	m_v2          = false;

Modified: trunk/GME/Parser/MgaDumper.h
==============================================================================
--- trunk/GME/Parser/MgaDumper.h	Thu Aug  9 12:08:13 2012	(r1999)
+++ trunk/GME/Parser/MgaDumper.h	Mon Aug 13 13:14:25 2012	(r2000)
@@ -35,8 +35,8 @@
 class ATL_NO_VTABLE CMgaDumper : 
 	public CComObjectRootEx<CComSingleThreadModel>,
 	public CComCoClass<CMgaDumper, &CLSID_MgaDumper>,
-	public ISupportErrorInfoImpl<&IID_IMgaDumper>,
-	public IDispatchImpl<IMgaDumper, &IID_IMgaDumper, &LIBID_MGAParserLib>,
+	public ISupportErrorInfoImpl2<&IID_IMgaDumper, &IID_IMgaDumper2>,
+	public IDispatchImpl<IMgaDumper2, &IID_IMgaDumper2, &LIBID_MGAParserLib, 1, 1>,
 	public IGMEVersionInfoImpl
 {
 public:
@@ -50,11 +50,10 @@
 	{ }
 
 DECLARE_REGISTRY_RESOURCEID(IDR_MGADUMPER)
-DECLARE_PROTECT_FINAL_CONSTRUCT()
-
 BEGIN_COM_MAP(CMgaDumper)
-	COM_INTERFACE_ENTRY(IMgaDumper)
-	COM_INTERFACE_ENTRY(IDispatch)
+	COM_INTERFACE_ENTRY2(IMgaDumper, IMgaDumper2)
+	COM_INTERFACE_ENTRY2(IDispatch, IMgaDumper2)
+	COM_INTERFACE_ENTRY(IMgaDumper2)
 	COM_INTERFACE_ENTRY(ISupportErrorInfo)
 	COM_INTERFACE_ENTRY_IID(IID_IGMEVersionInfo, IGMEVersionInfoImpl)
 END_COM_MAP()
@@ -66,7 +65,9 @@
 	void DoneDump(bool abort);
 
 	STDMETHOD(DumpProject)(IMgaProject *p, BSTR xmlfile);
+	STDMETHOD(DumpProject2)(IMgaProject *p, BSTR xmlfile, ULONGLONG hwndParent);
 	STDMETHOD(DumpFCOs)(IMgaProject *proj, IMgaFCOs *p, IMgaFolders *f, IMgaRegNodes *r, BSTR xmlfile);
+	STDMETHOD(DumpFCOs2)(IMgaProject *proj, IMgaFCOs *p, IMgaFolders *f, IMgaRegNodes *r, BSTR xmlfile, ULONGLONG hwndParent);
 	STDMETHOD(DumpClos)( IMgaFCOs *sel_fco, IMgaFolders *sel_fold, BSTR xmlfile, int lib_stub);
 	STDMETHOD(DumpClosR)( IMgaFCOs *sel_fco, IMgaFolders *sel_fold, BSTR xmlfile, IMgaFCOs *top_fco, IMgaFolders *top_fold, int options, BSTR abspath, BSTR acceptingkinds);
 	STDMETHOD(put_FormatVersion)(long p) { dumpversion = p; return S_OK; }

Modified: trunk/GME/Parser/MgaParser.cpp
==============================================================================
--- trunk/GME/Parser/MgaParser.cpp	Thu Aug  9 12:08:13 2012	(r1999)
+++ trunk/GME/Parser/MgaParser.cpp	Mon Aug 13 13:14:25 2012	(r2000)
@@ -15,6 +15,11 @@
 
 STDMETHODIMP CMgaParser::ParseFCOs(IMgaObject *here, BSTR filename)
 {
+	return ParseFCOs2(here, filename, NULL);
+}
+
+STDMETHODIMP CMgaParser::ParseFCOs2(IMgaObject *here, BSTR filename, ULONGLONG hwndParent_)
+{
 	CHECK_IN(here);
 	m_maintainGuids = false;
 
@@ -22,9 +27,13 @@
 	{
 		CloseAll();
 
-		COMTHROW( progress.CoCreateInstance(L"Mga.MgaProgressDlg") );
-		COMTHROW( progress->SetTitle(_bstr_t(L"Importing XML file...")) );
-		COMTHROW( progress->StartProgressDialog(NULL) );
+		HWND hwndParent = (HWND)hwndParent_;
+		if (hwndParent != 0)
+		{
+			COMTHROW( progress.CoCreateInstance(L"Mga.MgaProgressDlg") );
+			COMTHROW( progress->SetTitle(_bstr_t(L"Importing XML file...")) );
+			COMTHROW( progress->StartProgressDialog(hwndParent) );
+		}
 
 		CComObjPtr<IMgaProject> p;
 		COMTHROW( here->get_Project(PutOut(p)) );
@@ -146,8 +155,15 @@
 	return S_OK;
 }
 
+
+
 STDMETHODIMP CMgaParser::ParseProject(IMgaProject *p, BSTR filename)
 {
+	return ParseProject2(p, filename, 0);
+}
+
+STDMETHODIMP CMgaParser::ParseProject2(IMgaProject *p, BSTR filename, ULONGLONG hwndParent_)
+{
 	CHECK_IN(p);
 	m_maintainGuids = true; //will be set to false if p is NOT empty
 
@@ -155,9 +171,13 @@
 	{
 		CloseAll();
 
-		COMTHROW( progress.CoCreateInstance(L"Mga.MgaProgressDlg") );
-		COMTHROW( progress->SetTitle(_bstr_t(L"Importing XML file...")) );
-		COMTHROW( progress->StartProgressDialog(NULL) );
+		HWND hwndParent = (HWND)hwndParent_;
+		if (hwndParent != 0)
+		{
+			COMTHROW( progress.CoCreateInstance(L"Mga.MgaProgressDlg") );
+			COMTHROW( progress->SetTitle(_bstr_t(L"Importing XML file...")) );
+			COMTHROW( progress->StartProgressDialog(hwndParent) );
+		}
 
 
 		project = p;
@@ -297,6 +317,11 @@
 	return S_OK;
 }
 
+STDMETHODIMP CMgaParser::GetXMLParadigm(BSTR filename, BSTR *paradigm)
+{
+	return GetXMLInfo(filename, paradigm, _bstr_t().GetAddress(), _variant_t().GetAddress(), _bstr_t().GetAddress(), _bstr_t().GetAddress());
+}
+
 STDMETHODIMP CMgaParser::GetXMLInfo(BSTR filename, BSTR *paradigm, BSTR* parversion, VARIANT *parguid, BSTR* basename, BSTR* version) {
 
 //	CHECK_IN(filename);

Modified: trunk/GME/Parser/MgaParser.h
==============================================================================
--- trunk/GME/Parser/MgaParser.h	Thu Aug  9 12:08:13 2012	(r1999)
+++ trunk/GME/Parser/MgaParser.h	Mon Aug 13 13:14:25 2012	(r2000)
@@ -31,8 +31,8 @@
 class ATL_NO_VTABLE CMgaParser : 
 	public CComObjectRootEx<CComSingleThreadModel>,
 	public CComCoClass<CMgaParser, &CLSID_MgaParser>,
-	public ISupportErrorInfoImpl<&IID_IMgaParser>,
-	public IDispatchImpl<IMgaParser, &IID_IMgaParser, &LIBID_MGAParserLib>,
+	public ISupportErrorInfoImpl2<&IID_IMgaParser, &IID_IMgaParser2>,
+	public IDispatchImpl<IMgaParser2, &IID_IMgaParser2, &LIBID_MGAParserLib, 1, 1>,
 	public IGMEVersionInfoImpl,
 	public CGenParser
 {
@@ -47,8 +47,9 @@
 DECLARE_PROTECT_FINAL_CONSTRUCT()
 
 BEGIN_COM_MAP(CMgaParser)
-	COM_INTERFACE_ENTRY(IMgaParser)
-	COM_INTERFACE_ENTRY(IDispatch)
+	COM_INTERFACE_ENTRY2(IMgaParser, IMgaParser2)
+	COM_INTERFACE_ENTRY2(IDispatch, IMgaParser2)
+	COM_INTERFACE_ENTRY(IMgaParser2)
 	COM_INTERFACE_ENTRY(ISupportErrorInfo)
 	COM_INTERFACE_ENTRY_IID(IID_IGMEVersionInfo, IGMEVersionInfoImpl)
 END_COM_MAP()
@@ -57,11 +58,14 @@
 
 public:
 	STDMETHOD(GetXMLInfo)(BSTR filename, BSTR *paradigm, BSTR* parversion, VARIANT *parguid, BSTR* basename, BSTR* version);
+	STDMETHOD(GetXMLParadigm)(BSTR filename, BSTR *paradigm);
 	STDMETHOD(GetClipXMLInfo)(BSTR filename, IMgaObject *target, VARIANT_BOOL *isacceptable, BSTR* p_acckind, BSTR* p_version);
 	STDMETHOD(ParseFCOs)(IMgaObject *p, BSTR filename);
+	STDMETHOD(ParseFCOs2)(IMgaObject *p, BSTR filename, ULONGLONG hwndParent);
 	STDMETHOD(ParseClos1)(IMgaObject *p, BSTR filename); // basic
 	STDMETHOD(ParseClos4)(IMgaObject *p, BSTR filename, int options); // smart
 	STDMETHOD(ParseProject)(IMgaProject *p, BSTR filename);
+	STDMETHOD(ParseProject2)(IMgaProject *p, BSTR filename, ULONGLONG hwndParent);
 
 	std::tstring GetClipXMLInfo2();
 

Modified: trunk/GME/Parser/ParserLib.idl
==============================================================================
--- trunk/GME/Parser/ParserLib.idl	Thu Aug  9 12:08:13 2012	(r1999)
+++ trunk/GME/Parser/ParserLib.idl	Mon Aug 13 13:14:25 2012	(r2000)
@@ -10,7 +10,7 @@
 
 [
 	uuid(70C41B15-E3CE-11D3-B37A-005004D38590),
-	version(1.0),
+	version(1.1), // if changed, also change IDispatchImpls, GME_bin.wxs, DotNetPIAs.vcxproj, and add old PIAs to installer
 	helpstring("MGA Parser Type Library")
 ]
 library MGAParserLib
@@ -41,7 +41,8 @@
 	]
 	coclass MgaDumper
 	{
-		[default] interface IMgaDumper;
+		[default] interface IMgaDumper2;
+		interface IMgaDumper;
 		interface IGMEVersionInfo;
 	};
 
@@ -51,7 +52,8 @@
 	]
 	coclass MgaParser
 	{
-		[default] interface IMgaParser;
+		[default] interface IMgaParser2;
+		interface IMgaParser;
 		interface IGMEVersionInfo;
 	};
 

Modified: trunk/GME/Parser/StdAfx.h
==============================================================================
--- trunk/GME/Parser/StdAfx.h	Thu Aug  9 12:08:13 2012	(r1999)
+++ trunk/GME/Parser/StdAfx.h	Mon Aug 13 13:14:25 2012	(r2000)
@@ -73,6 +73,18 @@
 	~XMLPlatformUtilsTerminate_RAII() { xercesc_3_1::XMLPlatformUtils::Terminate(); }
 };
 
+template <const IID* piid1, const IID* piid2>
+class ATL_NO_VTABLE ISupportErrorInfoImpl2 : 
+	public ISupportErrorInfo
+{
+public:
+	STDMETHOD(InterfaceSupportsErrorInfo)(_In_ REFIID riid)
+	{
+		return (InlineIsEqualGUID(riid,*piid1) || InlineIsEqualGUID(riid,*piid2)) ? S_OK : S_FALSE;
+	}
+};
+
+
 //{{AFX_INSERT_LOCATION}}
 // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
 

Modified: trunk/Install/Build/build.py
==============================================================================
--- trunk/Install/Build/build.py	Thu Aug  9 12:08:13 2012	(r1999)
+++ trunk/Install/Build/build.py	Mon Aug 13 13:14:25 2012	(r2000)
@@ -295,8 +295,7 @@
     import glob
     tools.build_WiX([]
         + [file for file in glob.glob(os.path.join(GME_ROOT, "Install", "*.wxs")) if file.find('GME.wxs') == -1 ]
-        + glob.glob(os.path.join(GME_ROOT, "Install", "PIAs", "*.wxi"))
-        + glob.glob(os.path.join(GME_ROOT, "Install", "PIAs_1.0.1.0", "*.wxi"))
+        + glob.glob(os.path.join(GME_ROOT, "Install", "PIA*/*.wxi"))
         )
 
 def build_msi():

Modified: trunk/Install/Build/tools.py
==============================================================================
--- trunk/Install/Build/tools.py	Thu Aug  9 12:08:13 2012	(r1999)
+++ trunk/Install/Build/tools.py	Mon Aug 13 13:14:25 2012	(r2000)
@@ -16,7 +16,7 @@
 #
 ZIP_PRG = os.path.abspath(os.path.join(os.path.dirname(__file__), "zip.exe"))
 WIX_CANDLE_PRG = "candle.exe"
-WIX_CANDLE_ARG = "-dPIADir=..\GME\DotNetPIAs_1.0.0.0 -dPIADir.1.0.1.0=..\GME\DotNetPIAs"
+WIX_CANDLE_ARG = "-dPIADir.1.0.0.0=..\GME\DotNetPIAs_1.0.0.0 -dPIADir.1.0.1.0=..\GME\DotNetPIAs_1.0.1.0 -dPIADir=..\GME\DotNetPIAs"
 WIX_LIGHT_PRG = "light.exe"
 WIX_LIGHT_ARG = "-sw1076 -sw1055 -sw1056 -sice:ICE43 -sice:ICE57 -ext WixUIExtension -ext WixUtilExtension -ext WiXNetFxExtension" # See comments in GME.wxs
 MSBUILD = r"c:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe"

Modified: trunk/Install/GME_bin.wxs
==============================================================================
--- trunk/Install/GME_bin.wxs	Thu Aug  9 12:08:13 2012	(r1999)
+++ trunk/Install/GME_bin.wxs	Mon Aug 13 13:14:25 2012	(r2000)
@@ -675,7 +675,7 @@
     <DirectoryRef Id="INSTALLDIR_BIN">
       <Component Id="Parser.dll">
         <File Id="Parser.dll" Name="Parser.dll" KeyPath="yes" Source="..\GME\$(var.Release)\Parser.dll">
-          <TypeLib Id="{70C41B15-E3CE-11D3-B37A-005004D38590}" Description="MGA Parser Type Library" Language="0" MajorVersion="1" MinorVersion="0">
+          <TypeLib Id="{70C41B15-E3CE-11D3-B37A-005004D38590}" Description="MGA Parser Type Library" Language="0" MajorVersion="1" MinorVersion="1">
             <AppId Description="MgaUtil" Id="{461F30AF-3BF0-11D4-B3F0-005004D38590}">
               <Class Id="{70C41B25-E3CE-11D3-B37A-005004D38590}" Context="InprocServer32" Description="MgaMetaParser Class" ThreadingModel="apartment" Programmable="yes">
                 <ProgId Id="Mga.MgaMetaParser.1" Description="MetaParser Class">

Modified: trunk/Install/GME_inc.wxi
==============================================================================
--- trunk/Install/GME_inc.wxi	Thu Aug  9 12:08:13 2012	(r1999)
+++ trunk/Install/GME_inc.wxi	Mon Aug 13 13:14:25 2012	(r2000)
@@ -22,6 +22,4 @@
   <?define lib='lib'?>
   <?define bin='bin'?>
   <?endif ?>
-
-  <?define InteropDir='..\GME\DotNetPIAs' ?>
 </Include>

Modified: trunk/Install/GME_paradigms.wxs
==============================================================================
--- trunk/Install/GME_paradigms.wxs	Thu Aug  9 12:08:13 2012	(r1999)
+++ trunk/Install/GME_paradigms.wxs	Mon Aug 13 13:14:25 2012	(r2000)
@@ -11,6 +11,12 @@
         Manufacturer='Vanderbilt University, ISIS'
         InstallerVersion='300' Languages='1033' SummaryCodepage='1252'
         InstallPrivileges='elevated' InstallScope='perMachine'/>
+    
+        <PropertyRef Id="NETFRAMEWORK20"/>
+        <PropertyRef Id="NETFRAMEWORK40FULL"/>
+        <PropertyRef Id="NETFRAMEWORK40CLIENT"/>
+        <!-- used by PIAs -->
+        <Property Id="NETFRAMEWORK">NETFRAMEWORK20 OR NETFRAMEWORK40FULL OR NETFRAMEWORK40CLIENT</Property><!-- FIXME: doesnt work -->
 
     <!-- =========================================================== -->
     <!-- DIRECTORY STRUCTURE -->
@@ -55,6 +61,7 @@
     <ComponentGroupRef Id='GME.MGA.Core.1.0.1.0'/>
     <ComponentGroupRef Id='GME.MGA.Meta.1.0.1.0'/>
     <ComponentGroupRef Id='GME.MGA.Parser.1.0.1.0'/>
+    <ComponentGroupRef Id='GME.MGA.Parser.1.1.0.0'/>
     <ComponentGroupRef Id='GME.Util.1.0.1.0'/>
     <ComponentGroupRef Id='GME'/>
     <ComponentGroupRef Id='GME.MGA'/>

Modified: trunk/Install/PIAs/GME.MGA.Core.wxi
==============================================================================
--- trunk/Install/PIAs/GME.MGA.Core.wxi	Thu Aug  9 12:08:13 2012	(r1999)
+++ trunk/Install/PIAs/GME.MGA.Core.wxi	Mon Aug 13 13:14:25 2012	(r2000)
@@ -6,7 +6,7 @@
     <Fragment>
         <ComponentGroup Id="GME.MGA.Core">
             <Component Id="GME.MGA.Core.dll" Directory="INSTALLDIR_PARADIGMS32" Guid="{3BDD7F38-DCF5-46C1-B07E-CF70772C882F}" Permanent="yes">
-                <File Id="GME.MGA.Core.dll" KeyPath="yes" Source="$(var.PIADir)\GME.MGA.Core.dll" Assembly=".net" />
+                <File Id="GME.MGA.Core.dll" KeyPath="yes" Source="$(var.PIADir.1.0.0.0)\GME.MGA.Core.dll" Assembly=".net" />
                 <Condition>NETFRAMEWORK</Condition>
             </Component>
         </ComponentGroup>

Modified: trunk/Install/PIAs/GME.MGA.Meta.wxi
==============================================================================
--- trunk/Install/PIAs/GME.MGA.Meta.wxi	Thu Aug  9 12:08:13 2012	(r1999)
+++ trunk/Install/PIAs/GME.MGA.Meta.wxi	Mon Aug 13 13:14:25 2012	(r2000)
@@ -6,7 +6,7 @@
     <Fragment>
         <ComponentGroup Id="GME.MGA.Meta">
             <Component Id="GME.MGA.Meta.dll" Directory="INSTALLDIR_PARADIGMS32" Guid="{0BE9DD47-1FEB-4492-88E7-0172D9AA4A30}" Permanent="yes">
-                <File Id="GME.MGA.Meta.dll" KeyPath="yes" Source="$(var.PIADir)\GME.MGA.Meta.dll" Assembly=".net"  />
+                <File Id="GME.MGA.Meta.dll" KeyPath="yes" Source="$(var.PIADir.1.0.0.0)\GME.MGA.Meta.dll" Assembly=".net"  />
                 <Condition>NETFRAMEWORK</Condition>
             </Component>
         </ComponentGroup>

Modified: trunk/Install/PIAs/GME.MGA.Parser.wxi
==============================================================================
--- trunk/Install/PIAs/GME.MGA.Parser.wxi	Thu Aug  9 12:08:13 2012	(r1999)
+++ trunk/Install/PIAs/GME.MGA.Parser.wxi	Mon Aug 13 13:14:25 2012	(r2000)
@@ -6,7 +6,7 @@
     <Fragment>
         <ComponentGroup Id="GME.MGA.Parser">
             <Component Id="GME.MGA.Parser.dll" Directory="INSTALLDIR_PARADIGMS32" Guid="{9DF42C34-5F58-4158-BD50-454864B9DFD6}" Permanent="yes">
-                <File Id="GME.MGA.Parser.dll" KeyPath="yes" Source="$(var.PIADir)\GME.MGA.Parser.dll" Assembly=".net" />
+                <File Id="GME.MGA.Parser.dll" KeyPath="yes" Source="$(var.PIADir.1.0.0.0)\GME.MGA.Parser.dll" Assembly=".net" />
                 <Condition>NETFRAMEWORK</Condition>
             </Component>
         </ComponentGroup>

Modified: trunk/Install/PIAs/GME.MGA.wxi
==============================================================================
--- trunk/Install/PIAs/GME.MGA.wxi	Thu Aug  9 12:08:13 2012	(r1999)
+++ trunk/Install/PIAs/GME.MGA.wxi	Mon Aug 13 13:14:25 2012	(r2000)
@@ -6,7 +6,7 @@
     <Fragment>
         <ComponentGroup Id="GME.MGA">
             <Component Id="GME.MGA.dll" Directory="INSTALLDIR_PARADIGMS32" Guid="{4C5478E1-D9FF-4E93-B87C-B847F398408A}" Permanent="yes">
-                <File Id="GME.MGA.dll" KeyPath="yes" Source="$(var.PIADir)\GME.MGA.dll" Assembly=".net" />
+                <File Id="GME.MGA.dll" KeyPath="yes" Source="$(var.PIADir.1.0.0.0)\GME.MGA.dll" Assembly=".net" />
                 <Condition>NETFRAMEWORK</Condition>
             </Component>
         </ComponentGroup>

Modified: trunk/Install/PIAs/GME.Util.wxi
==============================================================================
--- trunk/Install/PIAs/GME.Util.wxi	Thu Aug  9 12:08:13 2012	(r1999)
+++ trunk/Install/PIAs/GME.Util.wxi	Mon Aug 13 13:14:25 2012	(r2000)
@@ -6,7 +6,7 @@
     <Fragment>
         <ComponentGroup Id="GME.Util">
             <Component Id="GME.Util.dll" Directory="INSTALLDIR_PARADIGMS32" Guid="{074746CF-EA1A-4B45-899E-D4D6C5B6FEB0}" Permanent="yes">
-                <File Id="GME.Util.dll" KeyPath="yes" Source="$(var.PIADir)\GME.Util.dll" Assembly=".net" />
+                <File Id="GME.Util.dll" KeyPath="yes" Source="$(var.PIADir.1.0.0.0)\GME.Util.dll" Assembly=".net" />
                 <Condition>NETFRAMEWORK</Condition>
             </Component>
         </ComponentGroup>

Modified: trunk/Install/PIAs/GMEPIA.wxi
==============================================================================
--- trunk/Install/PIAs/GMEPIA.wxi	Thu Aug  9 12:08:13 2012	(r1999)
+++ trunk/Install/PIAs/GMEPIA.wxi	Mon Aug 13 13:14:25 2012	(r2000)
@@ -6,7 +6,7 @@
     <Fragment>
         <ComponentGroup Id="GME">
             <Component Id="GME.dll" Directory="INSTALLDIR_PARADIGMS32" Guid="{B4C1E329-1964-4941-901B-077CC0A64A83}" Permanent="yes">
-                <File Id="GME.dll" KeyPath="yes" Source="$(var.PIADir)\GME.dll" Assembly=".net" />
+                <File Id="GME.dll" KeyPath="yes" Source="$(var.PIADir.1.0.0.0)\GME.dll" Assembly=".net" />
                 <Condition>NETFRAMEWORK</Condition>
             </Component>
         </ComponentGroup>

Modified: trunk/Install/PIAs_1.0.1.0/GME.MGA.Core.wxi
==============================================================================
--- trunk/Install/PIAs_1.0.1.0/GME.MGA.Core.wxi	Thu Aug  9 12:08:13 2012	(r1999)
+++ trunk/Install/PIAs_1.0.1.0/GME.MGA.Core.wxi	Mon Aug 13 13:14:25 2012	(r2000)
@@ -6,7 +6,7 @@
     <Fragment>
         <ComponentGroup Id="GME.MGA.Core.1.0.1.0">
             <Component Id="cmp4D3DABE643C1E5F8C94A9C33F1E1BAA9" Directory="PIADIR.1.0.1.0" Guid="{995757FA-C2F0-406F-BAED-0E97374BCE82}" Permanent="yes">
-                <File Id="filC56702691135417471E3DD618EFF6E78" KeyPath="yes" Source="$(var.PIADir.1.0.1.0)\GME.MGA.Core.dll" Assembly=".net"/>
+                <File Id="filC56702691135417471E3DD618EFF6E78" KeyPath="yes" Source="$(var.PIADir)\GME.MGA.Core.dll" Assembly=".net"/>
                 <Condition>NETFRAMEWORK</Condition>
                 <RegistryValue Root="HKCR" Key="CLSID\{7281C07A-3E09-11D3-B2F7-005004D38590}\InprocServer32\1.0.1.0" Name="Class" Value="GME.MGA.Core.CoreBinFileClass" Type="string" Action="write" />
                 <RegistryValue Root="HKCR" Key="CLSID\{7281C07A-3E09-11D3-B2F7-005004D38590}\InprocServer32\1.0.1.0" Name="Assembly" Value="GME.MGA.Core, Version=1.0.1.0, Culture=neutral, PublicKeyToken=f240a760fe751c2e" Type="string" Action="write" />

Modified: trunk/Install/PIAs_1.0.1.0/GME.MGA.Meta.wxi
==============================================================================
--- trunk/Install/PIAs_1.0.1.0/GME.MGA.Meta.wxi	Thu Aug  9 12:08:13 2012	(r1999)
+++ trunk/Install/PIAs_1.0.1.0/GME.MGA.Meta.wxi	Mon Aug 13 13:14:25 2012	(r2000)
@@ -6,7 +6,7 @@
     <Fragment>
         <ComponentGroup Id="GME.MGA.Meta.1.0.1.0">
             <Component Id="cmp43D10C69FA68348ED1D503B4D997B09A" Directory="PIADIR.1.0.1.0" Guid="{6B5883EA-1CE2-47B9-A5EB-175CD254143B}" Permanent="yes">
-                <File Id="fil423710884D4A22D3C76B728361F0EFD8" KeyPath="yes" Source="$(var.PIADir.1.0.1.0)\GME.MGA.Meta.dll" Assembly=".net"/>
+                <File Id="fil423710884D4A22D3C76B728361F0EFD8" KeyPath="yes" Source="$(var.PIADir)\GME.MGA.Meta.dll" Assembly=".net"/>
                 <Condition>NETFRAMEWORK</Condition>
                 <RegistryValue Root="HKCR" Key="CLSID\{83BA3244-B758-11D3-ABAE-000000000000}\InprocServer32\1.0.1.0" Name="Class" Value="GME.MGA.Meta.MgaMetaProjectClass" Type="string" Action="write" />
                 <RegistryValue Root="HKCR" Key="CLSID\{83BA3244-B758-11D3-ABAE-000000000000}\InprocServer32\1.0.1.0" Name="Assembly" Value="GME.MGA.Meta, Version=1.0.1.0, Culture=neutral, PublicKeyToken=f240a760fe751c2e" Type="string" Action="write" />

Modified: trunk/Install/PIAs_1.0.1.0/GME.MGA.wxi
==============================================================================
--- trunk/Install/PIAs_1.0.1.0/GME.MGA.wxi	Thu Aug  9 12:08:13 2012	(r1999)
+++ trunk/Install/PIAs_1.0.1.0/GME.MGA.wxi	Mon Aug 13 13:14:25 2012	(r2000)
@@ -6,7 +6,7 @@
     <Fragment>
         <ComponentGroup Id="GME.MGA.1.0.1.0">
             <Component Id="cmpBF781B59FC218D303B4729104C1E4234" Directory="PIADIR.1.0.1.0" Guid="{141067BE-706F-482F-8B1B-CF4DC339A091}" Permanent="yes">
-                <File Id="fil9EB57CB8D9FC1B5084EE2E2D2B5FE97F" KeyPath="yes" Source="$(var.PIADir.1.0.1.0)\GME.MGA.dll" Assembly=".net"/>
+                <File Id="fil9EB57CB8D9FC1B5084EE2E2D2B5FE97F" KeyPath="yes" Source="$(var.PIADir)\GME.MGA.dll" Assembly=".net"/>
                 <Condition>NETFRAMEWORK</Condition>
                 <RegistryValue Root="HKCR" Key="CLSID\{1DF52E42-BCC0-4439-B3CD-75610AC372A3}\InprocServer32\1.0.1.0" Name="Class" Value="GME.MGA.MgaOClass" Type="string" Action="write" />
                 <RegistryValue Root="HKCR" Key="CLSID\{1DF52E42-BCC0-4439-B3CD-75610AC372A3}\InprocServer32\1.0.1.0" Name="Assembly" Value="GME.MGA, Version=1.0.1.0, Culture=neutral, PublicKeyToken=f240a760fe751c2e" Type="string" Action="write" />

Modified: trunk/Install/PIAs_1.0.1.0/GME.Util.wxi
==============================================================================
--- trunk/Install/PIAs_1.0.1.0/GME.Util.wxi	Thu Aug  9 12:08:13 2012	(r1999)
+++ trunk/Install/PIAs_1.0.1.0/GME.Util.wxi	Mon Aug 13 13:14:25 2012	(r2000)
@@ -6,7 +6,7 @@
     <Fragment>
         <ComponentGroup Id="GME.Util.1.0.1.0">
             <Component Id="cmp885AB1B6320D6C1595A4F6BC54D799BD" Directory="PIADIR.1.0.1.0" Guid="{3FDF9D4A-688C-48D8-9E03-331B8C7C43D4}" Permanent="yes">
-                <File Id="fil37E4282FA6433FAB0E7388BDE800E258" KeyPath="yes" Source="$(var.PIADir.1.0.1.0)\GME.Util.dll" Assembly=".net"/>
+                <File Id="fil37E4282FA6433FAB0E7388BDE800E258" KeyPath="yes" Source="$(var.PIADir)\GME.Util.dll" Assembly=".net"/>
                 <Condition>NETFRAMEWORK</Condition>
                 <RegistryValue Root="HKCR" Key="CLSID\{461F30B1-3BF0-11D4-B3F0-005004D38590}\InprocServer32\1.0.1.0" Name="Class" Value="GME.Util.MgaResolverClass" Type="string" Action="write" />
                 <RegistryValue Root="HKCR" Key="CLSID\{461F30B1-3BF0-11D4-B3F0-005004D38590}\InprocServer32\1.0.1.0" Name="Assembly" Value="GME.Util, Version=1.0.1.0, Culture=neutral, PublicKeyToken=f240a760fe751c2e" Type="string" Action="write" />

Modified: trunk/Install/PIAs_1.0.1.0/GMEPIA.wxi
==============================================================================
--- trunk/Install/PIAs_1.0.1.0/GMEPIA.wxi	Thu Aug  9 12:08:13 2012	(r1999)
+++ trunk/Install/PIAs_1.0.1.0/GMEPIA.wxi	Mon Aug 13 13:14:25 2012	(r2000)
@@ -8,7 +8,7 @@
     <Fragment>
         <ComponentGroup Id="GME.1.0.1.0">
             <Component Id="cmp1D1602EEEE2DA94C4F88B4DAC0EBDB6F" Directory="PIADIR.1.0.1.0" Guid="{0CD246D6-8928-4F46-B85C-876EE769BCDE}" Permanent="yes">
-                <File Id="fil389AF60539FC47530EE6BAEE49125C9D" KeyPath="yes" Source="$(var.PIADir.1.0.1.0)\GME.dll" Assembly=".net"/>
+                <File Id="fil389AF60539FC47530EE6BAEE49125C9D" KeyPath="yes" Source="$(var.PIADir)\GME.dll" Assembly=".net"/>
                 <Condition>NETFRAMEWORK</Condition>
                 <RegistryValue Root="HKCR" Key="CLSID\{05403CF4-5C53-49D4-8F63-ED37870ABF1F}\InprocServer32\1.0.1.0" Name="Class" Value="GME.CollectionClass" Type="string" Action="write" />
                 <RegistryValue Root="HKCR" Key="CLSID\{05403CF4-5C53-49D4-8F63-ED37870ABF1F}\InprocServer32\1.0.1.0" Name="Assembly" Value="GME, Version=1.0.1.0, Culture=neutral, PublicKeyToken=f240a760fe751c2e" Type="string" Action="write" />

Added: trunk/Install/PIAs_1.1.0.0/GME.MGA.Parser.wxi
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ trunk/Install/PIAs_1.1.0.0/GME.MGA.Parser.wxi	Mon Aug 13 13:14:25 2012	(r2000)
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
+    <Fragment>
+        <DirectoryRef Id="INSTALLDIR_PARADIGMS32">
+            <Directory Id="PIADIR.1.1.0.0" Name="PIA1.1.0.0"/>
+        </DirectoryRef>
+    </Fragment>
+    <Fragment>
+        <ComponentGroup Id="GME.MGA.Parser.1.1.0.0">
+            <Component Id="cmp7DC6908A5632BAD72F1D292D7E72DE46" Directory="PIADIR.1.1.0.0" Guid="{61940AF6-644E-488E-A29C-94AC59AE6781}">
+			    <Condition>NETFRAMEWORK</Condition>
+                <File Id="filD81515CCFD08D8A988FDF5D3DAE554B8" KeyPath="yes" Source="$(var.PIADir)\GME.MGA.Parser.dll" Assembly=".net"/>
+                <RegistryValue Root="HKCR" Key="CLSID\{70C41B25-E3CE-11D3-B37A-005004D38590}\InprocServer32\1.1.0.0" Name="Class" Value="GME.MGA.Parser.MgaMetaParserClass" Type="string" Action="write" />
+                <RegistryValue Root="HKCR" Key="CLSID\{70C41B25-E3CE-11D3-B37A-005004D38590}\InprocServer32\1.1.0.0" Name="Assembly" Value="GME.MGA.Parser, Version=1.1.0.0, Culture=neutral, PublicKeyToken=f240a760fe751c2e" Type="string" Action="write" />
+                <RegistryValue Root="HKCR" Key="CLSID\{70C41B25-E3CE-11D3-B37A-005004D38590}\InprocServer32\1.1.0.0" Name="RuntimeVersion" Value="v2.0.50727" Type="string" Action="write" />
+                <RegistryValue Root="HKCR" Key="CLSID\{70C41B25-E3CE-11D3-B37A-005004D38590}\InprocServer32\1.1.0.0" Name="CodeBase" Value="file:///[#filD81515CCFD08D8A988FDF5D3DAE554B8]" Type="string" Action="write" />
+                <RegistryValue Root="HKCR" Key="CLSID\{70C41B25-E3CE-11D3-B37A-005004D38590}\InprocServer32" Name="Class" Value="GME.MGA.Parser.MgaMetaParserClass" Type="string" Action="write" />
+                <RegistryValue Root="HKCR" Key="CLSID\{70C41B25-E3CE-11D3-B37A-005004D38590}\InprocServer32" Name="Assembly" Value="GME.MGA.Parser, Version=1.1.0.0, Culture=neutral, PublicKeyToken=f240a760fe751c2e" Type="string" Action="write" />
+                <RegistryValue Root="HKCR" Key="CLSID\{70C41B25-E3CE-11D3-B37A-005004D38590}\InprocServer32" Name="RuntimeVersion" Value="v2.0.50727" Type="string" Action="write" />
+                <RegistryValue Root="HKCR" Key="CLSID\{70C41B25-E3CE-11D3-B37A-005004D38590}\InprocServer32" Name="CodeBase" Value="file:///[#filD81515CCFD08D8A988FDF5D3DAE554B8]" Type="string" Action="write" />
+                <RegistryValue Root="HKCR" Key="CLSID\{94D6FB54-1F7C-11D4-B3D0-005004D38590}\InprocServer32\1.1.0.0" Name="Class" Value="GME.MGA.Parser.MgaParserClass" Type="string" Action="write" />
+                <RegistryValue Root="HKCR" Key="CLSID\{94D6FB54-1F7C-11D4-B3D0-005004D38590}\InprocServer32\1.1.0.0" Name="Assembly" Value="GME.MGA.Parser, Version=1.1.0.0, Culture=neutral, PublicKeyToken=f240a760fe751c2e" Type="string" Action="write" />
+                <RegistryValue Root="HKCR" Key="CLSID\{94D6FB54-1F7C-11D4-B3D0-005004D38590}\InprocServer32\1.1.0.0" Name="RuntimeVersion" Value="v2.0.50727" Type="string" Action="write" />
+                <RegistryValue Root="HKCR" Key="CLSID\{94D6FB54-1F7C-11D4-B3D0-005004D38590}\InprocServer32\1.1.0.0" Name="CodeBase" Value="file:///[#filD81515CCFD08D8A988FDF5D3DAE554B8]" Type="string" Action="write" />
+                <RegistryValue Root="HKCR" Key="CLSID\{94D6FB54-1F7C-11D4-B3D0-005004D38590}\InprocServer32" Name="Class" Value="GME.MGA.Parser.MgaParserClass" Type="string" Action="write" />
+                <RegistryValue Root="HKCR" Key="CLSID\{94D6FB54-1F7C-11D4-B3D0-005004D38590}\InprocServer32" Name="Assembly" Value="GME.MGA.Parser, Version=1.1.0.0, Culture=neutral, PublicKeyToken=f240a760fe751c2e" Type="string" Action="write" />
+                <RegistryValue Root="HKCR" Key="CLSID\{94D6FB54-1F7C-11D4-B3D0-005004D38590}\InprocServer32" Name="RuntimeVersion" Value="v2.0.50727" Type="string" Action="write" />
+                <RegistryValue Root="HKCR" Key="CLSID\{94D6FB54-1F7C-11D4-B3D0-005004D38590}\InprocServer32" Name="CodeBase" Value="file:///[#filD81515CCFD08D8A988FDF5D3DAE554B8]" Type="string" Action="write" />
+                <RegistryValue Root="HKCR" Key="CLSID\{A5D0DAE7-16EE-11D4-B3C2-005004D38590}\InprocServer32\1.1.0.0" Name="Class" Value="GME.MGA.Parser.MgaDumperClass" Type="string" Action="write" />
+                <RegistryValue Root="HKCR" Key="CLSID\{A5D0DAE7-16EE-11D4-B3C2-005004D38590}\InprocServer32\1.1.0.0" Name="Assembly" Value="GME.MGA.Parser, Version=1.1.0.0, Culture=neutral, PublicKeyToken=f240a760fe751c2e" Type="string" Action="write" />
+                <RegistryValue Root="HKCR" Key="CLSID\{A5D0DAE7-16EE-11D4-B3C2-005004D38590}\InprocServer32\1.1.0.0" Name="RuntimeVersion" Value="v2.0.50727" Type="string" Action="write" />
+                <RegistryValue Root="HKCR" Key="CLSID\{A5D0DAE7-16EE-11D4-B3C2-005004D38590}\InprocServer32\1.1.0.0" Name="CodeBase" Value="file:///[#filD81515CCFD08D8A988FDF5D3DAE554B8]" Type="string" Action="write" />
+                <RegistryValue Root="HKCR" Key="CLSID\{A5D0DAE7-16EE-11D4-B3C2-005004D38590}\InprocServer32" Name="Class" Value="GME.MGA.Parser.MgaDumperClass" Type="string" Action="write" />
+                <RegistryValue Root="HKCR" Key="CLSID\{A5D0DAE7-16EE-11D4-B3C2-005004D38590}\InprocServer32" Name="Assembly" Value="GME.MGA.Parser, Version=1.1.0.0, Culture=neutral, PublicKeyToken=f240a760fe751c2e" Type="string" Action="write" />
+                <RegistryValue Root="HKCR" Key="CLSID\{A5D0DAE7-16EE-11D4-B3C2-005004D38590}\InprocServer32" Name="RuntimeVersion" Value="v2.0.50727" Type="string" Action="write" />
+                <RegistryValue Root="HKCR" Key="CLSID\{A5D0DAE7-16EE-11D4-B3C2-005004D38590}\InprocServer32" Name="CodeBase" Value="file:///[#filD81515CCFD08D8A988FDF5D3DAE554B8]" Type="string" Action="write" />
+                <RegistryValue Root="HKCR" Key="Record\{DF2010FC-D1DA-3A4C-9970-1E6C9FEB8F08}\1.1.0.0" Name="Class" Value="GME.MGA.Parser.inserttype_enum" Type="string" Action="write" />
+                <RegistryValue Root="HKCR" Key="Record\{DF2010FC-D1DA-3A4C-9970-1E6C9FEB8F08}\1.1.0.0" Name="Assembly" Value="GME.MGA.Parser, Version=1.1.0.0, Culture=neutral, PublicKeyToken=f240a760fe751c2e" Type="string" Action="write" />
+                <RegistryValue Root="HKCR" Key="Record\{DF2010FC-D1DA-3A4C-9970-1E6C9FEB8F08}\1.1.0.0" Name="RuntimeVersion" Value="v2.0.50727" Type="string" Action="write" />
+                <RegistryValue Root="HKCR" Key="Record\{DF2010FC-D1DA-3A4C-9970-1E6C9FEB8F08}\1.1.0.0" Name="CodeBase" Value="file:///[#filD81515CCFD08D8A988FDF5D3DAE554B8]" Type="string" Action="write" />
+                <RegistryValue Root="HKCR" Key="TypeLib\{70C41B15-E3CE-11D3-B37A-005004D38590}\1.1" Name="PrimaryInteropAssemblyName" Value="GME.MGA.Parser, Version=1.1.0.0, Culture=neutral, PublicKeyToken=f240a760fe751c2e" Type="string" Action="write" />
+                <RegistryValue Root="HKCR" Key="TypeLib\{70C41B15-E3CE-11D3-B37A-005004D38590}\1.1" Name="PrimaryInteropAssemblyCodeBase" Value="file:///[#filD81515CCFD08D8A988FDF5D3DAE554B8]" Type="string" Action="write" />
+            </Component>
+        </ComponentGroup>
+    </Fragment>
+</Wix>
\ No newline at end of file

Added: trunk/Install/PIAs_1.1.0.0/make
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ trunk/Install/PIAs_1.1.0.0/make	Mon Aug 13 13:14:25 2012	(r2000)
@@ -0,0 +1,21 @@
+set -e
+set -x
+
+version=1.1.0.0
+heat='/cygdrive/c/Program Files (x86)\Windows Installer XML v3.5\bin\heat'
+# for name in GME.MGA.Core GME.MGA.Meta GME.MGA GME.MGA.Parser GME.Util GME; do
+for name in GME.MGA.Parser; do
+"$heat" file C:/Windows/assembly/GAC_MSIL/${name}/${version}__f240a760fe751c2e/${name}.dll -o ${name}.wxi -gg -cg ${name}.${version} -srd -dr PIADIR -var var.PIADir
+done
+[ -f GME.wxi ] && mv GME.wxi GMEPIA.wxi
+
+# then add Assembly=".net" to <File
+# and <Condition>NETFRAMEWORK</Condition> under <Component>
+# then remove <RegistryValues from previous versions (for the same version of the typelib)
+# Add to first wxi:
+#  <DirectoryRef Id="INSTALLDIR_PARADIGMS32">
+#    <Directory Id="PIADIR.1.1.0.0" Name="PIA1.1.0.0"/>
+#  </DirectoryRef>
+# Old wxi: change Source="$(var.PIADir) to Source="$(var.PIADir.1.0.1.0)
+# For new versions, change WIX_CANDLE_ARG in tools.py
+

Modified: trunk/Tests/GPyUnit/test_PIAs.py
==============================================================================
--- trunk/Tests/GPyUnit/test_PIAs.py	Thu Aug  9 12:08:13 2012	(r1999)
+++ trunk/Tests/GPyUnit/test_PIAs.py	Mon Aug 13 13:14:25 2012	(r2000)
@@ -6,6 +6,10 @@
         import os.path
         self.assertTrue(os.path.isfile(os.path.join(os.environ['SystemRoot'], r'assembly\GAC_MSIL\GME.MGA\1.0.0.0__f240a760fe751c2e\GME.MGA.dll')))
         self.assertTrue(os.path.isfile(os.path.join(os.environ['SystemRoot'], r'assembly\GAC_MSIL\GME.MGA\1.0.1.0__f240a760fe751c2e\GME.MGA.dll')))
+        self.assertTrue(os.path.isfile(os.path.join(os.environ['SystemRoot'], r'assembly\GAC_MSIL\GME.MGA.Parser\1.0.0.0__f240a760fe751c2e\GME.MGA.Parser.dll')))
+        self.assertTrue(os.path.isfile(os.path.join(os.environ['SystemRoot'], r'assembly\GAC_MSIL\GME.MGA.Parser\1.0.1.0__f240a760fe751c2e\GME.MGA.Parser.dll')))
+        self.assertTrue(os.path.isfile(os.path.join(os.environ['SystemRoot'], r'assembly\GAC_MSIL\GME.MGA.Parser\1.1.0.0__f240a760fe751c2e\GME.MGA.Parser.dll')))
+
 
 if __name__ == "__main__":
         unittest.main()

Modified: trunk/Tests/GPyUnit/test_parser.py
==============================================================================
--- trunk/Tests/GPyUnit/test_parser.py	Thu Aug  9 12:08:13 2012	(r1999)
+++ trunk/Tests/GPyUnit/test_parser.py	Mon Aug 13 13:14:25 2012	(r2000)
@@ -1,6 +1,7 @@
 import unittest
 import os
 import GPyUnit.util
+from GPyUnit.util import DispatchEx
 
 def _adjacent_file(file):
     import os.path
@@ -28,6 +29,17 @@
     def connstr(self):
         return "MGA=" + _adjacent_file("parsertest.mga")
 
+    def test_GetXMLParadigm(self):
+        parser = DispatchEx("Mga.MgaParser")
+        paradigm = parser.GetXMLParadigm(os.environ['GME_ROOT'] + r"\Paradigms\MetaGME\MetaGME-model.xme")
+        assert paradigm == "MetaGME"
+       
+    def test_GetXMLInfo(self):
+        parser = DispatchEx("Mga.MgaParser")
+        xme = os.environ['GME_ROOT'] + r"\Paradigms\MetaGME\MetaGME-model.xme"
+        (paradigm, parversion, parguid, basename, ver) = parser.GetXMLInfo(xme)
+        assert paradigm == "MetaGME"
+    
 GPyUnit.util.MUGenerator(globals(), TestParser)
 
 if __name__ == "__main__":


More information about the gme-commit mailing list