mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-25 22:03:45 -06:00
Invalid build method error is now more verbose (umk/ide)
git-svn-id: svn://ultimatepp.org/upp/trunk@9833 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
eaa611a529
commit
9bd388c679
6 changed files with 35 additions and 9 deletions
|
|
@ -292,7 +292,7 @@ bool MakeBuild::BuildPackage(const Workspace& wspc, int pkindex, int pknumber, i
|
|||
const Package& pkg = wspc.package[pkindex];
|
||||
VectorMap<String, String> bm = GetMethodVars(method);
|
||||
if(bm.GetCount() == 0) {
|
||||
PutConsole("Invalid build method");
|
||||
PutConsole(GetInvalidBuildMethodError(method));
|
||||
ConsoleShow();
|
||||
return false;
|
||||
}
|
||||
|
|
@ -547,7 +547,7 @@ bool MakeBuild::Build()
|
|||
{
|
||||
VectorMap<String, String> bm = GetMethodVars(method);
|
||||
if(bm.GetCount() == 0) {
|
||||
PutConsole("Invalid build method");
|
||||
PutConsole(GetInvalidBuildMethodError(method));
|
||||
ConsoleShow();
|
||||
return false;
|
||||
}
|
||||
|
|
@ -733,3 +733,8 @@ void MakeBuild::SaveMakeFile(const String& fn, bool exporting)
|
|||
}
|
||||
EndBuilding(true);
|
||||
}
|
||||
|
||||
String MakeBuild::GetInvalidBuildMethodError(const String& method)
|
||||
{
|
||||
return "Invalid build method " + method + " (" + GetMethodPath(method) + ").";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,7 +27,8 @@ int CharFilterSlash(int c);
|
|||
String GetDefaultMethod();
|
||||
VectorMap<String, String> GetMethodVars(const String& method);
|
||||
|
||||
struct MakeBuild {
|
||||
class MakeBuild {
|
||||
public:
|
||||
virtual void ConsoleShow() = 0; // ShowConsole(); console.Sync();
|
||||
virtual void ConsoleSync() = 0; // console.Sync()
|
||||
virtual void ConsoleClear() = 0;
|
||||
|
|
@ -89,6 +90,9 @@ struct MakeBuild {
|
|||
void SaveMakeFile(const String& fn, bool exporting);
|
||||
|
||||
MakeBuild();
|
||||
|
||||
private:
|
||||
static String GetInvalidBuildMethodError(const String& method);
|
||||
};
|
||||
|
||||
extern bool output_per_assembly;
|
||||
|
|
|
|||
|
|
@ -115,10 +115,14 @@ String IdeContext::GetDefaultMethod()
|
|||
VectorMap<String, String> IdeContext::GetMethodVars(const String& method)
|
||||
{
|
||||
VectorMap<String, String> map;
|
||||
LoadVarFile(ConfigFile((String)~method + ".bm"), map);
|
||||
LoadVarFile(ConfigFile(GetMethodName(method)), map);
|
||||
return map;
|
||||
}
|
||||
|
||||
String IdeContext::GetMethodName(const String& method)
|
||||
{
|
||||
return (String)~method + ".bm";
|
||||
}
|
||||
|
||||
String GetDefaultMethod()
|
||||
{
|
||||
|
|
@ -130,6 +134,11 @@ VectorMap<String, String> GetMethodVars(const String& method)
|
|||
return the_ide ? the_ide->GetMethodVars(method) : VectorMap<String, String>();
|
||||
}
|
||||
|
||||
String GetMethodPath(const String& method)
|
||||
{
|
||||
return the_ide ? the_ide->GetMethodName(method) : "";
|
||||
}
|
||||
|
||||
bool IdeIsBuilding()
|
||||
{
|
||||
return the_ide && the_ide->IdeIsBuilding();
|
||||
|
|
|
|||
|
|
@ -83,8 +83,9 @@ public:
|
|||
virtual String IdeGetNestFolder() = 0;
|
||||
virtual String IdeGetIncludePath() = 0;
|
||||
|
||||
virtual String GetDefaultMethod();
|
||||
virtual String GetDefaultMethod();
|
||||
virtual VectorMap<String, String> GetMethodVars(const String& method);
|
||||
virtual String GetMethodName(const String& method);
|
||||
|
||||
virtual bool IsPersistentFindReplace() = 0;
|
||||
|
||||
|
|
@ -118,6 +119,7 @@ void IdeGotoCodeRef(String s);
|
|||
|
||||
String GetDefaultMethod();
|
||||
VectorMap<String, String> GetMethodVars(const String& method);
|
||||
String GetMethodPath(const String& method);
|
||||
|
||||
bool IdeIsDebug();
|
||||
void IdeEndDebug();
|
||||
|
|
|
|||
|
|
@ -27,10 +27,15 @@ String Ide::GetDefaultMethod()
|
|||
VectorMap<String, String> Ide::GetMethodVars(const String& method)
|
||||
{
|
||||
VectorMap<String, String> map;
|
||||
LoadVarFile(GetBuildMethodPath(method), map);
|
||||
LoadVarFile(GetMethodName(method), map);
|
||||
return map;
|
||||
}
|
||||
|
||||
String Ide::GetMethodName(const String& method)
|
||||
{
|
||||
return GetBuildMethodPath(method);
|
||||
}
|
||||
|
||||
void Puts(const char *s)
|
||||
{
|
||||
if(!SilentMode)
|
||||
|
|
@ -57,9 +62,9 @@ String GetAndroidSDKPath()
|
|||
return String();
|
||||
}
|
||||
|
||||
#ifdef flagMAIN
|
||||
#ifdef flagMAIN
|
||||
|
||||
CONSOLE_APP_MAIN
|
||||
CONSOLE_APP_MAIN
|
||||
{
|
||||
#ifdef PLATFORM_POSIX
|
||||
setlinebuf(stdout);
|
||||
|
|
|
|||
|
|
@ -154,8 +154,9 @@ struct Ide : public IdeContext, public MakeBuild {
|
|||
virtual void SetErrorEditor();
|
||||
virtual String GetMain();
|
||||
|
||||
virtual String GetDefaultMethod();
|
||||
virtual String GetDefaultMethod();
|
||||
virtual VectorMap<String, String> GetMethodVars(const String& method);
|
||||
virtual String GetMethodName(const String& method);
|
||||
|
||||
virtual bool IsPersistentFindReplace() { return false; }
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue