• 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
how to make patch package
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

how to make patch package


  • Subject: how to make patch package
  • From: 李剑 <email@hidden>
  • Date: Thu, 18 Jun 2009 15:40:44 +0800
  • Importance: Normal

Hi,Greg
Thanks your answer!
according you said,i tried below:
1. not check "relocation" option
2. two packages with different name and packageid
but patch package is also an install process!
 
maybe i need make preflight & preupgrade script? but i don't know how to write script!
does anyone had experience of make patch package?
 
 
 
 
____________________________________________________________________________________________________________
 
I keep ccing my replies to install-dev so the community can participate...

Now that you have a specific scenario, perhaps others can chime in, but I'm guessing you're getting bitten by the "relocation" bug that has been discussed on the installer-dev list many, many times.  This bug causes Installer to find your app in places on your hard disk other than the default /Applications path, and install there instead.  I'm guessing it updated your staged or development version of your app.

There are workarounds to shut off this behavior. Search the list archives.

You say "i think the updata package is an install process,not updata process!"
And you are absolutely correct.  It is an install process. There is no separate update logic.

You do get update behavior if:

Original package and new package have the same name and packageid.
New package contains ALL of the files needed to install the software on a machine that has never had the old version installed.

Otherwise, you'll see Installer _REMOVE_ files that exist in the older version of your package, but don't exist in the newer version of the package. This is important behavior to understand.

Therefore a "patch" package must have a different name and packageid, and must check for the existence of the older package before proceeding.  But it just installs stuff.

If you have follow-up questions, please post them to the list - not just to me.  I don't have all the knowledge!

-Greg

On Jun 17, 2009, at 12:01 AM, 李剑 wrote:

Hi,Greg
as your suggestion i try to made an install package and updata package,the info below:
 
package maker version:3.03
Mininum target : Mac OS X v10.3 panther
 
install package
ID:com.test.pkg
version:1.0.0
install path:/Applications
contents:test.app
test.app/content/resource/1.xml
test.app/content/resource/version.xml
 
when install finished,i can find files "/Application/test.app" and  "/library/receipts/test.pkg"
   
updata package,for this package i just want to modify test.app/content/resource/version.xml
ID:com.test_updata.pkg
version:1.0.1
install path:/Applications
contents:test.app   
test.app/content/resource/1.xml  (not checked,because i want to keep origin file)
test.app/content/resource/version.xml 
 
when install finished,i can find files "/library/receipts/test_updata.pkg"
but miss file "/Application/test.app/contents/resource/1.xml"
 
the result is not i want, i think the updata package is an install process,not updata process!
could you make very simple samples include install and updata for me if you feel free!
 
Thank you very much!
 
 
 
 

 

From: email@hidden
CC: email@hidden
To: email@hidden
Subject: Re: how to make patch package?
Date: Tue, 16 Jun 2009 21:42:13 -0700

Again, look at Apple and third-party examples.
You'd just make a com.test_1.0.1_update.pkg with your updated files.

-Greg

On Jun 16, 2009, at 9:02 PM, 李剑 wrote:

Hi,Greg

Thanks for you answer very much!
i am a new mac developer,can you tell how to make preflight scripts?
if my origin install package ID is com.test.pkg,and versiong is 1.0.0,how can i make patch package?
 
 
 
 
 
> Hi,Greg
>
> Thanks for you answer!
>
> you said should give Patch package a different name and package ID  
> than the original package.but how does system know this package is  
> patch and which software will be updated?
The _system_ doesn't know anything.  You must put logic into the .dist  
file or the preflight scripts to ensure the older package is installed & nbsp;
before you continue with installation.
> must somewhere is connected to original package?
Not formally.
> Can you give me some detail description?
Look at other applications for examples.
An example:
You can buy iWork '09 from Apple.  It comes on a DVD.  When you  
install it, it leaves a receipt:
/Library/Receipts/iWork09.pkg.  It has a package id of  
'com.apple.pkg.iWork09'.
Apple has released two updates so far.  When they are installed, they  
leave two more receipts:
/LIbrary/Receipts/iwork_09_update_1.pkg  -- this has package id  
'com.apple.pkg.iwork_09_update_1'
/Library/Receipts/iWork09_Update2.pkg -- this has package id  
' com.apple.pkg.iWork09_Update2'
In /LIbrary/Receipts/iwork_09_update_1.pkg/Contents/Resources/ 
iwork_09_update_1.dist is logic to see if the correct versions of  
Keynote, Numbers, and Pages are installed.  If they are not,  
installation will not proceed.
 

From: email@hidden
CC: email@hidden
To: email@hidden
Subject: Re: how to make patch package?
Date: Tue, 16 Jun 2009 09:26:20 -0700


On Jun 15, 2009, at 9:54 PM, 李剑 wrote:

Hi,Greg
 
Thanks for you answer!
 
you said should give Patch package a different name and package ID than the original package.but how does system know this package is patch and which software will be updated?

The _system_ doesn't know anything.  You must put logic into the .dist file or the preflight scripts to ensure the older package is installed before you continue with installation.

must somewhere is connected to original package?

Not formally.

Can you give me some detail description?

Look at other applications for examples.
An example:

You can buy iWork '09 from Apple.  It comes on a DVD.  When you install it, it leaves a receipt:
/Library/Receipts/iWork09.pkg.  It has a package id of 'com.apple.pkg.iWork09'.

Apple has released two updates so far.  When they are installed, they leave two more receipts:

/LIbrary/Receipts/iwork_09_update_1.pkg  -- this has package id 'com.apple.pkg.iwork_09_update_1'
/Library/Receipts/iWork09_Update2.pkg -- this has package id 'com.apple.pkg.iWork09_Update2'

In /LIbrary/Receipts/iwork_09_update_1.pkg/Contents/Resources/iwork_09_update_1.dist is logic to see if the correct versions of Keynote, Numbers, and Pages are installed.  If they are not, installation will not proceed.

 
Thank you very much!
Jason
 

From: email@hidden
To: email@hidden
Subject: Re: how to make patch package?
Date: Mon, 15 Jun 2009 10:35:39 -0700

There's nothing special about a "patch" package.  Package up the files that are changed or added. Give the Patch package a different name and package ID than the original package. Make sure there's some pre-install logic to verify that the software you are patching is installed.  That's it, unless some files also need to be removed, in which case you'll need a postinstall script to handle this for you.

In most cases, it's easier to just do a package that would install the entire new updated software from scratch and let the Installer take care of things, but vendors who ship commercial software and then ship free "updaters" have to do more work, since it wouldn't do to have the updater install a fully-functional version of the software...

-Greg

On Jun 14, 2009, at 9:57 PM, 李剑 wrote:

Dear all,
does anyone knows how to make a patch package with package maker?


更多热辣资讯尽在新版MSN首页! 立刻访问!
 _______________________________________________
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

  • Prev by Date: Re: how to make patch package?
  • Next by Date: changing destination path
  • Previous by thread: packagermaker --root and the other options
  • Next by thread: changing destination path
  • Index(es):
    • Date
    • Thread