1
我創建了一個JavaFx應用程序,並創建了多平臺本機軟件包。實際上,我成功創建了Windows和Mac OsX捆綁包。 現在我想簽署我的捆綁包以避免在安裝過程中出現惱人的警報。我購買了Comodo證書,在Windows中,我能夠正確簽署我的exe文件。使用COMODO證書籤名的JavaFx dmg軟件包
在Mac上,我遇到了問題。我按照這個教程https://docs.oracle.com/javafx/2/deployment/self-contained-packaging.htm#BCGDBIBB,我在我的鑰匙串中導入了Comodo證書。
我創建了一個圖像後腳本:
echo "Signing application bundle"
#Move to the folder containing application bundle
cd ../images/dmg.image
#do sign
codesign -s "CN_OF_COMODO_CERTIFICATE" *.app
echo "Done with signing"
但在編譯過程中我有這些消息:
do-deploy:
[copy] Copying 47 files to /Users/Utente/Documents/workspaceServer
/app/javafx/target/dist/libs
Using base JDK at: /Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk
Using base JDK at: /Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk
Using custom package resource [Bundle config file] (loaded from package/macosx/Info.plist)
Using custom package resource [icon] (loaded from package/macosx/appDesk.icns)
Creating app bundle: /Users/Utente/Documents/workspaceServer/app/javafx/target/deploy/bundles/appDesk.app
Did not find a key matching 'Developer ID Application: '
Config files are saved to /var/folders/q6/vmt_h0tx3rgdbt_4h2_2f3780000gn/T/fxbundler309272187389884092/macosx. Use them to customize package.
Building DMG package for appDesk
Using custom package resource [Bundle config file] (loaded from package/macosx/Info.plist)
Using custom package resource [icon] (loaded from package/macosx/appDesk.icns)
Did not find a key matching 'Developer ID Application: '
Config files are saved to /var/folders/q6/vmt_h0tx3rgdbt_4h2_2f3780000gn/T/fxbundler8772000028741891358/macosx. Use them to customize package.
Using default package resource [dmg background] (add package/macosx/appDesk-background.png to the class path to customize)
Using default package resource [volume icon] (add package/macosx/appDesk-volume.icns to the class path to customize)
Using custom package resource [script to run after application image is populated] (loaded from package/macosx/appDesk-post-image.sh)
Using default package resource [License setup] (add package/macosx/appDesk-license.plist to the class path to customize)
Using default package resource [DMG setup script] (add package/macosx/appDesk-dmg-setup.scpt to the class path to customize)
Running shell script on application image [/var/folders/q6/vmt_h0tx3rgdbt_4h2_2f3780000gn/T/fxbundler8772000028741891358/macosx/appDesk-post-image.sh]
Signing application bundle
*.app
: No such file or directory
Done with signing
hdiutil: unflatten: unflattening "appDesk-3.0.3.dmg"...
copying resource 'STR#' (5000)...
copying resource 'STR#' (5001)...
copying resource 'STR#' (5002)...
copying resource 'STR#' (5003)...
copying resource 'STR#' (5004)...
copying resource 'STR#' (5005)...
copying resource 'STR#' (5006)...
copying resource 'STR#' (5007)...
copying resource 'STR#' (5008)...
copying resource 'STR#' (5009)...
copying resource 'STR#' (5010)...
copying resource 'STR#' (5011)...
copying resource 'STR#' (5012)...
copying resource 'STR#' (5013)...
copying resource 'STR#' (5014)...
copying resource 'STR#' (5015)...
copying resource 'STR#' (5016)...
copying resource 'plst' (0)...
copying resource 'TEXT' (5000)...
copying resource 'LPic' (5000)...
copying resource 'styl' (5000)...
copying resource 'TMPL' (128)...
hdiutil: flatten: flattening "appDesk-3.0.3.dmg"...
Result DMG installer for appDesk: /Users/Utente/Documents/workspaceServer/app/javafx/target/deploy/bundles/appDesk-3.0.3.dmg
Config files are saved to /var/folders/q6/vmt_h0tx3rgdbt_4h2_2f3780000gn/T/fxbundler8772000028741891358/macosx. Use them to customize package.
Building PKG package for appDesk
Using custom package resource [Bundle config file] (loaded from package/macosx/Info.plist)
Using custom package resource [icon] (loaded from package/macosx/appDesk.icns)
Did not find a key matching 'Developer ID Application: '
Config files are saved to /var/folders/q6/vmt_h0tx3rgdbt_4h2_2f3780000gn/T/fxbundler8003647333686847937/macosx. Use them to customize package.
Using default package resource [pkg background image] (add package/macosx/appDesk-background.png to the class path to customize)
Using custom package resource [script to run after application image is populated] (loaded from package/macosx/appDesk-post-image.sh)
Running shell script on application image [/var/folders/q6/vmt_h0tx3rgdbt_4h2_2f3780000gn/T/fxbundler8003647333686847937/macosx/appDesk-post-image.sh]
Signing application bundle
{}
*.app
: No such file or directory
Done with signing
pkgbuild: Adding component at /var/folders/q6/vmt_h0tx3rgdbt_4h2_2f3780000gn/T/fxbundler8003647333686847937/images/image-5462634906848679457/appDesk.app
pkgbuild: Wrote package to /var/folders/q6/vmt_h0tx3rgdbt_4h2_2f3780000gn/T/fxbundler8003647333686847937/packages/appDesk-app.pkg
Did not find a key matching 'Developer ID Installer: '
productbuild: Wrote product to /Users/Utente/Documents/workspaceServer/app/javafx/target/deploy/bundles/appDesk-3.0.3.pkg
Config files are saved to /var/folders/q6/vmt_h0tx3rgdbt_4h2_2f3780000gn/T/fxbundler8003647333686847937/macosx. Use them to customize package.
Did not find a key matching '3rd Party Mac Developer Application: '
Bundler Mac App Store Ready Bundler skipped because of a configuration problem: No Mac App Store App Signing Key
Advice to fix: Install your app signing keys into your Mac Keychain using XCode.
BUILD SUCCESSFUL
Total time: 3 minutes 59 seconds
不知道如何解決這個問題,並自動生成期間簽署傷害?
===== EDITED ========= 這是因爲需要我的Info.plist文件:
<?xml version="1.0" ?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>LSMinimumSystemVersion</key>
<string>10.7.4</string>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleAllowMixedLocalizations</key>
<true/>
<key>CFBundleExecutable</key>
<string>appDesk</string>
<key>CFBundleIconFile</key>
<string>appDesk.icns</string>
<key>CFBundleIdentifier</key>
<string>fxApplication</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>appDesk</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>3.0.4</string>
<key>CFBundleSignature</key>
<string>????</string>
<!-- See http://developer.apple.com/library/mac/#releasenotes/General/SubmittingToMacAppStore/_index.html
for list of AppStore categories -->
<key>LSApplicationCategoryType</key>
<string>Unknown</string>
<key>CFBundleVersion</key>
<string>3.0.4</string>
<key>NSHumanReadableCopyright</key>
<string>Copyright</string>
<key>NSHighResolutionCapable</key>
<string>true</string>
</dict>
</plist>
感謝
你引用的教程是JavaFX 2.x.你有沒有按照這個[指南](https://developer.apple.com/library/mac/documentation/Security/Conceptual/CodeSigningGuide/Introduction/Introduction.html#//apple_ref/doc/uid/TP40005929-CH1-SW1)獲得Apple開發人員證書(與您的Comodo證書不一樣)? – NwDev
我想使用Comodo證書,因爲如果可能的話我不想支付2個不同的證書。 – drenda
是的,可以使用您購買的證書。但「開發者ID應用程序:」不是您的有效證書,您必須將其命名爲您的comodo中的證書路徑被調用。 – NwDev