← Back to team overview

kicad-developers team mailing list archive

Re: DatasPath reeng.

 

Marco Serantoni wrote:
Before looking for a solution for OSX i wish ask to more experienced developers here to see if is acceptable.

I wish to reimplement ReturnKicadDatasPath() using wxFileName and wxStandardPaths, this is the pseudocode with the search priorities:

wxDir::Exists($KICAD)
wxDir::Exists(Configured PATH)
wxDir::Exists(wxStandardPaths->GetExecutablePath()->RemoveLastDir()->AppendDir(wxT("share")))
#ifdef __UNIX__
wxStandardPaths::GetInstallPrefix()->AppendDir(wxT("kicad"))->AppendDir(wxT("share"))
wxStandardPaths::GetInstallPrefix()->AppendDir(wxT("kicad"))
#endif
wxDir::Exists(wxStandardPaths::GetUserDataDir())
wxDir::Exists(wxStandardPaths::GetDataDir())

I think in this way also future platforms could benefit of the change and the code could better integrate with each existing OS standard.
There is someone that have hints or contras ?


Marco,

Wayne just made a large commit. Please re-ask your question in view of his changes.

Dick







References