Getting LÖVE license texts from runtime
Posted: Mon Jul 29, 2024 9:08 am
I want to display the LÖVE licensing information from my game menu.
For Windows that would be "directory of love.exe"/license.txt, for macOS that would be "directory of love"/../Resources/license.txt, for Linux in case of the official AppImage, that's "directory of love"/../license.txt (but for versions distributed through package managers, there are options).
I know how to determine the OS in runtime, but how do I get the directory of the executable?
I also want to include similar info about all the assets and libraries, but that seems to be much easier (info embedded in the files or supplied as separate files alongside) than the actual runtime itself.
For Windows that would be "directory of love.exe"/license.txt, for macOS that would be "directory of love"/../Resources/license.txt, for Linux in case of the official AppImage, that's "directory of love"/../license.txt (but for versions distributed through package managers, there are options).
I know how to determine the OS in runtime, but how do I get the directory of the executable?
I also want to include similar info about all the assets and libraries, but that seems to be much easier (info embedded in the files or supplied as separate files alongside) than the actual runtime itself.