self.blackList=set(("nsmd","non-daw","carla","agordejo","adljack","agordejo.bin"))#only programs that have to do with audio and music. There is another general blacklist that speeds up discovery
))#shortcut list and programs not found by buildCache_grepExecutablePaths because they are just shellscripts and do not contain /nsm/server/announce.
self.userWhitelist=()#added dynamically by api.systemProgramsSetWhitelist add to morePrograms. highest priority
self.userBlacklist=()#added dynamically by api.systemProgramsSetBlacklist as blacklist. highest priority
self.programs=[]#main data structure of this file. list of dicts. guaranteed keys: agordejoExec, name, agordejoFullPath. And probably others, like description and version.
self.nsmExecutables=set()#set of executables for fast membership, if a GUI wants to know if they are available. Needs to be build "manually" with self.programs. no auto-property for a list. at least we don't want to do the work.
executableSystemPaths=set([pathlib.Path(p).resolve()forpinos.environ["PATH"].split(os.pathsep)])#resolve filters out symlinks, like ArchLinux's /sbin and /bin. set() makes it unique
logger.error(f"Desktop file {f} has problems: {e}")
continue
"""
agorExec=desktopEntry.get("X-NSM-Exec")
ifnotagorExec:
n=pathlib.Path(desktopEntry.getExec()).name
agorExec=n.split("")[0].strip()# this will fail with special filenames, such as spaces in filenames. But it is already the fallback for programs not adhering to the nsm specs. not our problem anymore.
logger.warning(f"Couldn't find actual path for {agorExec} eventhough we searched with the name from it's desktop file. If this program is not installed at all this is a false-negative error. Don't worry.")
continue
ifnotself._isexe(absExecPath):
logger.error(f"{absExecPath} was derived from .desktop file and exist, but it not executable!")
continue
data={
"agordejoName":desktopEntry.getName(),
"agordejoExec":agorExec,#to prevent 'carla-rack %u'. This is what nsm will call.