Skip to content

Commit

Permalink
[ios] Migrates fluent icon to use bundle_data_xcassets
Browse files Browse the repository at this point in the history
  • Loading branch information
Xiaoye220 committed Aug 23, 2024
1 parent f82069a commit 14da533
Show file tree
Hide file tree
Showing 2 changed files with 32,310 additions and 17,143 deletions.
5 changes: 3 additions & 2 deletions importer/process_ios_assets.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,13 +225,14 @@ def process_assets():
gn_file.write("# Do not make edits or they will be removed later\n")
gn_file.write("#\n\n")

gn_file.write("import(\"//build/config/ios/asset_catalog.gni\")\n\n")
gn_file.write("import(\"//build/config/ios/rules.gni\")\n\n")

for imageset in imagesets:
if imageset == ".DS_Store":
continue
imageset_folder_path = os.path.join(icon_assets_path, imageset)
gn_file.write("imageset(\"{}\")".format(imageset.replace(".imageset", "")) + " {\n")
gn_file.write("bundle_data_xcassets(\"{}\")".format(imageset.replace(".imageset", "")) + " {\n")
gn_file.write(" catalog = \"FluentIcons/Assets/IconAssets.xcassets\"\n")
gn_file.write(" sources = [\n")
for imageset_file in sorted(os.listdir(imageset_folder_path)):
gn_file.write(f" \"FluentIcons/Assets/IconAssets.xcassets/{imageset}/{imageset_file}\",\n")
Expand Down
Loading

0 comments on commit 14da533

Please sign in to comment.