Domanda

I have created a PackageMaker (OSX) Installer that successfully installs two items, a main file, and a folder of files (with root), within '/Applications/[specific Application folder]/' path. Now I want to make sure the installer doesn't install the folder if it already exists (but I do want to overwrite the main file). Pretty basic, I'm sure ... but how is this best done?

È stato utile?

Soluzione

Standard procedure: You will have to create two component packages- one for the main file and the other for the folder of files. Now in your Distribution script, you can disable the installation of second package based on the existence of the folder on the system.

Workaround: Use your preinstall script to rename the existing folder on the system, let the new folder get installed, and then from the postinstall script, delete the newly installed folder and rename the older package back to the original name.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top