Running CubicSDR.exe from the command-line in the directory of CubicSDR.exe is no problem.
But running from the command-line from a directory relative. E.g. ..\bin\CubicSDR.exe is a problem;
it fails to find all the share/font/*.fnt files and I get no sound!.
You would have to create a shortcut and set the working directory in the properties dialog. The Windows build is probably hardcoded to act like a portable install so it's always going to look for assets in the same folder you run it from.
A GetModuleFileName (NULL, my_name. sizeof(my_name)); could fix it. But OK.
I don't follow you on the portable install. I have lot of portable apps here that can run from any directory.
@gvanem As the Wiki says for Build Windows you need to build with BUILD_INSTALLER=1. In this case, the fonts dir is searched relative to the executable.
If not set, fonts are searched in ../share/cubicsdr/ whatever that means.
Since I built with BUILD_INSTALLER = 1, I tried to run using a relative path as you did and it worked for me. (Windows 10 x64, using either CMD or Git Bash)
Since I built with BUILD_INSTALLER = 1, I tried to run using a relative path as you did and it worked for me.
Which means -DRES_FOLDER="../share/cubicsdr/". The RES_FOLDER is a compile-time constant. Nothing to do with a run-time directory variable.
IMHO, it should be
@gvanem Hello, I've comitted some changes to make the fonts search smarter:
RES_FOLDER/fonts[Cubic exe path]/RES_FOLDER/fonts,[Cubic exe path]/fontsI think it covers your issue now, so far as my tests have shown.
@vsonnier : thanks for your effort. That fixed it.
@gvanem De nada.