[Clam-devel] Please test macosx dmg (only intel)
Volker Schumacher
volker at photone.de
Mon Jan 22 14:16:44 PST 2007
Sorry guys I'm stupid.
Just after I wrote my last email I realized that you put the script
into your email which does everything I did manually,
so please ignore my previous message. I will try with that script.
Best Wishes!
Volker
On Jan 22, 2007, at 9:00 PM, Pau Arumi wrote:
> At last a productive development day!
> http://clam.iua.upf.edu/download/mac/cvssnapshots/
> CLAM_Annotator-0.3.6-CVS-20070122.dmg
>
> Please, test and report results. It should work without any
> additional library. Only intel arch.
> Annotator should run but not work correctly since it lacks
> extractors and example data
>
> David and me have been working on a script (attached) that copies
> external libraries into the bundle and fixes all links outside the
> bundle.
> Specifically, it uses otool to retrieve all dependent dynamic
> libraries and install_name_tool to fix ids and links.
> The script gets recursively all libraries that depend on a given
> binary.
>
>
> Pau & David
>
> --
> This message has been scanned for viruses and
> dangerous content by MailScanner, and is
> believed to be clean.
>
> #! /opt/local/bin/python
>
> import os
>
> def run(command) :
> print "\033[32m:: ", command, "\033[0m"
> return os.system(command)
> for line in os.popen(command) :
> print line,
> sys.stdout.flush()
> def norun(command) :
> print "\033[31mXX ", command, "\033[0m"
> def phase(desc) :
> print "\033[33m== ", desc, "\033[0m"
>
>
> def libDependencies(binary, visited) :
> libs = []
> print "examining", binary
> for line in os.popen("otool -L "+binary).readlines()[1:] :
> entry = line.split()[0]
> if entry in visited :
> continue
> if entry.startswith("/System/") : continue
> if entry.startswith("/usr/lib/") : continue
> visited.append(entry)
> visited = libDependencies( entry, visited )
> return visited
>
> libsPath = libDependencies("Annotator", [] )
> print libsPath
>
>
> libs = [ (os.path.basename(path), path) for path in libsPath ]
>
> run("mkdir -p Annotator.app/Contents/Frameworks/")
>
> vars = {}
> for lib, path in libs :
> vars['toChange']=lib
> vars['path']=path
> run("cp %(path)s Annotator.app/Contents/Frameworks/%(toChange)s" %
> vars )
> run("install_name_tool -id @executable_path/../Frameworks/%
> (toChange)s Annotator.app/Contents/Frameworks/%(toChange)s" % vars)
>
> for lib, path in libs :
> vars['toChange']=lib
> vars['path']=path
> run("install_name_tool -change %(path)s @executable_path/../
> Frameworks/%(toChange)s Annotator.app/Contents/MacOS/Annotator" %
> vars )
> for changedLib, changedPath in libs :
> vars['changed']=changedLib
> vars['changedPath']=changedPath
> run("install_name_tool -change %(changedPath)s
> @executable_path/../Frameworks/%(changed)s Annotator.app/Contents/
> Frameworks/%(toChange)s" % vars )
>
> _______________________________________________
> Clam-devel mailing list
> Clam-devel at llistes.projectes.lafarga.org
> https://llistes.projectes.lafarga.org/cgi-bin/mailman/listinfo/clam-
> devel
More information about the clam-devel
mailing list