ultimatepp/uppsrc/ide/Core/Host.h
cxl 6626d00851 ide: developing git support
git-svn-id: svn://ultimatepp.org/upp/trunk@15590 f0d560ea-af0d-0410-9eb7-867de7ffcac7
2020-12-14 08:38:37 +00:00

45 lines
1.5 KiB
C

enum { REMOTE_TIMEOUT = 2000 };
extern String HostConsole;
struct Host {
struct FileInfo : Time, Moveable<FileInfo> {
int length;
};
Vector<String> exedirs;
String environment;
String *cmdout;
String onefile; // support for Ctrl+F7 - build single file
void DoDir(const String& s);
Host();
String GetEnvironment();
void AddEnvironment(const char *id, const char *value);
Vector<FileInfo> GetFileInfo(const Vector<String>& path);
void ChDir(const String& path);
bool RealizeDir(const String& path);
int Execute(const char *cmdline);
int ExecuteWithInput(const char *cmdline, bool noconvert);
int Execute(const char *cmdline, Stream& out, bool noconvert = false);
int AllocSlot();
bool Run(const char *cmdline, int slot, String key, int blitz_count);
bool Run(const char *cmdline, Stream& out, int slot, String key, int blitz_count);
bool Wait();
bool Wait(int slot);
void OnFinish(Event<> cb);
bool StartProcess(LocalProcess& p, const char *cmdline);
void Launch(const char *cmdline, bool console = false);
void AddFlags(Index<String>& cfg);
const Vector<String>& GetExecutablesDirs() const;
private:
bool HasPlatformFlag(const Index<String>& cfg);
};