| 1 |
#ifndef LINUX_HPP |
| 2 |
#define LINUX_HPP |
| 3 |
|
| 4 |
#include "PlatformCommon.hpp" |
| 5 |
#include "codelite_exports.h" |
| 6 |
|
| 7 |
#include <vector> |
| 8 |
#include <wx/string.h> |
| 9 |
|
| 10 |
class WXDLLIMPEXP_CL LINUX : public PlatformCommon |
| 11 |
{ |
| 12 |
wxString RUST_TOOLCHAIN_BIN; |
| 13 |
bool rust_toolchain_scanned = false; |
| 14 |
|
| 15 |
protected: |
| 16 |
bool get_rustup_bin_folder(wxString* rustup_bin_dir); |
| 17 |
|
| 18 |
public: |
| 19 |
LINUX() {} |
| 20 |
virtual ~LINUX() {} |
| 21 |
|
| 22 |
static LINUX* Get(); |
| 23 |
|
| 24 |
public: |
| 25 |
/** |
| 26 |
* @brief on linux it is simple "/" |
| 27 |
*/ |
| 28 |
bool FindInstallDir(wxString* installpath) override; |
| 29 |
|
| 30 |
/** |
| 31 |
* @brief locate the home folder within msys2 (e.g. /home/eran) |
| 32 |
*/ |
| 33 |
bool FindHomeDir(wxString* homedir) override; |
| 34 |
|
| 35 |
/** |
| 36 |
* @brief check if a command "command" is installed and return its fullpath |
| 37 |
*/ |
| 38 |
bool Which(const wxString& command, wxString* command_fullpath) override; |
| 39 |
|
| 40 |
/** |
| 41 |
* @brief some vendros deliver binaries with "-N" where N is the version number |
| 42 |
* this method attempts to search for command-<N>...command (in this order) |
| 43 |
*/ |
| 44 |
bool WhichWithVersion(const wxString& command, const std::vector<int>& versions, wxString* command_fullpath); |
| 45 |
}; |
| 46 |
|
| 47 |
#endif // LINUX_HPP |