From 39501fe724580f3881353c9b7e77cb0d9c35fccb Mon Sep 17 00:00:00 2001 From: Matthieu Gautier Date: Tue, 18 Jul 2017 15:43:04 +0200 Subject: [PATCH] Copy icu data at the right place. `kiwix-android` now use all files in "icu" assets directory. Not anymore directly the `icudt.dat` file. --- dependencies.py | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/dependencies.py b/dependencies.py index 9d47086..3acd526 100644 --- a/dependencies.py +++ b/dependencies.py @@ -380,8 +380,15 @@ class KiwixAndroid(Dependency): shutil.rmtree(pj(self.build_path, 'kiwixlib', 'src', 'main')) except FileNotFoundError: pass - shutil.copytree(pj(self.buildEnv.install_dir, 'kiwix-lib'), pj(self.build_path, 'kiwixlib', 'src', 'main')) - shutil.copy2(pj(self.buildEnv.install_dir, 'share', 'icu', '58.2', 'icudt58l.dat'), pj(self.build_path, 'app', 'src', 'main', 'assets', 'icudt.dat')) + shutil.copytree(pj(self.buildEnv.install_dir, 'kiwix-lib'), + pj(self.build_path, 'kiwixlib', 'src', 'main')) + os.makedirs( + pj(self.build_path, 'app', 'src', 'main', 'assets', 'icu'), + exist_ok=True) + shutil.copy2(pj(self.buildEnv.install_dir, 'share', 'icu', '58.2', + 'icudt58l.dat'), + pj(self.build_path, 'app', 'src', 'main', 'assets', + 'icu', 'icudt58l.dat')) class KiwixCustomApp(Dependency): @@ -460,8 +467,15 @@ class KiwixCustomApp(Dependency): shutil.rmtree(pj(self.build_path, 'kiwixlib', 'src', 'main')) except FileNotFoundError: pass - shutil.copytree(pj(self.buildEnv.install_dir, 'kiwix-lib'), pj(self.build_path, 'kiwixlib', 'src', 'main')) - shutil.copy2(pj(self.buildEnv.install_dir, 'share', 'icu', '58.2', 'icudt58l.dat'), pj(self.build_path, 'app', 'src', 'main', 'assets', 'icudt.dat')) + shutil.copytree(pj(self.buildEnv.install_dir, 'kiwix-lib'), + pj(self.build_path, 'kiwixlib', 'src', 'main')) + os.makedirs( + pj(self.build_path, 'app', 'src', 'main', 'assets', 'icu'), + exist_ok=True) + shutil.copy2(pj(self.buildEnv.install_dir, 'share', 'icu', '58.2', + 'icudt58l.dat'), + pj(self.build_path, 'app', 'src', 'main', 'assets', + 'icu', 'icudt58l.dat')) # Generate custom directory try: