[DEV] add many system support for MacOs, IOs and Windows.Correct the target flags

This commit is contained in:
Edouard DUPIN 2016-09-28 23:39:14 +02:00
parent e148a7e204
commit 2a9f3feed7
19 changed files with 339 additions and 4 deletions

View File

@ -0,0 +1,27 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-
##
## @author Edouard DUPIN
##
## @copyright 2012, Edouard DUPIN, all right reserved
##
## @license APACHE v2.0 (see license file)
##
from lutin import debug
from lutin import system
from lutin import tools
from lutin import env
import os
class System(system.System):
def __init__(self, target):
system.System.__init__(self)
# create some HELP:
self.set_help("CoreAudio : Ios interface for core graphic (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 CoreGraphics")
self.add_depend("UIKit")

View File

@ -0,0 +1,27 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-
##
## @author Edouard DUPIN
##
## @copyright 2012, Edouard DUPIN, all right reserved
##
## @license APACHE v2.0 (see license file)
##
from lutin import debug
from lutin import system
from lutin import tools
from lutin import env
import os
class System(system.System):
def __init__(self, target):
system.System.__init__(self)
# create some HELP:
self.set_help("CoreAudio : Ios interface for fundation (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 Foundation")
self.add_depend("QuartzCore")

View File

@ -0,0 +1,27 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-
##
## @author Edouard DUPIN
##
## @copyright 2012, Edouard DUPIN, all right reserved
##
## @license APACHE v2.0 (see license file)
##
from lutin import debug
from lutin import system
from lutin import tools
from lutin import env
import os
class System(system.System):
def __init__(self, target):
system.System.__init__(self)
# create some HELP:
self.set_help("CoreAudio : Ios interface for openGL (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 GLKit")
self.add_depend("Foundation")

View File

@ -0,0 +1,26 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-
##
## @author Edouard DUPIN
##
## @copyright 2012, Edouard DUPIN, all right reserved
##
## @license APACHE v2.0 (see license file)
##
from lutin import debug
from lutin import system
from lutin import tools
from lutin import env
import os
class System(system.System):
def __init__(self, target):
system.System.__init__(self)
# create some HELP:
self.set_help("CoreAudio : Ios interface for core application (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 QuartzCore")

View File

@ -0,0 +1,27 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-
##
## @author Edouard DUPIN
##
## @copyright 2012, Edouard DUPIN, all right reserved
##
## @license APACHE v2.0 (see license file)
##
from lutin import debug
from lutin import system
from lutin import tools
from lutin import env
import os
class System(system.System):
def __init__(self, target):
system.System.__init__(self)
# create some HELP:
self.set_help("CoreAudio : Ios interface for graphic UX (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 UIKit")
self.add_depend("GLKit")

View File

@ -0,0 +1,25 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-
##
## @author Edouard DUPIN
##
## @copyright 2012, Edouard DUPIN, all right reserved
##
## @license APACHE v2.0 (see license file)
##
from lutin import debug
from lutin import system
from lutin import tools
from lutin import env
import os
class System(system.System):
def __init__(self, target):
system.System.__init__(self)
# create some HELP:
self.set_help("CoreAudio : MacOs interface for application builder kit (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 AppKit")

View File

@ -0,0 +1,26 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-
##
## @author Edouard DUPIN
##
## @copyright 2012, Edouard DUPIN, all right reserved
##
## @license APACHE v2.0 (see license file)
##
from lutin import debug
from lutin import system
from lutin import tools
from lutin import env
import os
class System(system.System):
def __init__(self, target):
system.System.__init__(self)
# create some HELP:
self.set_help("CoreAudio : MacOs interface for basic cocoa graphic (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 Cocoa")
self.add_depend("QuartzCore")

View File

@ -0,0 +1,26 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-
##
## @author Edouard DUPIN
##
## @copyright 2012, Edouard DUPIN, all right reserved
##
## @license APACHE v2.0 (see license file)
##
from lutin import debug
from lutin import system
from lutin import tools
from lutin import env
import os
class System(system.System):
def __init__(self, target):
system.System.__init__(self)
# create some HELP:
self.set_help("QuartzCore : MacOs interface for base application (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 QuartzCore")
self.add_depend("AppKit")

View File

@ -0,0 +1,26 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-
##
## @author Edouard DUPIN
##
## @copyright 2012, Edouard DUPIN, all right reserved
##
## @license APACHE v2.0 (see license file)
##
from lutin import debug
from lutin import system
from lutin import tools
from lutin import env
import os
class System(system.System):
def __init__(self, target):
system.System.__init__(self)
# create some HELP:
self.set_help("OpenGL: Generic graphic library")
self.set_valid(True)
self.add_flag('link-lib', 'gdi32')

View File

@ -0,0 +1,26 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-
##
## @author Edouard DUPIN
##
## @copyright 2012, Edouard DUPIN, all right reserved
##
## @license APACHE v2.0 (see license file)
##
from lutin import debug
from lutin import system
from lutin import tools
from lutin import env
import os
class System(system.System):
def __init__(self, target):
system.System.__init__(self)
# create some HELP:
self.set_help("OpenGL: Generic graphic library")
self.set_valid(True)
self.add_flag('link-lib', 'kernel32')

View File

@ -20,10 +20,15 @@ class System(system.System):
# create some HELP: # create some HELP:
self.set_help("OpenGL: Generic graphic library") self.set_help("OpenGL: Generic graphic library")
self.set_valid(True) self.set_valid(True)
# TODO: this is a real bad dependency ...
self.add_depend([ self.add_depend([
'glew' 'c'
]) ])
self.add_flag('link-lib', 'opengl32')
if env.get_isolate_system() == True:
self.add_header_file([
"/usr/" + target.base_path + "/include/GL/*"
],
destination_path="GL",
recursive=True)

View File

@ -0,0 +1,26 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-
##
## @author Edouard DUPIN
##
## @copyright 2012, Edouard DUPIN, all right reserved
##
## @license APACHE v2.0 (see license file)
##
from lutin import debug
from lutin import system
from lutin import tools
from lutin import env
import os
class System(system.System):
def __init__(self, target):
system.System.__init__(self)
# create some HELP:
self.set_help("OpenGL: Generic graphic library")
self.set_valid(True)
self.add_flag('link-lib', 'user32')

View File

@ -184,7 +184,14 @@ class Target(target.Target):
"-mfloat-abi=softfp", "-mfloat-abi=softfp",
"-Wl,--fix-cortex-a8", "-Wl,--fix-cortex-a8",
]) ])
"""
self.add_flag("link-lib", [
"dl"
])
self.add_flag("link", [
"-rdynamic"
])
"""
# the -mthumb must be set for all the android produc, some ot the not work coretly without this one ... (all android code is generated with this flags) # the -mthumb must be set for all the android produc, some ot the not work coretly without this one ... (all android code is generated with this flags)
self.add_flag("c", "-mthumb") self.add_flag("c", "-mthumb")
# ----------------------- # -----------------------

View File

@ -41,6 +41,13 @@ class Target(target.Target):
self.pkg_path_bin = "bin" self.pkg_path_bin = "bin"
self.pkg_path_lib = "lib" self.pkg_path_lib = "lib"
self.pkg_path_license = "license" self.pkg_path_license = "license"
self.add_flag("link-lib", [
"dl"
])
self.add_flag("link", [
"-rdynamic"
])
""" """
.local/application .local/application

View File

@ -88,6 +88,13 @@ class Target(target.Target):
# Disable capabiliteis to compile in shared mode # Disable capabiliteis to compile in shared mode
self.support_dynamic_link = False self.support_dynamic_link = False
self.add_flag("link-lib", [
"dl"
])
self.add_flag("link", [
"-rdynamic"
])
def make_package_binary(self, pkg_name, pkg_properties, base_pkg_path, heritage_list, static): def make_package_binary(self, pkg_name, pkg_properties, base_pkg_path, heritage_list, static):
debug.debug("------------------------------------------------------------------------") debug.debug("------------------------------------------------------------------------")

View File

@ -46,6 +46,12 @@ class Target(target.Target):
if env.get_isolate_system() == True: if env.get_isolate_system() == True:
self.sysroot = "--sysroot=/aDirectoryThatDoesNotExist/" self.sysroot = "--sysroot=/aDirectoryThatDoesNotExist/"
self.add_flag("link-lib", [
"dl"
])
self.add_flag("link", [
"-rdynamic"
])
""" """
.local/application .local/application

View File

@ -47,6 +47,13 @@ class Target(target.Target):
self.pkg_path_lib = "lib" self.pkg_path_lib = "lib"
self.pkg_path_license = "license" self.pkg_path_license = "license"
self.add_flag("link-lib", [
"dl"
])
self.add_flag("link", [
"-rdynamic"
])
""" """
def get_staging_path(self, binary_name): def get_staging_path(self, binary_name):
return tools.get_run_path() + self.path_out + self.path_staging + "/" + binary_name + ".app/Contents/" return tools.get_run_path() + self.path_out + self.path_staging + "/" + binary_name + ".app/Contents/"

View File

@ -51,6 +51,11 @@ class Target(target.Target):
self.add_flag("c", [ self.add_flag("c", [
"-DWIN32=1" "-DWIN32=1"
]) ])
"""
self.add_flag("link-lib", [
"dl"
])
"""
self.pkg_path_data = "data" self.pkg_path_data = "data"
self.pkg_path_bin = "" self.pkg_path_bin = ""
self.pkg_path_lib = "lib" self.pkg_path_lib = "lib"
@ -60,6 +65,8 @@ class Target(target.Target):
self.suffix_lib_dynamic='.dll' self.suffix_lib_dynamic='.dll'
self.suffix_binary='.exe' self.suffix_binary='.exe'
#self.suffix_package='' #self.suffix_package=''
# TODO : Remove this ==> pb with openSSL shared lib ...
self.support_dynamic_link = False
def get_staging_path_data(self, binary_name, heritage_list): def get_staging_path_data(self, binary_name, heritage_list):