Re: package maker - fixing error in my post
Re: package maker - fixing error in my post
- Subject: Re: package maker - fixing error in my post
- From: Jim Dodd <email@hidden>
- Date: Tue, 23 Mar 2010 07:26:10 -0700 (PDT)
Title: RE: package maker
I'm sorry. I got the error return values wrong. The first error number should be 112 (decimal) which corresponds to the line starting with "16" in the strings file. The next error number would be 113 which corresponds to the line starting with "17" in the strings file and so on up to an error return value of 127 (decimal) corresponding to an error message line that starts with "31". Only use the numbers you need. Yu don't need to enter all the numbers from 16 - 13.
This is because you want to set bits number 5 and number 6 (with first bit number being 0) of the return value to indicate it's an error and you want to stop the installation. That bit-pattern corresponds to 96 (decimal). The least significant five bits (numbers 0 through 4) hold the value for the error message you want to
display to the user. Error messages 0 - 15 are reserved so your first error message must be 16 and you can use up through 31. So 96 + 16 gives a return value of 112 telling the Installer that there was an error and you want to display error message 16.
I hope this helps explain it.
Jim
From: Jim Dodd <email@hidden>
To: email@hidden
Sent: Tue, March 23, 2010 8:32:36 AM
Subject: Re: package maker
You won't have to do anything special with your InstallationScript. Just place it in the Install_resources folder where you have any other scripts (preinstall, postinstall etc.) that are included in PackageMaker. Just make sure you set its permissions to Executable. The script should return 0 if there was no error. If there is an error, return 113 (decimal) for the first type of error you want to flag. Then, make a separate InstallationCheck.strings file (in the same folder) with someting like this line:
"16" = "The sky is falling.\nBuild a roof and try installing again.";
Enter your own string in the quotes, of course. The "16" must be there (and in quotes) and corresponds to the return value of 113. Yes, this is strange but it's explained in the documentation. For your next
error, return 114 (decimal) and have a line tht begins with "17" etc. Notice I used "\n" to get a newline in the dialog (Apple Installer takes care of generating the dialog) and, if you need Unicode characters, make sure you use "\Unnnn" where the 'U' must be capitalized! The "nnnn" is the four Unicode numbers as usual. And the semi-colon at the end MUST be there.
Regards,
Jim Dodd
Onset Computer Corporation
From: spondita Madhuri Neog <email@hidden>
To: Xochitl Lunde <email@hidden>
Cc: email@hidden
Sent: Tue, March 23, 2010 2:41:30 AM
Subject: RE: package maker
Thanks for the response.
I have tried putting a requirement "Result of Script" for the distribution package but the path of the script is always taken as the absolute path i.e the path on my hard drive.This I have checked by seeing the _javascript_ code in raw editing mode.Hence package installation always fails in other MACs.
I have tried going to distribution's 'Actions' menu and use a "Get Application" and "Kill
Application",however it warns the user that all applications will be closed and the installation requires a logout.However i want it to prompt that only the running instance of my particular application should be closed.I have given the application's launch path in the "identifier" tab of "Get Application" and signal #9 in the "Kill Application"
I guess adding InstallationCheck script to the package will be useful but i dont know how to add it to the package considering the fact that the requirement "Result of Script" always takes up the absolute path.
_______________________________________________
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