0
我以前收到此錯誤與一個嵌入式的JRE我codesigned(沙盒)應用程序後導致崩潰進口dylib的文件(以下this tutorial):包裝應用
Library not loaded: /usr/X11/lib/libfreetype.6.dylib
Referenced from: /Game.app/Contents/PlugIns/jdk1.7.0.jdk/Contents/Home/jre/lib/libfontmanager.dylib
我做了什麼來解決,這是導入這些dylibs到同一目錄libfontmanager:
libfreetype.6.dylib
libpng16.16.dylib
libbz2.1.0.dylib
libSystem.B.dylib
libz.1.dylib
然後libfontmanager/libfreetype.6.dylib
運行這些命令210我再協同設計每一個dylib /罐+應用
codesign -v --deep --verbose=4 -f -s "3rd Party Mac Developer Application: Company" --verbose --entitlements Game.entitlements Game.app
find Game.app/Contents/ -type f \(-name "*.jar" -or -name "*.dylib" \) -exec codesign --verbose=4 --deep -f -s "3rd Party Mac Developer Application: Company" --entitlements Game.entitlements {} \;
該應用程序甚至被codesigned後完美運行!
唯一的問題是,包裝和安裝
productbuild --component Game.app /Applications -s "3rd Party Mac Developer Installer: Company" Game.pkg
sudo installer -store -pkg Game.pkg -target/
後的應用程序,讓我這個錯誤,在打開它
lsd[346]: LaunchServices: Could not store lsd-identifiers file at /private/var/db/lsd/com.apple.lsdschemes.plist
kernel[0]: CODE SIGNING: cs_invalid_page(0x118113000): p=658[JavaAppLauncher] final status 0x3000200, denying page sending SIGKILL
kernel[0]: CODE SIGNING: process 658[JavaAppLauncher]: rejecting invalid page at address 0x118113000 from offset 0x15000 in file "/Applications/Game.app/Contents/PlugIns/jdk1.7.0.jdk/Contents/Home/jre/lib/libz.1.dylib" (cs_mtime:1476852998.0 == mtime:1476852998.0) (signed:1 validated:1 tainted:1 wpmapped:0 slid:0)
com.apple.xpc.launchd[1]: (com.company.gameOSX.80672[658]) Binary is improperly signed.
是什麼造成的?
編輯:我發現了一些可能回答我的問題。我在提取的應用程序上運行這些命令,它工作得很好。
sudo codesign -f -s - "/Applications/Game.app/Contents/PlugIns/jdk1.7.0.jdk/Contents/Home/jre/lib/libbz2.1.0.dylib"
sudo codesign -f -s - "/Applications/Game.app/Contents/PlugIns/jdk1.7.0.jdk/Contents/Home/jre/lib/libSystem.B.dylib"
sudo codesign -f -s - "/Applications/Game.app/Contents/PlugIns/jdk1.7.0.jdk/Contents/Home/jre/lib/libz.1.dylib"
是什麼造成這些dylibs不被codesigned包裝後正常,如何解決這一問題?