• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: [Q] PackageMaker 3.0.2 and intall requirement
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Q] PackageMaker 3.0.2 and intall requirement


  • Subject: Re: [Q] PackageMaker 3.0.2 and intall requirement
  • From: email@hidden
  • Date: Mon, 2 Mar 2009 16:06:45 -0800


On Mar 2, 2009, at 3:37 PM, JongAm Park wrote:

It looks normal.

It is not.

As far as I can tell, it should be:

function pm_testcontrollerchoice_selected() {
result = true;
result = result && (choices. testToolchoice.selected == true);
return result;
}


Since you're the second person who ends up with this _choiceProperty abomination, I would strongly suggest filing a bug report on Apple Bug Reporter. This looks like a show-stopper in PackageMaker 3.

You could of course optimized the code like this:

function pm_testcontrollerchoice_selected()
{
	return choices. testToolchoice.selected;
}

You would need to fix the pm_testcontrollerchoice_enabled function too.


The some part of the distribution.dist is :

<?xml version="1.0" encoding="utf-8"?>
<installer-script minSpecVersion="1.000000" authoringTool="com.apple.PackageMaker" authoringToolVersion="3.0.3" authoringToolBuild="174">
<title>test</title>
<options customize="allow" allow-external-scripts="no" rootVolumeOnly="false"/>
<script>
function pm_testcontrollerchoice_selected() {
result = true;
result = result &amp;&amp; (choices.testTool_choice.testTool_choiceProperty == true);
return result;
}



function pm_testcontrollerchoice_enabled() {
result = true;
result = result &amp;&amp; (choices.testTool_choice.testTool_choiceProperty == true);
return result;
}</script>
<choices-outline>
<line choice="testToolchoice"/>
<line choice="testcontrollerchoice"/>
</choices-outline>
<choice id="testToolchoice" title="testTool">
<pkg-ref id="com.myCompany.test.testTool.pkg"/>
</choice>
<choice id="testcontrollerchoice" title="testController" selected="pm_testcontrollerchoice_selected()" enabled="pm_testcontrollerchoice_enabled()">
<pkg-ref id="com.myCompany.test.testcontroller.pkg"/>
</choice>
<pkg-ref id="com.myCompany.test.testTool.pkg" installKBytes="248" version="1" auth="Root">file:./Contents/ Packages/testTool.pkg</pkg-ref>
<pkg-ref id="com.myCompany.test.testTool.pkg">
<relocate search-id="pkmktoken20">
<bundle id="com.myCompany.testTool"/>
</relocate>
</pkg-ref>
<pkg-ref id="com.myCompany.test.testcontroller.pkg" installKBytes="60" version="1" auth="Root">file:./Contents/Packages/ testcontroller.pkg</pkg-ref>
<locator>
<search id="pkmktoken20-1" type="component">
<bundle CFBundleIdentifier="com.myCompany.testTool" path="/Applications/testTool.app"/>
</search>
<search id="pkmktoken20-0" type="script" script="pkmktoken20_combined()">
<script>
function pkmktoken20_combined() {
function pkmk_add_results_to_array(results, array) {
for(i = 0; i &lt; results.length; i++)
array.push(results[i]);
}
var result = new Array();
var search;
search = my.search.results['pkmktoken20-1'];
if(search) pkmk_add_results_to_array(search, result);
return result;
}
</script>
</search>
<search type="script" id="pkmktoken20" script="pkmktoken20_final()">
<script>
function pkmktoken20_final() {
var combined = my.search.results['pkmktoken20-0'];
return combined;
}
</script>
</search>
</locator>
</installer-script>


Thank you.

email@hidden wrote:

On Mar 2, 2009, at 9:23 AM, JongAm Park wrote:

Hello.

I would like to make a component B is to be installed when a component A is selected to be installed.
Users can toggle whether to install the component A or not. So, whether to install the component B or not is determined.


I set the component B's requirement like this.

if : Choices
choice : componentAchoice
property : selected
is : == true

On Failure
Selected : No, Start Selected: Unchanged
Enabled : Unchanged. Start Enabled: Unchanged
Hidden : Unchanged, Start Hidden : Unchanged


The choice ID of the component A is componentAchoice.

To me, the setting above looks right, but it doesn't work. Is there something wrong?

What does the generated Javascript code look like in the distribution script? (You can use the FlatPackage editor or inspect the package with Pacifist depending on the OS version you target).






_______________________________________________ Do not post admin requests to the list. They will be ignored. Installer-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >[Q] PackageMaker 3.0.2 and intall requirement (From: JongAm Park <email@hidden>)
 >Re: [Q] PackageMaker 3.0.2 and intall requirement (From: email@hidden)
 >Re: [Q] PackageMaker 3.0.2 and intall requirement (From: JongAm Park <email@hidden>)

  • Prev by Date: Re: [Q] PackageMaker 3.0.2 and intall requirement
  • Next by Date: Re: Problem with PackageBuilder: MyApp.app is missing in after installation
  • Previous by thread: Re: [Q] PackageMaker 3.0.2 and intall requirement
  • Next by thread: Problem with PackageBuilder: MyApp.app is missing in after installation
  • Index(es):
    • Date
    • Thread