Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
885a60f22c | |||
db4a587a44 | |||
9d6418eed9 | |||
ec60375c9f |
42
README.md
42
README.md
@@ -22,38 +22,20 @@ you can see exemple for some type in :
|
||||
edn : package
|
||||
glew : prebuild
|
||||
|
||||
Copyright (c)
|
||||
=============
|
||||
License (APACHE v2.0)
|
||||
=====================
|
||||
|
||||
2011, Edouard DUPIN
|
||||
Copyright lutin Edouard DUPIN
|
||||
|
||||
License (DSB)
|
||||
=============
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
1. Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
2. Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in
|
||||
the documentation and/or other materials provided with the
|
||||
distribution.
|
||||
|
||||
3. The name of the author may not be used to endorse or promote
|
||||
products derived from this software without specific prior
|
||||
written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
|
||||
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
|
||||
IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGE.
|
||||
|
90
bash-autocompletion/lutin.py
Executable file
90
bash-autocompletion/lutin.py
Executable file
@@ -0,0 +1,90 @@
|
||||
_lutin()
|
||||
{
|
||||
local cur prev optshorts opts renameprev listmodule
|
||||
COMPREPLY=()
|
||||
cur="${COMP_WORDS[COMP_CWORD]}"
|
||||
prev="${COMP_WORDS[COMP_CWORD-1]}"
|
||||
optshorts="-h -v -C -f -P -j -s -t -c -m -r -p"
|
||||
opts="--help --verbose --color --force --pretty --jobs --force-strip --target --compilator --mode --prj --package --simulation"
|
||||
|
||||
renameprev=${prev}
|
||||
case "${renameprev}" in
|
||||
-h)
|
||||
renameprev="--help"
|
||||
;;
|
||||
-v)
|
||||
renameprev="--verbose"
|
||||
;;
|
||||
-C)
|
||||
renameprev="--color"
|
||||
;;
|
||||
-f)
|
||||
renameprev="--force"
|
||||
;;
|
||||
-P)
|
||||
renameprev="--pretty"
|
||||
;;
|
||||
-j)
|
||||
renameprev="--jobs"
|
||||
;;
|
||||
-s)
|
||||
renameprev="--force-strip"
|
||||
;;
|
||||
-t)
|
||||
renameprev="--target"
|
||||
;;
|
||||
-c)
|
||||
renameprev="--compilator"
|
||||
;;
|
||||
-m)
|
||||
renameprev="--mode"
|
||||
;;
|
||||
-r)
|
||||
renameprev="--prj"
|
||||
;;
|
||||
-p)
|
||||
renameprev="--package"
|
||||
;;
|
||||
esac
|
||||
#
|
||||
# Complete the arguments to some of the basic commands.
|
||||
#
|
||||
case "${renameprev}" in
|
||||
--compilator)
|
||||
local names="clang gcc"
|
||||
COMPREPLY=( $(compgen -W "${names}" -- ${cur}) )
|
||||
return 0
|
||||
;;
|
||||
--jobs)
|
||||
local names="1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20"
|
||||
COMPREPLY=( $(compgen -W "${names}" -- ${cur}) )
|
||||
return 0
|
||||
;;
|
||||
--target)
|
||||
local names=`lutin.py --list-target`
|
||||
COMPREPLY=( $(compgen -W "${names}" -- ${cur}) )
|
||||
return 0
|
||||
;;
|
||||
--mode)
|
||||
local names="debug release"
|
||||
COMPREPLY=( $(compgen -W "${names}" -- ${cur}) )
|
||||
return 0
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
|
||||
if [[ ${cur} == --* ]] ; then
|
||||
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
|
||||
return 0
|
||||
fi
|
||||
if [[ ${cur} == -* ]] ; then
|
||||
COMPREPLY=( $(compgen -W "${optshorts}" -- ${cur}) )
|
||||
return 0
|
||||
fi
|
||||
listmodule=`lutin.py --list-module`
|
||||
COMPREPLY=( $(compgen -W "${listmodule}" -- ${cur}) )
|
||||
return 0
|
||||
}
|
||||
|
||||
complete -F _lutin lutin.py
|
6
bash-autocompletion/readme
Normal file
6
bash-autocompletion/readme
Normal file
@@ -0,0 +1,6 @@
|
||||
|
||||
to install autocompletion for lutin :
|
||||
|
||||
sudo cp bash-autocompletion/lutin.py /etc/bash_completion.d
|
||||
|
||||
==> and restart bash ...
|
13
licence.txt
Normal file
13
licence.txt
Normal file
@@ -0,0 +1,13 @@
|
||||
Copyright lutin Edouard DUPIN
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
@@ -1,32 +0,0 @@
|
||||
|
||||
Copyright (c) 2011, Edouard DUPIN
|
||||
|
||||
License (DSB)
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
|
||||
2. Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in
|
||||
the documentation and/or other materials provided with the
|
||||
distribution.
|
||||
|
||||
3. The name of the author may not be used to endorse or promote
|
||||
products derived from this software without specific prior
|
||||
written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
|
||||
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
|
||||
IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGE.L
|
24
lutin.py
24
lutin.py
@@ -27,6 +27,8 @@ myLutinArg.add(lutinArg.ArgDefine("m", "mode", list=[["debug",""],["release",""]
|
||||
myLutinArg.add(lutinArg.ArgDefine("r", "prj", desc="Use external project management (not build with lutin..."))
|
||||
myLutinArg.add(lutinArg.ArgDefine("p", "package", desc="Disable the package generation (usefull when just compile for test on linux ...)"))
|
||||
myLutinArg.add(lutinArg.ArgDefine("", "simulation", desc="simulater mode (availlable only for IOS)"))
|
||||
myLutinArg.add(lutinArg.ArgDefine("", "list-target", desc="list all availlables targets ==> for auto completion"))
|
||||
myLutinArg.add(lutinArg.ArgDefine("", "list-module", desc="list all availlables module ==> for auto completion"))
|
||||
|
||||
myLutinArg.add_section("cible", "generate in order set")
|
||||
localArgument = myLutinArg.parse()
|
||||
@@ -58,6 +60,28 @@ def parseGenericArg(argument,active):
|
||||
if active==False:
|
||||
usage()
|
||||
return True
|
||||
if argument.get_option_nName() == "list-module":
|
||||
if active==False:
|
||||
listOfModule = lutinModule.list_all_module()
|
||||
retValue = ""
|
||||
for moduleName in listOfModule:
|
||||
if retValue != "":
|
||||
retValue += " "
|
||||
retValue += moduleName
|
||||
print retValue
|
||||
exit(0)
|
||||
return True
|
||||
if argument.get_option_nName() == "list-target":
|
||||
if active==False:
|
||||
listOfTarget = lutinTarget.list_all_target()
|
||||
retValue = ""
|
||||
for targetName in listOfTarget:
|
||||
if retValue != "":
|
||||
retValue += " "
|
||||
retValue += targetName
|
||||
print retValue
|
||||
exit(0)
|
||||
return True
|
||||
elif argument.get_option_nName()=="jobs":
|
||||
if active==True:
|
||||
lutinMultiprocess.set_core_number(int(argument.get_arg()))
|
||||
|
@@ -91,7 +91,7 @@ class Module:
|
||||
"RIGHT" : [],
|
||||
"ADMOD_POSITION" : "top"
|
||||
}
|
||||
|
||||
self.subHeritageList = None
|
||||
|
||||
##
|
||||
## @brief add Some copilation flags for this module (and only this one)
|
||||
@@ -427,6 +427,8 @@ class Module:
|
||||
def build(self, target, packageName):
|
||||
# ckeck if not previously build
|
||||
if target.is_module_build(self.name)==True:
|
||||
if self.subHeritageList == None:
|
||||
self.localHeritage = heritage.heritage(self)
|
||||
return self.subHeritageList
|
||||
# create the packege heritage
|
||||
self.localHeritage = heritage.heritage(self)
|
||||
|
@@ -24,7 +24,6 @@ def store_command(cmdLine, file):
|
||||
if file != "" \
|
||||
and file != None:
|
||||
# Create directory:
|
||||
debug.warning("lklk " + file)
|
||||
lutinTools.create_directory_of_file(file)
|
||||
# Store the command Line:
|
||||
file2 = open(file, "w")
|
||||
|
@@ -323,6 +323,10 @@ class Target:
|
||||
|
||||
__startTargetName="lutinTarget"
|
||||
|
||||
def list_all_target():
|
||||
tmpListName = ["Android", "Linux", "MacOs", "IOs", "Windows" ]
|
||||
return tmpListName
|
||||
|
||||
def target_load(targetName, compilator, mode, generatePackage, externBuild, simulationMode):
|
||||
theTarget = __import__(__startTargetName + targetName)
|
||||
#try:
|
||||
|
@@ -31,6 +31,11 @@ class Target(lutinTarget.Target):
|
||||
if self.folder_sdk == "AUTO":
|
||||
self.folder_sdk = lutinTools.get_run_folder() + "/../android/sdk"
|
||||
|
||||
if not os.path.isdir(self.folder_ndk):
|
||||
debug.error("NDK path not set !!! set env : PROJECT_NDK on the NDK path")
|
||||
if not os.path.isdir(self.folder_sdk):
|
||||
debug.error("SDK path not set !!! set env : PROJECT_SDK on the SDK path")
|
||||
|
||||
arch = ""#"ARMv7"
|
||||
tmpOsVal = "64"
|
||||
gccVersion = "4.8"
|
||||
@@ -44,11 +49,11 @@ class Target(lutinTarget.Target):
|
||||
baseFolderX86 = self.folder_ndk + "/toolchains/x86-" + gccVersion + "/prebuilt/linux-x86" + tmpOsVal + "/bin/"
|
||||
cross = baseFolderArm + "arm-linux-androideabi-"
|
||||
if not os.path.isdir(baseFolderArm):
|
||||
debug.error("Gcc Arm pah does not exist !!!")
|
||||
debug.error("Gcc Arm path does not exist !!!")
|
||||
if not os.path.isdir(baseFolderMips):
|
||||
debug.info("Gcc Mips pah does not exist !!!")
|
||||
debug.info("Gcc Mips path does not exist !!!")
|
||||
if not os.path.isdir(baseFolderX86):
|
||||
debug.info("Gcc x86 pah does not exist !!!")
|
||||
debug.info("Gcc x86 path does not exist !!!")
|
||||
|
||||
lutinTarget.Target.__init__(self, "Android", typeCompilator, debugMode, generatePackage, arch, cross, sumulator)
|
||||
arch = "ARMv7"
|
||||
@@ -204,7 +209,7 @@ class Target(lutinTarget.Target):
|
||||
tmpFile.write( "/**\n")
|
||||
tmpFile.write( " * @author Edouard DUPIN, Kevin BILLONNEAU\n")
|
||||
tmpFile.write( " * @copyright 2011, Edouard DUPIN, all right reserved\n")
|
||||
tmpFile.write( " * @license BSD v3 (see license file)\n")
|
||||
tmpFile.write( " * @license APACHE v2.0 (see license file)\n")
|
||||
tmpFile.write( " * @note This file is autogenerate ==> see documantation to generate your own\n")
|
||||
tmpFile.write( " */\n")
|
||||
tmpFile.write( "package "+ compleatePackageName + ";\n")
|
||||
@@ -293,7 +298,7 @@ class Target(lutinTarget.Target):
|
||||
tmpFile.write( "/**\n")
|
||||
tmpFile.write( " * @author Edouard DUPIN, Kevin BILLONNEAU\n")
|
||||
tmpFile.write( " * @copyright 2011, Edouard DUPIN, all right reserved\n")
|
||||
tmpFile.write( " * @license BSD v3 (see license file)\n")
|
||||
tmpFile.write( " * @license APACHE v2.0 (see license file)\n")
|
||||
tmpFile.write( " * @note This file is autogenerate ==> see documantation to generate your own\n")
|
||||
tmpFile.write( " */\n")
|
||||
tmpFile.write( "package "+ compleatePackageName + ";\n")
|
||||
|
Reference in New Issue
Block a user