63 lines
2.2 KiB
Python
63 lines
2.2 KiB
Python
#!/usr/bin/python
|
|
import lutinDebug as debug
|
|
import lutinTarget
|
|
import lutinTools
|
|
import os
|
|
import stat
|
|
import lutinHost
|
|
import sys
|
|
|
|
class Target(lutinTarget.Target):
|
|
def __init__(self, typeCompilator, debugMode, generatePackage, sumulator=False):
|
|
# on windows board the basic path is not correct
|
|
# TODO : get external PATH for the minGW path
|
|
# TODO : Set the cyngwin path ...
|
|
if lutinHost.OS == "Windows":
|
|
cross = "c:\\MinGW\\bin\\"
|
|
sys.path.append("c:\\MinGW\\bin" )
|
|
os.environ['PATH'] += ";c:\\MinGW\\bin\\"
|
|
else:
|
|
#cross = "i586-mingw32msvc-"
|
|
cross = "x86_64-w64-mingw32-"
|
|
#cross = "i686-w64-mingw32-"
|
|
|
|
if typeCompilator!="gcc":
|
|
debug.error("Android does not support '" + typeCompilator + "' compilator ... availlable : [gcc]")
|
|
|
|
lutinTarget.Target.__init__(self, "Windows", typeCompilator, debugMode, generatePackage, "", cross)
|
|
|
|
self.folder_bin=""
|
|
self.folder_lib="/lib"
|
|
self.folder_data="/data"
|
|
self.folder_doc="/doc"
|
|
|
|
self.suffix_lib_static='.a'
|
|
self.suffix_lib_dynamic='.dll'
|
|
self.suffix_binary='.exe'
|
|
self.suffix_package=''
|
|
|
|
|
|
def get_staging_folder_data(self, binaryName):
|
|
return self.get_staging_folder(binaryName) + self.folder_data
|
|
|
|
def make_package(self, pkgName, pkgProperties, basePkgPath):
|
|
debug.debug("------------------------------------------------------------------------")
|
|
debug.info("Generate package '" + pkgName + "'")
|
|
debug.debug("------------------------------------------------------------------------")
|
|
debug.warning(" ==> TODO")
|
|
|
|
def install_package(self, pkgName):
|
|
debug.debug("------------------------------------------------------------------------")
|
|
debug.info("Install package '" + pkgName + "'")
|
|
debug.debug("------------------------------------------------------------------------")
|
|
debug.warning(" ==> TODO")
|
|
#sudo dpkg -i $(TARGET_OUT_FINAL)/$(PROJECT_NAME) + self.suffix_package
|
|
|
|
def un_install_package(self, pkgName):
|
|
debug.debug("------------------------------------------------------------------------")
|
|
debug.info("Un-Install package '" + pkgName + "'")
|
|
debug.debug("------------------------------------------------------------------------")
|
|
debug.warning(" ==> TODO")
|
|
#sudo dpkg -r $(TARGET_OUT_FINAL)/$(PROJECT_NAME) + self.suffix_package
|
|
|