2013-05-15 115 views
0

我在使用productbuild命令打包應用程序來創建一個包含許可證文件的pkg文件。下面是我如何做它:productbuild --distribution:package xxx.pkg could not be loaded

# Creates the first package 
productbuild --sign "3rd Party Mac Developer Installer: Tamaggo" --component tamaggo\ ibi.app /Applications/ tamaggoibi.pkg 

# Creates a package that will hold the first one using a distribution file 
productbuild --distribution tamaggo\ ibi.app/Contents/distribution.xml --package-path . --sign "3rd Party Mac Developer Installer: Tamaggo" bassel.pkg 

我總是得到以下警告:

productbuild:警告:包./tamaggoibi.pkg無法加載

如果我雙擊第一個創建的包,安裝成功完成。如果我雙擊另一個,什麼都不會發生。

我只是無法弄清楚第一個軟件包有什麼問題,導致它無法加載。

這裏的distribution.xml文件:

<?xml version="1.0" encoding="UTF-8"?> 
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN""http://www.apple.com/DTDs/PropertyList-1.0.dtd"> 
<installer-gui-script minSpecVersion="1"> 
<title>tamaggo ibi</title> 
<license file="license.html" /> 
<background file="ApplicationBackground.gif" /> 
<options customize="never" allow-external-scripts="no"/> 
<choices-outline> 
    <line choice="choice0"/> 
</choices-outline> 

<choice id="choice0" title="Install tamaggo ibi"> 
    <pkg-ref id="tamaggoibi" /> 
</choice> 

<pkg-ref id="tamaggoibi" version="1.6">#tamaggoibi.pkg</pkg-ref> 
</installer-gui-script> 
+0

好吧,我只知道第一個版本必須使用pkgbuild命令創建......現在它正確安裝應用程序。問題是我仍然沒有看到我的許可證文件... – iDev

回答

1

使用PKGBUILD固定我原來的問題,我發現這真的很好post,幫助我將許可證添加到安裝程序。

相關問題