Re: New to PackageMaker 3.0, could use some help
Re: New to PackageMaker 3.0, could use some help
- Subject: Re: New to PackageMaker 3.0, could use some help
- From: Stéphane Sudre <email@hidden>
- Date: Wed, 27 Feb 2008 22:16:49 +0100
On Feb 27, 2008, at 7:16 PM, Robert Kukuchka wrote:
Hi Stéphane,
Thanks for the reply. I appreciate the assistance. Just a few
follow ups.
1) Ok, so I'll look more into this Installer Plugin idea. I'm not
too familiar with it. I found some sample code on ADC, but nothing
in the docs. Based on the fact that FLAT packages don't support
Installer Plugins, should I then assume this is deprecated technology?
You probably would need to contact ADC to get an answer for this
question. But the answer would probably be: "We do not discuss
technologies or products that are not available yet."
Just remember it took Apple 7 years to bring back the "Arrange By"
submenu in the Finder contextual menu, so be patient.
3) When I refer to "radial" behavior I'm referring to as follows:
If I have selection A, B, and C which are all initially selected.
I'm seeing behavior under "custom" installation where if, for
example, I deselect A then try to deselect B, A selects itself
again. Then I'll try to deselect C and B selects itself again. It's
like whack-a-mole. I don't understand why selection of one
particular component will affect any other components.
Well, it's not really surprising if you consider the distribution
script that is created by PackageMaker 3.0.1 when you define a
requirement.
function pm_choice0_selected() {
result = true;
result = result && (my.target.availableKilobytes > 1 *
1024 * 1024);
return result;
}
function pm_choice0_enabled() {
result = true;
result = result && (my.target.availableKilobytes > 1 *
1024 * 1024);
return result;
}
<choice id="choice0" title="Picture 14" selected="pm_choice0_selected
()" enabled="pm_choice0_enabled()">
This code is not optimized, buggy and embarrassing. Here's why:
- not optimized:
result = true;
result = true && something;
When you consider that PackageMaker uses multiple pointless
animations that eat millions of CPU/GPU cycles and it's not able to
check that a value is set to true, it's mind-blowing.
- buggy:
I don't think this is clearly documented somewhere (1) but you
need to add a my.choice.selected test in your code so that
Installer.app runtime remembers the state of your checkbox. Whenever
you click a checkbox, all the other checkboxes are updated (because a
checkbox state can depend on the states of other checkboxes).
AFAIK, the script might be written this way:
function pm_choice0_selected()
{
/* I'm not a Javascript expert so I just kept the result temp var) */
result = (my.target.availableKilobytes > 1 * 1024 * 1024) &&
my.choice.selected test;
return result;
}
- embarrassing:
While I was writing this, I somehow got confused. The script
states that the available size should be more than 1 GB (1,048,576 KB
unless I'm on drugs)
my.target.availableKilobytes > 1 * 1024 * 1024
But I remembered selecting the following requirement in
PackageMaker UI: if "Megabytes on Target" is ">" "1"
So I checked again and sure enough, I got the same result.
So it's yet another bug in PackageMaker 3.
For the record, PackageMaker 2.11 is a bit better with Maths (but
there's still progress to be made AFAIK): if you select "1GB
available on volume" from the Samples popup button, you end up with
this script:
my.target.availableKilobytes > 1000000
Honestly, I don't know how to give my opinion on this 3.0.1 release
of PackageMaker without being impolite.
(1) this has been explained during an old WWDC session and here in
the middle of a paragraph:
http://developer.apple.com/documentation/DeveloperTools/Conceptual/
SoftwareDistribution/Managed_Install_Definition/chapter_7_section_3.html
_______________________________________________
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