How to change icon in minidlna 1.3.2?

Hello
On compilation I replace the minidlna icon to represent the device and for version 1.3.2 my icons stored in icons.c are ignored.
Anyone tried maybe to change the icon in this latest version and have a working way?

Yes, I do this routinely. The problem you are encountering is that the build system "heals" changes to package source files. It's a bit frustrating, but there are a couple ways around it:

  1. By fighting the build system - basically creating the package's build directory, changing the source files you want to change, then making them immutable so the build system can't overwrite it. After that you need to build with the -i flag to ignore the error the build system will generate when it pouts about not being able to overwrite your changes:

    make package/minidlna/prepare
    <make changes to build_dir/target-*/minidlna-1.3.2/icons.c>
    chattr +i build_dir/target-*/minidlna-1.3.2/icons.c
    make -i package/minidlna/compile

    I use the above method when I am doing quick and dirty changes to a package's source, or doing iterative testing on something.
  1. By making a patch for your change and integrating it into the build. It's more work to make the patch, but forever after it's easy to incorporate into your build:

    make package/minidlna/prepare
    mkdir a
    mkdir b
    cp build_dir/target-*/minidlna-1.3.2/icons.c a
    cp build_dir/target-*/minidlna-1.3.2/icons.c b
    <make changes to b/icons.c>
    diff -u5 a/icons.c b/icons.c > ~/999_local_custom_icons.patch
    cp ~/999_local_custom_icons.patch feeds/packages/multimedia/minidlna/patches/
    make package/minidlna/compile

    I use the above method when I have a finished change I want to forever incorporate into future builds. Forever after when you build OpenWrt, all you have to do is incorporate cp /path/to/999_local_custom_icons.patch feeds/packages/multimedia/minidlna/patches/ into the build process. Generally I do it after I make the toolchain and do a make download. OpenWrt will automatically pick up that patch when it builds minidlna.

Here is the patch I use: https://va1der.ca/~public/openwrt/patches/minidlna/999_local_tusker_icons.patch

4 Likes

Hi @VA1DER
Thanks, adding the patch really helped. I thought I was doing something wrong, I didn't realize that the compilation messed up my changes.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.