Update of /cvsroot/wxdevcenter/wxDevCenter/src/unix
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18216/src/unix
Modified Files:
Config.cpp
Log Message:
Add command line parser to allow to add paths to include data/features/plugins/config.
Index: Config.cpp
===================================================================
RCS file: /cvsroot/wxdevcenter/wxDevCenter/src/unix/Config.cpp,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** Config.cpp 8 Aug 2005 19:14:00 -0000 1.9
--- Config.cpp 11 Aug 2005 09:58:17 -0000 1.10
***************
*** 56,65 ****
m_strInstallPath = ReadConfig(WXDC_CONF_KEYNAME_INSTALLDIR , wxT(wxDC_INSTALL_TARGET));
! m_strDataPath.Add( ReadConfig(WXDC_CONF_KEYNAME_DATADIR , wxString(wxDC_INSTALL_TARGET) + wxString(wxT("/share/")) + WXDC_SETUP_APPIDENT + wxT("/data")));
! m_strFeaturesPath.Add( ReadConfig(WXDC_CONF_KEYNAME_FEATURESDIR , wxString(wxDC_INSTALL_TARGET) + wxString(wxT("/lib/")) + WXDC_SETUP_APPIDENT + wxT("/features")));
! m_strPluginsPath.Add( ReadConfig(WXDC_CONF_KEYNAME_PLUGINSDIR , wxString(wxDC_INSTALL_TARGET) + wxString(wxT("/lib/")) + WXDC_SETUP_APPIDENT + wxT("/plugins")));
! m_strConfPath.Add( ReadConfig(WXDC_CONF_KEYNAME_CONFDIR , wxString(wxDC_INSTALL_TARGET) + wxString(wxT("/share/")) + WXDC_SETUP_APPIDENT + wxT("/conf")));
! m_strUserConfPath.Add( ReadConfig(WXDC_CONF_KEYNAME_USERCONFDIR , wxGetHomeDir() + wxT("/.") + WXDC_SETUP_APPIDENT + wxT("/conf")));
!
}
--- 56,66 ----
m_strInstallPath = ReadConfig(WXDC_CONF_KEYNAME_INSTALLDIR , wxT(wxDC_INSTALL_TARGET));
!
! AddDataPath( ReadConfig(WXDC_CONF_KEYNAME_DATADIR , wxString(wxDC_INSTALL_TARGET) + wxString(wxT("/share/")) + WXDC_SETUP_APPIDENT + wxT("/data")));
! AddFeaturesPath( ReadConfig(WXDC_CONF_KEYNAME_FEATURESDIR , wxString(wxDC_INSTALL_TARGET) + wxString(wxT("/share/")) + WXDC_SETUP_APPIDENT + wxT("/features")));
! AddPluginsPath( ReadConfig(WXDC_CONF_KEYNAME_PLUGINSDIR , wxString(wxDC_INSTALL_TARGET) + wxString(wxT("/share/")) + WXDC_SETUP_APPIDENT + wxT("/plugins")));
! AddPluginsPath( ReadConfig(WXDC_CONF_KEYNAME_PLUGINSDIR , wxString(wxDC_INSTALL_TARGET) + wxString(wxT("/lib/")) + WXDC_SETUP_APPIDENT + wxT("/plugins")));
! AddGlobalConfPath(ReadConfig(WXDC_CONF_KEYNAME_CONFDIR , wxString(wxDC_INSTALL_TARGET) + wxString(wxT("/share/")) + WXDC_SETUP_APPIDENT + wxT("/conf")));
! AddUserConfPath( ReadConfig(WXDC_CONF_KEYNAME_USERCONFDIR , wxGetHomeDir() + wxT("/.") + WXDC_SETUP_APPIDENT + wxT("/conf")));
}
***************
*** 102,160 ****
}
-
- //////////////////////////////////////////////////////////////////////
- // Configuration système
-
- // Retourne le chemin d'instalation de l'application.
- wxString ConfigUnix::GetInstallPath()
- {
- return m_strInstallPath;
- }
-
- // Retourne le chemin racine des données (images, icones, etc).
- wxString ConfigUnix::GetDataPath(long lStackIndex)
- {
- if(lStackIndex>=0l && lStackIndex<(long)m_strDataPath.GetCount())
- return m_strDataPath[lStackIndex];
- else
- return wxT("");
- }
-
- // Retourne le chemin racine des fonctionnalités.
- wxString ConfigUnix::GetFeaturesPath(long lStackIndex)
- {
- if(lStackIndex>=0l && lStackIndex<(long)m_strFeaturesPath.GetCount())
- return m_strFeaturesPath[lStackIndex];
- else
- return wxT("");
- }
-
- // Retourne le chemin racine des pluggins.
- wxString ConfigUnix::GetPluginsPath(long lStackIndex)
- {
- if(lStackIndex>=0l && lStackIndex<(long)m_strPluginsPath.GetCount())
- return m_strPluginsPath[lStackIndex];
- else
- return wxT("");
- }
-
- // Retourne le chemin racine de la configuration globale.
- wxString ConfigUnix::GetGlobalConfPath(long lStackIndex)
- {
- if(lStackIndex>=0l && lStackIndex<(long)m_strConfPath.GetCount())
- return m_strConfPath[lStackIndex];
- else
- return wxT("");
- }
-
- // Retourne le chemin racine de la configuration utilisateur.
- wxString ConfigUnix::GetUserConfPath(long lStackIndex)
- {
- if(lStackIndex>=0l && lStackIndex<(long)m_strUserConfPath.GetCount())
- return m_strUserConfPath[lStackIndex];
- else
- return wxT("");
- }
-
// Crée un profile utilisateur si aucun n'existe.
void ConfigUnix::CreateUserProfile()
--- 103,106 ----
|