Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ios] Migrates fluent icon to use bundle_data_xcassets #747

Merged
merged 1 commit into from
Aug 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading