flipperdevices / flipperzero-ufbt

Compact tool for building and debugging applications for Flipper Zero.
https://pypi.org/project/ufbt/
GNU General Public License v3.0
484 stars 36 forks source link

assets_icons.h produces compile time error #23

Closed GLinnik21 closed 10 months ago

GLinnik21 commented 10 months ago

Description

When using ufbt to build the FlipperZero application, a compilation error occurs when trying to include <assets_icons.h>. The application compiles and runs without issues when using the full fbt.

The assets library is specified in the manifest like so: fap_libs=["assets"]

Steps to Reproduce

  1. Use ufbt for building the project.
  2. Include <assets_icons.h> in the source file.
  3. Observe compilation error.

Expected Behavior

Compilation should succeed without errors.

Actual Behavior

Compilation fails with the following error:

/MH-Z19-UART/mh_z19_ui.c:3:10: fatal error: assets_icons.h: No such file or directory
    3 | #include <assets_icons.h>
      |          ^~~~~~~~~~~~~~~~
compilation terminated.

Logs

scons: Entering directory `/Users/<user>/.ufbt/current/scripts/ufbt'
        CC      /MH-Z19-UART/mh_z19_ui.c
        CDB   /MH-Z19-UART/.vscode/compile_commands.json
/MH-Z19-UART/mh_z19_ui.c:3:10: fatal error: assets_icons.h: No such file or directory
    3 | #include <assets_icons.h>
      |          ^~~~~~~~~~~~~~~~
compilation terminated.
scons: *** [/Users/<user>/.ufbt/build/mh_z19_uart/mh_z19_ui.o] Error 1

Environment

hedger commented 10 months ago

?

hedger commented 10 months ago

Please provide a minimal reproduction case

GLinnik21 commented 10 months ago

Please provide a minimal reproduction case

Yeah, sorry. I accidentally sent it without description.

GLinnik21 commented 10 months ago

Here is the code. Also it fails on CI

hedger commented 10 months ago

This is actually intentional. Icons are not part of SDK, so please copy all the images you need to your app's repo and use fap_icon_assets.