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

Add support for FAP icons #21

Closed
dcoles opened this issue Dec 7, 2022 Discussed in #20 · 2 comments
Closed

Add support for FAP icons #21

dcoles opened this issue Dec 7, 2022 Discussed in #20 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@dcoles
Copy link
Collaborator

dcoles commented Dec 7, 2022

Discussed in #20

Originally posted by GitCat3 December 7, 2022
So I notice that there seems to be no way to create an icon for the .fap in the flipper zero, is this planned or is there a way to do this and i'm just dumb?

@dcoles dcoles added the enhancement New feature or request label Dec 7, 2022
@dcoles
Copy link
Collaborator Author

dcoles commented Dec 7, 2022

This isn't currently supported by the manifest! macro, but support can definitely be added.

I think the only real "trick" is converting an image to the format expected by the Flipper Zero. The two options would be:

  • Have the user pre-build the icon and just include it in the binary (what we do in the images example)
  • Use build.rs or a proc macro to process the image when creating the manifest

I'm probably learning towards the later, since it would make a better experience for developers.

@dcoles dcoles self-assigned this Dec 10, 2022
@dcoles
Copy link
Collaborator Author

dcoles commented Dec 10, 2022

As of flipperzero-rt-0.4.1 it's now possible to set a custom icon for your application! 🥳

From examples/hello-rust:

// Define the FAP Manifest for this application
manifest!(
    name = "Hello, Rust!",
    has_icon = true,
    // See `docs/icons.md` for icon format
    icon = "rustacean-10x10.icon"
);

Icons can be created from any 10x10 px monochrome image. However they need to be converted to the Flipper Zero's custom icon format before they can be used.

@dcoles dcoles closed this as completed Dec 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant