<?xml version="1.0" encoding="utf-8"?>
<installer-script minSpecVersion="1.000000" authoringTool="com.apple.PackageMaker" authoringToolVersion="3.0.6" authoringToolBuild="201">
    <title>DVDFab_retail_addon</title>
    <options customize="never" allow-external-scripts="no"/>
    <domains enable_localSystem="true"/>
    <installation-check script="pm_install_check();"/>
    <script>function my_check(){
	var res = false;
	try{
		b_Copy_jp = system.files.fileExistsAtPath("/Applications/DVDFab BDDVD Copy.app");

         b_DVDCopy_jp = system.files.fileExistsAtPath("/Applications/DVDFab DVD Copy.app");

		b_CopyPremium_jp = system.files.fileExistsAtPath("/Applications/DVDFab Premium.app");

	}catch (e) {
		return false;
	}

	res = (b_Copy_jp || b_DVDCopy_jp || b_CopyPremium_jp);

	return res;	
}

function pm_install_check() {
  if(!(my_check() == true)) {
    my.result.title = 'インストールが失敗しました。';
    my.result.message = 'DVDFab DVD Copy.app、DVDFab BDDVD Copy.app 又はDVDFab  Premium.app が見つかりませんでした。まず、それをインストールしてください。セットアップが終了しています。';
    my.result.type = 'Fatal';
    return false;
  }
  return true;
}
</script>
    <choices-outline>
        <line choice="choice5"/>
    </choices-outline>
    <choice id="choice5" title="DVDFab">
        <pkg-ref id="com.dvdfab.dvdfabretailaddon.libDecryptionDisc.pkg"/>
    </choice>
    <pkg-ref id="com.dvdfab.dvdfabretailaddon.libDecryptionDisc.pkg" installKBytes="16" version="1.0" auth="Root">#libdecryptiondisc.pkg</pkg-ref>
</installer-script>