wxMaxima
Loading...
Searching...
No Matches
Dirstructure.h
Go to the documentation of this file.
1// -*- mode: c++; c-file-style: "linux"; c-basic-offset: 2; indent-tabs-mode: nil -*-
2// Copyright (C) 2004-2015 Andrej Vodopivec <andrej.vodopivec@gmail.com>
3// (C) 2015 Gunter Königsmann <wxMaxima@physikbuch.de>
4// (C) 2013 Doug Ilijev <doug.ilijev@gmail.com>
5//
6// This program is free software; you can redistribute it and/or modify
7// it under the terms of the GNU General Public License as published by
8// the Free Software Foundation; either version 2 of the License, or
9// (at your option) any later version.
10//
11// This program is distributed in the hope that it will be useful,
12// but WITHOUT ANY WARRANTY; without even the implied warranty of
13// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14// GNU General Public License for more details.
15//
16//
17// You should have received a copy of the GNU General Public License
18// along with this program; if not, write to the Free Software
19// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20//
21// SPDX-License-Identifier: GPL-2.0+
22
29#ifndef DIRSTRUCTURE_H
30#define DIRSTRUCTURE_H
31
32
33// This macro is used to mark the macports prefix, so that it can be easily patched
34// The MacPorts port file for wxMaxima uses this, so don't remove this!
35// Note: this is not done with a define passed through cmake because I didn't find a way
36// to pass paths which need quoting through cmake.
37#define OSX_MACPORTS_PREFIX "/opt/local"
38// If set to 1, the macports path is put first into the search path (after app package paths).
39// This could be done with a define but then it doesn't make sense to use a different method.
40#define OSX_MACPORTS_PREFER 0
41
42#include "precomp.h"
43#include <wx/wx.h>
44#include <wx/string.h>
45#include <wx/stdpaths.h>
46#include <wx/utils.h>
47
58{
59public:
62 ~Dirstructure(){ m_dirStructure = NULL; }
63private:
65 static wxString ResourcesDir();
66
67public:
69 static wxString UserConfDir() {return m_userConfDir;}
71 static void UserConfDir(const wxString &userConfDir);
72
74 static wxString DataDir();
75
77 wxString HelpDir() const {return m_helpDir;}
79 void HelpDir(const wxString &helpDir){m_helpDir = helpDir;}
80
84 static wxString UserAutocompleteFile();
85
87 static wxString AutocompleteFile()
88 { return DataDir() + wxS("/autocomplete.txt"); }
89
94 static wxString LocaleDir()
95 { return ResourcesDir() + wxS("/locale"); }
96
98 static wxString MaximaDefaultLocation();
99
100 static wxString AnchorsCacheFile()
101 {
102 return UserConfDir() + "/manual_anchors.xml";
103 }
104
105 static Dirstructure *Get()
106 {
107 return m_dirStructure;
108 }
109private:
110 wxString m_helpDir;
111 static wxString m_userConfDir;
112 static Dirstructure *m_dirStructure;
113};
114
115#endif // DIRSTRUCTURE_H
An object that represents the directory structure wxMaxima is installed in.
Definition: Dirstructure.h:58
static wxString LocaleDir()
The directory the locale data is to be found in.
Definition: Dirstructure.h:94
static wxString MaximaDefaultLocation()
The executable file path to the maxima executable (or .bat on Windows)
Definition: Dirstructure.cpp:138
static wxString AutocompleteFile()
The path to wxMaxima's own AutoComplete file.
Definition: Dirstructure.h:87
Dirstructure()
The constructor and destructor.
Definition: Dirstructure.cpp:40
static wxString UserConfDir()
The directory the user stores its data in.
Definition: Dirstructure.h:69
void HelpDir(const wxString &helpDir)
Set the directory the help file is stored in.
Definition: Dirstructure.h:79
static wxString DataDir()
The directory general data is stored in.
Definition: Dirstructure.cpp:128
static wxString UserAutocompleteFile()
The file private accelerator key information is stored in.
Definition: Dirstructure.cpp:250
wxString HelpDir() const
The directory the help file is stored in.
Definition: Dirstructure.h:77