From 663188773df6d79eaa2d71cb8a4f08e2f50138c0 Mon Sep 17 00:00:00 2001 From: Edouard DUPIN Date: Thu, 24 Sep 2015 21:16:00 +0200 Subject: [PATCH] [DEV] integrate new methode for IOs and MacOs --- lutin/module.py | 2 + lutin/target.py | 2 +- .../z_builder/lutinBuilder_libraryDynamic.py | 5 +- lutin/z_target/lutinTarget_IOs.py | 114 ++++++++++++++---- lutin/z_target/lutinTarget_Linux.py | 21 ++-- lutin/z_target/lutinTarget_MacOs.py | 103 ++++++++++++++-- lutin/z_target/lutinTarget_Windows.py | 19 ++- 7 files changed, 210 insertions(+), 56 deletions(-) diff --git a/lutin/module.py b/lutin/module.py index 6c7575e..8ffbb1d 100644 --- a/lutin/module.py +++ b/lutin/module.py @@ -460,6 +460,7 @@ class Module: self.local_heritage.add_lib_static(res_file) except ValueError: debug.error(" UN-SUPPORTED link format: '.a'") + """ if self.type == 'LIBRARY' \ or self.type == 'LIBRARY_DYNAMIC': try: @@ -475,6 +476,7 @@ class Module: self.local_heritage.add_lib_dynamic(res_file) except ValueError: debug.error(" UN-SUPPORTED link format: '.so'/'.dynlib'/'.dll'") + """ try: tmp_builder = builder.get_builder_with_output("jar"); list_file = tools.filter_extention(list_sub_file_needed_to_build, tmp_builder.get_input_type()) diff --git a/lutin/target.py b/lutin/target.py index c34944f..08d0689 100644 --- a/lutin/target.py +++ b/lutin/target.py @@ -159,7 +159,7 @@ class Target: if self.config["compilator"] == "clang": self.cc = self.cross + "clang" self.xx = self.cross + "clang++" - self.ar=self.cross + "llvm-ar" + #self.ar=self.cross + "llvm-ar" self.ranlib="" else: self.cc = self.cross + "gcc" diff --git a/lutin/z_builder/lutinBuilder_libraryDynamic.py b/lutin/z_builder/lutinBuilder_libraryDynamic.py index deea1b7..bc15ce2 100644 --- a/lutin/z_builder/lutinBuilder_libraryDynamic.py +++ b/lutin/z_builder/lutinBuilder_libraryDynamic.py @@ -91,8 +91,9 @@ def link(file, binary, target, depancy, name, basic_path, static=False): lib_name = elem[len(lib_path)+len(target.prefix_lib)+1:-len(target.suffix_lib_dynamic)] cmd.append("-L" + lib_path) cmd.append("-l" + lib_name) - if len(list_dynamic) > 0: - cmd.append("-Wl,-R$ORIGIN/../lib/") + if target.name != "MacOs": + if len(list_dynamic) > 0: + cmd.append("-Wl,-R$ORIGIN/../lib/") except: pass try: diff --git a/lutin/z_target/lutinTarget_IOs.py b/lutin/z_target/lutinTarget_IOs.py index 453a28b..78a134d 100644 --- a/lutin/z_target/lutinTarget_IOs.py +++ b/lutin/z_target/lutinTarget_IOs.py @@ -55,11 +55,11 @@ class Target(target.Target): #self.suffix_package='' if self.sumulator == True: - self.sysroot = "-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.3.sdk" + self.sysroot = "-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk" self.global_flags_ld.append("-mios-simulator-version-min=8.0") self.global_flags_cc.append("-mios-simulator-version-min=8.0") else: - self.sysroot = "-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.3.sdk" + self.sysroot = "-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk" self.global_flags_ld.append("-miphoneos-version-min=8.0") self.global_flags_cc.append("-miphoneos-version-min=8.0") @@ -76,44 +76,116 @@ class Target(target.Target): self.global_flags_m.append("-fobjc-arc") #self.global_flags_m.append("-fmodules") + + self.pkg_path_data = "share" + self.pkg_path_bin = "" + self.pkg_path_lib = "lib" + self.pkg_path_license = "license" + - def get_staging_path(self, binary_name): - return tools.get_run_path() + self.path_out + self.path_staging + "/" + binary_name + ".app/" + def make_package(self, pkg_name, pkg_properties, base_pkg_path, heritage_list): + #The package generated depend of the type of the element: + end_point_module_name = heritage_list.list_heritage[-1].name + module = self.get_module(end_point_module_name) + if module == None: + debug.error("can not create package ... "); + if module.get_type() == 'PREBUILD': + #nothing to do ... + return + if module.get_type() == 'LIBRARY' \ + or module.get_type() == 'LIBRARY_DYNAMIC' \ + or module.get_type() == 'LIBRARY_STATIC': + debug.info("Can not create package for library"); + return + if module.get_type() == 'BINARY' \ + or module.get_type() == 'BINARY_STAND_ALONE': + self.make_package_binary(pkg_name, pkg_properties, base_pkg_path, heritage_list, static = True) + if module.get_type() == 'BINARY_SHARED': + self.make_package_binary(pkg_name, pkg_properties, base_pkg_path, heritage_list, static = False) + if module.get_type() == 'PACKAGE': + debug.info("Can not create package for package"); - def get_staging_path_data(self, binary_name): - return self.get_staging_path(binary_name) + self.path_data + "/" - def make_package(self, pkg_name, pkg_properties, basePkgPath, heritage_list): + def make_package_binary(self, pkg_name, pkg_properties, base_pkg_path, heritage_list, static): debug.debug("------------------------------------------------------------------------") debug.info("Generate package '" + pkg_name + "'") debug.debug("------------------------------------------------------------------------") + #output path + target_outpath = os.path.join(self.get_staging_path(pkg_name), pkg_name + ".app") + tools.create_directory_of_file(target_outpath) + ## Create share datas: + if static == True: + target_outpath_data = os.path.join(target_outpath, self.pkg_path_data, pkg_name) + else: + target_outpath_data = os.path.join(target_outpath, self.pkg_path_data) + tools.create_directory_of_file(target_outpath_data) + debug.debug("heritage for " + str(pkg_name) + ":") + for heritage in heritage_list.list_heritage: + debug.debug("sub elements: " + str(heritage.name)) + path_src = self.get_build_path_data(heritage.name) + debug.verbose(" has directory: " + path_src) + if os.path.isdir(path_src): + if static == True: + debug.debug(" need copy: " + path_src + " to " + target_outpath_data) + #copy all data: + tools.copy_anything(path_src, target_outpath_data, recursive=True, force_identical=True) + else: + debug.debug(" need copy: " + os.path.dirname(path_src) + " to " + target_outpath_data) + #copy all data: + tools.copy_anything(os.path.dirname(path_src), target_outpath_data, recursive=True, force_identical=True) + + ## copy binary files: + target_outpath_bin = os.path.join(target_outpath, self.pkg_path_bin) + tools.create_directory_of_file(target_outpath_bin) + path_src = self.get_build_file_bin(pkg_name) + path_dst = os.path.join(target_outpath_bin, pkg_name + self.suffix_binary) + debug.verbose("path_dst: " + str(path_dst)) + tools.copy_file(path_src, path_dst) + + ## Create libraries: + if static == False: + #copy all shred libs... + target_outpath_lib = os.path.join(target_outpath, self.pkg_path_lib) + tools.create_directory_of_file(target_outpath_lib) + debug.verbose("libs for " + str(pkg_name) + ":") + for heritage in heritage_list.list_heritage: + debug.debug("sub elements: " + str(heritage.name)) + file_src = self.get_build_file_dynamic(heritage.name) + debug.verbose(" has directory: " + file_src) + if os.path.isfile(file_src): + debug.debug(" need copy: " + file_src + " to " + target_outpath_lib) + #copy all data: + # TODO : We can have a problem when writing over library files ... + tools.copy_file(file_src, os.path.join(target_outpath_lib, os.path.basename(file_src)) ) + + ## Create icon: if "ICON" in pkg_properties.keys() \ and pkg_properties["ICON"] != "": # Resize all icon needed for Ios ... # TODO : Do not regenerate if source resource is not availlable # TODO : Add a colored background ... debug.print_element("pkg", "iTunesArtwork.png", "<==", pkg_properties["ICON"]) - image.resize(pkg_properties["ICON"], self.get_staging_path(pkg_name) + "/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"]) - image.resize(pkg_properties["ICON"], self.get_staging_path(pkg_name) + "/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"]) - image.resize(pkg_properties["ICON"], self.get_staging_path(pkg_name) + "/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"]) - image.resize(pkg_properties["ICON"], self.get_staging_path(pkg_name) + "/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"]) - image.resize(pkg_properties["ICON"], self.get_staging_path(pkg_name) + "/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"]) - image.resize(pkg_properties["ICON"], self.get_staging_path(pkg_name) + "/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"]) - image.resize(pkg_properties["ICON"], self.get_staging_path(pkg_name) + "/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"]) - image.resize(pkg_properties["ICON"], self.get_staging_path(pkg_name) + "/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"]) - image.resize(pkg_properties["ICON"], self.get_staging_path(pkg_name) + "/Icon-Small@2x.png", 58, 58) + image.resize(pkg_properties["ICON"], os.path.join(target_outpath, "Icon-Small@2x.png"), 58, 58) debug.print_element("pkg", "PkgInfo", "<==", "APPL????") - infoFile = self.get_staging_path(pkg_name) + "/PkgInfo" + infoFile = os.path.join(target_outpath, "PkgInfo") # Create the info file tmpFile = open(infoFile, 'w') tmpFile.write("APPL????") @@ -206,7 +278,7 @@ class Target(target.Target): dataFile += "\n" dataFile += "\n\n" - infoFile = self.get_staging_path(pkg_name) + "/Info.plist" + infoFile = os.path.join(target_outpath, "Info.plist") # Create the info file tmpFile = open(infoFile, 'w') tmpFile.write(dataFile) @@ -274,7 +346,7 @@ class Target(target.Target): dataFile += "\n" dataFile += "\n\n" - infoFile = self.get_staging_path(pkg_name) + "/ResourceRules.plist" + infoFile = os.path.join(target_outpath, "ResourceRules.plist") # Create the info file tmpFile = open(infoFile, 'w') tmpFile.write(dataFile) @@ -292,7 +364,7 @@ class Target(target.Target): dataFile += "\n" dataFile += "\n\n" - infoFile = self.get_staging_path(pkg_name) + "/Entitlements.plist" + infoFile = os.path.join(target_outpath, "Entitlements.plist") # Create the info file tmpFile = open(infoFile, 'w') tmpFile.write(dataFile) @@ -311,7 +383,7 @@ class Target(target.Target): if self.sumulator == False: # Create the info file - tmpFile = open(self.get_build_path(pkg_name) + "/worddown.xcent", 'w') + tmpFile = open(os.path.join(target_outpath, pkg_name + ".xcent"), 'w') tmpFile.write("\n") tmpFile.write("\n") tmpFile.write("\n") diff --git a/lutin/z_target/lutinTarget_Linux.py b/lutin/z_target/lutinTarget_Linux.py index 0077bdf..1f93c1d 100644 --- a/lutin/z_target/lutinTarget_Linux.py +++ b/lutin/z_target/lutinTarget_Linux.py @@ -111,7 +111,7 @@ class Target(target.Target): target_outpath = os.path.join(self.get_staging_path(pkg_name), pkg_name + ".app") tools.create_directory_of_file(target_outpath) - ## Create share datas + ## Create share datas: if static == True: target_outpath_data = os.path.join(target_outpath, self.pkg_path_data, pkg_name) else: @@ -132,7 +132,7 @@ class Target(target.Target): #copy all data: tools.copy_anything(os.path.dirname(path_src), target_outpath_data, recursive=True, force_identical=True) - ## copy binary files + ## copy binary files: target_outpath_bin = os.path.join(target_outpath, self.pkg_path_bin) tools.create_directory_of_file(target_outpath_bin) path_src = self.get_build_file_bin(pkg_name) @@ -140,7 +140,7 @@ class Target(target.Target): debug.verbose("path_dst: " + str(path_dst)) tools.copy_file(path_src, path_dst) - ## Create libraries + ## Create libraries: if static == False: #copy all shred libs... target_outpath_lib = os.path.join(target_outpath, self.pkg_path_lib) @@ -156,31 +156,31 @@ class Target(target.Target): # TODO : We can have a problem when writing over library files ... tools.copy_file(file_src, os.path.join(target_outpath_lib, os.path.basename(file_src)) ) - ## Create version file + ## Create version file: tmpFile = open(target_outpath + "/version.txt", 'w') tmpFile.write(pkg_properties["VERSION"]) tmpFile.flush() tmpFile.close() - ## Create maintainer file + ## Create maintainer file: tmpFile = open(target_outpath + "/maintainer.txt", 'w') tmpFile.write(self.generate_list_separate_coma(pkg_properties["MAINTAINER"])) tmpFile.flush() tmpFile.close() - ## Create appl_name file + ## Create appl_name file: tmpFile = open(target_outpath + "/appl_name.txt", 'w') tmpFile.write("en_EN:" + pkg_properties["NAME"]) tmpFile.flush() tmpFile.close() - ## Create appl_description file + ## Create appl_description file: tmpFile = open(target_outpath + "/appl_description.txt", 'w') tmpFile.write("en_EN:" + pkg_properties["DESCRIPTION"]) tmpFile.flush() tmpFile.close() - ## Create Readme file + ## Create Readme file: readmeFileDest = target_outpath + "/readme.txt" if os.path.exists(base_pkg_path + "/os-Linux/README")==True: tools.copy_file(base_pkg_path + "/os-Linux/README", readmeFileDest) @@ -195,7 +195,7 @@ class Target(target.Target): tmpFile.flush() tmpFile.close() - ## Create licence file + ## Create licence file: licenseFileDest = os.path.join(target_outpath, self.pkg_path_license, pkg_name + ".txt") tools.create_directory_of_file(licenseFileDest) if os.path.exists(base_pkg_path + "/license.txt")==True: @@ -207,7 +207,7 @@ class Target(target.Target): tmpFile.flush() tmpFile.close() - ## Create changeLog file + ## Create changeLog file: changeLogFileDest = target_outpath + "/changelog.txt" if os.path.exists(base_pkg_path + "/changelog") == True: tools.copy_file(base_pkg_path + "/changelog", changeLogFileDest) @@ -218,7 +218,6 @@ class Target(target.Target): tmpFile.flush() tmpFile.close() - ## create the package: debug.debug("package : " + self.get_staging_path(pkg_name) + "/" + pkg_name + ".app.pkg") os.system("cd " + self.get_staging_path(pkg_name) + " ; tar -czf " + pkg_name + ".app.tar.gz " + pkg_name + ".app") diff --git a/lutin/z_target/lutinTarget_MacOs.py b/lutin/z_target/lutinTarget_MacOs.py index 15482b7..4605b63 100644 --- a/lutin/z_target/lutinTarget_MacOs.py +++ b/lutin/z_target/lutinTarget_MacOs.py @@ -40,24 +40,103 @@ class Target(target.Target): self.global_flags_cc.append("-D__STDCPP_LLVM__") - + self.pkg_path_data = "Resources" + self.pkg_path_bin = "MacOS" + self.pkg_path_lib = "lib" + self.pkg_path_license = "license" + + """ def get_staging_path(self, binary_name): return tools.get_run_path() + self.path_out + self.path_staging + "/" + binary_name + ".app/Contents/" def get_staging_path_data(self, binary_name): return self.get_staging_path(binary_name) + self.path_data + "/" + """ def make_package(self, pkg_name, pkg_properties, base_pkg_path, heritage_list): + #The package generated depend of the type of the element: + end_point_module_name = heritage_list.list_heritage[-1].name + module = self.get_module(end_point_module_name) + if module == None: + debug.error("can not create package ... "); + if module.get_type() == 'PREBUILD': + #nothing to do ... + return + if module.get_type() == 'LIBRARY' \ + or module.get_type() == 'LIBRARY_DYNAMIC' \ + or module.get_type() == 'LIBRARY_STATIC': + debug.info("Can not create package for library"); + return + if module.get_type() == 'BINARY' \ + or module.get_type() == 'BINARY_STAND_ALONE': + self.make_package_binary(pkg_name, pkg_properties, base_pkg_path, heritage_list, static = True) + if module.get_type() == 'BINARY_SHARED': + self.make_package_binary(pkg_name, pkg_properties, base_pkg_path, heritage_list, static = False) + if module.get_type() == 'PACKAGE': + debug.info("Can not create package for package"); + + + def make_package_binary(self, pkg_name, pkg_properties, base_pkg_path, heritage_list, static): debug.debug("------------------------------------------------------------------------") debug.info("Generate package '" + pkg_name + "'") debug.debug("------------------------------------------------------------------------") + #output path + target_outpath = os.path.join(self.get_staging_path(pkg_name), pkg_name + ".app/Contents") + tools.create_directory_of_file(target_outpath) - if "ICON" in pkg_properties.keys() \ + ## Create share datas: + if static == True: + target_outpath_data = os.path.join(target_outpath, self.pkg_path_data, pkg_name) + else: + target_outpath_data = os.path.join(target_outpath, self.pkg_path_data) + tools.create_directory_of_file(target_outpath_data) + debug.debug("heritage for " + str(pkg_name) + ":") + for heritage in heritage_list.list_heritage: + debug.debug("sub elements: " + str(heritage.name)) + path_src = self.get_build_path_data(heritage.name) + debug.verbose(" has directory: " + path_src) + if os.path.isdir(path_src): + if static == True: + debug.debug(" need copy: " + path_src + " to " + target_outpath_data) + #copy all data: + tools.copy_anything(path_src, target_outpath_data, recursive=True, force_identical=True) + else: + debug.debug(" need copy: " + os.path.dirname(path_src) + " to " + target_outpath_data) + #copy all data: + tools.copy_anything(os.path.dirname(path_src), target_outpath_data, recursive=True, force_identical=True) + + ## copy binary files: + target_outpath_bin = os.path.join(target_outpath, self.pkg_path_bin) + tools.create_directory_of_file(target_outpath_bin) + path_src = self.get_build_file_bin(pkg_name) + path_dst = os.path.join(target_outpath_bin, pkg_name + self.suffix_binary) + debug.verbose("path_dst: " + str(path_dst)) + tools.copy_file(path_src, path_dst) + + ## Create libraries: + if static == False: + #copy all shred libs... + target_outpath_lib = os.path.join(target_outpath, self.pkg_path_lib) + tools.create_directory_of_file(target_outpath_lib) + debug.verbose("libs for " + str(pkg_name) + ":") + for heritage in heritage_list.list_heritage: + debug.debug("sub elements: " + str(heritage.name)) + file_src = self.get_build_file_dynamic(heritage.name) + debug.verbose(" has directory: " + file_src) + if os.path.isfile(file_src): + debug.debug(" need copy: " + file_src + " to " + target_outpath_lib) + #copy all data: + # TODO : We can have a problem when writing over library files ... + tools.copy_file(file_src, os.path.join(target_outpath_lib, os.path.basename(file_src)) ) + + ## Create icon (no convertion ==> TODO: must test if png is now supported): + if "ICON" in pkg_properties.keys() \ and pkg_properties["ICON"] != "": - tools.copy_file(pkg_properties["ICON"], self.get_staging_path_data(pkg_name) + "/icon.icns", force=True) + tools.copy_file(pkg_properties["ICON"], os.path.join(target_outpath, "icon.icns"), force=True) + ## Create info.plist file: # http://www.sandroid.org/imcross/#Deployment - infoFile=self.get_staging_path(pkg_name) + "/Info.plist" + infoFile = os.path.join(target_outpath, "Info.plist") # Create the info file tmpFile = open(infoFile, 'w') tmpFile.write("\n") @@ -79,15 +158,17 @@ class Target(target.Target): tmpFile.write("\n\n") tmpFile.flush() tmpFile.close() - infoFile=self.get_staging_path(pkg_name) + "/PkgInfo" + + ## Create PkgInfo file: + infoFile=os.path.join(target_outpath, "PkgInfo") # Create the info file tmpFile = open(infoFile, 'w') tmpFile.write("APPL????") tmpFile.flush() tmpFile.close() - # Create a simple interface to localy install the aplication for the shell (a shell command line interface) - shell_file_name=self.get_staging_path(pkg_name) + "/shell/" + pkg_name + ## Create a simple interface to localy install the aplication for the shell (a shell command line interface): + shell_file_name = os.path.join(target_outpath, "shell", pkg_name) # Create the info file tools.create_directory_of_file(shell_file_name) tmpFile = open(shell_file_name, 'w') @@ -98,19 +179,19 @@ class Target(target.Target): tmpFile.flush() tmpFile.close() - - # Must create the disk image of the application + ## Create the disk image of the application: debug.info("Generate disk image for '" + pkg_name + "'") - output_file_name = self.get_final_path() + "/" + pkg_name + ".dmg" + output_file_name = os.path.join(self.get_final_path(), pkg_name + ".dmg") cmd = "hdiutil create -volname " cmd += pkg_name + " -srcpath " - cmd += tools.get_run_path() + self.path_out + self.path_staging + "/" + pkg_name + ".app" + cmd += os.path.join(tools.get_run_path(), self.path_out, self.path_staging, pkg_name + ".app") cmd += " -ov -format UDZO " cmd += output_file_name tools.create_directory_of_file(output_file_name) multiprocess.run_command_direct(cmd) debug.info("disk image: " + output_file_name) + ## user information: debug.info("You can have an shell interface by executing : ") debug.info(" sudo cp " + shell_file_name + " /usr/local/bin") diff --git a/lutin/z_target/lutinTarget_Windows.py b/lutin/z_target/lutinTarget_Windows.py index e658bd8..57f138a 100644 --- a/lutin/z_target/lutinTarget_Windows.py +++ b/lutin/z_target/lutinTarget_Windows.py @@ -102,7 +102,7 @@ class Target(target.Target): target_outpath = os.path.join(self.get_staging_path(pkg_name), pkg_name + ".app") tools.create_directory_of_file(target_outpath) - ## Create share datas + ## Create share datas: if static == True: target_outpath_data = os.path.join(target_outpath, self.pkg_path_data, pkg_name) else: @@ -123,7 +123,7 @@ class Target(target.Target): #copy all data: tools.copy_anything(os.path.dirname(path_src), target_outpath_data, recursive=True, force_identical=True) - ## copy binary files + ## copy binary files: target_outpath_bin = os.path.join(target_outpath, self.pkg_path_bin) tools.create_directory_of_file(target_outpath_bin) path_src = self.get_build_file_bin(pkg_name) @@ -131,31 +131,31 @@ class Target(target.Target): debug.verbose("path_dst: " + str(path_dst)) tools.copy_file(path_src, path_dst) - ## Create version file + ## Create version file: tmpFile = open(target_outpath + "/version.txt", 'w') tmpFile.write(pkg_properties["VERSION"]) tmpFile.flush() tmpFile.close() - ## Create maintainer file + ## Create maintainer file: tmpFile = open(target_outpath + "/maintainer.txt", 'w') tmpFile.write(self.generate_list_separate_coma(pkg_properties["MAINTAINER"])) tmpFile.flush() tmpFile.close() - ## Create appl_name file + ## Create appl_name file: tmpFile = open(target_outpath + "/appl_name.txt", 'w') tmpFile.write("en_EN:" + pkg_properties["NAME"]) tmpFile.flush() tmpFile.close() - ## Create appl_description file + ## Create appl_description file: tmpFile = open(target_outpath + "/appl_description.txt", 'w') tmpFile.write("en_EN:" + pkg_properties["DESCRIPTION"]) tmpFile.flush() tmpFile.close() - ## Create Readme file + ## Create Readme file: readmeFileDest = target_outpath + "/readme.txt" if os.path.exists(base_pkg_path + "/os-Linux/README")==True: tools.copy_file(base_pkg_path + "/os-Linux/README", readmeFileDest) @@ -170,7 +170,7 @@ class Target(target.Target): tmpFile.flush() tmpFile.close() - ## Create licence file + ## Create licence file: licenseFileDest = os.path.join(target_outpath, self.pkg_path_license, pkg_name + ".txt") tools.create_directory_of_file(licenseFileDest) if os.path.exists(base_pkg_path + "/license.txt")==True: @@ -182,7 +182,7 @@ class Target(target.Target): tmpFile.flush() tmpFile.close() - ## Create changeLog file + ## Create changeLog file: changeLogFileDest = target_outpath + "/changelog.txt" if os.path.exists(base_pkg_path + "/changelog") == True: tools.copy_file(base_pkg_path + "/changelog", changeLogFileDest) @@ -193,7 +193,6 @@ class Target(target.Target): tmpFile.flush() tmpFile.close() - def make_package_single_file(self, pkg_name, pkg_properties, base_pkg_path, heritage_list): debug.debug("------------------------------------------------------------------------")