且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

更新到OSX 10.9.5后如何更改对Java应用程序进行签名的方式

更新时间:2023-09-20 13:15:16

问题是从19.9.5版本开始,codesign不允许您对包含符号链接的文件夹进行签名,我认为以前它忽略了该问题.

The problem is that from 19.9.5 onwards codesign doesn't let you sign folders containing symbolic links, I think previously it ignored the problem.

在我的特殊情况下,我制作了libjli.dylib的副本,并用该副本替换了symblic链接.这项工作奏效了,由于进行了更改,我没有遇到任何问题.

In my particular case I made a copy of the libjli.dylib and replaced the symblic link with this copy. This worked and Ive not encountered any problems due to making this change.

rm /Applications/MyApp.app/Contents/PlugIns/jdk1.8.0_25.jdk/Contents/MacOS/libjli.dylib
cp /Applications/MyApp.app/Contents/PlugIns/jdk1.8.0_25.jdk/Contents/Home/jre/lib/jli/libjli.dylib /Applications/SongKong.app/Contents/PlugIns/jdk1.8.0_25.jdk/Contents/MacOS
export CODESIGN_ALLOCATE="/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/codesign_allocate"

/usr/bin/codesign --sign "Developer ID Application: My Name" --force --deep --verbose /Applications/MyApp.app
/usr/bin/codesign --verify --deep  --verbose /Applications/MyApp.app