~ubuntu-branches/debian/stretch/codelite/stretch

« back to all changes in this revision

Viewing changes to CodeLite/cl_standard_paths.cpp

  • Committer: Package Import Robot
  • Author(s): James Cowgill
  • Date: 2014-09-01 00:23:18 UTC
  • mfrom: (1.1.14)
  • Revision ID: package-import@ubuntu.com-20140901002318-wx98wxrjb2e0ifi8
Tags: 6.1.1+dfsg-1
* New upstream release.

* debian/control
  - Build depend on libhunspell-dev.
  - Re-enable SFTP support using libssh-gcrypt.
  - Recommend valgrind (for new MemChecker plugin).
* debian/copyright
  - Remove bundled version of hunspell.
* debian/patches
  - Refresh patches.
  - Patch 10_move-helper-binaries.patch rewritten due to upstream changes.
  - Add 19_remove-bundled-clang-format.patch to fix clang-format paths.
  - Add 20_Compilation-fix-for-non-precompiled-header-builds.patch from
    upstream to fix build.
* debian/*.1
  - Remove manpages in debian/ - moved to upstream

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
//////////////////////////////////////////////////////////////////////////////
 
2
//////////////////////////////////////////////////////////////////////////////
 
3
//
 
4
// copyright            : (C) 2014 The CodeLite Team
 
5
// file name            : cl_standard_paths.cpp
 
6
//
 
7
// -------------------------------------------------------------------------
 
8
// A
 
9
//              _____           _      _     _ _
 
10
//             /  __ \         | |    | |   (_) |
 
11
//             | /  \/ ___   __| | ___| |    _| |_ ___
 
12
//             | |    / _ \ / _  |/ _ \ |   | | __/ _ )
 
13
//             | \__/\ (_) | (_| |  __/ |___| | ||  __/
 
14
//              \____/\___/ \__,_|\___\_____/_|\__\___|
 
15
//
 
16
//                                                  F i l e
 
17
//
 
18
//    This program is free software; you can redistribute it and/or modify
 
19
//    it under the terms of the GNU General Public License as published by
 
20
//    the Free Software Foundation; either version 2 of the License, or
 
21
//    (at your option) any later version.
 
22
//
 
23
//////////////////////////////////////////////////////////////////////////////
 
24
//////////////////////////////////////////////////////////////////////////////
 
25
 
1
26
#include "cl_standard_paths.h"
2
27
#include <wx/stdpaths.h>
3
28
#include <wx/filename.h>
35
60
#else
36
61
    // Release mode
37
62
    return wxStandardPaths::Get().GetUserDataDir();
38
 
    
 
63
 
39
64
#endif
40
65
#else // Windows / OSX
41
66
    return wxStandardPaths::Get().GetUserDataDir();
46
71
{
47
72
    m_path = path;
48
73
}
 
74
 
 
75
wxString clStandardPaths::GetPluginsDirectory() const
 
76
{
 
77
#ifdef __WXGTK__
 
78
    wxString pluginsDir = PLUGINS_DIR;
 
79
#else
 
80
    wxFileName path(GetDataDir(), "");
 
81
    path.AppendDir("plugins");
 
82
    wxString pluginsDir = path.GetPath();
 
83
#endif
 
84
    return pluginsDir;
 
85
}
 
86
 
 
87
wxString clStandardPaths::GetDataDir() const
 
88
{
 
89
    return wxStandardPaths::Get().GetDataDir();
 
90
}
 
91
 
 
92
wxString clStandardPaths::GetBinFolder() const
 
93
{
 
94
    return wxStandardPaths::Get().GetPluginsDir();
 
95
}
 
96
 
 
97
wxString clStandardPaths::GetBinaryFullPath(const wxString& toolname) const
 
98
{
 
99
    wxFileName binary( GetBinFolder(), toolname );
 
100
    binary.SetExt( wxEmptyString );
 
101
#ifdef __WXMSW__
 
102
    binary.SetExt( "exe" );
 
103
#endif
 
104
    return binary.GetFullPath();
 
105
}
 
106
 
 
107
wxString clStandardPaths::GetLexersDir() const
 
108
{
 
109
    wxFileName fn(GetDataDir(), "");
 
110
    fn.AppendDir("lexers");
 
111
    return fn.GetPath();
 
112
}
 
113
 
 
114
wxString clStandardPaths::GetUserLexersDir() const
 
115
{
 
116
    wxFileName fn(GetUserDataDir(), "");
 
117
    fn.AppendDir("lexers");
 
118
    return fn.GetPath();
 
119
}