"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "saga-gis/src/saga_core/saga_gui/wksp_tool_manager.cpp" between
saga-7.6.2_src.zip and saga-7.6.3_src.zip

About: SAGA (System for Automated Geoscientific Analyses) is a Geographic Information System (GIS) software for geodata processing and analysis. All source codes.

wksp_tool_manager.cpp  (saga-7.6.2_src):wksp_tool_manager.cpp  (saga-7.6.3_src)
skipping to change at line 137 skipping to change at line 137
m_Parameters.Add_Bool("NODE_TOOLS", m_Parameters.Add_Bool("NODE_TOOLS",
"BEEP" , _TL("Beep when finished"), "BEEP" , _TL("Beep when finished"),
_TL(""), _TL(""),
false false
); );
m_Parameters.Add_Choice("NODE_TOOLS", m_Parameters.Add_Choice("NODE_TOOLS",
"HELP_SOURCE" , _TL("Tool Description Source"), "HELP_SOURCE" , _TL("Tool Description Source"),
_TL(""), _TL(""),
CSG_String::Format("%s|%s|", CSG_String::Format("%s|%s",
_TL("built-in"), _TL("built-in"),
_TL("online") _TL("online")
), 0 ), 0
); );
//----------------------------------------------------- //-----------------------------------------------------
m_Parameters.Add_Node("", "NODE_FILES", _TL("Files"), _TL("")); m_Parameters.Add_Node("", "NODE_FILES", _TL("Files"), _TL(""));
m_Parameters.Add_Bool("NODE_FILES", m_Parameters.Add_Bool("NODE_FILES",
"LNG_OLDSTYLE" , _TL("Old Style Namings"), "LNG_OLDSTYLE" , _TL("Old Style Namings"),
skipping to change at line 233 skipping to change at line 233
bool CWKSP_Tool_Manager::Initialise(void) bool CWKSP_Tool_Manager::Initialise(void)
{ {
CONFIG_Read("/TOOLS", "DLG_INFO", CDLG_Parameters::m_bInfo); CONFIG_Read("/TOOLS", "DLG_INFO", CDLG_Parameters::m_bInfo);
CONFIG_Read("/TOOLS", &m_Parameters); CONFIG_Read("/TOOLS", &m_Parameters);
CONFIG_Do_Save(m_Parameters("SAVE_CONFIG")->asBool()); CONFIG_Do_Save(m_Parameters("SAVE_CONFIG")->asBool());
g_pSAGA->Process_Set_Frequency(m_Parameters("PROCESS_UPDATE")->asInt()); g_pSAGA->Process_Set_Frequency(m_Parameters("PROCESS_UPDATE")->asInt());
#ifdef _OPENMP #ifdef _OPENMP
SG_OMP_Set_Max_Num_Threads(m_Parameters("OMP_THREADS_MAX")->asInt()); SG_OMP_Set_Max_Num_Threads(m_Parameters("OMP_THREADS_MAX")->asInt
#endif ());
#endif
//----------------------------------------------------- //-----------------------------------------------------
wxString Library; #ifdef _SAGA_MSW
wxString Default_Path(g_pSAGA->Get_App_Path());
#else
wxString Default_Path(MODULE_LIBRARY_PATH);
#endif
for(int i=0; CONFIG_Read(CFG_LIBS, wxString::Format(CFG_LIBF, i), Library //-----------------------------------------------------
); i++) bool bCompatible = true;
#ifdef __GNUC__
long Version;
if( !CONFIG_Read("/VERSION", "GNUC" , Version) || Version != __GN
UC__ )
{
bCompatible = false;
}
#ifdef __GNUC_MINOR__
else if( !CONFIG_Read("/VERSION", "GNUC_MINOR" , Version)
|| Version != __GNUC_MINOR__ )
{
bCompatible = false;
}
#ifdef __GNUC_PATCHLEVEL__
else if( !CONFIG_Read("/VERSION", "GNUC_PATCHLEVE
L" , Version) || Version != __GNUC_PATCHLEVEL__ )
{
bCompatible = false;
}
#endif
#endif
#endif
//-----------------------------------------------------
if( bCompatible ) // gcc builds: don't load stored libraries when t
here is no abi compatibility assured!
{ {
if( !wxFileExists(Library) ) wxString Library;
for(int i=0; CONFIG_Read(CFG_LIBS, wxString::Format(CFG_LIBF, i),
Library); i++)
{ {
wxFileName fn(Library); fn.MakeAbsolute(g_pSAGA-> if( !wxFileExists(Library) )
Get_App_Path()); {
wxFileName fn(Library);
Library = fn.GetFullPath(); fn.MakeAbsolute(Default_Path);
}
Library = fn.GetFullPath();
}
SG_UI_Progress_Lock(true); SG_UI_Progress_Lock(true);
SG_Get_Tool_Library_Manager().Add_Library(&Library); SG_Get_Tool_Library_Manager().Add_Library(&Library);
SG_UI_Progress_Lock(false); SG_UI_Progress_Lock(false);
}
} }
//-----------------------------------------------------
if( SG_Get_Tool_Library_Manager().Get_Count() == 0 ) if( SG_Get_Tool_Library_Manager().Get_Count() == 0 )
{ {
#if defined(_SAGA_LINUX) SG_Get_Tool_Library_Manager().Add_Directory(&Default_Path, true);
if( (SG_Get_Tool_Library_Manager().Add_Directory(CSG_String(MODULE_LIBRAR #ifdef _SAGA_LINUX
Y_PATH), false) SG_Get_Tool_Library_Manager().Add_Directory(SG_File_Make_Path(SHA
+ SG_Get_Tool_Library_Manager().Add_Directory(SG_File_Make_Path(CSG_St RE_PATH, "toolchains"), false);
ring(SHARE_PATH), SG_T("toolchains")), false)) == 0 ) #endif
#endif
SG_Get_Tool_Library_Manager().Add_Directory(&g_pSAGA->Get_App_Pat
h(), true);
} }
_Update(false); _Update(false);
return( true ); return( true );
} }
//--------------------------------------------------------- //---------------------------------------------------------
#ifdef _SAGA_MSW
#define GET_LIBPATH(path) Get_FilePath_Relative(g_pSAGA->Get_App_Pa
th().c_str(), path.c_str())
#else
#define GET_LIBPATH(path) path.c_str()
#endif
//---------------------------------------------------------
bool CWKSP_Tool_Manager::Finalise(void) bool CWKSP_Tool_Manager::Finalise(void)
{ {
CONFIG_Write("/VERSION", "SAGA", SAGA_VERSION);
#ifdef __GNUC__
CONFIG_Write("/VERSION", "GNUC", (long)__GNUC__);
#ifdef __GNUC_MINOR__
CONFIG_Write("/VERSION", "GNUC_MINOR", (long)__GNUC_MINOR
__);
#ifdef __GNUC_PATCHLEVEL__
CONFIG_Write("/VERSION", "GNUC_PATCHLEVEL", (long
)__GNUC_PATCHLEVEL__);
#endif
#endif
#endif
CONFIG_Write("/TOOLS", "DLG_INFO", CDLG_Parameters::m_bInfo); CONFIG_Write("/TOOLS", "DLG_INFO", CDLG_Parameters::m_bInfo);
CONFIG_Write("/TOOLS", &m_Parameters); CONFIG_Write("/TOOLS", &m_Parameters);
//-----------------------------------------------------
#ifdef _SAGA_MSW
wxString Default_Path(g_pSAGA->Get_App_Path());
#else
wxString Default_Path(MODULE_LIBRARY_PATH);
#endif
CONFIG_Delete(CFG_LIBS); CONFIG_Delete(CFG_LIBS);
for(int i=0, n=0; i<Get_Count(); i++) for(int i=0, n=0; i<Get_Count(); i++)
{ {
CWKSP_Tool_Group *pGroup = Get_Group(i); CWKSP_Tool_Group *pGroup = Get_Group(i);
for(int j=0; j<pGroup->Get_Count(); j++) for(int j=0; j<pGroup->Get_Count(); j++)
{ {
CSG_Tool_Library *pLibrary = pGroup->Get_Lib rary(j)->Get_Library(); CSG_Tool_Library *pLibrary = pGroup->Get_Lib rary(j)->Get_Library();
if( pLibrary->Get_Type() == TOOL_CHAINS ) if( pLibrary->Get_Type() == TOOL_CHAINS )
{ {
for(int j=0; j<pLibrary->Get_Count(); j++) for(int j=0; j<pLibrary->Get_Count(); j++)
{ {
CONFIG_Write(CFG_LIBS, wxString::Format(C CONFIG_Write(CFG_LIBS, wxString::Format(C
FG_LIBF, n++), GET_LIBPATH(pLibrary->Get_File_Name(j))); FG_LIBF, n++),
Get_FilePath_Relative(Default_Pat
h.c_str(), pLibrary->Get_File_Name(j).c_str())
);
} }
} }
else else
{ {
CONFIG_Write(CFG_LIBS, wxString::Format(CFG_LIBF, CONFIG_Write(CFG_LIBS, wxString::Format(CFG_LIBF,
n++), GET_LIBPATH(pLibrary->Get_File_Name())); n++),
Get_FilePath_Relative(Default_Path.c_str(
), pLibrary->Get_File_Name().c_str())
);
} }
} }
} }
return( true ); return( true );
} }
/////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////
// // // //
/////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////
 End of changes. 15 change blocks. 
35 lines changed or deleted 91 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)