From 52729c3c71e0426b9e7606973b6e5c6491db6846 Mon Sep 17 00:00:00 2001 From: Edouard DUPIN Date: Tue, 20 Sep 2016 22:33:00 +0200 Subject: [PATCH] [DEV/DEBUG] correct the build of IOs target and correct the resize installed image --- lutin/module.py | 11 +++++++++-- lutin/z_target/lutinTarget_IOs.py | 6 +++--- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/lutin/module.py b/lutin/module.py index 73bf69d..b6ef1b9 100644 --- a/lutin/module.py +++ b/lutin/module.py @@ -244,7 +244,14 @@ class Module: if sizeX > 0: debug.verbose("Image file : " + display_source + " ==> " + destination + " resize=(" + str(sizeX) + "," + str(sizeY) + ")") fileName, fileExtension = os.path.splitext(os.path.join(self._origin_path,source)) - image.resize(source, os.path.join(target.get_build_path_data(self._name), destination), sizeX, sizeY, file_cmd) + # Create the resized file in a temporary path to auto-copy when needed + temporary_file = os.path.join(target.get_build_path_temporary_generate(self._name), "image_generation", destination) + image.resize(source, temporary_file, sizeX, sizeY, file_cmd) + # Copy file in statndard mode + tools.copy_file(temporary_file, + os.path.join(target.get_build_path_data(self._name), destination), + file_cmd, + in_list=copy_list) else: debug.verbose("Might copy file : " + display_source + " ==> " + destination) tools.copy_file(source, @@ -857,7 +864,7 @@ class Module: # ---------------------------------------------------- debug.debug("install datas") copy_list={} - self.image_to_build(target, copy_list) # TODO : When file is resized, the final file is not removed if the file is not needed anymore + self.image_to_build(target, copy_list) self.files_to_build(target, copy_list) self.paths_to_build(target, copy_list) #real copy files diff --git a/lutin/z_target/lutinTarget_IOs.py b/lutin/z_target/lutinTarget_IOs.py index 3d02a2a..600b1ca 100644 --- a/lutin/z_target/lutinTarget_IOs.py +++ b/lutin/z_target/lutinTarget_IOs.py @@ -323,7 +323,7 @@ class Target(target.Target): 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 - tmpFile = open(os.path.join(target_outpath, pkg_name + ".xcent"), 'w') + tmpFile = open(os.path.join(self.get_build_path(pkg_name), pkg_name + ".xcent"), 'w') tmpFile.write("\n") tmpFile.write("\n") tmpFile.write("\n") @@ -352,8 +352,8 @@ class Target(target.Target): cmdLine = 'codesign --force --sign ' # to get this key ; certtool y | grep "Developer" cmdLine += ' "' + signatureKey + '" ' - cmdLine += ' --entitlements ' + self.get_build_path(pkg_name) + '/worddown.xcent' - cmdLine += ' ' + self.get_staging_path(pkg_name) + cmdLine += ' --entitlements ' + os.path.join(self.get_build_path(pkg_name), pkg_name + ".xcent") + cmdLine += ' ' + os.path.join(self.get_staging_path(pkg_name), pkg_name + ".app") multiprocess.run_command(cmdLine) def create_random_number(self, len):