diff --git a/uppsrc/ide/Android/Executables.h b/uppsrc/ide/Android/Executables.h index b1ca7e489..8dc5ce8bc 100644 --- a/uppsrc/ide/Android/Executables.h +++ b/uppsrc/ide/Android/Executables.h @@ -58,10 +58,11 @@ private: class NDKBuild { public: NDKBuild(const String& path); - virtual ~NDKBuild(); + virtual ~NDKBuild() {} void SetJobs(int jobs) { this->jobs = jobs; } void SetWorkingDir(const String& workingDir) { this->workingDir = workingDir; } + void EnableVerbose(bool verbose = true) { this->verbose = verbose; } String MakeCmd() const; @@ -69,6 +70,7 @@ private: String path; String workingDir; int jobs; + bool verbose; }; } diff --git a/uppsrc/ide/Android/NDKBuild.cpp b/uppsrc/ide/Android/NDKBuild.cpp index ec2be943d..5093868f8 100644 --- a/uppsrc/ide/Android/NDKBuild.cpp +++ b/uppsrc/ide/Android/NDKBuild.cpp @@ -3,19 +3,17 @@ namespace Upp { NDKBuild::NDKBuild(const String& path) + : path(path) + , jobs(jobs) + , verbose(false) { - this->path = path; - this->jobs = 0; -} - -NDKBuild::~NDKBuild() -{ - } String NDKBuild::MakeCmd() const { String cmd = NormalizeExePath(path); + if(verbose) + cmd << " V=1 "; if(!workingDir.IsEmpty()) cmd << " -C " << workingDir; if(jobs > 0) diff --git a/uppsrc/ide/Builders/AndroidBuilder.cpp b/uppsrc/ide/Builders/AndroidBuilder.cpp index f03b9d645..d98eeadc8 100644 --- a/uppsrc/ide/Builders/AndroidBuilder.cpp +++ b/uppsrc/ide/Builders/AndroidBuilder.cpp @@ -103,15 +103,17 @@ bool AndroidBuilder::BuildPackage( } else if(BuilderUtils::IsCppOrCFile(filePath)) { + String normailzedFilePath = NormalizePathSeparator(filePath); + nativeSourcesOptions.Add(globalOptions); if(pkg[i].noblitz) { if (isBlitz) { - noBlitzNativeSourceFiles.Add(filePath); + noBlitzNativeSourceFiles.Add(normailzedFilePath); continue; } } - nativeSources.Add(filePath); + nativeSources.Add(normailzedFilePath); } else if(BuilderUtils::IsXmlFile(filePath)) { @@ -172,7 +174,7 @@ bool AndroidBuilder::BuildPackage( LOG(ERROR_METHOD_NAME + "Blitz was enable, but no blitz file generated."); } else { - nativeSources.Add(blitz.path); + nativeSources.Add(package + DIR_SEPS + GetFileName(blitz.path)); } } @@ -239,6 +241,9 @@ bool AndroidBuilder::Link( GenerateMakeFile(); NDKBuild ndkBuild(ndk.GetNdkBuildPath()); + if(IsVerbose()) { + ndkBuild.EnableVerbose(); + } ndkBuild.SetWorkingDir(project->GetDir()); ndkBuild.SetJobs(GetHydraThreads()); if(host->Execute(ndkBuild.MakeCmd()) != 0 ) { diff --git a/uppsrc/ide/Core/Core.cpp b/uppsrc/ide/Core/Core.cpp index a0bc60873..dce7983f2 100644 --- a/uppsrc/ide/Core/Core.cpp +++ b/uppsrc/ide/Core/Core.cpp @@ -89,6 +89,7 @@ static IdeContext *the_ide; IdeContext *TheIde() { return the_ide; } void TheIde(IdeContext *context) { the_ide = context; } +bool IsVerbose() { return the_ide ? the_ide->IsVerbose() : false; } void PutConsole(const char *s) { if(the_ide) the_ide->PutConsole(s); } void PutVerbose(const char *s) { if(the_ide) the_ide->PutVerbose(s); } void PutLinking() { if(the_ide) the_ide->PutLinking(); } diff --git a/uppsrc/ide/Core/Core.h b/uppsrc/ide/Core/Core.h index 1b760a1b2..6b5c2fe95 100644 --- a/uppsrc/ide/Core/Core.h +++ b/uppsrc/ide/Core/Core.h @@ -37,6 +37,7 @@ class Image; class IdeContext { public: + virtual bool IsVerbose() const = 0; virtual void PutConsole(const char *s) = 0; virtual void PutVerbose(const char *s) = 0; virtual void PutLinking() = 0; @@ -95,6 +96,7 @@ public: IdeContext *TheIde(); void TheIde(IdeContext *context); +bool IsVerbose(); void PutConsole(const char *s); void PutVerbose(const char *s); void PutLinking(); diff --git a/uppsrc/ide/ide.h b/uppsrc/ide/ide.h index 491bcef80..7e4c24bd1 100644 --- a/uppsrc/ide/ide.h +++ b/uppsrc/ide/ide.h @@ -346,6 +346,7 @@ public: virtual void Activate(); virtual void Layout(); + virtual bool IsVerbose() const; virtual void PutConsole(const char *s); virtual void PutVerbose(const char *s); virtual void PutLinking(); diff --git a/uppsrc/ide/idewin.cpp b/uppsrc/ide/idewin.cpp index 8be7a0584..1c3321778 100644 --- a/uppsrc/ide/idewin.cpp +++ b/uppsrc/ide/idewin.cpp @@ -90,6 +90,11 @@ void Ide::ConsolePaste() } } +bool Ide::IsVerbose() const +{ + return console.verbosebuild; +} + void Ide::PutConsole(const char *s) { console << s << "\n";