How to view changes, made to kits, reflected in compiled applications

I was working on mediaplayer issue #8567 ([MediaPlayer] show tooltip with current time position (easy)) – Haiku

anytime I make changes in interface kit classes (slider.cpp), a compile of mediaplayer (jam -q MediaPlayer) don’t seem to reflect the change, I had to build haiku.hpkg/haiku_devel.hpkg and then do a restart to view the changes. This takes up a lot of time. Is this the correct and fastest way ?

The problem here is you are making a change in one place and then compiling something completely different, and running that with system libraries.

What you need to do instead is to use the new library containing your interface kit changes, called libbe.so and run either the system MediaPlayer with it or your freshly compiled one.

To do this you have to set the LIBRARY_PATH in a way to prefer the new libbe.so or use LD_PRELOAD.

You can use find to locate thr new libbe.so, so for example in the haiku sourcetree run:
find generated/ -iname libbe.so
and it should show you where libbe.so was build to. alternatively the build will show this during rebuilds.

Now you either set LD_PRELOAD to the path of your new library, or you add the folder containing libbe.so as first folder in LIBRARY_PATH, and run the MediaPlayer with thode enviroment variables

example:
LD_PRELOAD=path/to/checkout/generated/path/to/libbe.so MediaPlayer

or
export LIBRARY_PATH=path/to/libbefolder/:$LIBRARY_PATH
MediaPlayer

I typed this on my phone, so please ignore any spelling errors.

Edit: to verify MediaPlayer runs with the new version you can use the listimage command, it should then not use the libbe.so in /system but the one in your haiku checkout

4 Likes