Search code examples
xcodemacosbashinstallationcd

Mac Os X Installer that copies contents from cd


I have to make an mac os x app that has some awful specifications. I managed to make the app but now I am stuck at the installer phase. I have to copy the app to the application folder (easy) from a cd (not dvd but a 700 mb cd keep that in mind) and 300 to 500 mb zip file, containing webpages and resources, in the app folder (AppName.app) and unarchive it there in a www folder.

I tried doing this with a package installer and a shell script unfortunately the script runs in a sandbox and I can't access the content form the cd.

I can't put the zip files in the install package because there is a windows and a linux installer that uses them too. So it's a shared resource.

I've tried different approaches to resolve this issue, none seemed to work.The only solution that is in my head right now is to make another app in objective c (that will run from the cd) witch will copy the real app and the zip file to the applications folder.

I must have an friendly executable installer for the app and that is my only desperate choice at the moment. Is there any other way to do this?


Solution

  • So I found the soulution: Aparently the postscript is called with 4 params:

    $1, $2, $3 and $4 $1 is the place your package installer (usulay its in the .mpkg executable folder you have to go down a few dirs in the herarchy) $2 is the sanbox place of your installer $3 is the aplication destinations or root (here I got both situations :-?? so I checked them up) $4 is the root

    so the path was something like this: $1/../../../file.zip unzip to /Aplications/AppName.app/www/