[GME-commit] GMESRC/SDK/BON/tools/ComponentConfig
InterpreterConfigDlg.cpp,1.15,1.16 RenameComponent.h,1.5,1.6
VcprojHandler.cpp,1.1,1.2
gme-commit at list.isis.vanderbilt.edu
gme-commit at list.isis.vanderbilt.edu
Tue Feb 1 18:29:03 CST 2005
Update of /var/lib/gme/GMESRC/SDK/BON/tools/ComponentConfig
In directory braindrain:/tmp/cvs-serv27776/tools/ComponentConfig
Modified Files:
InterpreterConfigDlg.cpp RenameComponent.h VcprojHandler.cpp
Log Message:
1.BON/*.vcproj updated according to Peter's suggestion
2. lst files contain the right files (sln and vcproj)
3.ComponentConfig corrected
CVS User: zolmol
Index: InterpreterConfigDlg.cpp
===================================================================
RCS file: /var/lib/gme/GMESRC/SDK/BON/tools/ComponentConfig/InterpreterConfigDlg.cpp,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -d -r1.15 -r1.16
*** InterpreterConfigDlg.cpp 31 Jan 2005 20:23:28 -0000 1.15
--- InterpreterConfigDlg.cpp 2 Feb 2005 00:29:01 -0000 1.16
***************
*** 487,490 ****
--- 487,491 ----
( is_gmeloc_changed
, is_compname_changed
+ , componenttechnology
, m_gmeSourceFiles
, sdkBONPath
Index: RenameComponent.h
===================================================================
RCS file: /var/lib/gme/GMESRC/SDK/BON/tools/ComponentConfig/RenameComponent.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** RenameComponent.h 31 Jan 2005 20:23:28 -0000 1.5
--- RenameComponent.h 2 Feb 2005 00:29:01 -0000 1.6
***************
*** 118,144 ****
( bool is_gmeloc_changed
, bool is_compname_changed
, std::vector<std::string>& m_gmeSourceFiles
, std::string& strBONPath
, string _vcprojFileName
, string _componentName // new component name
! , string _oldComponentName="Component"
)
: oldVcprojFileName( _vcprojFileName )
! , componentName( _componentName )
, oldComponentName( _oldComponentName )
{
! if( oldComponentName == "" ) oldComponentName = "Component";
! // calculate the new vcproj filename
! newVcprojFileName = oldVcprojFileName;
! int pos = newVcprojFileName.find( oldComponentName);
! if( pos != string::npos) // found
{
! newVcprojFileName.replace( pos, oldComponentName.length(), componentName);
! if( newVcprojFileName.length() >= 7
! && newVcprojFileName.substr( newVcprojFileName.length() - 7, 7).compare( ".vcproj") != 0)
{
! newVcprojFileName += ".vcproj"; // make sure the extension is there
}
}
--- 118,167 ----
( bool is_gmeloc_changed
, bool is_compname_changed
+ , int comp_tech
, std::vector<std::string>& m_gmeSourceFiles
, std::string& strBONPath
, string _vcprojFileName
, string _componentName // new component name
! , string _oldComponentName
)
: oldVcprojFileName( _vcprojFileName )
! , newVcprojFileName( _vcprojFileName )
, oldComponentName( _oldComponentName )
+ , componentName( _componentName )
{
! switch( comp_tech) // component technology
! {
! case 1: tech_name = "BONComponent"; // BON
! break;
! case 2: tech_name = "Interpreter"; // Old BON
! break;
! case 3: tech_name = "Component"; // Raw
! break;
! case 4: tech_name = "BON2Component"; // BON2
! break;
! };
! //AfxMessageBox( tech_name.c_str());
! bool ini = false;
! if( oldComponentName == "" )
{
! is_gmeloc_changed = ini = true; // initially need to update the settings
!
! // component name will be the technology name
! oldComponentName = tech_name;
!
! // calculate the new vcproj filename
! newVcprojFileName = componentName + tech_name + ".vcproj";
! componentName += tech_name;
! }
! else
! {
! componentName += tech_name;
! oldComponentName += tech_name;
! int pos = newVcprojFileName.find( oldComponentName);
! if( pos != string::npos) // found
{
! newVcprojFileName.replace( pos, oldComponentName.length(), componentName);
}
}
***************
*** 147,151 ****
proj2sln["BONComponent.vcproj"] = "BONComponent.sln";
proj2sln["BON2Component.vcproj"] = "BON2Component.sln";
! if( oldComponentName.compare( "Component" ) != 0 )
{
if( oldVcprojFileName.find( "BON2" ) != -1 )
--- 170,178 ----
proj2sln["BONComponent.vcproj"] = "BONComponent.sln";
proj2sln["BON2Component.vcproj"] = "BON2Component.sln";
!
! if( !oldComponentName.empty())
! proj2sln[ oldComponentName + ".vcproj"] = tech_name + ".sln";
!
! /*if( !oldComponentName.empty())
{
if( oldVcprojFileName.find( "BON2" ) != -1 )
***************
*** 161,165 ****
proj2sln[oldComponentName + "Component.vcproj"] = "Component.sln";
}
! }
if( is_gmeloc_changed || is_compname_changed)
--- 188,192 ----
proj2sln[oldComponentName + "Component.vcproj"] = "Component.sln";
}
! }*/
if( is_gmeloc_changed || is_compname_changed)
***************
*** 194,199 ****
if( is_compname_changed) // these are changing only if compname_changed
{
! doSln();
! doDef();
}
}
--- 221,226 ----
if( is_compname_changed) // these are changing only if compname_changed
{
! doSln( );
! doDef(ini);
}
}
***************
*** 208,219 ****
string oldVcprojFileName;
string newVcprojFileName;
- string componentName;
string oldComponentName;
map<string, string> proj2sln;
! void doDef( )
{
map<string,string> _s_r;
! _s_r[oldComponentName + ".DLL"] = componentName + ".DLL";
SetFileAttributes( "component.def", FILE_ATTRIBUTE_NORMAL );
SearchAndReplace::replace( _s_r, "component.def" );
--- 235,250 ----
string oldVcprojFileName;
string newVcprojFileName;
string oldComponentName;
+ string componentName;
+ string tech_name;
map<string, string> proj2sln;
! void doDef( bool first = false )
{
map<string,string> _s_r;
! if( first)
! _s_r[ "Component.DLL"] = componentName + ".DLL";
! else
! _s_r[oldComponentName + ".DLL"] = componentName + ".DLL";
SetFileAttributes( "component.def", FILE_ATTRIBUTE_NORMAL );
SearchAndReplace::replace( _s_r, "component.def" );
Index: VcprojHandler.cpp
===================================================================
RCS file: /var/lib/gme/GMESRC/SDK/BON/tools/ComponentConfig/VcprojHandler.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** VcprojHandler.cpp 31 Jan 2005 20:23:28 -0000 1.1
--- VcprojHandler.cpp 2 Feb 2005 00:29:01 -0000 1.2
***************
*** 269,276 ****
{
CString ip = inc_path;
! if( -1 == ip.Find(".\\") && -1 == ip.Find("./"))
{
if( !ip.IsEmpty()) ip += ",";
! ip += ".\\";
}
CComBSTR new_inc_path = ip;
--- 269,276 ----
{
CString ip = inc_path;
! if( -1 == ip.Find("$(ProjectDir)"))
{
if( !ip.IsEmpty()) ip += ",";
! ip += "$(ProjectDir)";
}
CComBSTR new_inc_path = ip;
***************
*** 290,294 ****
if( SUCCEEDED( hr))
{
! CComBSTR new_tlb_outputfile("ComponentLib.tlb");
hr = spMidlToolNew->put_TypeLibraryName( new_tlb_outputfile);
if( FAILED( hr))
--- 290,294 ----
if( SUCCEEDED( hr))
{
! CComBSTR new_tlb_outputfile("$(OutDir)/ComponentLib.tlb");
hr = spMidlToolNew->put_TypeLibraryName( new_tlb_outputfile);
if( FAILED( hr))
***************
*** 298,312 ****
}
! CComBSTR h_outputfile;
! hr = spMidlToolNew->get_HeaderFileName( &h_outputfile);
! if( SUCCEEDED( hr))
! {
! CComBSTR new_h_outputfile("ComponentLib.h");
! hr = spMidlToolNew->put_HeaderFileName( new_h_outputfile);
! if( FAILED( hr))
! {
! scout << "Error: could not set HeaderFileName property for MIDLTool." << endl;
! }
! }
return 1;
--- 298,312 ----
}
! //CComBSTR h_outputfile; do not set header file now
! //hr = spMidlToolNew->get_HeaderFileName( &h_outputfile);
! //if( SUCCEEDED( hr))
! //{
! // CComBSTR new_h_outputfile("ComponentLib.h");
! // hr = spMidlToolNew->put_HeaderFileName( new_h_outputfile);
! // if( FAILED( hr))
! // {
! // scout << "Error: could not set HeaderFileName property for MIDLTool." << endl;
! // }
! //}
return 1;
***************
*** 355,359 ****
CComBSTR name, name_new(new_n);
hr = spProject->get_Name( &name);
! if( SUCCEEDED( hr) && name == (LPCTSTR) old_n)
{
hr = spProject->put_Name( name_new );
--- 355,360 ----
CComBSTR name, name_new(new_n);
hr = spProject->get_Name( &name);
! BSTRreplace( name, name_new, old_n, new_n);
! if( SUCCEEDED( hr))// && name == (LPCTSTR) old_n)
{
hr = spProject->put_Name( name_new );
More information about the GME-commit
mailing list