"""Find all binaries. Use all available resources: xdg desktop files, binary string seach in
@ -52,6 +53,9 @@ class SupportedProgramsDatabase(object):
"""
def__init__(self):
#self.grepexcluded = (pathlib.Path(PATHS["share"], "grepexcluded.txt")) #from a system without audio software installed: find /usr/bin -printf "%f\n" | sort > grepexcluded.txt
#assert self.grepexcluded.exists()
self.blacklist=("nsmd","non-daw","carla")#only programs that have to do with audio and music. There is another general blacklist that speeds up discovery
self.morePrograms=("thisdoesnotexisttest","carla-rack","carla-patchbay","carla-jack-multi","ardour5","ardour6","nsm-data","nsm-jack")#only programs not found by buildCache_grepExecutablePaths because they are just shellscripts and do not contain /nsm/server/announce.
self.userWhitelist=()#added dynamically to morePrograms
@ -67,7 +71,7 @@ class SupportedProgramsDatabase(object):
self.unfilteredExecutables=None#in build()
#self.build() #fills self.programs and
defbuildCache_grepExecutablePaths(self):
defbuildCache_grepExecutablePaths(self):#TODO: this is a time consuming process. But is has a chance of finding programs that would have been missed otherwise.
completedProcess=subprocess.run(command,stdout=subprocess.PIPE,stderr=subprocess.PIPE,universal_newlines=True,shell=True)#universal_newlines is an alias for text, which was deprecated in 3.7 because text is more understandable. capture_output replaces the two PIPEs in 3.7
forfullPathincompletedProcess.stdout.split():
@ -94,7 +100,7 @@ class SupportedProgramsDatabase(object):