mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-07-11 22:03:01 -06:00
ide: Custom build steps DIR now points to package directory, for post-link, pre-link it is main package directory
git-svn-id: svn://ultimatepp.org/upp/trunk@4240 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
55866065e4
commit
be11987bef
4 changed files with 734 additions and 730 deletions
File diff suppressed because it is too large
Load diff
|
|
@ -227,11 +227,12 @@ static void AddPath(VectorMap<String, String>& out, String key, String path)
|
|||
out.Add(key + "_UNIX", UnixPath(path));
|
||||
}
|
||||
|
||||
Vector<String> CppBuilder::CustomStep(const String& pf, const String& package, bool& error)
|
||||
Vector<String> CppBuilder::CustomStep(const String& pf, const String& package_, bool& error)
|
||||
{
|
||||
String path = package.GetCount() ? SourcePath(package, pf) : pf;
|
||||
String package = Nvl(package_, mainpackage);
|
||||
String path = *pf == '.' ? target : SourcePath(package, pf);
|
||||
String file = GetHostPath(path);
|
||||
String ext = ToLower(GetFileExt(file));
|
||||
String ext = ToLower(GetFileExt(pf));
|
||||
for(int i = 0; i < wspc.GetCount(); i++) {
|
||||
const Array< ::CustomStep >& mv = wspc.GetPackage(i).custom;
|
||||
for(int j = 0; j < mv.GetCount(); j++) {
|
||||
|
|
@ -240,7 +241,7 @@ Vector<String> CppBuilder::CustomStep(const String& pf, const String& package, b
|
|||
VectorMap<String, String> mac;
|
||||
AddPath(mac, "PATH", file);
|
||||
AddPath(mac, "RELPATH", pf);
|
||||
AddPath(mac, "DIR", GetFileFolder(file));
|
||||
AddPath(mac, "DIR", GetFileFolder(PackagePath(package)));
|
||||
AddPath(mac, "PACKAGE", package);
|
||||
mac.Add("FILE", GetFileName(file));
|
||||
mac.Add("TITLE", GetFileTitle(file));
|
||||
|
|
@ -256,6 +257,7 @@ Vector<String> CppBuilder::CustomStep(const String& pf, const String& package, b
|
|||
|
||||
mac.Add("INCLUDE", Join(include, ";"));
|
||||
Vector<String> out = Cuprep(m.output, mac, include);
|
||||
DDUMPC(out);
|
||||
bool dirty = out.IsEmpty();
|
||||
for(int i = 0; !dirty && i < out.GetCount(); i++)
|
||||
dirty = (GetFileTime(file) > GetFileTime(out[i]));
|
||||
|
|
|
|||
|
|
@ -377,6 +377,7 @@ struct Builder {
|
|||
String release_link;
|
||||
String version;
|
||||
String script;
|
||||
String mainpackage;
|
||||
bool doall;
|
||||
|
||||
virtual bool BuildPackage(const String& package, Vector<String>& linkfile, String& linkoptions,
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ void Custom::DoMenu(Button& b, Callback1<String> cb, bool cmd) {
|
|||
String sample = SourcePath(pk, samplefile);
|
||||
menu.Add("Input file path (like '" + UnixPath(sample) + "')", callback1(cb, "$(PATH)"));
|
||||
menu.Add("Input file package-relative path (like '" + samplefile + "')", callback1(cb, "$(RELPATH)"));
|
||||
menu.Add("Input file directory (like '" + UnixPath(GetFileFolder(sample)) + "')", callback1(cb, "$(DIR)"));
|
||||
menu.Add("Package directory (like '" + UnixPath(GetFileFolder(sample)) + "')", callback1(cb, "$(DIR)"));
|
||||
menu.Add("Input file name (like '" + GetFileName(sample) + "')", callback1(cb, "$(FILE)"));
|
||||
menu.Add("Input file title (like '" + GetFileTitle(sample) + "')", callback1(cb, "$(TITLE)"));
|
||||
menu.Add("Input file package (like '" + pk + "')", callback1(cb, "$(PACKAGE)"));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue