Skip to content

Commit 877b7d1

Browse files
committed
reorganize generated assets folder
1 parent 69db0b2 commit 877b7d1

4 files changed

Lines changed: 17 additions & 51 deletions

File tree

.github/workflows/ios_main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ jobs:
5353
--build=missing
5454
--profile:host=conan/profiles/ios-simulator-arm64
5555
--deployer=conan/conandeployer.py
56-
--deployer-folder=conan-assets
56+
--deployer-folder=conan-assets/files
5757
-s build_type=Release
5858
-s "&:build_type=RelWithDebInfo"
5959
-s "odrcore/*:build_type=RelWithDebInfo"

OpenDocumentReader.xcodeproj/project.pbxproj

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -38,20 +38,6 @@
3838
E2F7ED61220B54D700D63515 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = E2F7ED5F220B54D700D63515 /* LaunchScreen.storyboard */; };
3939
/* End PBXBuildFile section */
4040

41-
/* Begin PBXBuildRule section */
42-
E15897752DF6377C00319830 /* PBXBuildRule */ = {
43-
isa = PBXBuildRule;
44-
compilerSpec = com.apple.compilers.proxy.script;
45-
fileType = pattern.proxy;
46-
inputFiles = (
47-
);
48-
isEditable = 1;
49-
outputFiles = (
50-
);
51-
script = "# Type a script or drag a script file from your workspace to insert its path.\n";
52-
};
53-
/* End PBXBuildRule section */
54-
5541
/* Begin PBXContainerItemProxy section */
5642
E22B25312557F0E2001D0C52 /* PBXContainerItemProxy */ = {
5743
isa = PBXContainerItemProxy;
@@ -129,23 +115,6 @@
129115
F441BA4458128EC8A16A91C9 /* Pods-OpenDocumentReaderTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-OpenDocumentReaderTests.release.xcconfig"; path = "Pods/Target Support Files/Pods-OpenDocumentReaderTests/Pods-OpenDocumentReaderTests.release.xcconfig"; sourceTree = "<group>"; };
130116
/* End PBXFileReference section */
131117

132-
/* Begin PBXFileSystemSynchronizedBuildFileExceptionSet section */
133-
E15897762DF637BD00319830 /* PBXFileSystemSynchronizedBuildFileExceptionSet */ = {
134-
isa = PBXFileSystemSynchronizedBuildFileExceptionSet;
135-
membershipExceptions = (
136-
odrcore/odr_spreadsheet.css,
137-
odrcore/odr_spreadsheet.js,
138-
odrcore/odr.css,
139-
odrcore/odr.js,
140-
);
141-
target = E2F7ED4E220B54D600D63515 /* OpenDocumentReader */;
142-
};
143-
/* End PBXFileSystemSynchronizedBuildFileExceptionSet section */
144-
145-
/* Begin PBXFileSystemSynchronizedRootGroup section */
146-
E15897702DF631AF00319830 /* conan-assets */ = {isa = PBXFileSystemSynchronizedRootGroup; exceptions = (E15897762DF637BD00319830 /* PBXFileSystemSynchronizedBuildFileExceptionSet */, ); explicitFileTypes = {}; explicitFolders = (); path = "conan-assets"; sourceTree = "<group>"; };
147-
/* End PBXFileSystemSynchronizedRootGroup section */
148-
149118
/* Begin PBXFrameworksBuildPhase section */
150119
E22B25292557F0E2001D0C52 /* Frameworks */ = {
151120
isa = PBXFrameworksBuildPhase;
@@ -229,7 +198,6 @@
229198
E2F7ED46220B54D600D63515 = {
230199
isa = PBXGroup;
231200
children = (
232-
E15897702DF631AF00319830 /* conan-assets */,
233201
E17AF34D2C258C5100FBED6A /* configs */,
234202
E2F7ED51220B54D600D63515 /* OpenDocumentReader */,
235203
E22B252D2557F0E2001D0C52 /* OpenDocumentReaderTests */,
@@ -305,13 +273,9 @@
305273
E158977C2DF640E700319830 /* [CP] Copy Conan Resources */,
306274
);
307275
buildRules = (
308-
E15897752DF6377C00319830 /* PBXBuildRule */,
309276
);
310277
dependencies = (
311278
);
312-
fileSystemSynchronizedGroups = (
313-
E15897702DF631AF00319830 /* conan-assets */,
314-
);
315279
name = OpenDocumentReader;
316280
productName = "OpenDocument Reader";
317281
productReference = 52A348B12A9262D100DACAB9 /* OpenDocumentReader.app */;

conan/conandeployer.py

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44

55
def deploy(graph, output_folder: str, **kwargs):
6+
project_folder = Path(__file__).parent.parent
67
output_folder = Path(output_folder).resolve()
78

89
conanfile = graph.root.conanfile
@@ -22,51 +23,53 @@ def deploy(graph, output_folder: str, **kwargs):
2223

2324
copytree_kwargs = {"symlinks": symlinks, "dirs_exist_ok": True}
2425

26+
conan_files = output_folder / "files"
27+
2528
if "odrcore" in deps:
2629
dep = deps["odrcore"]
27-
conanfile.output.info(f"Deploying odrcore to {output_folder}")
30+
conanfile.output.info(f"Deploying odrcore to {conan_files}")
2831
shutil.copytree(
2932
f"{dep.package_folder}/share",
30-
f"{output_folder}/odrcore",
33+
f"{conan_files}/odrcore",
3134
**copytree_kwargs,
3235
)
3336

3437
if "pdf2htmlex" in deps:
3538
dep = deps["pdf2htmlex"]
36-
conanfile.output.info(f"Deploying pdf2htmlex to {output_folder}")
39+
conanfile.output.info(f"Deploying pdf2htmlex to {conan_files}")
3740
shutil.copytree(
3841
f"{dep.package_folder}/share/pdf2htmlEX",
39-
f"{output_folder}/pdf2htmlex",
42+
f"{conan_files}/pdf2htmlex",
4043
**copytree_kwargs,
4144
)
4245

4346
if "poppler-data" in deps:
4447
dep = deps["poppler-data"]
45-
conanfile.output.info(f"Deploying poppler-data to {output_folder}")
48+
conanfile.output.info(f"Deploying poppler-data to {conan_files}")
4649
shutil.copytree(
4750
f"{dep.package_folder}/share/poppler",
48-
f"{output_folder}/poppler",
51+
f"{conan_files}/poppler",
4952
**copytree_kwargs,
5053
)
5154

5255
if "fontconfig" in deps:
5356
dep = deps["fontconfig"]
54-
conanfile.output.info(f"Deploying fontconfig to {output_folder}")
57+
conanfile.output.info(f"Deploying fontconfig to {conan_files}")
5558
shutil.copytree(
5659
f"{dep.package_folder}/res/share",
57-
f"{output_folder}/fontconfig",
60+
f"{conan_files}/fontconfig",
5861
**copytree_kwargs,
5962
)
6063

6164
with (
6265
open(f"{output_folder}/input-files.xcfilelist", "w") as f_in,
6366
open(f"{output_folder}/output-files.xcfilelist", "w") as f_out,
6467
):
65-
for file in Path(output_folder).glob("**/*"):
66-
file = file.relative_to(output_folder)
68+
for file in Path(conan_files).glob("**/*"):
69+
file = file.relative_to(conan_files)
6770
if file.suffix == ".xcfilelist":
6871
continue
69-
f_in.write(f"$(PROJECT_DIR)/{output_folder.name}/{file}\n")
72+
f_in.write(f"$(PROJECT_DIR)/{conan_files.relative_to(project_folder)}/{file}\n")
7073
f_out.write(
7174
f"${{TARGET_BUILD_DIR}}/${{UNLOCALIZED_RESOURCES_FOLDER_PATH}}/{file}\n"
7275
)

conan/copy-resources.sh

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
#!/bin/sh
2+
23
set -e
34
set -u
45
set -o pipefail
56

67
mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
78

8-
# copy all resources from "${PROJECT_DIR}/conan-assets" to "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
9-
# but ignore .xcfilelist
10-
rsync -av --exclude='*.xcfilelist' "${PROJECT_DIR}/conan-assets/" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/"
9+
rsync -av "${PROJECT_DIR}/conan-assets/files/" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/"

0 commit comments

Comments
 (0)