mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-07-11 22:03:01 -06:00
.ide BLITZ for Android works on Android and added support for Android verbose builds.
git-svn-id: svn://ultimatepp.org/upp/trunk@10952 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
575348b33e
commit
1d5cb740f6
7 changed files with 25 additions and 11 deletions
|
|
@ -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;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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 ) {
|
||||
|
|
|
|||
|
|
@ -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(); }
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -90,6 +90,11 @@ void Ide::ConsolePaste()
|
|||
}
|
||||
}
|
||||
|
||||
bool Ide::IsVerbose() const
|
||||
{
|
||||
return console.verbosebuild;
|
||||
}
|
||||
|
||||
void Ide::PutConsole(const char *s)
|
||||
{
|
||||
console << s << "\n";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue