[DEV] correction for Android port
This commit is contained in:
parent
422cc3d78d
commit
84ccc7605e
@ -257,14 +257,16 @@ class module:
|
||||
###############################################################################
|
||||
## Commands for running gcc to link a shared library.
|
||||
###############################################################################
|
||||
def Link_to_so(self, file, binary, target, depancy):
|
||||
tmpList = target.GenerateFile(binary, self.name,self.originFolder,file,"lib-shared")
|
||||
def Link_to_so(self, file, binary, target, depancy, libName=""):
|
||||
if libName=="":
|
||||
libName = self.name
|
||||
tmpList = target.GenerateFile(binary, libName,self.originFolder,file,"lib-shared")
|
||||
# check the dependency for this file :
|
||||
if False==dependency.NeedRePackage(tmpList[1], tmpList[0], True) \
|
||||
and False==dependency.NeedRePackage(tmpList[1], depancy.src, False):
|
||||
return tmpList[1]
|
||||
lutinTools.CreateDirectoryOfFile(tmpList[1])
|
||||
debug.printElement("SharedLib", self.name, "==>", tmpList[1])
|
||||
debug.printElement("SharedLib", libName, "==>", tmpList[1])
|
||||
#$(Q)$(TARGET_AR) $(TARGET_GLOBAL_ARFLAGS) $(PRIVATE_ARFLAGS) $@ $(PRIVATE_ALL_OBJECTS)
|
||||
cmdLine=lutinTools.ListToStr([
|
||||
target.xx,
|
||||
@ -278,7 +280,7 @@ class module:
|
||||
target.global_flags_ld])
|
||||
RunCommand(cmdLine)
|
||||
if "release"==target.buildMode:
|
||||
debug.printElement("SharedLib(strip)", self.name, "", "")
|
||||
debug.printElement("SharedLib(strip)", libName, "", "")
|
||||
cmdLine=lutinTools.ListToStr([
|
||||
target.strip,
|
||||
tmpList[1]])
|
||||
@ -388,7 +390,8 @@ class module:
|
||||
target.copyToStaging(self.name)
|
||||
elif self.type=="PACKAGE":
|
||||
if target.name=="Android":
|
||||
resFile = self.Link_to_so(listSubFileNeededToBuild, packageName, target, subHeritage)
|
||||
# special case for android wrapper :
|
||||
resFile = self.Link_to_so(listSubFileNeededToBuild, packageName, target, subHeritage, "libewol")
|
||||
else:
|
||||
resFile = self.Link_to_bin(listSubFileNeededToBuild, packageName, target, subHeritage)
|
||||
target.CleanModuleTree()
|
||||
|
@ -125,16 +125,16 @@ class Target:
|
||||
return list
|
||||
|
||||
def GetFinalFolder(self):
|
||||
return lutinTools.GetRunFolder() + self.folder_out + self.folder_final + "/"
|
||||
return lutinTools.GetRunFolder() + self.folder_out + self.folder_final
|
||||
|
||||
def GetStagingFolder(self, binaryName):
|
||||
return lutinTools.GetRunFolder() + self.folder_out + self.folder_staging + "/" + binaryName + "/"
|
||||
return lutinTools.GetRunFolder() + self.folder_out + self.folder_staging + "/" + binaryName
|
||||
|
||||
def GetStagingFolderData(self, binaryName):
|
||||
return self.GetStagingFolder(binaryName) + self.folder_data + "/" + binaryName + "/"
|
||||
return self.GetStagingFolder(binaryName) + self.folder_data + "/" + binaryName
|
||||
|
||||
def GetBuildFolder(self, moduleName):
|
||||
return lutinTools.GetRunFolder() + self.folder_out + self.folder_build + "/" + moduleName + "/"
|
||||
return lutinTools.GetRunFolder() + self.folder_out + self.folder_build + "/" + moduleName
|
||||
|
||||
def IsModuleBuild(self,module):
|
||||
for mod in self.buildDone:
|
||||
@ -200,9 +200,13 @@ class Target:
|
||||
debug.info("Build all")
|
||||
self.LoadAll()
|
||||
for mod in self.moduleList:
|
||||
if mod.type == "BINARY" \
|
||||
or mod.type == "PACKAGE":
|
||||
mod.Build(self, None)
|
||||
if self.name=="Android":
|
||||
if mod.type == "PACKAGE":
|
||||
mod.Build(self, None)
|
||||
else:
|
||||
if mod.type == "BINARY" \
|
||||
or mod.type == "PACKAGE":
|
||||
mod.Build(self, None)
|
||||
elif name == "clean":
|
||||
debug.info("Clean all")
|
||||
self.LoadAll()
|
||||
|
@ -19,8 +19,8 @@ def RunCommand(cmdLine):
|
||||
class Target(lutinTarget.Target):
|
||||
def __init__(self, typeCompilator, debugMode, generatePackage):
|
||||
|
||||
self.folder_ndk = os.getenv('PROJECT_NDK', lutinTools.GetRunFolder() + "/../android/ndk/")
|
||||
self.folder_sdk = os.getenv('PROJECT_SDK', lutinTools.GetRunFolder() + "/../android/sdk/")
|
||||
self.folder_ndk = os.getenv('PROJECT_NDK', lutinTools.GetRunFolder() + "/../android/ndk")
|
||||
self.folder_sdk = os.getenv('PROJECT_SDK', lutinTools.GetRunFolder() + "/../android/sdk")
|
||||
arch = "ARMv7"
|
||||
cross = self.folder_ndk + "/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi-"
|
||||
|
||||
@ -174,6 +174,7 @@ class Target(lutinTarget.Target):
|
||||
# Doc :
|
||||
# http://asantoso.wordpress.com/2009/09/15/how-to-build-android-application-package-apk-from-the-command-line-using-the-sdk-tools-continuously-integrated-using-cruisecontrol/
|
||||
debug.printElement("pkg", "R.java", "<==", "Resources files")
|
||||
lutinTools.CreateDirectoryOfFile(self.GetStagingFolder(pkgName) + "/src/noFile")
|
||||
cmdLine = self.folder_sdk + "/platform-tools/aapt p -f " \
|
||||
+ "-M " + self.GetStagingFolder(pkgName) + "/AndroidManifest.xml " \
|
||||
+ "-F " + self.GetStagingFolder(pkgName) + "/resources.res " \
|
||||
@ -187,10 +188,10 @@ class Target(lutinTarget.Target):
|
||||
lutinTools.CreateDirectoryOfFile(self.GetStagingFolder(pkgName) + "/build/classes/noFile")
|
||||
debug.printElement("pkg", "*.class", "<==", "*.java")
|
||||
# more information with : -Xlint
|
||||
# + self.file_finalAbstraction + " "\ # this generate ex: out/Android/debug/staging/tethys/src/com/edouarddupin/tethys/edn.java
|
||||
cmdLine = "javac " \
|
||||
+ "-d " + self.GetStagingFolder(pkgName) + "/build/classes " \
|
||||
+ "-classpath " + self.folder_sdk + "/platforms/android-" + str(self.boardId) + "/android.jar " \
|
||||
+ self.file_finalAbstraction + " "\
|
||||
+ self.folder_ewol + "/sources/android/src/org/ewol/EwolAudioTask.java " \
|
||||
+ self.folder_ewol + "/sources/android/src/org/ewol/EwolCallback.java " \
|
||||
+ self.folder_ewol + "/sources/android/src/org/ewol/EwolConstants.java " \
|
||||
|
Loading…
Reference in New Issue
Block a user