Compare commits

..

5 Commits
0.7.3 ... 0.7.5

14 changed files with 98 additions and 71 deletions

View File

@@ -17,6 +17,7 @@ import lutin.module as module
import lutin.target as target import lutin.target as target
import lutin.env as env import lutin.env as env
import lutin.multiprocess as multiprocess import lutin.multiprocess as multiprocess
import lutin.tools as tools
myArgs = arguments.LutinArg() myArgs = arguments.LutinArg()
myArgs.add(arguments.ArgDefine("h", "help", desc="Display this help")) myArgs.add(arguments.ArgDefine("h", "help", desc="Display this help"))
@@ -66,7 +67,8 @@ def usage(full=False):
for mod in listOfAllModule: for mod in listOfAllModule:
data_print = " " data_print = " "
if full == False: if full == False:
if mod["type"][:6] == "BINARY": if mod["type"] != None \
and mod["type"][:6] == "BINARY":
data_print += color['blue'] data_print += color['blue']
if mod["sub-type"] == "": if mod["sub-type"] == "":
data_print += "* " data_print += "* "
@@ -78,9 +80,11 @@ def usage(full=False):
data_print += "S " data_print += "S "
else: else:
data_print += " " data_print += " "
elif mod["type"] == "PACKAGE": elif mod["type"] != None \
and mod["type"] == "PACKAGE":
data_print += color['red'] + "# " data_print += color['red'] + "# "
elif mod["type"][:7] == "LIBRARY": elif mod["type"] != None \
and mod["type"][:7] == "LIBRARY":
data_print += color['yellow'] + " " data_print += color['yellow'] + " "
else: else:
data_print += color['default'] + " " data_print += color['default'] + " "
@@ -89,9 +93,11 @@ def usage(full=False):
data_print += mod["name"] + color['default'] data_print += mod["name"] + color['default']
if full == False: if full == False:
data_print += "\r\t\t\t\t\t\t\t" data_print += "\r\t\t\t\t\t\t\t"
if mod["license"] != "": if mod["license"] != None \
and mod["license"] != "":
data_print += color['yellow'] + " [" + mod["license"] + "]" + color['default'] data_print += color['yellow'] + " [" + mod["license"] + "]" + color['default']
if mod["version"] != []: if mod["version"] != None \
and mod["version"] != []:
version_ID = tools.version_to_string(mod["version"]) version_ID = tools.version_to_string(mod["version"])
data_print += color['blue'] + " (" + version_ID + ")" + color['default'] data_print += color['blue'] + " (" + version_ID + ")" + color['default']
""" """
@@ -106,11 +112,14 @@ def usage(full=False):
if mod["description"] != "": if mod["description"] != "":
print(" " + mod["description"]) print(" " + mod["description"])
if full == True: if full == True:
if mod["type"] != "": if mod["type"] != None \
and mod["type"] != "":
print(" Type: " + mod["type"]) print(" Type: " + mod["type"])
if mod["sub-type"] != "": if mod["sub-type"] != None \
and mod["sub-type"] != "":
print(" Sub-Type: " + mod["sub-type"]) print(" Sub-Type: " + mod["sub-type"])
if mod["version"] != []: if mod["version"] != None \
and mod["version"] != []:
version_ID = "" version_ID = ""
for id in mod["version"]: for id in mod["version"]:
if len(version_ID) != 0: if len(version_ID) != 0:
@@ -120,14 +129,19 @@ def usage(full=False):
version_ID+="." version_ID+="."
version_ID += str(id) version_ID += str(id)
print(" version: " + color['blue'] + version_ID + color['default']) print(" version: " + color['blue'] + version_ID + color['default'])
if mod["compagny-type"] != "" \ if mod["compagny-type"] != None \
and mod["compagny-name"] != None \
and mod["compagny-type"] != "" \
and mod["compagny-name"] != "": and mod["compagny-name"] != "":
print(" compagny: " + color['purple'] + mod["compagny-type"] + "/" + mod["compagny-name"] + color['default']) print(" compagny: " + color['purple'] + mod["compagny-type"] + "/" + mod["compagny-name"] + color['default'])
elif mod["compagny-name"] != "": elif mod["compagny-name"] != None \
and mod["compagny-name"] != "":
print(" compagny: " + color['purple'] + mod["compagny-name"] + color['default']) print(" compagny: " + color['purple'] + mod["compagny-name"] + color['default'])
if mod["license"] != "": if mod["license"] != None \
and mod["license"] != "":
print(" license: " + color['yellow'] + mod["license"] + color['default']) print(" license: " + color['yellow'] + mod["license"] + color['default'])
if mod["maintainer"] != []: if mod["maintainer"] != None \
and mod["maintainer"] != []:
print(" maintainers:") print(" maintainers:")
for elem in mod["maintainer"]: for elem in mod["maintainer"]:
print(" " + str(elem)) print(" " + str(elem))

View File

@@ -40,7 +40,7 @@ def resize(src_file, dest_file, x, y, cmd_file=None):
if os.path.exists(src_file) == False: if os.path.exists(src_file) == False:
debug.error("Request a resize an image that does not existed : '" + src_file + "'") debug.error("Request a resize an image that does not existed : '" + src_file + "'")
cmd_line = "resize Image : " + src_file + " ==> " + dest_file + " newSize=(" + str(x) + "x" + str(y) + ")" cmd_line = "resize Image : " + src_file + " ==> " + dest_file + " newSize=(" + str(x) + "x" + str(y) + ")"
if False==depend.need_re_build(dest_file, src_file, file_cmd=cmd_file , cmd_line=cmd_line): if depend.need_re_build(dest_file, src_file, file_cmd=cmd_file , cmd_line=cmd_line) == False:
return return
# add cmdLine ... # add cmdLine ...
x = get_pow_2_multiple(x) x = get_pow_2_multiple(x)

View File

@@ -476,26 +476,29 @@ class Module:
package_name, package_name,
target, target,
self.sub_heritage_list, self.sub_heritage_list,
flags = self.flags,
name = self.name, name = self.name,
basic_path = self.origin_path) basic_path = self.origin_path)
self.local_heritage.add_lib_static(res_file) self.local_heritage.add_lib_static(res_file)
except ValueError: except ValueError:
debug.error(" UN-SUPPORTED link format: '.a'") debug.error(" UN-SUPPORTED link format: '.a'")
if self.type == 'LIBRARY' \ if target.support_dynamic_link == True:
or self.type == 'LIBRARY_DYNAMIC': if self.type == 'LIBRARY' \
try: or self.type == 'LIBRARY_DYNAMIC':
tmp_builder = builder.get_builder_with_output("so"); try:
list_file = tools.filter_extention(list_sub_file_needed_to_build, tmp_builder.get_input_type()) tmp_builder = builder.get_builder_with_output("so");
if len(list_file) > 0: list_file = tools.filter_extention(list_sub_file_needed_to_build, tmp_builder.get_input_type())
res_file = tmp_builder.link(list_file, if len(list_file) > 0:
package_name, res_file = tmp_builder.link(list_file,
target, package_name,
self.sub_heritage_list, target,
name = self.name, self.sub_heritage_list,
basic_path = self.origin_path) flags = self.flags,
self.local_heritage.add_lib_dynamic(res_file) name = self.name,
except ValueError: basic_path = self.origin_path)
debug.error(" UN-SUPPORTED link format: '.so'/'.dynlib'/'.dll'") self.local_heritage.add_lib_dynamic(res_file)
except ValueError:
debug.error(" UN-SUPPORTED link format: '.so'/'.dynlib'/'.dll'")
try: try:
tmp_builder = builder.get_builder_with_output("jar"); tmp_builder = builder.get_builder_with_output("jar");
list_file = tools.filter_extention(list_sub_file_needed_to_build, tmp_builder.get_input_type()) list_file = tools.filter_extention(list_sub_file_needed_to_build, tmp_builder.get_input_type())
@@ -504,6 +507,7 @@ class Module:
package_name, package_name,
target, target,
self.sub_heritage_list, self.sub_heritage_list,
flags = self.flags,
name = self.name, name = self.name,
basic_path = self.origin_path) basic_path = self.origin_path)
self.local_heritage.add_lib_interpreted('java', res_file) self.local_heritage.add_lib_interpreted('java', res_file)
@@ -513,7 +517,7 @@ class Module:
or self.type == 'BINARY_SHARED' \ or self.type == 'BINARY_SHARED' \
or self.type == 'BINARY_STAND_ALONE': or self.type == 'BINARY_STAND_ALONE':
shared_mode = False shared_mode = False
if target.name=="Android": if target.name == "Android":
debug.warning("Android mode ...") debug.warning("Android mode ...")
# special case for android ... # special case for android ...
for elem in self.sub_heritage_list.src['src']: for elem in self.sub_heritage_list.src['src']:
@@ -523,8 +527,9 @@ class Module:
shared_mode = True shared_mode = True
break; break;
static_mode = True static_mode = True
if self.type == 'BINARY_SHARED': if target.support_dynamic_link == True:
static_mode = False if self.type == 'BINARY_SHARED':
static_mode = False
if shared_mode == True: if shared_mode == True:
try: try:
tmp_builder = builder.get_builder_with_output("so"); tmp_builder = builder.get_builder_with_output("so");
@@ -533,6 +538,7 @@ class Module:
package_name, package_name,
target, target,
self.sub_heritage_list, self.sub_heritage_list,
flags = self.flags,
name = self.name, name = self.name,
basic_path = self.origin_path, basic_path = self.origin_path,
static = static_mode) static = static_mode)
@@ -547,6 +553,7 @@ class Module:
package_name, package_name,
target, target,
self.sub_heritage_list, self.sub_heritage_list,
flags = self.flags,
name = self.name, name = self.name,
basic_path = self.origin_path) basic_path = self.origin_path)
self.local_heritage.add_sources(res_file) self.local_heritage.add_sources(res_file)
@@ -559,13 +566,14 @@ class Module:
package_name, package_name,
target, target,
self.sub_heritage_list, self.sub_heritage_list,
flags = self.flags,
name = self.name, name = self.name,
basic_path = self.origin_path, basic_path = self.origin_path,
static = static_mode) static = static_mode)
except ValueError: except ValueError:
debug.error(" UN-SUPPORTED link format: '.bin'") debug.error(" UN-SUPPORTED link format: '.bin'")
elif self.type == "PACKAGE": elif self.type == "PACKAGE":
if target.name=="Android": if target.name == "Android":
# special case for android wrapper: # special case for android wrapper:
try: try:
tmp_builder = builder.get_builder_with_output("so"); tmp_builder = builder.get_builder_with_output("so");
@@ -574,6 +582,7 @@ class Module:
package_name, package_name,
target, target,
self.sub_heritage_list, self.sub_heritage_list,
flags = self.flags,
name = "lib" + self.name, name = "lib" + self.name,
basic_path = self.origin_path) basic_path = self.origin_path)
self.local_heritage.add_sources(res_file) self.local_heritage.add_sources(res_file)
@@ -587,6 +596,7 @@ class Module:
package_name, package_name,
target, target,
self.sub_heritage_list, self.sub_heritage_list,
flags = self.flags,
name = self.name, name = self.name,
basic_path = self.origin_path) basic_path = self.origin_path)
self.local_heritage.add_sources(res_file) self.local_heritage.add_sources(res_file)
@@ -599,6 +609,7 @@ class Module:
package_name, package_name,
target, target,
self.sub_heritage_list, self.sub_heritage_list,
flags = self.flags,
name = self.name, name = self.name,
basic_path = self.origin_path) basic_path = self.origin_path)
except ValueError: except ValueError:

View File

@@ -134,6 +134,8 @@ class Target:
self.pkg_path_readme_file = "readme.txt" self.pkg_path_readme_file = "readme.txt"
self.pkg_path_change_log_file = "changelog.txt" self.pkg_path_change_log_file = "changelog.txt"
# special case for IOS (example) no build dynamicly ...
self.support_dynamic_link = True
def update_path_tree(self): 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"])
@@ -531,9 +533,9 @@ class Target:
return return
if module.get_type() == 'BINARY' \ if module.get_type() == 'BINARY' \
or module.get_type() == 'BINARY_STAND_ALONE': or module.get_type() == 'BINARY_STAND_ALONE':
self.make_package_generic_binary(pkg_name, pkg_properties, base_pkg_path, heritage_list, static = True) self.make_package_binary(pkg_name, pkg_properties, base_pkg_path, heritage_list, static = True)
if module.get_type() == 'BINARY_SHARED': if module.get_type() == 'BINARY_SHARED':
self.make_package_generic_binary(pkg_name, pkg_properties, base_pkg_path, heritage_list, static = False) self.make_packages_binary(pkg_name, pkg_properties, base_pkg_path, heritage_list, static = False)
if module.get_type() == 'PACKAGE': if module.get_type() == 'PACKAGE':
debug.info("Can not create package for package"); debug.info("Can not create package for package");
return return

View File

@@ -91,6 +91,7 @@ def file_write_data(path, data, only_if_new=False):
if old_data == data: if old_data == data:
return return
#real write of data: #real write of data:
create_directory_of_file(path)
file = open(path, "w") file = open(path, "w")
file.write(data) file.write(data)
file.close() file.close()

View File

@@ -40,7 +40,7 @@ def get_output_type():
## ##
## @brief Commands for running gcc to link an executable. ## @brief Commands for running gcc to link an executable.
## ##
def link(file, binary, target, depancy, name, basic_path, static = False): def link(file, binary, target, depancy, flags, name, basic_path, static = False):
file_src, file_dst, file_depend, file_cmd, file_warning = target.generate_file(binary, name, basic_path, file, "bin") file_src, file_dst, file_depend, file_cmd, file_warning = target.generate_file(binary, name, basic_path, file, "bin")
debug.extreme_verbose("list files = " + str(depancy.src)) debug.extreme_verbose("list files = " + str(depancy.src))
list_static = [] list_static = []

View File

@@ -38,7 +38,7 @@ def get_output_type():
## ##
## @brief Commands for running gcc to link a shared library. ## @brief Commands for running gcc to link a shared library.
## ##
def link(file, binary, target, depancy, name, basic_path, static=False): def link(file, binary, target, depancy, flags, name, basic_path, static=False):
file_src, file_dst, file_depend, file_cmd, file_warning = target.generate_file(binary, name, basic_path, file, "lib-shared") file_src, file_dst, file_depend, file_cmd, file_warning = target.generate_file(binary, name, basic_path, file, "lib-shared")
list_static = [] list_static = []
list_dynamic = [] list_dynamic = []
@@ -101,6 +101,10 @@ def link(file, binary, target, depancy, name, basic_path, static=False):
cmd.append(flags["local"]["link"]) cmd.append(flags["local"]["link"])
except: except:
pass pass
try:
cmd.append(flags["export"]["link"])
except:
pass
try: try:
cmd.append(depancy.flags["link"]) cmd.append(depancy.flags["link"])
except: except:

View File

@@ -38,7 +38,7 @@ def get_output_type():
## ##
## @brief Commands for running ar. ## @brief Commands for running ar.
## ##
def link(file, binary, target, depancy, name, basic_path): def link(file, binary, target, depancy, flags, name, basic_path):
file_src, file_dst, file_depend, file_cmd, file_warning = target.generate_file(binary, name, basic_path, file, "lib-static") file_src, file_dst, file_depend, file_cmd, file_warning = target.generate_file(binary, name, basic_path, file, "lib-static")
#$(Q)$(TARGET_AR) $(TARGET_GLOBAL_ARFLAGS) $(PRIVATE_ARFLAGS) $@ $(PRIVATE_ALL_OBJECTS) #$(Q)$(TARGET_AR) $(TARGET_GLOBAL_ARFLAGS) $(PRIVATE_ARFLAGS) $@ $(PRIVATE_ALL_OBJECTS)
cmd = [ cmd = [

View File

@@ -213,7 +213,7 @@ class Target(target.Target):
return self.get_staging_path(binary_name) + self.path_data return self.get_staging_path(binary_name) + self.path_data
""" """
def make_package_generic_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("------------------------------------------------------------------------")
debug.info("Generate package '" + pkg_name + "' v" + tools.version_to_string(pkg_properties["VERSION"])) debug.info("Generate package '" + pkg_name + "' v" + tools.version_to_string(pkg_properties["VERSION"]))
debug.debug("------------------------------------------------------------------------") debug.debug("------------------------------------------------------------------------")

View File

@@ -82,6 +82,8 @@ class Target(target.Target):
self.pkg_path_lib = "lib" self.pkg_path_lib = "lib"
self.pkg_path_license = "license" self.pkg_path_license = "license"
# Disable capabiliteis to compile in shared mode
self.support_dynamic_link = False
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("------------------------------------------------------------------------")
@@ -109,23 +111,23 @@ class Target(target.Target):
# Resize all icon needed for Ios ... # Resize all icon needed for Ios ...
# TODO : Do not regenerate if source resource is not availlable # TODO : Do not regenerate if source resource is not availlable
# TODO : Add a colored background ... # TODO : Add a colored background ...
debug.print_element("pkg", "iTunesArtwork.png", "<==", pkg_properties["ICON"]) debug.print_element("pkg", os.path.relpath(pkg_properties["ICON"]), "==>", "iTunesArtwork.png")
image.resize(pkg_properties["ICON"], os.path.join(target_outpath, "iTunesArtwork.png"), 512, 512) image.resize(pkg_properties["ICON"], os.path.join(target_outpath, "iTunesArtwork.png"), 512, 512)
debug.print_element("pkg", "iTunesArtwork@2x.png", "<==", pkg_properties["ICON"]) debug.print_element("pkg", os.path.relpath(pkg_properties["ICON"]), "==>", "iTunesArtwork@2x.png")
image.resize(pkg_properties["ICON"], os.path.join(target_outpath, "iTunesArtwork@2x.png"), 1024, 1024) image.resize(pkg_properties["ICON"], os.path.join(target_outpath, "iTunesArtwork@2x.png"), 1024, 1024)
debug.print_element("pkg", "Icon-60@2x.png", "<==", pkg_properties["ICON"]) debug.print_element("pkg", os.path.relpath(pkg_properties["ICON"]), "==>", "Icon-60@2x.png")
image.resize(pkg_properties["ICON"], os.path.join(target_outpath, "Icon-60@2x.png"), 120, 120) image.resize(pkg_properties["ICON"], os.path.join(target_outpath, "Icon-60@2x.png"), 120, 120)
debug.print_element("pkg", "Icon-76.png", "<==", pkg_properties["ICON"]) debug.print_element("pkg", os.path.relpath(pkg_properties["ICON"]), "==>", "Icon-76.png")
image.resize(pkg_properties["ICON"], os.path.join(target_outpath, "Icon-76.png"), 76, 76) image.resize(pkg_properties["ICON"], os.path.join(target_outpath, "Icon-76.png"), 76, 76)
debug.print_element("pkg", "Icon-76@2x.png", "<==", pkg_properties["ICON"]) debug.print_element("pkg", os.path.relpath(pkg_properties["ICON"]), "==>", "Icon-76@2x.png")
image.resize(pkg_properties["ICON"], os.path.join(target_outpath, "Icon-76@2x.png"), 152, 152) image.resize(pkg_properties["ICON"], os.path.join(target_outpath, "Icon-76@2x.png"), 152, 152)
debug.print_element("pkg", "Icon-Small-40.png", "<==", pkg_properties["ICON"]) debug.print_element("pkg", os.path.relpath(pkg_properties["ICON"]), "==>", "Icon-Small-40.png")
image.resize(pkg_properties["ICON"], os.path.join(target_outpath, "Icon-Small-40.png"), 40, 40) image.resize(pkg_properties["ICON"], os.path.join(target_outpath, "Icon-Small-40.png"), 40, 40)
debug.print_element("pkg", "Icon-Small-40@2x.png", "<==", pkg_properties["ICON"]) debug.print_element("pkg", os.path.relpath(pkg_properties["ICON"]), "==>", "Icon-Small-40@2x.png")
image.resize(pkg_properties["ICON"], os.path.join(target_outpath, "Icon-Small-40@2x.png"), 80, 80) image.resize(pkg_properties["ICON"], os.path.join(target_outpath, "Icon-Small-40@2x.png"), 80, 80)
debug.print_element("pkg", "Icon-Small.png", "<==", pkg_properties["ICON"]) debug.print_element("pkg", os.path.relpath(pkg_properties["ICON"]), "==>", "Icon-Small.png")
image.resize(pkg_properties["ICON"], os.path.join(target_outpath, "Icon-Small.png"), 29, 29) image.resize(pkg_properties["ICON"], os.path.join(target_outpath, "Icon-Small.png"), 29, 29)
debug.print_element("pkg", "Icon-Small@2x.png", "<==", pkg_properties["ICON"]) debug.print_element("pkg", os.path.relpath(pkg_properties["ICON"]), "==>", "Icon-Small@2x.png")
image.resize(pkg_properties["ICON"], os.path.join(target_outpath, "Icon-Small@2x.png"), 58, 58) image.resize(pkg_properties["ICON"], os.path.join(target_outpath, "Icon-Small@2x.png"), 58, 58)
## Create the info file: ## Create the info file:
@@ -177,9 +179,9 @@ class Target(target.Target):
data_file += " </array>\n" data_file += " </array>\n"
data_file += " \n" data_file += " \n"
data_file += " <key>CFBundleShortVersionString</key>\n" data_file += " <key>CFBundleShortVersionString</key>\n"
data_file += " <string>"+pkg_properties["VERSION"]+"</string>\n" data_file += " <string>"+tools.version_to_string(pkg_properties["VERSION"])+"</string>\n"
data_file += " <key>CFBundleVersion</key>\n" data_file += " <key>CFBundleVersion</key>\n"
data_file += " <string>"+pkg_properties["VERSION_CODE"]+"</string>\n" data_file += " <string>"+str(pkg_properties["VERSION_CODE"])+"</string>\n"
data_file += " \n" data_file += " \n"
data_file += " <key>CFBundleResourceSpecification</key>\n" data_file += " <key>CFBundleResourceSpecification</key>\n"
data_file += " <string>ResourceRules.plist</string>\n" data_file += " <string>ResourceRules.plist</string>\n"
@@ -312,8 +314,10 @@ class Target(target.Target):
# Must create the tarball of the application # Must create the tarball of the application
#cd $(TARGET_OUT_FINAL)/; tar -cf $(PROJECT_NAME).tar $(PROJECT_NAME).app #cd $(TARGET_OUT_FINAL)/; tar -cf $(PROJECT_NAME).tar $(PROJECT_NAME).app
#cd $(TARGET_OUT_FINAL)/; tar -czf $(PROJECT_NAME).tar.gz $(PROJECT_NAME).app #cd $(TARGET_OUT_FINAL)/; tar -czf $(PROJECT_NAME).tar.gz $(PROJECT_NAME).app
if self.sumulator == False: if self.sumulator == False:
if "APPLE_APPLICATION_IOS_ID" not in pkg_properties:
pkg_properties["APPLE_APPLICATION_IOS_ID"] = "00000000"
debug.warning("Missing package property : APPLE_APPLICATION_IOS_ID USE " + pkg_properties["APPLE_APPLICATION_IOS_ID"] + " ID ... ==> CAN NOT WORK ..." )
# Create the info file # Create the info file
tmpFile = open(os.path.join(target_outpath, pkg_name + ".xcent"), 'w') tmpFile = open(os.path.join(target_outpath, pkg_name + ".xcent"), 'w')
tmpFile.write("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n") tmpFile.write("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n")
@@ -321,15 +325,12 @@ class Target(target.Target):
tmpFile.write("<plist version=\"1.0\">\n") tmpFile.write("<plist version=\"1.0\">\n")
tmpFile.write(" <dict>\n") tmpFile.write(" <dict>\n")
tmpFile.write(" <key>application-identifier</key>\n") tmpFile.write(" <key>application-identifier</key>\n")
try: tmpFile.write(" <string>" + pkg_properties["APPLE_APPLICATION_IOS_ID"] + "." + pkg_properties["COMPAGNY_TYPE"] + "." + pkg_properties["COMPAGNY_NAME2"] + "." + pkg_name + "</string>\n")
tmpFile.write(" <string>" + pkg_properties["APPLE_APPLICATION_IOS_ID"] + "." + pkg_properties["COMPAGNY_TYPE"] + "." + pkg_properties["COMPAGNY_NAME2"] + "." + pkg_name + "</string>\n")
except:
debug.error("Missing package property : APPLE_APPLICATION_IOS_ID")
tmpFile.write(" <key>get-task-allow</key>\n") tmpFile.write(" <key>get-task-allow</key>\n")
tmpFile.write(" <true/>\n") tmpFile.write(" <true/>\n")
tmpFile.write(" <key>keychain-access-groups</key>\n") tmpFile.write(" <key>keychain-access-groups</key>\n")
tmpFile.write(" <array>\n") tmpFile.write(" <array>\n")
tmpFile.write(" <string>" + pkg_properties["APPLE_APPLICATION_IOS_ID"] + ".atriasoft.worddown</string>\n") tmpFile.write(" <string>" + pkg_properties["APPLE_APPLICATION_IOS_ID"] + "." + pkg_properties["COMPAGNY_TYPE"] + "." + pkg_properties["COMPAGNY_NAME2"] + "." + pkg_name + "</string>\n")
tmpFile.write(" </array>\n") tmpFile.write(" </array>\n")
tmpFile.write(" </dict>\n") tmpFile.write(" </dict>\n")
tmpFile.write("</plist>\n") tmpFile.write("</plist>\n")
@@ -342,18 +343,12 @@ class Target(target.Target):
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\"'") 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 = tools.file_read_data(iosDevelopperKeyFile) signatureKey = tools.file_read_data(iosDevelopperKeyFile)
signatureKey = re.sub('\n', '', signatureKey) signatureKey = re.sub('\n', '', signatureKey)
cmdLine = 'codesign --force --sign ' cmdLine = 'codesign --force --sign '
# to get this key ; certtool y | grep "Developer" # to get this key ; certtool y | grep "Developer"
cmdLine += ' "' + signatureKey + '" ' cmdLine += ' "' + signatureKey + '" '
cmdLine += ' --entitlements ' + self.get_build_path(pkg_name) + '/worddown.xcent' cmdLine += ' --entitlements ' + self.get_build_path(pkg_name) + '/worddown.xcent'
cmdLine += ' ' + self.get_staging_path(pkg_name) cmdLine += ' ' + self.get_staging_path(pkg_name)
multiprocess.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
# --entitlements /Users/edouarddupin/Library/Developer/Xcode/DerivedData/worddown-cmuvjchgtiteexdiacyqoexsyadg/Build/Intermediates/worddown.build/Debug-iphoneos/worddown.build/worddown.xcent
# /Users/edouarddupin/Library/Developer/Xcode/DerivedData/worddown-cmuvjchgtiteexdiacyqoexsyadg/Build/Products/Debug-iphoneos/worddown.app
def createRandomNumber(self, len): def createRandomNumber(self, len):
out = "" out = ""

View File

@@ -73,7 +73,7 @@ class Target(target.Target):
* *--> YY * *--> YY
*--> sources *--> sources
""" """
def make_package_generic_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("------------------------------------------------------------------------")
debug.info("Generate generic '" + pkg_name + "' v" + tools.version_to_string(pkg_properties["VERSION"])) debug.info("Generate generic '" + pkg_name + "' v" + tools.version_to_string(pkg_properties["VERSION"]))
debug.debug("------------------------------------------------------------------------") debug.debug("------------------------------------------------------------------------")

View File

@@ -110,7 +110,6 @@ class Target(target.Target):
data_file = "#!/bin/bash\n" data_file = "#!/bin/bash\n"
data_file += "# Simply open the real application in the correct way (a link does not work ...)\n" data_file += "# Simply open the real application in the correct way (a link does not work ...)\n"
data_file += "/Applications/" + pkg_name + ".app/Contents/MacOS/" + pkg_name + " $*\n" data_file += "/Applications/" + pkg_name + ".app/Contents/MacOS/" + pkg_name + " $*\n"
#tmpFile.write("open -n /Applications/edn.app --args -AppCommandLineArg $*\n")
tools.file_write_data(os.path.join(target_outpath, "shell", pkg_name), tools.file_write_data(os.path.join(target_outpath, "shell", pkg_name),
data_file, data_file,
only_if_new=True) only_if_new=True)
@@ -128,8 +127,8 @@ class Target(target.Target):
debug.info("disk image: " + output_file_name) debug.info("disk image: " + output_file_name)
## user information: ## user information:
debug.info("You can have an shell interface by executing : ") #debug.info("You can have an shell interface by executing : ")
debug.info(" sudo cp " + shell_file_name + " /usr/local/bin") #debug.info(" sudo cp " + shell_file_name + " /usr/local/bin")
def install_package(self, pkg_name): def install_package(self, pkg_name):
debug.debug("------------------------------------------------------------------------") debug.debug("------------------------------------------------------------------------")

View File

@@ -70,7 +70,7 @@ class Target(target.Target):
def get_staging_path_data(self, binary_name, heritage_list): def get_staging_path_data(self, binary_name, heritage_list):
return self.get_staging_path(binary_name) + self.path_data return self.get_staging_path(binary_name) + self.path_data
def make_package_generic_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("------------------------------------------------------------------------")
debug.info("Generate package '" + pkg_name + "' v" + tools.version_to_string(pkg_properties["VERSION"])) debug.info("Generate package '" + pkg_name + "' v" + tools.version_to_string(pkg_properties["VERSION"]))
debug.debug("------------------------------------------------------------------------") debug.debug("------------------------------------------------------------------------")

View File

@@ -7,7 +7,7 @@ def readme():
# https://pypi.python.org/pypi?%3Aaction=list_classifiers # https://pypi.python.org/pypi?%3Aaction=list_classifiers
setup(name='lutin', setup(name='lutin',
version='0.7.3', version='0.7.5',
description='Lutin generic builder', description='Lutin generic builder',
long_description=readme(), long_description=readme(),
url='http://github.com/HeeroYui/lutin', url='http://github.com/HeeroYui/lutin',
@@ -19,7 +19,7 @@ setup(name='lutin',
'lutin/z_system', 'lutin/z_system',
'lutin/z_target'], 'lutin/z_target'],
classifiers=[ classifiers=[
'Development Status :: 3 - Alpha', 'Development Status :: 4 - Beta',
'License :: OSI Approved :: Apache Software License', 'License :: OSI Approved :: Apache Software License',
'Programming Language :: Python', 'Programming Language :: Python',
'Topic :: Software Development :: Compilers', 'Topic :: Software Development :: Compilers',
@@ -33,6 +33,7 @@ setup(name='lutin',
include_package_data = True, include_package_data = True,
zip_safe=False) zip_safe=False)
#To developp: ./setup.py install/develop #To developp: sudo ./setup.py install
# sudo ./setup.py develop
#TO register all in pip: ./setup.py register sdist upload #TO register all in pip: ./setup.py register sdist upload