diff --git a/lutin/module.py b/lutin/module.py index b07d072..5441ff6 100644 --- a/lutin/module.py +++ b/lutin/module.py @@ -753,7 +753,7 @@ class Module: or self._type == 'BINARY_SHARED' \ or self._type == 'BINARY_STAND_ALONE': shared_mode = False - if target.name == "Android": + if "Android" in target.get_type(): debug.warning("Android mode ...") # special case for android ... for elem in self._sub_heritage_list.src['src']: @@ -809,7 +809,7 @@ class Module: except ValueError: debug.error(" UN-SUPPORTED link format: '.bin'") elif self._type == "PACKAGE": - if target.name == "Android": + if "Android" in target.get_type(): # special case for android wrapper: try: tmp_builder = builder.get_builder_with_output("so"); @@ -879,7 +879,7 @@ class Module: or self._type == 'PACKAGE': if target.end_generate_package == True: # generate the package with his properties ... - if target.name=="Android": + if "Android" in target.get_type(): self._sub_heritage_list.add_heritage(self._local_heritage) target.make_package(self._name, self._package_prop, os.path.join(self._origin_path, ".."), self._sub_heritage_list) else: @@ -1260,13 +1260,27 @@ class Module: self._print_list('export path "' + str(element) + '" ' + str(len(value)), value) ## + ## @brief Get packaging property variable + ## @param[in] self (handle) Class handle + ## @param[in] name (string) Variable to get: "COMPAGNY_TYPE", "COMPAGNY_NAME", "ICON", "MAINTAINER", "SECTION", "PRIORITY", "DESCRIPTION", "VERSION", "VERSION_CODE", "NAME", "ANDROID_MANIFEST", "ANDROID_JAVA_FILES", "RIGHT", "ANDROID_RESOURCES", "ANDROID_APPL_TYPE", "ADMOD_ID", "APPLE_APPLICATION_IOS_ID", "LICENSE", "ANDROID_SIGN", "ADMOD_POSITION" + ## @return (string) Value assiciated at the package + ## + def get_pkg(self, name): + if name in self._package_prop: + return copy.deepcopy(self._package_prop[name]) + return None + + def pkg_set(self, variable, value): + debug.warning("[" + self._name + "] DEPRECATED : pkg_set(...) replaced by set_pkg(...)") + self.set_pkg(variable, value) + ## ## @brief Set packaging variables ## @param[in] self (handle) Class handle ## @param[in] variable (string) Variable to set: "COMPAGNY_TYPE", "COMPAGNY_NAME", "ICON", "MAINTAINER", "SECTION", "PRIORITY", "DESCRIPTION", "VERSION", "VERSION_CODE", "NAME", "ANDROID_MANIFEST", "ANDROID_JAVA_FILES", "RIGHT", "ANDROID_RESOURCES", "ANDROID_APPL_TYPE", "ADMOD_ID", "APPLE_APPLICATION_IOS_ID", "LICENSE", "ANDROID_SIGN", "ADMOD_POSITION" ## @param[in] value (string) Value assiciated at the package ## @return None ## - def pkg_set(self, variable, value): + def set_pkg(self, variable, value): if "COMPAGNY_TYPE" == variable: # com : Commercial # net : Network?? @@ -1344,22 +1358,25 @@ class Module: ## ## @brief set a package config only if the config has not be change ## @param[in] self (handle) Class handle - ## @param[in] variable (string) Variable to set: show @ref pkg_set + ## @param[in] variable (string) Variable to set: show @ref set_pkg ## @param[in] value (string) Value assiciated at the package ## @return None ## def _pkg_set_if_default(self, variable, value): if self._package_prop_default[variable] == True: - self.pkg_set(variable, value) + self.set_pkg(variable, value) + def pkg_add(self, variable, value): + debug.warning("[" + self._name + "] DEPRECATED : pkg_add(...) replaced by add_pkg(...)") + self.add_pkg(variable, value) ## ## @brief add an element in tha package property ## @param[in] self (handle) Class handle - ## @param[in] variable (string) Variable to set: show @ref pkg_set + ## @param[in] variable (string) Variable to set: show @ref set_pkg ## @param[in] value (string) Value assiciated at the package ## @return None ## - def pkg_add(self, variable, value): + def add_pkg(self, variable, value): if variable in self._package_prop: self._package_prop[variable].append(value) else: diff --git a/lutin/system.py b/lutin/system.py index c5d0bd6..2c7ea7a 100644 --- a/lutin/system.py +++ b/lutin/system.py @@ -37,6 +37,41 @@ class System: self._action_on_state={} self._headers=[] self._version=None + + ## + ## @brief Set the help of this system Module + ## @param[in] self (handle) Class handle + ## @param[in] help (string) Help for the user + ## @return None + ## + def set_help(self, help): + self._help = help; + + ## + ## @brief Get the help of this system Module + ## @param[in] self (handle) Class handle + ## @return (string) Help for the user + ## + def get_help(self): + return self._help; + + ## + ## @brief Set validity state of the system Module + ## @param[in] self (handle) Class handle + ## @param[in] state (bool) New valididty state of the system module + ## @return None + ## + def set_valid(self, state): + self._valid = state + + ## + ## @brief Get validity state of the system Module + ## @param[in] self (handle) Class handle + ## @return (bool) New valididty state of the system module + ## + def get_valid(self): + return self._valid + ## ## @brief Add source element ## @param[in] self (handle) Class handle @@ -136,7 +171,7 @@ class System: clip_path=elem["clip"], recursive=elem["recursive"]) if self._version != None: - module.pkg_set("VERSION", self._version); + module.set_pkg("VERSION", self._version); @@ -236,7 +271,7 @@ def exist(lib_name, target_name, target) : debug.verbose("SYSTEM: request: " + str(data["name"])) if "System" in dir(the_system): data["system"] = the_system.System(target) - data["exist"] = data["system"].valid + data["exist"] = data["system"].get_valid() else: debug.warning("Not find: '" + data["name"] + "' ==> get exception") return data["exist"] diff --git a/lutin/target.py b/lutin/target.py index 9c96f83..6da20c6 100644 --- a/lutin/target.py +++ b/lutin/target.py @@ -32,16 +32,12 @@ class Target: ## @param[in] arch (string) specific parameter for gcc -arch element ## def __init__(self, name, config, arch): + ## configuration of the build self.config = config - #processor type selection (auto/arm/ppc/x86) - self.select_arch = config["arch"]; # TODO : Remove THIS ... - #bus size selection (auto/32/64) - self.select_bus = config["bus-size"]; # TODO : Remove THIS ... - - if config["bus-size"] == "auto": + if self.config["bus-size"] == "auto": debug.error("system error ==> must generate the default 'bus-size' config") - if config["arch"] == "auto": + if self.config["arch"] == "auto": debug.error("system error ==> must generate the default 'bus-size' config") debug.debug("config=" + str(config)) @@ -50,13 +46,12 @@ class Target: else: self.arch = "" - # todo : remove this : - self.sumulator = config["simulation"] - self.name = name - self.config_based_on = name self.end_generate_package = config["generate-package"] + # todo : remove this : + self._name = name + self._config_based_on = [name] debug.info("================================="); - debug.info("== Target='" + self.name + "' " + config["bus-size"] + " bits for arch '" + config["arch"] + "'"); + debug.info("== Target='" + self._name + "' " + self.config["bus-size"] + " bits for arch '" + self.config["arch"] + "'"); debug.info("================================="); self.set_cross_base() @@ -70,8 +65,6 @@ class Target: self.global_libs_ld=[] self.global_libs_ld_shared=[] - self.global_sysroot="" - self.suffix_cmd_line='.cmd' self.suffix_warning='.warning' self.suffix_dependence='.d' @@ -83,19 +76,19 @@ class Target: self.suffix_package='.deb' self.path_generate_code="/generate_header" - self.path_arch="/" + self.name + self.path_arch = "/" + self._name self.add_flag("c", [ - '-D__TARGET_OS__' + self.name, - '-D__TARGET_ARCH__' + self.select_arch, - '-D__TARGET_ADDR__' + self.select_bus + 'BITS', + '-D__TARGET_OS__' + self._name, + '-D__TARGET_ARCH__' + self.config["arch"], + '-D__TARGET_ADDR__' + self.config["bus-size"] + 'BITS', '-D_REENTRANT' ]) self.add_flag("c", "-nodefaultlibs") self.add_flag("c++", "-nostdlib") self.add_flag("ar", 'rcs') - if self.name == "Windows": + if self._name == "Windows": self.add_flag("c++", [ '-static-libgcc', '-static-libstdc++' @@ -179,19 +172,40 @@ class Target: ## @return ([string,...]) The current target name and other sub name type (ubuntu ...) ## def get_type(self): - out = [self.name] - if self.name != self.config_based_on: - out.append(self.config_based_on) - return out + return self._config_based_on + + ## + ## @brief Add a type that the model is based on + ## @param[in] self (handle) Class handle + ## @param[in] name (string) Name of that the element is based on ... + ## + def add_type(self, name): + self._config_based_on.append(name) + + ## + ## @brief Get the name of the target: Linux, Windows, ... + ## @param[in] self (handle) Class handle + ## @return (string) Name of the target + ## + def get_name(self): + return self._name ## ## @brief Get build mode of the target: ["debug", "release"] ## @param[in] self (handle) Class handle - ## @return The current target build mode. + ## @return (string) The current target build mode. ## def get_mode(self): return self.config["mode"] + ## + ## @brief Get build for a simulator (Ios and Android for example) + ## @param[in] self (handle) Class handle + ## @return (bool) sumulation requested + ## + def get_simulation(self): + return self.config["simulation"] + ## ## @brief Add global target flags ## @param[in] self (handle) Class handle @@ -208,7 +222,7 @@ class Target: ## @return None ## def _update_path_tree(self): - self.path_out = os.path.join("out", self.name + "_" + self.config["arch"] + "_" + self.config["bus-size"], self.config["mode"]) + self.path_out = os.path.join("out", self._name + "_" + self.config["arch"] + "_" + self.config["bus-size"], self.config["mode"]) self.path_final = os.path.join("final", self.config["compilator"]) self.path_staging = os.path.join("staging", self.config["compilator"]) self.path_build = os.path.join("build", self.config["compilator"]) @@ -561,9 +575,9 @@ class Target: module.load_module(self, name) return True; # need to import the module (or the system module ...) - exist = system.exist(name, self.name, self) + exist = system.exist(name, self._name, self) if exist == True: - system.load(self, name, self.name) + system.load(self, name, self._name) return True; # we did not find the module ... return False; @@ -610,12 +624,12 @@ class Target: debug.info("build all") self.load_all() for mod in self.module_list: - if self.name=="Android": - if mod.type == "PACKAGE": + if self._name=="Android": + if mod.get_type() == "PACKAGE": mod.build(self, None) else: - if mod.type == "BINARY" \ - or mod.type == "PACKAGE": + if mod.get_type() == "BINARY" \ + or mod.get_type() == "PACKAGE": mod.build(self, None) elif name == "clean": debug.info("clean all") diff --git a/lutin/z_builder/lutinBuilder_binary.py b/lutin/z_builder/lutinBuilder_binary.py index 6fba65d..80c6759 100644 --- a/lutin/z_builder/lutinBuilder_binary.py +++ b/lutin/z_builder/lutinBuilder_binary.py @@ -100,10 +100,6 @@ def link(file, binary, target, depancy, flags, name, basic_path, static = False) cmd.append(target.sysroot) except: pass - try: - cmd.append(target.global_sysroot) - except: - pass try: cmd.append(["-o", file_dst]) except: diff --git a/lutin/z_builder/lutinBuilder_libraryDynamic.py b/lutin/z_builder/lutinBuilder_libraryDynamic.py index ebef104..3d7ed4b 100644 --- a/lutin/z_builder/lutinBuilder_libraryDynamic.py +++ b/lutin/z_builder/lutinBuilder_libraryDynamic.py @@ -97,7 +97,7 @@ def link(file, binary, target, depancy, flags, name, basic_path, static=False): cmd.append(["-o", file_dst]) try: - cmd.append(target.global_sysroot) + cmd.append(target.sysroot) except: pass try: diff --git a/lutin/z_system/lutinSystem_Android_ADMOD.py b/lutin/z_system/lutinSystem_Android_ADMOD.py index 1cc25a4..f1aeafd 100644 --- a/lutin/z_system/lutinSystem_Android_ADMOD.py +++ b/lutin/z_system/lutinSystem_Android_ADMOD.py @@ -18,9 +18,9 @@ class System(system.System): def __init__(self, target): system.System.__init__(self) # create some HELP: - self.help="ADMOD: Android SDK ad-mod interface (auto-create interface for admod)\n" + self.set_help("ADMOD: Android SDK ad-mod interface (auto-create interface for admod)\n") # todo : Check if present ... - self.valid = True + self.set_valid(True) # todo : create a searcher of the presence of the library: self.add_sources(target.path_sdk + "/extras/google/google_play_services/libproject/google-play-services_lib/libs/google-play-services.jar") self.add_action("PACKAGE", 10, "admod-auto-wrapper", tool_generate_main_java_class) diff --git a/lutin/z_system/lutinSystem_Android_SDK.py b/lutin/z_system/lutinSystem_Android_SDK.py index 715c328..ee043b2 100644 --- a/lutin/z_system/lutinSystem_Android_SDK.py +++ b/lutin/z_system/lutinSystem_Android_SDK.py @@ -18,11 +18,11 @@ class System(system.System): def __init__(self, target): system.System.__init__(self) # create some HELP: - self.help="SDK: Android SDK basic interface java\n" + self.set_help("SDK: Android SDK basic interface java") # jar file: jar_file_path=os.path.join(target.path_sdk, "platforms", "android-" + str(target.board_id), "android.jar") # TODO : Check if the android sdk android.jar is present ... - self.valid = True + self.set_valid(True) # todo : create a searcher of the presence of the library: self.add_sources(jar_file_path) self.add_flag("link-lib", "dl") diff --git a/lutin/z_system/lutinSystem_Android_c.py b/lutin/z_system/lutinSystem_Android_c.py index 39250e0..0118adc 100644 --- a/lutin/z_system/lutinSystem_Android_c.py +++ b/lutin/z_system/lutinSystem_Android_c.py @@ -18,6 +18,6 @@ class System(system.System): def __init__(self, target): system.System.__init__(self) # create some HELP: - self.help = "C: Generic C library" - self.valid = True + self.set_help("C: Generic C library") + self.set_valid(True) diff --git a/lutin/z_system/lutinSystem_Android_cxx.py b/lutin/z_system/lutinSystem_Android_cxx.py index 766d2dd..3b2ab39 100644 --- a/lutin/z_system/lutinSystem_Android_cxx.py +++ b/lutin/z_system/lutinSystem_Android_cxx.py @@ -18,8 +18,8 @@ class System(system.System): def __init__(self, target): system.System.__init__(self) # create some HELP: - self.help = "CXX: Generic C++ library" - self.valid = True + self.set_help("CXX: Generic C++ library") + self.set_valid(True) if target.config["compilator"] == "clang": if target.board_id < 21: debug.error("Clang work only with the board wersion >= 21 : android 5.x.x") diff --git a/lutin/z_system/lutinSystem_Android_m.py b/lutin/z_system/lutinSystem_Android_m.py index 41b3c96..b2894b9 100644 --- a/lutin/z_system/lutinSystem_Android_m.py +++ b/lutin/z_system/lutinSystem_Android_m.py @@ -18,9 +18,9 @@ class System(system.System): def __init__(self, target): system.System.__init__(self) # create some HELP: - self.help="M : m library \n base of std libs (availlagle in GNU C lib and bionic" + self.set_help("M : m library \n base of std libs (availlagle in GNU C lib and bionic") # No check ==> on the basic std libs: - self.valid = True + self.set_valid(True) # todo : create a searcher of the presence of the library: self.add_flag("link-lib", "m") diff --git a/lutin/z_system/lutinSystem_Android_opengl.py b/lutin/z_system/lutinSystem_Android_opengl.py index 13d8c23..f2cb407 100644 --- a/lutin/z_system/lutinSystem_Android_opengl.py +++ b/lutin/z_system/lutinSystem_Android_opengl.py @@ -18,8 +18,8 @@ class System(system.System): def __init__(self, target): system.System.__init__(self) # create some HELP: - self.help = "OpenGL: Generic graphic library" - self.valid = True + self.set_help("OpenGL: Generic graphic library") + self.set_valid(True) # no check needed ==> just add this: self.add_depend([ 'c', diff --git a/lutin/z_system/lutinSystem_Android_pthread.py b/lutin/z_system/lutinSystem_Android_pthread.py index ea96219..15d15e7 100644 --- a/lutin/z_system/lutinSystem_Android_pthread.py +++ b/lutin/z_system/lutinSystem_Android_pthread.py @@ -18,14 +18,14 @@ class System(system.System): def __init__(self, target): system.System.__init__(self) # create some HELP: - self.help="pthread : Generic multithreading system\n Can be install with the package:\n - pthread-dev" + self.set_help("pthread : Generic multithreading system\n Can be install with the package:\n - pthread-dev") # check if the library exist: """ if not os.path.isfile("/usr/include/pthread.h"): # we did not find the library reqiested (just return) (automaticly set at false) return; """ - self.valid = True + self.set_valid(True) # todo : create a searcher of the presence of the library: #self.add_flag("link-lib", "pthread") self.add_depend([ diff --git a/lutin/z_system/lutinSystem_Android_z.py b/lutin/z_system/lutinSystem_Android_z.py index 91511c9..79cd581 100644 --- a/lutin/z_system/lutinSystem_Android_z.py +++ b/lutin/z_system/lutinSystem_Android_z.py @@ -17,12 +17,12 @@ class System(system.System): def __init__(self, target): system.System.__init__(self) # create some HELP: - self.help="Z : z library \n Can be install with the package:\n - zlib1g-dev" + self.set_help("Z : z library \n Can be install with the package:\n - zlib1g-dev") # check if the library exist: if not os.path.isfile("/usr/include/zlib.h"): # we did not find the library reqiested (just return) (automaticly set at false) return; - self.valid = True + self.set_valid(True) # todo : create a searcher of the presence of the library: self.add_flag("link-lib", "z") diff --git a/lutin/z_system/lutinSystem_IOs_CoreAudio.py b/lutin/z_system/lutinSystem_IOs_CoreAudio.py index 27e110b..433cfeb 100644 --- a/lutin/z_system/lutinSystem_IOs_CoreAudio.py +++ b/lutin/z_system/lutinSystem_IOs_CoreAudio.py @@ -18,8 +18,8 @@ class System(system.System): def __init__(self, target): system.System.__init__(self) # create some HELP: - self.help="CoreAudio : Ios interface for audio (all time present, just system interface)" - self.valid = True + self.set_help("CoreAudio : Ios interface for audio (all time present, just system interface)") + self.set_valid(True) # todo : create a searcher of the presence of the library: self.add_flag("link", "-framework CoreAudio") self.add_flag("link", "-framework AudioToolbox") diff --git a/lutin/z_system/lutinSystem_IOs_cxx.py b/lutin/z_system/lutinSystem_IOs_cxx.py index 6e75ecb..bac4c00 100644 --- a/lutin/z_system/lutinSystem_IOs_cxx.py +++ b/lutin/z_system/lutinSystem_IOs_cxx.py @@ -18,8 +18,8 @@ class System(system.System): def __init__(self, target): system.System.__init__(self) # create some HELP: - self.help = "CXX: Generic C++ library" - self.valid = True + self.set_help("CXX: Generic C++ library") + self.set_valid(True) # no check needed ==> just add this: self.add_flag("c++", "-D__STDCPP_LLVM__") self.add_flag("c++-remove", "-nostdlib") diff --git a/lutin/z_system/lutinSystem_IOs_m.py b/lutin/z_system/lutinSystem_IOs_m.py index 41b3c96..b2894b9 100644 --- a/lutin/z_system/lutinSystem_IOs_m.py +++ b/lutin/z_system/lutinSystem_IOs_m.py @@ -18,9 +18,9 @@ class System(system.System): def __init__(self, target): system.System.__init__(self) # create some HELP: - self.help="M : m library \n base of std libs (availlagle in GNU C lib and bionic" + self.set_help("M : m library \n base of std libs (availlagle in GNU C lib and bionic") # No check ==> on the basic std libs: - self.valid = True + self.set_valid(True) # todo : create a searcher of the presence of the library: self.add_flag("link-lib", "m") diff --git a/lutin/z_system/lutinSystem_Linux_X11.py b/lutin/z_system/lutinSystem_Linux_X11.py index 899144a..c623d87 100644 --- a/lutin/z_system/lutinSystem_Linux_X11.py +++ b/lutin/z_system/lutinSystem_Linux_X11.py @@ -18,8 +18,8 @@ class System(system.System): def __init__(self, target): system.System.__init__(self) # create some HELP: - self.help = "X11: Basic interface of Linux Graphic interface" - self.valid = True + self.set_help("X11: Basic interface of Linux Graphic interface") + self.set_valid(True) # no check needed ==> just add this: self.add_depend(['c']) self.add_flag('link-lib', 'X11') diff --git a/lutin/z_system/lutinSystem_Linux_alsa.py b/lutin/z_system/lutinSystem_Linux_alsa.py index 738bfc8..27b829e 100644 --- a/lutin/z_system/lutinSystem_Linux_alsa.py +++ b/lutin/z_system/lutinSystem_Linux_alsa.py @@ -18,13 +18,13 @@ class System(system.System): def __init__(self, target): system.System.__init__(self) # create some HELP: - self.help="ALSA : Advanced Linux Sound Architecture\n Can be install with the package:\n - libasound2-dev" + self.set_help("ALSA : Advanced Linux Sound Architecture\n Can be install with the package:\n - libasound2-dev") # check if the library exist: if not os.path.isfile("/usr/include/alsa/asoundlib.h") \ and not os.path.isfile("/usr/include/dssi/alsa/asoundlib.h"): # we did not find the library reqiested (just return) (automaticly set at false) return; - self.valid = True + self.set_valid(True) if env.get_isolate_system() == False: self.add_flag("link-lib", "asound") else: diff --git a/lutin/z_system/lutinSystem_Linux_arpa.py b/lutin/z_system/lutinSystem_Linux_arpa.py index 22915f0..e4f84ce 100644 --- a/lutin/z_system/lutinSystem_Linux_arpa.py +++ b/lutin/z_system/lutinSystem_Linux_arpa.py @@ -18,13 +18,13 @@ class System(system.System): def __init__(self, target): system.System.__init__(self) # create some HELP: - self.help="rpc : generic RPC library (developed by oracle)" + self.set_help("rpc : generic RPC library (developed by oracle)") # check if the library exist: if not os.path.isfile("/usr/include/arpa/ftp.h"): # we did not find the library reqiested (just return) (automaticly set at false) return; # No check ==> on the basic std libs: - self.valid = True + self.set_valid(True) if env.get_isolate_system() == True: #self.add_flag("link-lib", "xns") self.add_header_file([ diff --git a/lutin/z_system/lutinSystem_Linux_boost.py b/lutin/z_system/lutinSystem_Linux_boost.py index 54159db..4c8a636 100644 --- a/lutin/z_system/lutinSystem_Linux_boost.py +++ b/lutin/z_system/lutinSystem_Linux_boost.py @@ -18,12 +18,12 @@ class System(system.System): def __init__(self, target): system.System.__init__(self) # create some HELP: - self.help="BOOST : Boost interface (need when we have not all c++ feature\n Can be install with the package:\n - libboost-all-dev" + self.set_help("BOOST : Boost interface (need when we have not all c++ feature\n Can be install with the package:\n - libboost-all-dev") # check if the library exist: if not os.path.isfile("/usr/include/boost/chrono.hpp"): # we did not find the library reqiested (just return) (automaticly set at false) return; - self.valid = True + self.set_valid(True) if env.get_isolate_system() == False: # todo : create a searcher of the presence of the library: self.add_flag("link-lib", [ diff --git a/lutin/z_system/lutinSystem_Linux_c.py b/lutin/z_system/lutinSystem_Linux_c.py index 2ebe916..d19f159 100644 --- a/lutin/z_system/lutinSystem_Linux_c.py +++ b/lutin/z_system/lutinSystem_Linux_c.py @@ -18,8 +18,8 @@ class System(system.System): def __init__(self, target): system.System.__init__(self) # create some HELP: - self.help = "C: Generic C library" - self.valid = True + self.set_help("C: Generic C library") + self.set_valid(True) if env.get_isolate_system() == False: # We must have it ... all time pass diff --git a/lutin/z_system/lutinSystem_Linux_cxx.py b/lutin/z_system/lutinSystem_Linux_cxx.py index 89c57c9..e109a9d 100644 --- a/lutin/z_system/lutinSystem_Linux_cxx.py +++ b/lutin/z_system/lutinSystem_Linux_cxx.py @@ -19,8 +19,8 @@ class System(system.System): def __init__(self, target): system.System.__init__(self) # create some HELP: - self.help = "CXX: Generic C++ library" - self.valid = True + self.set_help("CXX: Generic C++ library") + self.set_valid(True) # no check needed ==> just add this: self.add_depend([ 'c', diff --git a/lutin/z_system/lutinSystem_Linux_jack.py b/lutin/z_system/lutinSystem_Linux_jack.py index e31dde6..b870140 100644 --- a/lutin/z_system/lutinSystem_Linux_jack.py +++ b/lutin/z_system/lutinSystem_Linux_jack.py @@ -18,12 +18,12 @@ class System(system.System): def __init__(self, target): system.System.__init__(self) # create some HELP: - self.help="JACK : Jack Low-Latency Audio Server\n Can be install with the package:\n - libjack-jackd2-dev (new)\n - libjack-dev (old)" + self.set_help("JACK : Jack Low-Latency Audio Server\n Can be install with the package:\n - libjack-jackd2-dev (new)\n - libjack-dev (old)") # check if the library exist: if not os.path.isfile("/usr/include/jack/jack.h"): # we did not find the library reqiested (just return) (automaticly set at false) return; - self.valid = True + self.set_valid(True) self.add_depend([ 'uuid', 'c' diff --git a/lutin/z_system/lutinSystem_Linux_m.py b/lutin/z_system/lutinSystem_Linux_m.py index d56ede8..28e1aae 100644 --- a/lutin/z_system/lutinSystem_Linux_m.py +++ b/lutin/z_system/lutinSystem_Linux_m.py @@ -18,9 +18,9 @@ class System(system.System): def __init__(self, target): system.System.__init__(self) # create some HELP: - self.help="M : m library \n base of std libs (availlagle in GNU C lib and bionic" + self.set_help("M : m library \n base of std libs (availlagle in GNU C lib and bionic") # No check ==> on the basic std libs: - self.valid = True + self.set_valid(True) # todo : create a searcher of the presence of the library: self.add_flag("link-lib", "m") self.add_depend([ diff --git a/lutin/z_system/lutinSystem_Linux_opengl.py b/lutin/z_system/lutinSystem_Linux_opengl.py index c18405f..e70b0cb 100644 --- a/lutin/z_system/lutinSystem_Linux_opengl.py +++ b/lutin/z_system/lutinSystem_Linux_opengl.py @@ -18,8 +18,8 @@ class System(system.System): def __init__(self, target): system.System.__init__(self) # create some HELP: - self.help = "OpenGL: Generic graphic library" - self.valid = True + self.set_help("OpenGL: Generic graphic library") + self.set_valid(True) # no check needed ==> just add this: self.add_depend([ 'c', diff --git a/lutin/z_system/lutinSystem_Linux_oss.py b/lutin/z_system/lutinSystem_Linux_oss.py index 5517c22..0fdabd5 100644 --- a/lutin/z_system/lutinSystem_Linux_oss.py +++ b/lutin/z_system/lutinSystem_Linux_oss.py @@ -18,13 +18,13 @@ class System(system.System): def __init__(self, target): system.System.__init__(self) # create some HELP: - self.help="OSS : Linux Open Sound System\n Can be install with the package:\n - ... TODO ..." + self.set_help("OSS : Linux Open Sound System\n Can be install with the package:\n - ... TODO ...") # check if the library exist: """ if not os.path.isfile("/usr/include/jack/jack.h"): # we did not find the library reqiested (just return) (automaticly set at false) return; - self.valid = True + self.set_valid(True) # todo : create a searcher of the presence of the library: self.add_flag("link-lib", "oss") """ diff --git a/lutin/z_system/lutinSystem_Linux_pthread.py b/lutin/z_system/lutinSystem_Linux_pthread.py index 9132163..fac50fc 100644 --- a/lutin/z_system/lutinSystem_Linux_pthread.py +++ b/lutin/z_system/lutinSystem_Linux_pthread.py @@ -18,12 +18,12 @@ class System(system.System): def __init__(self, target): system.System.__init__(self) # create some HELP: - self.help="pthread : Generic multithreading system\n Can be install with the package:\n - pthread-dev" + self.set_help("pthread : Generic multithreading system\n Can be install with the package:\n - pthread-dev") # check if the library exist: if not os.path.isfile("/usr/include/pthread.h"): # we did not find the library reqiested (just return) (automaticly set at false) return; - self.valid = True + self.set_valid(True) # todo : create a searcher of the presence of the library: self.add_flag("link-lib", "pthread") self.add_depend([ diff --git a/lutin/z_system/lutinSystem_Linux_pulse.py b/lutin/z_system/lutinSystem_Linux_pulse.py index de32498..c2b7c73 100644 --- a/lutin/z_system/lutinSystem_Linux_pulse.py +++ b/lutin/z_system/lutinSystem_Linux_pulse.py @@ -18,7 +18,7 @@ class System(system.System): def __init__(self, target): system.System.__init__(self) # create some HELP: - self.help="PULSE : The Linux PulseAudio\n Can be install with the package:\n - libpulse-dev" + self.set_help("PULSE : The Linux PulseAudio\n Can be install with the package:\n - libpulse-dev") # check if the library exist: if not os.path.isfile("/usr/include/pulse/pulseaudio.h"): # we did not find the library reqiested (just return) (automaticly set at false) @@ -38,7 +38,7 @@ class System(system.System): debug.warning("Can not det version of Pulseaudio ... ==> remove it") return self.set_version([int(version),int(version2)]) - self.valid = True + self.set_valid(True) self.add_depend([ 'c' ]) diff --git a/lutin/z_system/lutinSystem_Linux_rpc.py b/lutin/z_system/lutinSystem_Linux_rpc.py index 00f9d7d..f4c7e2c 100644 --- a/lutin/z_system/lutinSystem_Linux_rpc.py +++ b/lutin/z_system/lutinSystem_Linux_rpc.py @@ -18,9 +18,9 @@ class System(system.System): def __init__(self, target): system.System.__init__(self) # create some HELP: - self.help="rpc : generic RPC library (developed by oracle)" + self.set_help("rpc : generic RPC library (developed by oracle)") # No check ==> on the basic std libs: - self.valid = True + self.set_valid(True) self.add_depend([ 'c' ]) diff --git a/lutin/z_system/lutinSystem_Linux_uuid.py b/lutin/z_system/lutinSystem_Linux_uuid.py index 4b3f828..50cee06 100644 --- a/lutin/z_system/lutinSystem_Linux_uuid.py +++ b/lutin/z_system/lutinSystem_Linux_uuid.py @@ -18,12 +18,12 @@ class System(system.System): def __init__(self, target): system.System.__init__(self) # create some HELP: - self.help="uuid: Unique ID library" + self.set_help("uuid: Unique ID library") # check if the library exist: if not os.path.isfile("/usr/include/uuid/uuid.h"): # we did not find the library reqiested (just return) (automaticly set at false) return; - self.valid = True + self.set_valid(True) self.add_depend([ 'c' ]) diff --git a/lutin/z_system/lutinSystem_Linux_z.py b/lutin/z_system/lutinSystem_Linux_z.py index eab12a8..0b10e5a 100644 --- a/lutin/z_system/lutinSystem_Linux_z.py +++ b/lutin/z_system/lutinSystem_Linux_z.py @@ -18,12 +18,12 @@ class System(system.System): def __init__(self, target): system.System.__init__(self) # create some HELP: - self.help="Z : z library \n Can be install with the package:\n - zlib1g-dev" + self.set_help("Z : z library \n Can be install with the package:\n - zlib1g-dev") # check if the library exist: if not os.path.isfile("/usr/include/zlib.h"): # we did not find the library reqiested (just return) (automaticly set at false) return; - self.valid = True + self.set_valid(True) # todo : create a searcher of the presence of the library: self.add_flag("link-lib", "z") self.add_depend([ diff --git a/lutin/z_system/lutinSystem_MacOs_CoreAudio.py b/lutin/z_system/lutinSystem_MacOs_CoreAudio.py index 17607e3..06524ed 100644 --- a/lutin/z_system/lutinSystem_MacOs_CoreAudio.py +++ b/lutin/z_system/lutinSystem_MacOs_CoreAudio.py @@ -18,8 +18,8 @@ class System(system.System): def __init__(self, target): system.System.__init__(self) # create some HELP: - self.help="CoreAudio : MacOs interface for audio (all time present, just system interface)" - self.valid = True + self.set_help("CoreAudio : MacOs interface for audio (all time present, just system interface)") + self.set_valid(True) # todo : create a searcher of the presence of the library: self.add_flag("link", "-framework CoreAudio") self.add_flag("link", "-framework CoreFoundation") diff --git a/lutin/z_system/lutinSystem_MacOs_cxx.py b/lutin/z_system/lutinSystem_MacOs_cxx.py index c3f79d7..8a70fd3 100644 --- a/lutin/z_system/lutinSystem_MacOs_cxx.py +++ b/lutin/z_system/lutinSystem_MacOs_cxx.py @@ -18,8 +18,8 @@ class System(system.System): def __init__(self, target): system.System.__init__(self) # create some HELP: - self.help = "CXX: Generic C++ library" - self.valid = True + self.set_help("CXX: Generic C++ library") + self.set_valid(True) # no check needed ==> just add this: self.add_flag("c++","-D__STDCPP_LLVM__") self.add_flag("c++-remove","-nostdlib") diff --git a/lutin/z_system/lutinSystem_MacOs_m.py b/lutin/z_system/lutinSystem_MacOs_m.py index 41b3c96..b2894b9 100644 --- a/lutin/z_system/lutinSystem_MacOs_m.py +++ b/lutin/z_system/lutinSystem_MacOs_m.py @@ -18,9 +18,9 @@ class System(system.System): def __init__(self, target): system.System.__init__(self) # create some HELP: - self.help="M : m library \n base of std libs (availlagle in GNU C lib and bionic" + self.set_help("M : m library \n base of std libs (availlagle in GNU C lib and bionic") # No check ==> on the basic std libs: - self.valid = True + self.set_valid(True) # todo : create a searcher of the presence of the library: self.add_flag("link-lib", "m") diff --git a/lutin/z_system/lutinSystem_Windows_cxx.py b/lutin/z_system/lutinSystem_Windows_cxx.py index 92555c2..d33bc84 100644 --- a/lutin/z_system/lutinSystem_Windows_cxx.py +++ b/lutin/z_system/lutinSystem_Windows_cxx.py @@ -18,8 +18,8 @@ class System(system.System): def __init__(self, target): system.System.__init__(self) # create some HELP: - self.help = "CXX: Generic C++ library" - self.valid = True + self.set_help("CXX: Generic C++ library") + self.set_valid(True) # no check needed ==> just add this: self.add_flag("c++","-D__STDCPP_GNU__") self.add_flag("c++-remove","-nostdlib") diff --git a/lutin/z_system/lutinSystem_Windows_ds.py b/lutin/z_system/lutinSystem_Windows_ds.py index 95491a4..38216f1 100644 --- a/lutin/z_system/lutinSystem_Windows_ds.py +++ b/lutin/z_system/lutinSystem_Windows_ds.py @@ -18,12 +18,12 @@ class System(system.System): def __init__(self, target): system.System.__init__(self) # create some HELP: - self.help="DirectSound : Direct sound API for windows audio interface" + self.set_help("DirectSound : Direct sound API for windows audio interface") # check if the library exist: if not os.path.isfile("/usr/i686-w64-mingw32/include/dsound.h"): # we did not find the library reqiested (just return) (automaticly set at false) return; - self.valid = True + self.set_valid(True) # todo : create a searcher of the presence of the library: self.add_flag("link-lib",[ "dsound", diff --git a/lutin/z_system/lutinSystem_Windows_m.py b/lutin/z_system/lutinSystem_Windows_m.py index 41b3c96..b2894b9 100644 --- a/lutin/z_system/lutinSystem_Windows_m.py +++ b/lutin/z_system/lutinSystem_Windows_m.py @@ -18,9 +18,9 @@ class System(system.System): def __init__(self, target): system.System.__init__(self) # create some HELP: - self.help="M : m library \n base of std libs (availlagle in GNU C lib and bionic" + self.set_help("M : m library \n base of std libs (availlagle in GNU C lib and bionic") # No check ==> on the basic std libs: - self.valid = True + self.set_valid(True) # todo : create a searcher of the presence of the library: self.add_flag("link-lib", "m") diff --git a/lutin/z_target/lutinTarget_Android.py b/lutin/z_target/lutinTarget_Android.py index 5f17ee6..8fae8c0 100644 --- a/lutin/z_target/lutinTarget_Android.py +++ b/lutin/z_target/lutinTarget_Android.py @@ -151,7 +151,7 @@ class Target(target.Target): elif self.type_arch == "x86": pass - self.global_sysroot = "--sysroot=" + os.path.join(self.path_ndk, "platforms", "android-" + str(self.board_id), "arch-arm") + self.sysroot = "--sysroot=" + os.path.join(self.path_ndk, "platforms", "android-" + str(self.board_id), "arch-arm") self.add_flag("c", [ "-D__ARM_ARCH_5__", @@ -207,12 +207,6 @@ class Target(target.Target): "-Wa,--noexecstack" ]) - def check_right_package(self, pkg_properties, value): - for val in pkg_properties["RIGHT"]: - if value == val: - return True - return False - def convert_name_application(self, pkg_name): value = pkg_name.lower() value = value.replace(' ', '')