ide: Developing upphub

git-svn-id: svn://ultimatepp.org/upp/trunk@15589 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2020-12-13 15:56:21 +00:00
parent 4c85d7bf7e
commit cececa665c
5 changed files with 14 additions and 8 deletions

View file

@ -93,7 +93,7 @@ String NoCr(const char *s)
return out;
}
void MakeBuild::CreateHost(Host& host, bool darkmode, bool disable_uhd, const VectorMap<String, String>& add_to_env)
void MakeBuild::CreateHost(Host& host, bool darkmode, bool disable_uhd)
{
SetupDefaultMethod();
VectorMap<String, String> bm = GetMethodVars(method);
@ -125,11 +125,6 @@ void MakeBuild::CreateHost(Host& host, bool darkmode, bool disable_uhd, const Ve
LDUMP(env[i]);
host.environment << env.GetKey(i) << '=' << env[i] << '\0';
}
for(int i = 0; i < add_to_env.GetCount(); i++) {
LDUMP(add_to_env.GetKey(i));
LDUMP(add_to_env[i]);
host.environment << add_to_env.GetKey(i) << '=' << add_to_env[i] << '\0';
}
host.environment.Cat(0);
host.cmdout = &cmdout;
}

View file

@ -67,7 +67,7 @@ public:
bool makefile_svn_revision = true;
void CreateHost(Host& host, bool darkmode = false, bool disable_uhd = false, const VectorMap<String, String>& add_to_env = VectorMap<String, String>());
void CreateHost(Host& host, bool darkmode = false, bool disable_uhd = false);
const TargetMode& GetTargetMode();
Index<String> PackageConfig(const Workspace& wspc, int package, const VectorMap<String, String>& bm,

View file

@ -13,6 +13,16 @@ String Host::GetEnvironment()
return environment;
}
void Host::AddEnvironment(const char *id, const char *value)
{
bool b = *environment;
if(b)
environment.Trim(environment.GetCount() - 1);
environment << id << '=' << value << '\0';
if(b)
environment << '\0';
}
Vector<Host::FileInfo> Host::GetFileInfo(const Vector<String>& path)
{
Vector<FileInfo> fi;

View file

@ -19,6 +19,7 @@ struct Host : LocalProcess {
Host();
String GetEnvironment();
void AddEnvironment(const char *id, const char *value);
Vector<FileInfo> GetFileInfo(const Vector<String>& path);
void ChDir(const String& path);

View file

@ -1,7 +1,7 @@
#include "ide.h"
#define IMAGECLASS UrepoImg
#define IMAGEFILE <urepo/urepo.iml>
#define IMAGEFILE <ide/urepo.iml>
#include <Draw/iml.h>
struct RepoDiff : DiffDlg {