[DEV] register on pip ...
This commit is contained in:
parent
801e2e8209
commit
ee6c01f278
10
.gitignore
vendored
10
.gitignore
vendored
@ -1 +1,9 @@
|
||||
*.pyc
|
||||
# Compiled python modules.
|
||||
*.pyc
|
||||
|
||||
# Setuptools distribution folder.
|
||||
/dist/
|
||||
/build/
|
||||
|
||||
# Python egg metadata, regenerated from source files by setuptools.
|
||||
/*.egg-info
|
1
MANIFEST.in
Normal file
1
MANIFEST.in
Normal file
@ -0,0 +1 @@
|
||||
include README.rst
|
@ -1,29 +1,43 @@
|
||||
build
|
||||
Lutin
|
||||
=====
|
||||
|
||||
`lutin` is a generic package maker is a FREE software tool.
|
||||
`lutin` is a generic builder and package maker is a FREE software tool.
|
||||
|
||||
Instructions
|
||||
============
|
||||
------------
|
||||
|
||||
This is a tool to generate the binary, shared library, static library and package independently of the OS
|
||||
|
||||
This software builds C, C++, m, m++, to object file and generate associated libraries (.so & .a) end create final Executable file
|
||||
|
||||
This tool can generate package for Linux, MacOs, Android
|
||||
|
||||
|
||||
Create a lutin module
|
||||
=====================
|
||||
Lutin is under a FREE license that can be found in the COPYING file.
|
||||
Any contribution is more than welcome ;)
|
||||
|
||||
Set the lutin module maker with the name :
|
||||
lutin_xxxxx.py
|
||||
xxx : represent the name of the module/binary/package and must be lower case and no special characters
|
||||
git repository
|
||||
--------------
|
||||
|
||||
http://github.com/HeeroYui/lutin/
|
||||
|
||||
Documentation
|
||||
-------------
|
||||
|
||||
http://github.io/HeeroYui/lutin/
|
||||
|
||||
Installation
|
||||
------------
|
||||
|
||||
Requirements: ``Python >= 2.7`` and ``pip``
|
||||
|
||||
Just run::
|
||||
|
||||
pip install lutin
|
||||
|
||||
you can see exemple for some type in :
|
||||
ewol : library
|
||||
edn : package
|
||||
glew : prebuild
|
||||
|
||||
License (APACHE v2.0)
|
||||
=====================
|
||||
---------------------
|
||||
|
||||
Copyright lutin Edouard DUPIN
|
||||
|
@ -1,9 +1,14 @@
|
||||
#!/usr/bin/python
|
||||
|
||||
##
|
||||
## @author Edouard DUPIN
|
||||
##
|
||||
## @copyright 2012, Edouard DUPIN, all right reserved
|
||||
##
|
||||
## @license APACHE v2.0 (see license file)
|
||||
##
|
||||
import os
|
||||
import sys
|
||||
|
||||
# now import other standard module (must be done here and not before ...
|
||||
# Local import
|
||||
from . import target
|
||||
from . import builder
|
||||
from . import system
|
||||
@ -15,11 +20,12 @@ from . import module
|
||||
is_init = False
|
||||
|
||||
if is_init == False:
|
||||
"""
|
||||
When the user use with make.py we initialise ourself
|
||||
"""
|
||||
debug.verbose("Use Make as a make stadard")
|
||||
sys.path.append(tools.get_run_folder())
|
||||
builder.import_path(tools.get_current_path(__file__))
|
||||
module.import_path(tools.get_current_path(__file__))
|
||||
system.import_path(tools.get_current_path(__file__))
|
||||
target.import_path(tools.get_current_path(__file__))
|
||||
|
||||
debug.debug("missing file lutinBase.py ==> loading subPath...");
|
||||
# Import all sub path without out and archive
|
||||
|
@ -6,8 +6,8 @@
|
||||
##
|
||||
## @license APACHE v2.0 (see license file)
|
||||
##
|
||||
|
||||
import sys
|
||||
# Local import
|
||||
from . import debug
|
||||
|
||||
class ArgElement:
|
||||
|
@ -6,19 +6,14 @@
|
||||
##
|
||||
## @license APACHE v2.0 (see license file)
|
||||
##
|
||||
|
||||
import sys
|
||||
import os
|
||||
import inspect
|
||||
import fnmatch
|
||||
import datetime
|
||||
# Local import
|
||||
from . import debug
|
||||
from . import heritage
|
||||
import datetime
|
||||
from . import tools as lutinTools
|
||||
from . import module as lutinModule
|
||||
from . import system as lutinSystem
|
||||
from . import image as lutinImage
|
||||
from . import host as lutinHost
|
||||
|
||||
##
|
||||
## constitution of dictionnary:
|
||||
|
@ -1,11 +1,11 @@
|
||||
##
|
||||
## Executable/binary builder
|
||||
##
|
||||
import lutinMultiprocess
|
||||
import lutinTools
|
||||
import lutinDebug as debug
|
||||
import lutinDepend as dependency
|
||||
import lutinEnv
|
||||
from lutin import multiprocess
|
||||
from lutin import tools
|
||||
from lutin import debug
|
||||
from lutin import depend
|
||||
from lutin import env
|
||||
import os
|
||||
|
||||
##
|
||||
@ -82,27 +82,27 @@ def link(file, binary, target, depancy, name, basic_folder):
|
||||
cmd.append(target.global_flags_ld)
|
||||
except:
|
||||
pass
|
||||
cmdLine=lutinTools.list_to_str(cmd)
|
||||
cmdLine=tools.list_to_str(cmd)
|
||||
# check the dependency for this file :
|
||||
if dependency.need_re_package(file_dst, file_src, True, file_cmd, cmdLine) == False \
|
||||
and dependency.need_re_package(file_dst, depancy.src, False, file_cmd, cmdLine) == False:
|
||||
if depend.need_re_package(file_dst, file_src, True, file_cmd, cmdLine) == False \
|
||||
and depend.need_re_package(file_dst, depancy.src, False, file_cmd, cmdLine) == False:
|
||||
return file_dst
|
||||
lutinTools.create_directory_of_file(file_dst)
|
||||
tools.create_directory_of_file(file_dst)
|
||||
debug.print_element("Executable", name, "==>", file_dst)
|
||||
|
||||
lutinMultiprocess.run_command(cmdLine)
|
||||
multiprocess.run_command(cmdLine)
|
||||
if target.config["mode"] == "release"\
|
||||
or lutinEnv.get_force_strip_mode() == True:
|
||||
or env.get_force_strip_mode() == True:
|
||||
# get the file size of the non strip file
|
||||
originSize = lutinTools.file_size(file_dst);
|
||||
originSize = tools.file_size(file_dst);
|
||||
debug.print_element("Executable(strip)", name, "", "")
|
||||
cmdLineStrip=lutinTools.list_to_str([
|
||||
cmdLineStrip=tools.list_to_str([
|
||||
target.strip,
|
||||
file_dst])
|
||||
lutinMultiprocess.run_command(cmdLineStrip)
|
||||
multiprocess.run_command(cmdLineStrip)
|
||||
# get the stip size of the binary
|
||||
stripSize = lutinTools.file_size(file_dst)
|
||||
stripSize = tools.file_size(file_dst)
|
||||
debug.debug("file reduce size : " + str(originSize/1024) + "ko ==> " + str(stripSize/1024) + "ko")
|
||||
# write cmd line only after to prevent errors ...
|
||||
lutinMultiprocess.store_command(cmdLine, file_cmd)
|
||||
multiprocess.store_command(cmdLine, file_cmd)
|
||||
|
@ -1,10 +1,10 @@
|
||||
##
|
||||
## C builder
|
||||
##
|
||||
import lutinMultiprocess
|
||||
import lutinTools
|
||||
import lutinDebug as debug
|
||||
import lutinDepend as dependency
|
||||
from lutin import multiprocess
|
||||
from lutin import tools
|
||||
from lutin import debug
|
||||
from lutin import depend
|
||||
|
||||
# C version:
|
||||
default_version = 1989
|
||||
@ -51,15 +51,15 @@ def compile(file, binary, target, depancy, flags, path, name, basic_folder):
|
||||
target.sysroot,
|
||||
target.global_include_cc]
|
||||
try:
|
||||
cmd.append(lutinTools.add_prefix("-I", path["export"]))
|
||||
cmd.append(tools.add_prefix("-I", path["export"]))
|
||||
except:
|
||||
pass
|
||||
try:
|
||||
cmd.append(lutinTools.add_prefix("-I", path["local"]))
|
||||
cmd.append(tools.add_prefix("-I", path["local"]))
|
||||
except:
|
||||
pass
|
||||
try:
|
||||
cmd.append(lutinTools.add_prefix("-I", depancy.path))
|
||||
cmd.append(tools.add_prefix("-I", depancy.path))
|
||||
except:
|
||||
pass
|
||||
try:
|
||||
@ -87,14 +87,14 @@ def compile(file, binary, target, depancy, flags, path, name, basic_folder):
|
||||
cmd.append("-MP")
|
||||
cmd.append(file_src)
|
||||
# Create cmd line
|
||||
cmdLine=lutinTools.list_to_str(cmd)
|
||||
cmdLine=tools.list_to_str(cmd)
|
||||
# check the dependency for this file :
|
||||
if dependency.need_re_build(file_dst, file_src, file_depend, file_cmd, cmdLine) == False:
|
||||
if depend.need_re_build(file_dst, file_src, file_depend, file_cmd, cmdLine) == False:
|
||||
return file_dst
|
||||
lutinTools.create_directory_of_file(file_dst)
|
||||
tools.create_directory_of_file(file_dst)
|
||||
comment = ["c", name, "<==", file]
|
||||
# process element
|
||||
lutinMultiprocess.run_in_pool(cmdLine, comment, file_cmd)
|
||||
multiprocess.run_in_pool(cmdLine, comment, file_cmd)
|
||||
return file_dst
|
||||
|
||||
|
||||
|
@ -1,10 +1,10 @@
|
||||
##
|
||||
## C++ builder
|
||||
##
|
||||
import lutinMultiprocess
|
||||
import lutinTools
|
||||
import lutinDebug as debug
|
||||
import lutinDepend as dependency
|
||||
from lutin import multiprocess
|
||||
from lutin import tools
|
||||
from lutin import debug
|
||||
from lutin import depend
|
||||
# C++ default version:
|
||||
default_version = 1999
|
||||
default_version_gnu = False
|
||||
@ -51,15 +51,15 @@ def compile(file, binary, target, depancy, flags, path, name, basic_folder):
|
||||
target.global_include_cc
|
||||
]
|
||||
try:
|
||||
cmd.append(lutinTools.add_prefix("-I",path["export"]))
|
||||
cmd.append(tools.add_prefix("-I",path["export"]))
|
||||
except:
|
||||
pass
|
||||
try:
|
||||
cmd.append(lutinTools.add_prefix("-I",path["local"]))
|
||||
cmd.append(tools.add_prefix("-I",path["local"]))
|
||||
except:
|
||||
pass
|
||||
try:
|
||||
cmd.append(lutinTools.add_prefix("-I",depancy.path))
|
||||
cmd.append(tools.add_prefix("-I",depancy.path))
|
||||
except:
|
||||
pass
|
||||
try:
|
||||
@ -101,15 +101,15 @@ def compile(file, binary, target, depancy, flags, path, name, basic_folder):
|
||||
cmd.append(["-c", "-MMD", "-MP"])
|
||||
cmd.append(file_src)
|
||||
# Create cmd line
|
||||
cmdLine=lutinTools.list_to_str(cmd)
|
||||
cmdLine=tools.list_to_str(cmd)
|
||||
|
||||
# check the dependency for this file :
|
||||
if dependency.need_re_build(file_dst, file_src, file_depend, file_cmd, cmdLine) == False:
|
||||
if depend.need_re_build(file_dst, file_src, file_depend, file_cmd, cmdLine) == False:
|
||||
return file_dst
|
||||
lutinTools.create_directory_of_file(file_dst)
|
||||
tools.create_directory_of_file(file_dst)
|
||||
comment = ["c++", name, "<==", file]
|
||||
#process element
|
||||
lutinMultiprocess.run_in_pool(cmdLine, comment, file_cmd)
|
||||
multiprocess.run_in_pool(cmdLine, comment, file_cmd)
|
||||
return file_dst
|
||||
|
||||
def get_version_compilation_flags(flags, dependency_flags):
|
||||
|
@ -1,10 +1,10 @@
|
||||
##
|
||||
## Java builder
|
||||
##
|
||||
import lutinMultiprocess
|
||||
import lutinTools
|
||||
import lutinDebug as debug
|
||||
import lutinDepend as dependency
|
||||
from lutin import multiprocess
|
||||
from lutin import tools
|
||||
from lutin import debug
|
||||
from lutin import depend
|
||||
|
||||
##
|
||||
## Initialize the builder, if needed ... to get dependency between builder (for example)
|
||||
|
@ -1,10 +1,11 @@
|
||||
##
|
||||
## Dynamic library builder
|
||||
##
|
||||
import lutinMultiprocess
|
||||
import lutinTools
|
||||
import lutinDebug as debug
|
||||
import lutinDepend as dependency
|
||||
from lutin import multiprocess
|
||||
from lutin import tools
|
||||
from lutin import debug
|
||||
from lutin import depend
|
||||
from lutin import env
|
||||
import os
|
||||
|
||||
##
|
||||
@ -73,27 +74,27 @@ def link(file, binary, target, depancy, name, basic_folder):
|
||||
cmd.append(target.global_flags_ld)
|
||||
except:
|
||||
pass
|
||||
cmdLine=lutinTools.list_to_str(cmd)
|
||||
cmdLine=tools.list_to_str(cmd)
|
||||
# check the dependency for this file :
|
||||
if dependency.need_re_package(file_dst, file_src, True, file_cmd, cmdLine) == False \
|
||||
and dependency.need_re_package(file_dst, depancy.src, False, file_cmd, cmdLine) == False:
|
||||
if depend.need_re_package(file_dst, file_src, True, file_cmd, cmdLine) == False \
|
||||
and depend.need_re_package(file_dst, depancy.src, False, file_cmd, cmdLine) == False:
|
||||
return tmpList[1]
|
||||
lutinTools.create_directory_of_file(file_dst)
|
||||
tools.create_directory_of_file(file_dst)
|
||||
debug.print_element("SharedLib", name, "==>", file_dst)
|
||||
lutinMultiprocess.run_command(cmdLine)
|
||||
multiprocess.run_command(cmdLine)
|
||||
# strip the output file:
|
||||
if target.config["mode"] == "release" \
|
||||
or lutinEnv.get_force_strip_mode() == True:
|
||||
or env.get_force_strip_mode() == True:
|
||||
# get the file size of the non strip file
|
||||
originSize = lutinTools.file_size(file_dst);
|
||||
originSize = tools.file_size(file_dst);
|
||||
debug.print_element("SharedLib(strip)", name, "", "")
|
||||
cmdLineStrip=lutinTools.list_to_str([
|
||||
cmdLineStrip=tools.list_to_str([
|
||||
target.strip,
|
||||
file_dst])
|
||||
lutinMultiprocess.run_command(cmdLineStrip)
|
||||
multiprocess.run_command(cmdLineStrip)
|
||||
# get the stip size of the binary
|
||||
stripSize = lutinTools.file_size(file_dst)
|
||||
stripSize = tools.file_size(file_dst)
|
||||
debug.debug("file reduce size : " + str(originSize/1024) + "ko ==> " + str(stripSize/1024) + "ko")
|
||||
# write cmd line only after to prevent errors ...
|
||||
lutinMultiprocess.store_command(cmdLine, file_cmd)
|
||||
multiprocess.store_command(cmdLine, file_cmd)
|
||||
#debug.print_element("SharedLib", self.name, "==>", tmpList[1])
|
||||
|
@ -1,10 +1,11 @@
|
||||
##
|
||||
## Static library builder
|
||||
##
|
||||
import lutinMultiprocess
|
||||
import lutinTools
|
||||
import lutinDebug as debug
|
||||
import lutinDepend as dependency
|
||||
from lutin import multiprocess
|
||||
from lutin import tools
|
||||
from lutin import debug
|
||||
from lutin import depend
|
||||
from lutin import env
|
||||
import os
|
||||
|
||||
##
|
||||
@ -59,23 +60,23 @@ def link(file, binary, target, depancy, name, basic_folder):
|
||||
cmd.append(file_src)
|
||||
except:
|
||||
pass
|
||||
cmdLine=lutinTools.list_to_str(cmd)
|
||||
cmdLine=tools.list_to_str(cmd)
|
||||
# check the dependency for this file :
|
||||
if dependency.need_re_package(file_dst, file_src, True, file_cmd, cmdLine) == False \
|
||||
and dependency.need_re_package(file_dst, depancy.src, False, file_cmd, cmdLine) == False:
|
||||
if depend.need_re_package(file_dst, file_src, True, file_cmd, cmdLine) == False \
|
||||
and depend.need_re_package(file_dst, depancy.src, False, file_cmd, cmdLine) == False:
|
||||
return file_dst
|
||||
lutinTools.create_directory_of_file(file_dst)
|
||||
tools.create_directory_of_file(file_dst)
|
||||
debug.print_element("StaticLib", name, "==>", file_dst)
|
||||
# explicitly remove the destination to prevent error ...
|
||||
if os.path.exists(file_dst) and os.path.isfile(file_dst):
|
||||
os.remove(file_dst)
|
||||
lutinMultiprocess.run_command(cmdLine)
|
||||
multiprocess.run_command(cmdLine)
|
||||
#$(Q)$(TARGET_RANLIB) $@
|
||||
if target.ranlib != "":
|
||||
cmdLineRanLib=lutinTools.list_to_str([
|
||||
cmdLineRanLib=tools.list_to_str([
|
||||
target.ranlib,
|
||||
file_dst ])
|
||||
lutinMultiprocess.run_command(cmdLineRanLib)
|
||||
multiprocess.run_command(cmdLineRanLib)
|
||||
# write cmd line only after to prevent errors ...
|
||||
lutinMultiprocess.store_command(cmdLine, file_cmd)
|
||||
multiprocess.store_command(cmdLine, file_cmd)
|
||||
return file_dst
|
||||
|
@ -1,11 +1,11 @@
|
||||
##
|
||||
## Objective-C builder
|
||||
##
|
||||
import lutinMultiprocess
|
||||
import lutinTools
|
||||
import lutinBuilder
|
||||
import lutinDebug as debug
|
||||
import lutinDepend as dependency
|
||||
from lutin import multiprocess
|
||||
from lutin import tools
|
||||
from lutin import builder
|
||||
from lutin import debug
|
||||
from lutin import depend
|
||||
|
||||
local_ref_on_builder_c = None
|
||||
|
||||
@ -15,7 +15,7 @@ local_ref_on_builder_c = None
|
||||
def init():
|
||||
global local_ref_on_builder_c
|
||||
debug.debug("m builder get dependency on the C builder")
|
||||
local_ref_on_builder_c = lutinBuilder.get_builder("c")
|
||||
local_ref_on_builder_c = builder.get_builder("c")
|
||||
|
||||
##
|
||||
## Get the current builder type.
|
||||
@ -51,15 +51,15 @@ def compile(file, binary, target, depancy, flags, path, name, basic_folder):
|
||||
target.sysroot,
|
||||
target.global_include_cc]
|
||||
try:
|
||||
cmd.append(lutinTools.add_prefix("-I",path["export"]))
|
||||
cmd.append(tools.add_prefix("-I",path["export"]))
|
||||
except:
|
||||
pass
|
||||
try:
|
||||
cmd.append(lutinTools.add_prefix("-I",path["local"]))
|
||||
cmd.append(tools.add_prefix("-I",path["local"]))
|
||||
except:
|
||||
pass
|
||||
try:
|
||||
cmd.append(lutinTools.add_prefix("-I",depancy.path))
|
||||
cmd.append(tools.add_prefix("-I",depancy.path))
|
||||
except:
|
||||
pass
|
||||
try:
|
||||
@ -102,13 +102,13 @@ def compile(file, binary, target, depancy, flags, path, name, basic_folder):
|
||||
cmd.append("-x objective-c")
|
||||
cmd.append(file_src)
|
||||
# Create cmd line
|
||||
cmdLine=lutinTools.list_to_str(cmd)
|
||||
cmdLine=tools.list_to_str(cmd)
|
||||
# check the dependency for this file :
|
||||
if False==dependency.need_re_build(file_dst, file_src, file_depend, file_cmd, cmdLine):
|
||||
if False==depend.need_re_build(file_dst, file_src, file_depend, file_cmd, cmdLine):
|
||||
return file_dst
|
||||
lutinTools.create_directory_of_file(file_dst)
|
||||
tools.create_directory_of_file(file_dst)
|
||||
comment = ["m", name, "<==", file]
|
||||
#process element
|
||||
lutinMultiprocess.run_in_pool(cmdLine, comment, file_cmd)
|
||||
multiprocess.run_in_pool(cmdLine, comment, file_cmd)
|
||||
return file_dst
|
||||
|
||||
|
@ -1,11 +1,11 @@
|
||||
##
|
||||
## Objective C++ builder
|
||||
##
|
||||
import lutinMultiprocess
|
||||
import lutinTools
|
||||
import lutinBuilder
|
||||
import lutinDebug as debug
|
||||
import lutinDepend as dependency
|
||||
from lutin import multiprocess
|
||||
from lutin import tools
|
||||
from lutin import builder
|
||||
from lutin import debug
|
||||
from lutin import depend
|
||||
|
||||
local_ref_on_builder_cpp = None
|
||||
|
||||
@ -15,7 +15,7 @@ local_ref_on_builder_cpp = None
|
||||
def init():
|
||||
global local_ref_on_builder_cpp
|
||||
debug.debug("mm builder get dependency on the CPP builder")
|
||||
local_ref_on_builder_cpp = lutinBuilder.get_builder("cpp")
|
||||
local_ref_on_builder_cpp = builder.get_builder("cpp")
|
||||
|
||||
##
|
||||
## Get the current builder type.
|
||||
@ -51,15 +51,15 @@ def compile(file, binary, target, depancy, flags, path, name, basic_folder):
|
||||
target.sysroot,
|
||||
target.global_include_cc]
|
||||
try:
|
||||
cmd.append(lutinTools.add_prefix("-I",path["export"]))
|
||||
cmd.append(tools.add_prefix("-I",path["export"]))
|
||||
except:
|
||||
pass
|
||||
try:
|
||||
cmd.append(lutinTools.add_prefix("-I",path["local"]))
|
||||
cmd.append(tools.add_prefix("-I",path["local"]))
|
||||
except:
|
||||
pass
|
||||
try:
|
||||
cmd.append(lutinTools.add_prefix("-I",depancy.path))
|
||||
cmd.append(tools.add_prefix("-I",depancy.path))
|
||||
except:
|
||||
pass
|
||||
try:
|
||||
@ -114,12 +114,12 @@ def compile(file, binary, target, depancy, flags, path, name, basic_folder):
|
||||
cmd.append("-x objective-c++")
|
||||
cmd.append(file_src)
|
||||
# Create cmd line
|
||||
cmdLine=lutinTools.list_to_str(cmd)
|
||||
cmdLine=tools.list_to_str(cmd)
|
||||
# check the dependency for this file :
|
||||
if False==dependency.need_re_build(file_dst, file_src, file_depend, file_cmd, cmdLine):
|
||||
if False==depend.need_re_build(file_dst, file_src, file_depend, file_cmd, cmdLine):
|
||||
return file_dst
|
||||
lutinTools.create_directory_of_file(file_dst)
|
||||
tools.create_directory_of_file(file_dst)
|
||||
comment = ["m++", name, "<==", file]
|
||||
#process element
|
||||
lutinMultiprocess.run_in_pool(cmdLine, comment, file_cmd)
|
||||
multiprocess.run_in_pool(cmdLine, comment, file_cmd)
|
||||
return file_dst
|
||||
|
@ -1,9 +1,9 @@
|
||||
##
|
||||
## ASM builder
|
||||
##
|
||||
import lutinMultiprocess
|
||||
import lutinTools
|
||||
import lutinDepend as dependency
|
||||
from lutin import multiprocess
|
||||
from lutin import tools
|
||||
from lutin import depend
|
||||
|
||||
##
|
||||
## Initialize the builder, if needed ... to get dependency between builder (for example)
|
||||
|
@ -8,7 +8,6 @@
|
||||
##
|
||||
|
||||
import os
|
||||
from . import multiprocess as lutinMultiprocess
|
||||
import threading
|
||||
import re
|
||||
|
||||
@ -107,7 +106,8 @@ def error(input, threadID=-1, force=False, crash=True):
|
||||
print(color_red + "[ERROR] " + input + color_default)
|
||||
debugLock.release()
|
||||
if crash==True:
|
||||
lutinMultiprocess.error_occured()
|
||||
from . import multiprocess
|
||||
multiprocess.error_occured()
|
||||
if threadID != -1:
|
||||
threading.interrupt_main()
|
||||
exit(-1)
|
||||
|
@ -6,11 +6,10 @@
|
||||
##
|
||||
## @license APACHE v2.0 (see license file)
|
||||
##
|
||||
|
||||
import os
|
||||
# Local import
|
||||
from . import debug
|
||||
from . import env as environement
|
||||
|
||||
from . import env
|
||||
|
||||
def need_re_build(dst, src, dependFile=None, file_cmd="", cmdLine=""):
|
||||
debug.extreme_verbose("Resuest check of dependency of :")
|
||||
@ -19,7 +18,7 @@ def need_re_build(dst, src, dependFile=None, file_cmd="", cmdLine=""):
|
||||
debug.extreme_verbose(" dept='" + str(dependFile) + "'")
|
||||
debug.extreme_verbose(" cmd='" + str(file_cmd) + "'")
|
||||
# if force mode selected ==> just force rebuild ...
|
||||
if environement.get_force_mode():
|
||||
if env.get_force_mode():
|
||||
debug.extreme_verbose(" ==> must rebuild (force mode)")
|
||||
return True
|
||||
|
||||
@ -118,7 +117,7 @@ def need_re_package(dst, srcList, mustHaveSrc, file_cmd="", cmdLine=""):
|
||||
return False
|
||||
|
||||
# if force mode selected ==> just force rebuild ...
|
||||
if environement.get_force_mode():
|
||||
if env.get_force_mode():
|
||||
debug.extreme_verbose(" ==> must re-package (force mode)")
|
||||
return True
|
||||
|
||||
|
@ -7,6 +7,7 @@
|
||||
## @license APACHE v2.0 (see license file)
|
||||
##
|
||||
|
||||
# Local import
|
||||
from . import debug
|
||||
|
||||
|
||||
|
@ -6,9 +6,9 @@
|
||||
##
|
||||
## @license APACHE v2.0 (see license file)
|
||||
##
|
||||
|
||||
import sys
|
||||
import copy
|
||||
# Local import
|
||||
from . import debug
|
||||
|
||||
|
||||
|
@ -6,9 +6,9 @@
|
||||
##
|
||||
## @license APACHE v2.0 (see license file)
|
||||
##
|
||||
|
||||
import platform
|
||||
import sys
|
||||
# Local import
|
||||
from . import debug
|
||||
|
||||
# print os.name # ==> 'posix'
|
||||
|
@ -6,13 +6,13 @@
|
||||
##
|
||||
## @license APACHE v2.0 (see license file)
|
||||
##
|
||||
|
||||
from . import debug
|
||||
from . import tools
|
||||
import platform
|
||||
import os
|
||||
from . import multiprocess as lutinMultiprocess
|
||||
from . import depend as dependency
|
||||
# Local import
|
||||
from . import debug
|
||||
from . import tools
|
||||
from . import multiprocess
|
||||
from . import depend
|
||||
|
||||
enableResizeImage = True
|
||||
try:
|
||||
@ -40,7 +40,7 @@ def resize(srcFile, destFile, x, y, cmd_file=None):
|
||||
if os.path.exists(srcFile) == False:
|
||||
debug.error("Request a resize an image that does not existed : '" + srcFile + "'")
|
||||
cmd_line = "resize Image : " + srcFile + " ==> " + destFile + " newSize=(" + str(x) + "x" + str(y) + ")"
|
||||
if False==dependency.need_re_build(destFile, srcFile, file_cmd=cmd_file , cmdLine=cmd_line):
|
||||
if False==depend.need_re_build(destFile, srcFile, file_cmd=cmd_file , cmdLine=cmd_line):
|
||||
return
|
||||
# add cmdLine ...
|
||||
x = get_pow_2_multiple(x)
|
||||
@ -90,4 +90,4 @@ def resize(srcFile, destFile, x, y, cmd_file=None):
|
||||
tmpImage = im1.resize((x, y), Image.ANTIALIAS)
|
||||
tools.create_directory_of_file(destFile)
|
||||
tmpImage.save(destFile)
|
||||
lutinMultiprocess.store_command(cmd_line, cmd_file)
|
||||
multiprocess.store_command(cmd_line, cmd_file)
|
||||
|
@ -11,15 +11,13 @@ import sys
|
||||
import os
|
||||
import inspect
|
||||
import fnmatch
|
||||
from . import module
|
||||
# Local import
|
||||
from . import host
|
||||
from . import tools as lutinTools
|
||||
from . import tools
|
||||
from . import debug
|
||||
from . import heritage
|
||||
from . import depend as dependency
|
||||
from . import builder
|
||||
from . import multiprocess as lutinMultiprocess
|
||||
from . import env as lutinEnv
|
||||
from . import multiprocess
|
||||
|
||||
class Module:
|
||||
|
||||
@ -89,7 +87,7 @@ class Module:
|
||||
debug.error(' ==> error : "%s" ' %moduleType)
|
||||
raise 'Input value error'
|
||||
self.origin_file = file;
|
||||
self.origin_folder = lutinTools.get_current_path(self.origin_file)
|
||||
self.origin_folder = tools.get_current_path(self.origin_file)
|
||||
self.local_heritage = heritage.heritage(self)
|
||||
|
||||
self.package_prop = { "COMPAGNY_TYPE" : set(""),
|
||||
@ -185,7 +183,7 @@ class Module:
|
||||
def folders_to_staging(self, binary_name, target):
|
||||
for source, destination in self.folders:
|
||||
debug.debug("Might copy folder : " + source + "==>" + destination)
|
||||
lutinTools.copy_anything_target(target, self.origin_folder + "/" + source, destination)
|
||||
tools.copy_anything_target(target, self.origin_folder + "/" + source, destination)
|
||||
|
||||
# call here to build the module
|
||||
def build(self, target, package_name):
|
||||
@ -246,7 +244,7 @@ class Module:
|
||||
debug.warning(" UN-SUPPORTED file format: '" + self.origin_folder + "/" + file + "'")
|
||||
|
||||
# when multiprocess availlable, we need to synchronize here ...
|
||||
lutinMultiprocess.pool_synchrosize()
|
||||
multiprocess.pool_synchrosize()
|
||||
|
||||
# generate end point:
|
||||
if self.type=='PREBUILD':
|
||||
@ -340,16 +338,16 @@ class Module:
|
||||
# remove folder of the lib ... for this targer
|
||||
folderbuild = target.get_build_folder(self.name)
|
||||
debug.info("remove folder : '" + folderbuild + "'")
|
||||
lutinTools.remove_folder_and_sub_folder(folderbuild)
|
||||
tools.remove_folder_and_sub_folder(folderbuild)
|
||||
elif self.type=='BINARY' \
|
||||
or self.type=='PACKAGE':
|
||||
# remove folder of the lib ... for this targer
|
||||
folderbuild = target.get_build_folder(self.name)
|
||||
debug.info("remove folder : '" + folderbuild + "'")
|
||||
lutinTools.remove_folder_and_sub_folder(folderbuild)
|
||||
tools.remove_folder_and_sub_folder(folderbuild)
|
||||
folderStaging = target.get_staging_folder(self.name)
|
||||
debug.info("remove folder : '" + folderStaging + "'")
|
||||
lutinTools.remove_folder_and_sub_folder(folderStaging)
|
||||
tools.remove_folder_and_sub_folder(folderStaging)
|
||||
else:
|
||||
debug.error("Dit not know the element type ... (impossible case) type=" + self.type)
|
||||
|
||||
|
@ -18,9 +18,10 @@ else:
|
||||
import os
|
||||
import subprocess
|
||||
import shlex
|
||||
# Local import
|
||||
from . import debug
|
||||
from . import tools as lutinTools
|
||||
from . import env as lutinEnv
|
||||
import tools
|
||||
from . import env
|
||||
|
||||
queueLock = threading.Lock()
|
||||
workQueue = queue.Queue()
|
||||
@ -46,7 +47,7 @@ def store_command(cmdLine, file):
|
||||
if file != "" \
|
||||
and file != None:
|
||||
# Create directory:
|
||||
lutinTools.create_directory_of_file(file)
|
||||
tools.create_directory_of_file(file)
|
||||
# Store the command Line:
|
||||
file2 = open(file, "w")
|
||||
file2.write(cmdLine)
|
||||
@ -98,7 +99,7 @@ def run_command(cmdLine, storeCmdLine="", buildId=-1, file=""):
|
||||
err = err.decode("utf-8")
|
||||
# Check error :
|
||||
if p.returncode == 0:
|
||||
debug.debug(lutinEnv.print_pretty(cmdLine))
|
||||
debug.debug(env.print_pretty(cmdLine))
|
||||
queueLock.acquire()
|
||||
# TODO : Print the output all the time .... ==> to show warnings ...
|
||||
if buildId >= 0 and (output != "" or err != ""):
|
||||
@ -113,7 +114,7 @@ def run_command(cmdLine, storeCmdLine="", buildId=-1, file=""):
|
||||
exitFlag = True
|
||||
# if No ID : Not in a multiprocess mode ==> just stop here
|
||||
if buildId < 0:
|
||||
debug.debug(lutinEnv.print_pretty(cmdLine), force=True)
|
||||
debug.debug(env.print_pretty(cmdLine), force=True)
|
||||
debug.print_compilator(output)
|
||||
debug.print_compilator(err)
|
||||
if p.returncode == 2:
|
||||
@ -266,7 +267,7 @@ def pool_synchrosize():
|
||||
debug.error("Pool error occured ... (No return information on Pool)")
|
||||
return
|
||||
debug.error("Error in an pool element : [" + str(errorExecution["id"]) + "]", crash=False)
|
||||
debug.debug(lutinEnv.print_pretty(errorExecution["cmd"]), force=True)
|
||||
debug.debug(env.print_pretty(errorExecution["cmd"]), force=True)
|
||||
debug.print_compilator(str(errorExecution["out"][0]))
|
||||
debug.print_compilator(str(errorExecution["err"][0]))
|
||||
if errorExecution["return"] == 2:
|
||||
|
@ -11,12 +11,10 @@ import sys
|
||||
import os
|
||||
import inspect
|
||||
import fnmatch
|
||||
from . import debug
|
||||
import datetime
|
||||
from . import tools as lutinTools
|
||||
# Local import
|
||||
from . import debug
|
||||
from . import module
|
||||
from . import image as lutinImage
|
||||
from . import host as lutinHost
|
||||
|
||||
class System:
|
||||
def __init__(self):
|
||||
|
@ -7,14 +7,14 @@
|
||||
## @license APACHE v2.0 (see license file)
|
||||
##
|
||||
|
||||
import lutinDebug as debug
|
||||
import lutinSystem
|
||||
import lutinTools as tools
|
||||
from lutin import debug
|
||||
from lutin import system
|
||||
from lutin import tools
|
||||
import os
|
||||
|
||||
class System(lutinSystem.System):
|
||||
class System(system.System):
|
||||
def __init__(self):
|
||||
lutinSystem.System.__init__(self)
|
||||
system.System.__init__(self)
|
||||
# create some HELP:
|
||||
self.help="CoreAudio : Ios interface for audio (all time present, just system interface)"
|
||||
self.valid = True
|
||||
|
@ -7,14 +7,14 @@
|
||||
## @license APACHE v2.0 (see license file)
|
||||
##
|
||||
|
||||
import lutinDebug as debug
|
||||
import lutinSystem
|
||||
import lutinTools as tools
|
||||
from lutin import debug
|
||||
from lutin import system
|
||||
from lutin import tools
|
||||
import os
|
||||
|
||||
class System(lutinSystem.System):
|
||||
class System(system.System):
|
||||
def __init__(self):
|
||||
lutinSystem.System.__init__(self)
|
||||
system.System.__init__(self)
|
||||
# create some HELP:
|
||||
self.help="ALSA : Advanced Linux Sound Architecture\n Can be install with the package:\n - libasound2-dev"
|
||||
# check if the library exist:
|
||||
|
@ -7,14 +7,14 @@
|
||||
## @license APACHE v2.0 (see license file)
|
||||
##
|
||||
|
||||
import lutinDebug as debug
|
||||
import lutinSystem
|
||||
import lutinTools as tools
|
||||
from lutin import debug
|
||||
from lutin import system
|
||||
from lutin import tools
|
||||
import os
|
||||
|
||||
class System(lutinSystem.System):
|
||||
class System(system.System):
|
||||
def __init__(self):
|
||||
lutinSystem.System.__init__(self)
|
||||
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"
|
||||
# check if the library exist:
|
||||
|
@ -7,14 +7,14 @@
|
||||
## @license APACHE v2.0 (see license file)
|
||||
##
|
||||
|
||||
import lutinDebug as debug
|
||||
import lutinSystem
|
||||
import lutinTools as tools
|
||||
from lutin import debug
|
||||
from lutin import system
|
||||
from lutin import tools
|
||||
import os
|
||||
|
||||
class System(lutinSystem.System):
|
||||
class System(system.System):
|
||||
def __init__(self):
|
||||
lutinSystem.System.__init__(self)
|
||||
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)"
|
||||
# check if the library exist:
|
||||
|
@ -7,14 +7,14 @@
|
||||
## @license APACHE v2.0 (see license file)
|
||||
##
|
||||
|
||||
import lutinDebug as debug
|
||||
import lutinSystem
|
||||
import lutinTools as tools
|
||||
from lutin import debug
|
||||
from lutin import system
|
||||
from lutin import tools
|
||||
import os
|
||||
|
||||
class System(lutinSystem.System):
|
||||
class System(system.System):
|
||||
def __init__(self):
|
||||
lutinSystem.System.__init__(self)
|
||||
system.System.__init__(self)
|
||||
# create some HELP:
|
||||
self.help="OSS : Linux Open Sound System\n Can be install with the package:\n - ... TODO ..."
|
||||
# check if the library exist:
|
||||
|
@ -7,14 +7,14 @@
|
||||
## @license APACHE v2.0 (see license file)
|
||||
##
|
||||
|
||||
import lutinDebug as debug
|
||||
import lutinSystem
|
||||
import lutinTools as tools
|
||||
from lutin import debug
|
||||
from lutin import system
|
||||
from lutin import tools
|
||||
import os
|
||||
|
||||
class System(lutinSystem.System):
|
||||
class System(system.System):
|
||||
def __init__(self):
|
||||
lutinSystem.System.__init__(self)
|
||||
system.System.__init__(self)
|
||||
# create some HELP:
|
||||
self.help="PULSE : The Linux PulseAudio\n Can be install with the package:\n - libpulse-dev"
|
||||
# check if the library exist:
|
||||
|
@ -7,14 +7,14 @@
|
||||
## @license APACHE v2.0 (see license file)
|
||||
##
|
||||
|
||||
import lutinDebug as debug
|
||||
import lutinSystem
|
||||
import lutinTools as tools
|
||||
from lutin import debug
|
||||
from lutin import system
|
||||
from lutin import tools
|
||||
import os
|
||||
|
||||
class System(lutinSystem.System):
|
||||
class System(system.System):
|
||||
def __init__(self):
|
||||
lutinSystem.System.__init__(self)
|
||||
system.System.__init__(self)
|
||||
# create some HELP:
|
||||
self.help="Z : z library \n Can be install with the package:\n - zlib1g-dev"
|
||||
# check if the library exist:
|
||||
|
@ -7,14 +7,14 @@
|
||||
## @license APACHE v2.0 (see license file)
|
||||
##
|
||||
|
||||
import lutinDebug as debug
|
||||
import lutinSystem
|
||||
import lutinTools as tools
|
||||
from lutin import debug
|
||||
from lutin import system
|
||||
from lutin import tools
|
||||
import os
|
||||
|
||||
class System(lutinSystem.System):
|
||||
class System(system.System):
|
||||
def __init__(self):
|
||||
lutinSystem.System.__init__(self)
|
||||
system.System.__init__(self)
|
||||
# create some HELP:
|
||||
self.help="CoreAudio : MacOs interface for audio (all time present, just system interface)"
|
||||
self.valid = True
|
||||
|
@ -7,14 +7,14 @@
|
||||
## @license APACHE v2.0 (see license file)
|
||||
##
|
||||
|
||||
import lutinDebug as debug
|
||||
import lutinSystem
|
||||
import lutinTools as tools
|
||||
from lutin import debug
|
||||
from lutin import system
|
||||
from lutin import tools
|
||||
import os
|
||||
|
||||
class System(lutinSystem.System):
|
||||
class System(system.System):
|
||||
def __init__(self):
|
||||
lutinSystem.System.__init__(self)
|
||||
system.System.__init__(self)
|
||||
# create some HELP:
|
||||
self.help="DirectSound : Direct sound API for windows audio interface"
|
||||
# check if the library exist:
|
||||
|
@ -11,14 +11,14 @@ import sys
|
||||
import os
|
||||
import inspect
|
||||
import fnmatch
|
||||
import datetime
|
||||
# Local import
|
||||
from . import debug
|
||||
from . import heritage
|
||||
import datetime
|
||||
from . import tools as lutinTools
|
||||
from . import module as lutinModule
|
||||
from . import system as lutinSystem
|
||||
from . import image as lutinImage
|
||||
from . import host as lutinHost
|
||||
from . import tools
|
||||
from . import module
|
||||
from . import system
|
||||
from . import image
|
||||
from . import multiprocess
|
||||
|
||||
class Target:
|
||||
@ -190,10 +190,10 @@ class Target:
|
||||
debug.verbose("cmd file " + cmdFile)
|
||||
if x == -1:
|
||||
debug.verbose("must copy file : '" + source + "' ==> '" + dst + "'");
|
||||
lutinTools.copy_file(source, baseFolder+"/"+dst, cmdFile)
|
||||
tools.copy_file(source, baseFolder+"/"+dst, cmdFile)
|
||||
else:
|
||||
debug.verbose("resize image : '" + source + "' ==> '" + dst + "' size=(" + str(x) + "," + str(y) + ")");
|
||||
lutinImage.resize(source, baseFolder+"/"+dst, x, y, cmdFile)
|
||||
image.resize(source, baseFolder+"/"+dst, x, y, cmdFile)
|
||||
|
||||
|
||||
def clean_module_tree(self):
|
||||
@ -243,32 +243,32 @@ class Target:
|
||||
return list
|
||||
|
||||
def get_final_folder(self):
|
||||
return lutinTools.get_run_folder() + self.folder_out + self.folder_final
|
||||
return tools.get_run_folder() + self.folder_out + self.folder_final
|
||||
|
||||
def get_staging_folder(self, binaryName):
|
||||
return lutinTools.get_run_folder() + self.folder_out + self.folder_staging + "/" + binaryName
|
||||
return tools.get_run_folder() + self.folder_out + self.folder_staging + "/" + binaryName
|
||||
|
||||
def get_staging_folder_data(self, binaryName):
|
||||
return self.get_staging_folder(binaryName) + self.folder_data + "/" + binaryName
|
||||
|
||||
def get_build_folder(self, moduleName):
|
||||
return lutinTools.get_run_folder() + self.folder_out + self.folder_build + "/" + moduleName
|
||||
return tools.get_run_folder() + self.folder_out + self.folder_build + "/" + moduleName
|
||||
|
||||
def get_doc_folder(self, moduleName):
|
||||
return lutinTools.get_run_folder() + self.folder_out + self.folder_doc + "/" + moduleName
|
||||
return tools.get_run_folder() + self.folder_out + self.folder_doc + "/" + moduleName
|
||||
|
||||
def is_module_build(self, module):
|
||||
def is_module_build(self, my_module):
|
||||
for mod in self.buildDone:
|
||||
if mod == module:
|
||||
if mod == my_module:
|
||||
return True
|
||||
self.buildDone.append(module)
|
||||
self.buildDone.append(my_module)
|
||||
return False
|
||||
|
||||
def is_module_buildTree(self, module):
|
||||
def is_module_buildTree(self, my_module):
|
||||
for mod in self.buildTreeDone:
|
||||
if mod == module:
|
||||
if mod == my_module:
|
||||
return True
|
||||
self.buildTreeDone.append(module)
|
||||
self.buildTreeDone.append(my_module)
|
||||
return False
|
||||
|
||||
def add_module(self, newModule):
|
||||
@ -286,16 +286,16 @@ class Target:
|
||||
"""
|
||||
|
||||
def build_tree(self, name, packagesName):
|
||||
for module in self.moduleList:
|
||||
if module.name == name:
|
||||
module.build_tree(self, packagesName)
|
||||
for mod in self.moduleList:
|
||||
if mod.name == name:
|
||||
mod.build_tree(self, packagesName)
|
||||
return
|
||||
debug.error("request to build tree on un-existant module name : '" + name + "'")
|
||||
|
||||
def clean(self, name):
|
||||
for module in self.moduleList:
|
||||
if module.name == name:
|
||||
module.clean(self)
|
||||
for mod in self.moduleList:
|
||||
if mod.name == name:
|
||||
mod.clean(self)
|
||||
return
|
||||
debug.error("request to clean an un-existant module name : '" + name + "'")
|
||||
|
||||
@ -304,32 +304,32 @@ class Target:
|
||||
if elem.name == name:
|
||||
return True
|
||||
if optionnal == False:
|
||||
lutinModule.load_module(self, name)
|
||||
module.load_module(self, name)
|
||||
return True
|
||||
else:
|
||||
# TODO : Check internal module and system module ...
|
||||
# need to import the module (or the system module ...)
|
||||
exist = lutinSystem.exist(name, self.name)
|
||||
exist = system.exist(name, self.name)
|
||||
if exist == True:
|
||||
lutinSystem.load(self, name, self.name)
|
||||
system.load(self, name, self.name)
|
||||
return True;
|
||||
# try to find in the local Modules:
|
||||
exist = lutinModule.exist(self, name)
|
||||
exist = module.exist(self, name)
|
||||
if exist == True:
|
||||
lutinModule.load_module(self, name)
|
||||
module.load_module(self, name)
|
||||
return True;
|
||||
else:
|
||||
return False;
|
||||
|
||||
def load_all(self):
|
||||
listOfAllTheModule = lutinModule.list_all_module()
|
||||
listOfAllTheModule = module.list_all_module()
|
||||
for modName in listOfAllTheModule:
|
||||
self.load_if_needed(modName)
|
||||
|
||||
def project_add_module(self, name, projectMng, addedModule):
|
||||
for module in self.moduleList:
|
||||
if module.name == name:
|
||||
module.ext_project_add_module(self, projectMng, addedModule)
|
||||
for mod in self.moduleList:
|
||||
if mod.name == name:
|
||||
mod.ext_project_add_module(self, projectMng, addedModule)
|
||||
return
|
||||
|
||||
def build_optionnal(self, moduleName, packagesName=None):
|
||||
|
@ -8,17 +8,16 @@
|
||||
##
|
||||
|
||||
|
||||
import lutinDebug as debug
|
||||
import lutinTarget
|
||||
import lutinTools as tools
|
||||
import lutinHost
|
||||
import lutinImage
|
||||
import lutinMultiprocess
|
||||
import lutinHost
|
||||
from lutin import debug
|
||||
from lutin import target
|
||||
from lutin import tools
|
||||
from lutin import image
|
||||
from lutin import multiprocess
|
||||
from lutin import host
|
||||
import os
|
||||
import sys
|
||||
|
||||
class Target(lutinTarget.Target):
|
||||
class Target(target.Target):
|
||||
def __init__(self, config):
|
||||
#processor type selection (auto/arm/ppc/x86)
|
||||
if config["arch"] == "auto":
|
||||
@ -28,7 +27,7 @@ class Target(lutinTarget.Target):
|
||||
config["bus-size"] = "32"
|
||||
|
||||
arch = ""#"ARMv7"
|
||||
lutinTarget.Target.__init__(self, "Android", config, arch)
|
||||
target.Target.__init__(self, "Android", config, arch)
|
||||
|
||||
self.folder_ndk = os.getenv('PROJECT_NDK', "AUTO")
|
||||
self.folder_sdk = os.getenv('PROJECT_SDK', "AUTO")
|
||||
@ -57,7 +56,7 @@ class Target(lutinTarget.Target):
|
||||
|
||||
tmpOsVal = "64"
|
||||
gccVersion = "4.9"
|
||||
if lutinHost.BUS_SIZE==64:
|
||||
if host.BUS_SIZE==64:
|
||||
tmpOsVal = "_64"
|
||||
if self.config["compilator"] == "clang":
|
||||
self.set_cross_base(self.folder_ndk + "/toolchains/llvm-3.3/prebuilt/linux-x86_64/bin/")
|
||||
@ -334,7 +333,7 @@ class Target(lutinTarget.Target):
|
||||
tools.create_directory_of_file(self.get_staging_folder(pkgName) + "/res/drawable/icon.png");
|
||||
if "ICON" in pkgProperties.keys() \
|
||||
and pkgProperties["ICON"] != "":
|
||||
lutinImage.resize(pkgProperties["ICON"], self.get_staging_folder(pkgName) + "/res/drawable/icon.png", 256, 256)
|
||||
image.resize(pkgProperties["ICON"], self.get_staging_folder(pkgName) + "/res/drawable/icon.png", 256, 256)
|
||||
else:
|
||||
# to be sure that we have all time a resource ...
|
||||
tmpFile = open(self.get_staging_folder(pkgName) + "/res/drawable/plop.txt", 'w')
|
||||
@ -596,7 +595,7 @@ class Target(lutinTarget.Target):
|
||||
+ "-S " + self.get_staging_folder(pkgName) + "/res/ " \
|
||||
+ adModResouceFolder \
|
||||
+ "-J " + self.get_staging_folder(pkgName) + "/src/ "
|
||||
lutinMultiprocess.run_command(cmdLine)
|
||||
multiprocess.run_command(cmdLine)
|
||||
#aapt package -f -M ${manifest.file} -F ${packaged.resource.file} -I ${path.to.android-jar.library}
|
||||
# -S ${android-resource-directory} [-m -J ${folder.to.output.the.R.java}]
|
||||
|
||||
@ -637,7 +636,7 @@ class Target(lutinTarget.Target):
|
||||
+ filesString \
|
||||
+ self.file_finalAbstraction + " " \
|
||||
+ self.get_staging_folder(pkgName) + "/src/R.java "
|
||||
lutinMultiprocess.run_command(cmdLine)
|
||||
multiprocess.run_command(cmdLine)
|
||||
|
||||
debug.print_element("pkg", ".dex", "<==", "*.class")
|
||||
cmdLine = androidToolPath + "dx " \
|
||||
@ -648,7 +647,7 @@ class Target(lutinTarget.Target):
|
||||
if "ADMOD_ID" in pkgProperties:
|
||||
cmdLine += self.folder_sdk + "/extras/google/google_play_services/libproject/google-play-services_lib/libs/google-play-services.jar "
|
||||
|
||||
lutinMultiprocess.run_command(cmdLine)
|
||||
multiprocess.run_command(cmdLine)
|
||||
|
||||
debug.print_element("pkg", ".apk", "<==", ".dex, assets, .so, res")
|
||||
#builderDebug="-agentlib:jdwp=transport=dt_socket,server=y,address=8050,suspend=y "
|
||||
@ -664,7 +663,7 @@ class Target(lutinTarget.Target):
|
||||
+ " -z " + self.get_staging_folder(pkgName) + "/resources.res " \
|
||||
+ " -f " + self.get_staging_folder(pkgName) + "/build/" + pkgNameApplicationName + ".dex " \
|
||||
+ " -rf " + self.get_staging_folder(pkgName) + "/data "
|
||||
lutinMultiprocess.run_command(cmdLine)
|
||||
multiprocess.run_command(cmdLine)
|
||||
|
||||
# doc :
|
||||
# http://developer.android.com/tools/publishing/app-signing.html
|
||||
@ -683,7 +682,7 @@ class Target(lutinTarget.Target):
|
||||
+ " -keypass PassKey__AndroidDebugKey " \
|
||||
+ self.get_staging_folder(pkgName) + "/build/" + pkgNameApplicationName + "-unalligned.apk " \
|
||||
+ " alias__AndroidDebugKey"
|
||||
lutinMultiprocess.run_command(cmdLine)
|
||||
multiprocess.run_command(cmdLine)
|
||||
tmpFile = open("tmpPass.boo", 'w')
|
||||
tmpFile.write("\n")
|
||||
tmpFile.flush()
|
||||
@ -696,12 +695,12 @@ class Target(lutinTarget.Target):
|
||||
+ " -sigalg SHA1withRSA -digestalg SHA1 " \
|
||||
+ self.get_staging_folder(pkgName) + "/build/" + pkgNameApplicationName + "-unalligned.apk " \
|
||||
+ " " + pkgNameApplicationName
|
||||
lutinMultiprocess.run_command(cmdLine)
|
||||
multiprocess.run_command(cmdLine)
|
||||
cmdLine = "jarsigner " \
|
||||
+ " -verify -verbose -certs " \
|
||||
+ " -sigalg SHA1withRSA -digestalg SHA1 " \
|
||||
+ self.get_staging_folder(pkgName) + "/build/" + pkgNameApplicationName + "-unalligned.apk "
|
||||
lutinMultiprocess.run_command(cmdLine)
|
||||
multiprocess.run_command(cmdLine)
|
||||
|
||||
debug.print_element("pkg", ".apk(aligned)", "<==", ".apk (not aligned)")
|
||||
tools.remove_file(self.get_staging_folder(pkgName) + "/" + pkgNameApplicationName + ".apk")
|
||||
@ -709,7 +708,7 @@ class Target(lutinTarget.Target):
|
||||
cmdLine = androidToolPath + "zipalign 4 " \
|
||||
+ self.get_staging_folder(pkgName) + "/build/" + pkgNameApplicationName + "-unalligned.apk " \
|
||||
+ self.get_staging_folder(pkgName) + "/" + pkgNameApplicationName + ".apk "
|
||||
lutinMultiprocess.run_command(cmdLine)
|
||||
multiprocess.run_command(cmdLine)
|
||||
|
||||
# copy file in the final stage :
|
||||
tools.copy_file(self.get_staging_folder(pkgName) + "/" + pkgNameApplicationName + ".apk",
|
||||
@ -725,7 +724,7 @@ class Target(lutinTarget.Target):
|
||||
pkgNameApplicationName += "debug"
|
||||
cmdLine = self.folder_sdk + "/platform-tools/adb install -r " \
|
||||
+ self.get_staging_folder(pkgName) + "/" + pkgNameApplicationName + ".apk "
|
||||
lutinMultiprocess.run_command(cmdLine)
|
||||
multiprocess.run_command(cmdLine)
|
||||
|
||||
def un_install_package(self, pkgName):
|
||||
debug.debug("------------------------------------------------------------------------")
|
||||
@ -735,7 +734,7 @@ class Target(lutinTarget.Target):
|
||||
if self.config["mode"] == "debug":
|
||||
pkgNameApplicationName += "debug"
|
||||
cmdLine = self.folder_sdk + "/platform-tools/adb uninstall " + pkgNameApplicationName
|
||||
RlutinMultiprocess.unCommand(cmdLine)
|
||||
Rmultiprocess.unCommand(cmdLine)
|
||||
|
||||
def Log(self, pkgName):
|
||||
debug.debug("------------------------------------------------------------------------")
|
||||
@ -743,6 +742,6 @@ class Target(lutinTarget.Target):
|
||||
debug.debug("------------------------------------------------------------------------")
|
||||
debug.info("cmd: " + self.folder_sdk + "/platform-tools/adb shell logcat ")
|
||||
cmdLine = self.folder_sdk + "/platform-tools/adb shell logcat "
|
||||
lutinMultiprocess.run_command(cmdLine)
|
||||
multiprocess.run_command(cmdLine)
|
||||
|
||||
|
||||
|
@ -7,18 +7,18 @@
|
||||
## @license APACHE v2.0 (see license file)
|
||||
##
|
||||
|
||||
import lutinDebug as debug
|
||||
import lutinTarget
|
||||
import lutinTools
|
||||
import lutinImage
|
||||
from lutin import debug
|
||||
from lutin import target
|
||||
from lutin import tools
|
||||
from lutin import image
|
||||
import os
|
||||
import stat
|
||||
import lutinMultiprocess
|
||||
import lutinHost
|
||||
from lutin import multiprocess
|
||||
from lutin import host
|
||||
import random
|
||||
import re
|
||||
|
||||
class Target(lutinTarget.Target):
|
||||
class Target(target.Target):
|
||||
def __init__(self, config):
|
||||
if config["compilator"] == "gcc":
|
||||
debug.info("compile only with clang for IOs");
|
||||
@ -37,7 +37,7 @@ class Target(lutinTarget.Target):
|
||||
else:
|
||||
arch="arm64" # for ipad air
|
||||
#arch="armv7" # for Iphone 4
|
||||
lutinTarget.Target.__init__(self, "IOs", config, arch)
|
||||
target.Target.__init__(self, "IOs", config, arch)
|
||||
if self.config["simulation"] == True:
|
||||
self.set_cross_base("/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/")
|
||||
else:
|
||||
@ -76,7 +76,7 @@ class Target(lutinTarget.Target):
|
||||
#self.global_flags_m.append("-fmodules")
|
||||
|
||||
def get_staging_folder(self, binaryName):
|
||||
return lutinTools.get_run_folder() + self.folder_out + self.folder_staging + "/" + binaryName + ".app/"
|
||||
return tools.get_run_folder() + self.folder_out + self.folder_staging + "/" + binaryName + ".app/"
|
||||
|
||||
def get_staging_folder_data(self, binaryName):
|
||||
return self.get_staging_folder(binaryName) + self.folder_data + "/"
|
||||
@ -92,23 +92,23 @@ class Target(lutinTarget.Target):
|
||||
# TODO : Do not regenerate if source resource is not availlable
|
||||
# TODO : Add a colored background ...
|
||||
debug.print_element("pkg", "iTunesArtwork.png", "<==", pkgProperties["ICON"])
|
||||
lutinImage.resize(pkgProperties["ICON"], self.get_staging_folder(pkgName) + "/iTunesArtwork.png", 512, 512)
|
||||
image.resize(pkgProperties["ICON"], self.get_staging_folder(pkgName) + "/iTunesArtwork.png", 512, 512)
|
||||
debug.print_element("pkg", "iTunesArtwork@2x.png", "<==", pkgProperties["ICON"])
|
||||
lutinImage.resize(pkgProperties["ICON"], self.get_staging_folder(pkgName) + "/iTunesArtwork@2x.png", 1024, 1024)
|
||||
image.resize(pkgProperties["ICON"], self.get_staging_folder(pkgName) + "/iTunesArtwork@2x.png", 1024, 1024)
|
||||
debug.print_element("pkg", "Icon-60@2x.png", "<==", pkgProperties["ICON"])
|
||||
lutinImage.resize(pkgProperties["ICON"], self.get_staging_folder(pkgName) + "/Icon-60@2x.png", 120, 120)
|
||||
image.resize(pkgProperties["ICON"], self.get_staging_folder(pkgName) + "/Icon-60@2x.png", 120, 120)
|
||||
debug.print_element("pkg", "Icon-76.png", "<==", pkgProperties["ICON"])
|
||||
lutinImage.resize(pkgProperties["ICON"], self.get_staging_folder(pkgName) + "/Icon-76.png", 76, 76)
|
||||
image.resize(pkgProperties["ICON"], self.get_staging_folder(pkgName) + "/Icon-76.png", 76, 76)
|
||||
debug.print_element("pkg", "Icon-76@2x.png", "<==", pkgProperties["ICON"])
|
||||
lutinImage.resize(pkgProperties["ICON"], self.get_staging_folder(pkgName) + "/Icon-76@2x.png", 152, 152)
|
||||
image.resize(pkgProperties["ICON"], self.get_staging_folder(pkgName) + "/Icon-76@2x.png", 152, 152)
|
||||
debug.print_element("pkg", "Icon-Small-40.png", "<==", pkgProperties["ICON"])
|
||||
lutinImage.resize(pkgProperties["ICON"], self.get_staging_folder(pkgName) + "/Icon-Small-40.png", 40, 40)
|
||||
image.resize(pkgProperties["ICON"], self.get_staging_folder(pkgName) + "/Icon-Small-40.png", 40, 40)
|
||||
debug.print_element("pkg", "Icon-Small-40@2x.png", "<==", pkgProperties["ICON"])
|
||||
lutinImage.resize(pkgProperties["ICON"], self.get_staging_folder(pkgName) + "/Icon-Small-40@2x.png", 80, 80)
|
||||
image.resize(pkgProperties["ICON"], self.get_staging_folder(pkgName) + "/Icon-Small-40@2x.png", 80, 80)
|
||||
debug.print_element("pkg", "Icon-Small.png", "<==", pkgProperties["ICON"])
|
||||
lutinImage.resize(pkgProperties["ICON"], self.get_staging_folder(pkgName) + "/Icon-Small.png", 29, 29)
|
||||
image.resize(pkgProperties["ICON"], self.get_staging_folder(pkgName) + "/Icon-Small.png", 29, 29)
|
||||
debug.print_element("pkg", "Icon-Small@2x.png", "<==", pkgProperties["ICON"])
|
||||
lutinImage.resize(pkgProperties["ICON"], self.get_staging_folder(pkgName) + "/Icon-Small@2x.png", 58, 58)
|
||||
image.resize(pkgProperties["ICON"], self.get_staging_folder(pkgName) + "/Icon-Small@2x.png", 58, 58)
|
||||
|
||||
debug.print_element("pkg", "PkgInfo", "<==", "APPL????")
|
||||
infoFile = self.get_staging_folder(pkgName) + "/PkgInfo"
|
||||
@ -227,7 +227,7 @@ class Target(lutinTarget.Target):
|
||||
else:
|
||||
cmdLine += " -platform iphoneos "
|
||||
cmdLine += " -o " + self.get_staging_folder(pkgName) + "/" + "Info.plist"
|
||||
lutinMultiprocess.run_command(cmdLine)
|
||||
multiprocess.run_command(cmdLine)
|
||||
"""
|
||||
"""
|
||||
|
||||
@ -329,16 +329,16 @@ class Target(lutinTarget.Target):
|
||||
# application signing :
|
||||
debug.print_element("pkg(signed)", "pkg", "<==", "Signing application")
|
||||
iosDevelopperKeyFile = ".iosKey.txt"
|
||||
if lutinTools.file_size(iosDevelopperKeyFile) < 10:
|
||||
if tools.file_size(iosDevelopperKeyFile) < 10:
|
||||
debug.error("To sign an application we need to have a signing key in the file '" + iosDevelopperKeyFile + "' \n it is represented like: 'iPhone Developer: Francis DUGENOUX (YRRQE5KGTH)'\n you can obtain it with : 'certtool y | grep \"Developer\"'")
|
||||
signatureKey = lutinTools.file_read_data(iosDevelopperKeyFile)
|
||||
signatureKey = tools.file_read_data(iosDevelopperKeyFile)
|
||||
signatureKey = re.sub('\n', '', signatureKey)
|
||||
cmdLine = 'codesign --force --sign '
|
||||
# to get this key ; certtool y | grep "Developer"
|
||||
cmdLine += ' "' + signatureKey + '" '
|
||||
cmdLine += ' --entitlements ' + self.get_build_folder(pkgName) + '/worddown.xcent'
|
||||
cmdLine += ' ' + self.get_staging_folder(pkgName)
|
||||
lutinMultiprocess.run_command(cmdLine)
|
||||
multiprocess.run_command(cmdLine)
|
||||
|
||||
# --force --sign "iPhone Developer: Edouard DUPIN (SDFGSDFGSDFG)"
|
||||
# --resource-rules=/Users/edouarddupin/Library/Developer/Xcode/DerivedData/worddown-cmuvjchgtiteexdiacyqoexsyadg/Build/Products/Debug-iphoneos/worddown.app/ResourceRules.plist
|
||||
@ -357,18 +357,18 @@ class Target(lutinTarget.Target):
|
||||
debug.info("Install package '" + pkgName + "'")
|
||||
debug.debug("------------------------------------------------------------------------")
|
||||
if self.sumulator == False:
|
||||
if lutinTools.file_size("ewol/ios-deploy/ios-deploy") == 0:
|
||||
if tools.file_size("ewol/ios-deploy/ios-deploy") == 0:
|
||||
debug.print_element("tool", "ios-deploy", "<==", "external sources")
|
||||
cmdLine = 'cd ewol/ios-deploy ; make ; cd ../.. '
|
||||
lutinMultiprocess.run_command(cmdLine)
|
||||
if lutinTools.file_size("ewol/ios-deploy/ios-deploy") == 0:
|
||||
multiprocess.run_command(cmdLine)
|
||||
if tools.file_size("ewol/ios-deploy/ios-deploy") == 0:
|
||||
debug.error("Can not create ios-deploy external software ...")
|
||||
debug.print_element("deploy", "iphone/ipad", "<==", "aplication")
|
||||
cmdLine = './ewol/ios-deploy/ios-deploy --bundle ' + self.get_staging_folder(pkgName)
|
||||
lutinMultiprocess.run_command(cmdLine)
|
||||
multiprocess.run_command(cmdLine)
|
||||
else:
|
||||
simulatorIdFile = ".iosSimutatorId_" + pkgName + ".txt"
|
||||
if lutinTools.file_size(simulatorIdFile) < 10:
|
||||
if tools.file_size(simulatorIdFile) < 10:
|
||||
#create the file:
|
||||
tmpFile = open(simulatorIdFile, 'w')
|
||||
tmpFile.write(self.createRandomNumber(8))
|
||||
@ -382,17 +382,17 @@ class Target(lutinTarget.Target):
|
||||
tmpFile.write(self.createRandomNumber(12))
|
||||
tmpFile.flush()
|
||||
tmpFile.close()
|
||||
simulatorId = lutinTools.file_read_data(simulatorIdFile)
|
||||
simulatorId = tools.file_read_data(simulatorIdFile)
|
||||
home = os.path.expanduser("~")
|
||||
destinationFolderBase = home + "/Library/Application\\ Support/iPhone\\ Simulator/7.1/Applications/" + simulatorId
|
||||
destinationFolder = home + "/Library/Application Support/iPhone Simulator/7.1/Applications/" + simulatorId + "/" + pkgName + ".app"
|
||||
destinationFolder2 = home + "/Library/Application\\ Support/iPhone\\ Simulator/7.1/Applications/" + simulatorId + "/" + pkgName + ".app"
|
||||
debug.info("install in simulator : " + destinationFolder)
|
||||
lutinTools.create_directory_of_file(destinationFolder + "/plop.txt")
|
||||
tools.create_directory_of_file(destinationFolder + "/plop.txt")
|
||||
cmdLine = "cp -rf " + self.get_staging_folder(pkgName) + " " + destinationFolder2
|
||||
lutinMultiprocess.run_command(cmdLine)
|
||||
multiprocess.run_command(cmdLine)
|
||||
cmdLine = "touch " + destinationFolderBase
|
||||
lutinMultiprocess.run_command(cmdLine)
|
||||
multiprocess.run_command(cmdLine)
|
||||
|
||||
#sudo dpkg -i $(TARGET_OUT_FINAL)/$(PROJECT_NAME) + self.suffix_package
|
||||
|
||||
@ -404,7 +404,7 @@ class Target(lutinTarget.Target):
|
||||
debug.warning("not implemented")
|
||||
else:
|
||||
simulatorIdFile = ".iosSimutatorId_" + pkgName + ".txt"
|
||||
if lutinTools.file_size(simulatorIdFile) < 10:
|
||||
if tools.file_size(simulatorIdFile) < 10:
|
||||
debug.warning("Can not get simulation O_ID : " + simulatorIdFile)
|
||||
|
||||
#sudo dpkg -r $(TARGET_OUT_FINAL)/$(PROJECT_NAME) + self.suffix_package
|
||||
@ -414,18 +414,18 @@ class Target(lutinTarget.Target):
|
||||
debug.info("log of iOs board")
|
||||
debug.debug("------------------------------------------------------------------------")
|
||||
if self.sumulator == False:
|
||||
if lutinTools.file_size("ewol/ios-deploy/ios-deploy") == 0:
|
||||
if tools.file_size("ewol/ios-deploy/ios-deploy") == 0:
|
||||
debug.print_element("tool", "ios-deploy", "<==", "external sources")
|
||||
cmdLine = 'cd ewol/ios-deploy ; make ; cd ../.. '
|
||||
lutinMultiprocess.run_command(cmdLine)
|
||||
if lutinTools.file_size("ewol/ios-deploy/ios-deploy") == 0:
|
||||
multiprocess.run_command(cmdLine)
|
||||
if tools.file_size("ewol/ios-deploy/ios-deploy") == 0:
|
||||
debug.error("Can not create ios-deploy external software ...")
|
||||
debug.print_element("deploy", "iphone/ipad", "<==", "aplication")
|
||||
cmdLine = './ewol/ios-deploy/ios-deploy --debug --bundle ' + self.get_staging_folder(pkgName)
|
||||
lutinMultiprocess.run_command(cmdLine)
|
||||
multiprocess.run_command(cmdLine)
|
||||
else:
|
||||
cmdLine = "tail -f ~/Library/Logs/iOS\ Simulator/7.1/system.log"
|
||||
lutinMultiprocess.run_command(cmdLine)
|
||||
multiprocess.run_command(cmdLine)
|
||||
|
||||
|
||||
|
||||
|
@ -7,31 +7,30 @@
|
||||
## @license APACHE v2.0 (see license file)
|
||||
##
|
||||
|
||||
import lutinDebug as debug
|
||||
import lutinTarget
|
||||
import lutinTools as tools
|
||||
from lutin import debug
|
||||
from lutin import target
|
||||
from lutin import tools
|
||||
import os
|
||||
import stat
|
||||
import re
|
||||
import lutinMultiprocess
|
||||
import lutinHost
|
||||
from lutin import host
|
||||
|
||||
class Target(lutinTarget.Target):
|
||||
class Target(target.Target):
|
||||
def __init__(self, config):
|
||||
#processor type selection (auto/arm/ppc/x86)
|
||||
if config["arch"] == "auto":
|
||||
config["arch"] = "x86"
|
||||
#bus size selection (auto/32/64)
|
||||
if config["bus-size"] == "auto":
|
||||
config["bus-size"] = str(lutinHost.BUS_SIZE)
|
||||
lutinTarget.Target.__init__(self, "Linux", config, "")
|
||||
config["bus-size"] = str(host.BUS_SIZE)
|
||||
target.Target.__init__(self, "Linux", config, "")
|
||||
if self.config["bus-size"] == "64":
|
||||
# 64 bits
|
||||
if lutinHost.BUS_SIZE != 64:
|
||||
if host.BUS_SIZE != 64:
|
||||
self.global_flags_cc.append("-m64")
|
||||
else:
|
||||
# 32 bits
|
||||
if lutinHost.BUS_SIZE != 32:
|
||||
if host.BUS_SIZE != 32:
|
||||
self.global_flags_cc.append("-m32")
|
||||
|
||||
def generate_list_separate_coma(self, list):
|
||||
|
@ -7,24 +7,24 @@
|
||||
## @license APACHE v2.0 (see license file)
|
||||
##
|
||||
|
||||
import lutinDebug as debug
|
||||
import lutinTarget
|
||||
import lutinTools
|
||||
import lutinHost
|
||||
from lutin import debug
|
||||
from lutin import target
|
||||
from lutin import tools
|
||||
from lutin import host
|
||||
import os
|
||||
import stat
|
||||
|
||||
class Target(lutinTarget.Target):
|
||||
class Target(target.Target):
|
||||
def __init__(self, config):
|
||||
#processor type selection (auto/arm/ppc/x86)
|
||||
if config["arch"] == "auto":
|
||||
config["arch"] = "x86"
|
||||
#bus size selection (auto/32/64)
|
||||
if config["bus-size"] == "auto":
|
||||
config["bus-size"] = str(lutinHost.BUS_SIZE)
|
||||
config["bus-size"] = str(host.BUS_SIZE)
|
||||
# http://biolpc22.york.ac.uk/pub/linux-mac-cross/
|
||||
# http://devs.openttd.org/~truebrain/compile-farm/apple-darwin9.txt
|
||||
lutinTarget.Target.__init__(self, "MacOs", config, "")
|
||||
target.Target.__init__(self, "MacOs", config, "")
|
||||
|
||||
self.folder_bin="/MacOS"
|
||||
self.folder_lib="/lib"
|
||||
@ -38,7 +38,7 @@ class Target(lutinTarget.Target):
|
||||
|
||||
|
||||
def get_staging_folder(self, binaryName):
|
||||
return lutinTools.get_run_folder() + self.folder_out + self.folder_staging + "/" + binaryName + ".app/Contents/"
|
||||
return tools.get_run_folder() + self.folder_out + self.folder_staging + "/" + binaryName + ".app/Contents/"
|
||||
|
||||
def get_staging_folder_data(self, binaryName):
|
||||
return self.get_staging_folder(binaryName) + self.folder_data + "/"
|
||||
@ -50,7 +50,7 @@ class Target(lutinTarget.Target):
|
||||
|
||||
if "ICON" in pkgProperties.keys() \
|
||||
and pkgProperties["ICON"] != "":
|
||||
lutinTools.copy_file(pkgProperties["ICON"], self.get_staging_folder_data(pkgName) + "/icon.icns", force=True)
|
||||
tools.copy_file(pkgProperties["ICON"], self.get_staging_folder_data(pkgName) + "/icon.icns", force=True)
|
||||
|
||||
# http://www.sandroid.org/imcross/#Deployment
|
||||
infoFile=self.get_staging_folder(pkgName) + "/Info.plist"
|
||||
|
@ -7,16 +7,16 @@
|
||||
## @license APACHE v2.0 (see license file)
|
||||
##
|
||||
|
||||
import lutinDebug as debug
|
||||
import lutinTarget
|
||||
import lutinTools as tools
|
||||
import lutinHost
|
||||
from lutin import debug
|
||||
from lutin import target
|
||||
from lutin import tools
|
||||
from lutin import host
|
||||
import os
|
||||
import stat
|
||||
import sys
|
||||
import lutinZip as zip
|
||||
from lutin import zip
|
||||
|
||||
class Target(lutinTarget.Target):
|
||||
class Target(target.Target):
|
||||
def __init__(self, config):
|
||||
if config["compilator"] != "gcc":
|
||||
debug.error("Windows does not support '" + config["compilator"] + "' compilator ... availlable : [gcc]")
|
||||
@ -27,14 +27,14 @@ class Target(lutinTarget.Target):
|
||||
config["arch"] = "x86"
|
||||
#bus size selection (auto/32/64)
|
||||
if config["bus-size"] == "auto":
|
||||
config["bus-size"] = str(lutinHost.BUS_SIZE)
|
||||
config["bus-size"] = str(host.BUS_SIZE)
|
||||
|
||||
lutinTarget.Target.__init__(self, "Windows", config, "")
|
||||
target.Target.__init__(self, "Windows", config, "")
|
||||
|
||||
# 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":
|
||||
if host.OS == "Windows":
|
||||
self.set_cross_base("c:\\MinGW\\bin\\")
|
||||
sys.path.append("c:\\MinGW\\bin" )
|
||||
os.environ['PATH'] += ";c:\\MinGW\\bin\\"
|
||||
|
@ -10,11 +10,11 @@
|
||||
import os
|
||||
import shutil
|
||||
import errno
|
||||
from . import debug
|
||||
import fnmatch
|
||||
from . import multiprocess as lutinMultiprocess
|
||||
from . import depend as dependency
|
||||
|
||||
# Local import
|
||||
from . import debug
|
||||
from . import depend
|
||||
import multiprocess
|
||||
|
||||
"""
|
||||
|
||||
@ -101,12 +101,12 @@ def copy_file(src, dst, cmd_file=None, force=False):
|
||||
debug.error("Request a copy a file that does not existed : '" + src + "'")
|
||||
cmd_line = "copy \"" + src + "\" \"" + dst + "\""
|
||||
if force == False \
|
||||
and dependency.need_re_build(dst, src, file_cmd=cmd_file , cmdLine=cmd_line) == False:
|
||||
and depend.need_re_build(dst, src, file_cmd=cmd_file , cmdLine=cmd_line) == False:
|
||||
return
|
||||
debug.print_element("copy file", src, "==>", dst)
|
||||
create_directory_of_file(dst)
|
||||
shutil.copyfile(src, dst)
|
||||
lutinMultiprocess.store_command(cmd_line, cmd_file)
|
||||
multiprocess.store_command(cmd_line, cmd_file)
|
||||
|
||||
|
||||
def copy_anything(src, dst):
|
||||
|
@ -9,7 +9,7 @@
|
||||
import platform
|
||||
import os
|
||||
import zipfile
|
||||
|
||||
# Local import
|
||||
from . import debug
|
||||
from . import tools
|
||||
|
||||
|
22
setup.py
22
setup.py
@ -1,13 +1,31 @@
|
||||
#!/usr/bin/python
|
||||
from setuptools import setup
|
||||
|
||||
def readme():
|
||||
with open('README.rst') as f:
|
||||
return f.read()
|
||||
|
||||
# https://pypi.python.org/pypi?%3Aaction=list_classifiers
|
||||
setup(name='lutin',
|
||||
version='0.5.0',
|
||||
version='0.5.2',
|
||||
description='Lutin generic builder',
|
||||
long_description=readme(),
|
||||
url='http://github.com/HeeroYui/lutin',
|
||||
author='Edouard DUPIN',
|
||||
author_email='yui.heero@gmail.com',
|
||||
license='APACHE-2',
|
||||
packages=['lutin'],
|
||||
packages=['lutin',
|
||||
'lutin/builder',
|
||||
'lutin/system',
|
||||
'lutin/target'
|
||||
],
|
||||
classifiers=[
|
||||
'Development Status :: 3 - Alpha',
|
||||
'License :: OSI Approved :: Apache Software License',
|
||||
'Programming Language :: Python',
|
||||
'Topic :: Software Development :: Compilers',
|
||||
],
|
||||
keywords='builder c++ c android ios macos makefile cmake',
|
||||
scripts=['bin/lutin'],
|
||||
include_package_data = True,
|
||||
zip_safe=False)
|
||||
|
Loading…
x
Reference in New Issue
Block a user