Polyphase Game Engine
Loading...
Searching...
No Matches
LinuxHostShell.h
Go to the documentation of this file.
1#pragma once
2
3#if EDITOR
4
5#include <string>
6#include <cstdint>
7
9
19namespace LinuxHostShell
20{
22 bool UsesWsl();
23
30 std::string ToShellPath(const std::string& hostPath);
31
38 std::string Quote(const std::string& str);
39
46 std::string BuildCommand(const std::string& body, const std::string& wslDistro = "");
47
58 int32_t Run(const std::string& body, std::string* outOutput = nullptr,
59 const std::string& wslDistro = "");
60
67 int32_t RunScript(const std::string& scriptBody, const std::string& hostScriptPath,
68 std::string* outOutput = nullptr, const std::string& wslDistro = "");
69
71 bool EnsureHostDir(const std::string& hostPath);
72
78 bool HasTool(const std::string& tool, const std::string& wslDistro = "");
79
81 std::string GetOption(const PolyphaseBuildContext* ctx, const char* key,
82 const std::string& fallback = "");
83
85 void Report(const PolyphaseBuildContext* ctx, const std::string& line);
86
93 bool WriteTextFileLF(const std::string& hostPath, const std::string& contents);
94}
95
96#endif /* EDITOR */
Stable C ABI header for native build-target addons.