mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-17 14:16:10 -06:00
Core can be fully compiled on Windows with Android Builder.
git-svn-id: svn://ultimatepp.org/upp/trunk@10672 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
48cb8c8466
commit
d02a00f19a
6 changed files with 209 additions and 130 deletions
|
|
@ -1,5 +1,9 @@
|
|||
#include "AndroidBuilder.h"
|
||||
|
||||
#define METHOD_NAME "AndroidModuleMakeFileCreator::" + String(__FUNCTION__) + "(): "
|
||||
#define ERROR_METHOD_NAME "[ERROR] " METHOD_NAME
|
||||
#define INFO_METHOD_NAME "[INFO] " METHOD_NAME
|
||||
|
||||
namespace Upp {
|
||||
|
||||
AndroidModuleMakeFileCreator::AndroidModuleMakeFileCreator(const Index<String>& builderConfig)
|
||||
|
|
@ -19,28 +23,6 @@ void AndroidModuleMakeFileCreator::AddInclude(const String& path)
|
|||
makeFile.AddInclude(path);
|
||||
}
|
||||
|
||||
void AndroidModuleMakeFileCreator::AddIncludeWithSubdirs(const String& path)
|
||||
{
|
||||
BiVector<String> dirs { path };
|
||||
while(!dirs.IsEmpty()) {
|
||||
for(FindFile ff(AppendFileName(dirs.Head(), "*")); ff; ff.Next()) {
|
||||
if(ff.IsHidden() || ff.IsSymLink() || !ff.IsFolder()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
String name = ff.GetName();
|
||||
if (name.EndsWith(".tpp")) {
|
||||
continue;
|
||||
}
|
||||
|
||||
dirs.AddTail(ff.GetPath());
|
||||
}
|
||||
|
||||
AddInclude(dirs.Head());
|
||||
dirs.DropHead();
|
||||
}
|
||||
}
|
||||
|
||||
void AndroidModuleMakeFileCreator::AddIncludes(const Array<OptItem>& uses)
|
||||
{
|
||||
for(const OptItem& use : uses) {
|
||||
|
|
@ -78,4 +60,26 @@ void AndroidModuleMakeFileCreator::AddSharedLibraries(const Array<OptItem>& uses
|
|||
}
|
||||
}
|
||||
|
||||
bool AndroidModuleMakeFileCreator::Save(const String& path)
|
||||
{
|
||||
String directory = GetFileDirectory(path);
|
||||
if (!RealizeDirectory(directory)) {
|
||||
LOG(ERROR_METHOD_NAME + "Creating module directory failed \"" + directory + "\".");
|
||||
return false;
|
||||
}
|
||||
|
||||
String data = Create();
|
||||
if (FileExists(path) && LoadFile(path) == data) {
|
||||
LOG(INFO_METHOD_NAME + "Following file \"" + path + "\" content is the same as previous one.");
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!SaveFile(path, Create())) {
|
||||
LOG(ERROR_METHOD_NAME + "Saving module file failed \"" + path + "\".");
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue