Why use .in in Gnome Music app?

Hello. I’m trying to learn gnome development in python and I found Gnome Music in Builder.

It took me a few minutes to realize gnome-music.in is a python file and the entry point of the app. It is passed to meson as input.

configure_file(
    input: 'gnome-music.in',
    output: 'gnome-music',
    configuration: bin_config,
    install_dir: get_option('bindir')
)

I feel like I’m missing something here. Is there something special I don’t understand with .in file?

.in is just a convention; it stands for ‘input’. The file is processed by meson to hardcode various build variables into the output file.

In gnome-music.in there are strings like @version@ which are replaced by the values in bin_config, defined in meson.build just above the excerpt you shared.

https://mesonbuild.com/Configuration.html

2 Likes