5 Replies Latest reply: May 7, 2012 2:51 AM by jayfromwasilla
El Gaucho Level 1 Level 1 (0 points)

Hello,

 

I am trying to deploy a solution as an install package. Currently, there are 3 items inside the folder that needs to be installed in the /Applications folder. This in itself is easy. However, when I create upgrades to the solution, I want to carry over one file from the previous installation to the new one. Is there a way to have this upgraded version install and instead of removing all of the earlier files, can it install the new files (which are 3) and carry over 1 of the other files.

 

I hope this makes sense. Thanks for any input or sample scripts that I may be able to modify to accomplish this.


Thanks,


Stephen

  • 1. Re: Trying to create install script in PackageMaker...help for newbie
    etresoft Level 7 Level 7 (24,270 points)

    It should already do that. If the target directories already exist, it shouldn't overwrite them.

  • 2. Re: Trying to create install script in PackageMaker...help for newbie
    El Gaucho Level 1 Level 1 (0 points)

    Thanks for your time!

     

    Perhaps it would help if I explain a little further my situation and what I am trying to accomplish.

     

    I have a database runtime solution that I want to distribute. I have all of the necessary files in a single folder, let's say, named "Progam 1.2". Since whenever I upgrade this version, I need to have the old data file from the previous version on hand to import into the new file, I create a new folder called "Program 1.3" So after the installation, I would have both folders. The user then opens the new version and the program then will import the previous versions data. At that point the user may delete the previous version folder entirely.

     

    My question is how can accomplish an install so that the new version will not overwrite the previous folder "Program 1.2" when installing the upgrade to "Program 1.3" since I need the data file for updating the data. Ideally, I would love to have the new folder installed and the single data file in the previous version folder be copied to the new versions folder and be renamed to "Previous Data" so that the new version can update the data.

     

    Again, I am a complete newbie in this arena and have simply been doing DMG files where the user copies the new version to the applications folder. But if there was a way to automate this installation more, I would like to do that.

     

    Thanks again for your help!


    Stephen

  • 3. Re: Trying to create install script in PackageMaker...help for newbie
    etresoft Level 7 Level 7 (24,270 points)

    El Gaucho wrote:

     

    My question is how can accomplish an install so that the new version will not overwrite the previous folder "Program 1.2" when installing the upgrade to "Program 1.3" since I need the data file for updating the data. Ideally, I would love to have the new folder installed and the single data file in the previous version folder be copied to the new versions folder and be renamed to "Previous Data" so that the new version can update the data.

    Sounds like a good plan. All you need is a pre-flight script to copy the data and a post-flight script to re-import it.

  • 4. Re: Trying to create install script in PackageMaker...help for newbie
    El Gaucho Level 1 Level 1 (0 points)

    Any suggestions on how to get started on this? Sample scripts to modify? Again, this is all new.

     

    Thanks!

  • 5. Re: Trying to create install script in PackageMaker...help for newbie
    jayfromwasilla Level 1 Level 1 (0 points)

    One thing to think about is storing the database file in a location such as:

    ~/Library/Application Support/Your App Name

     

    Now when you upgrade from v1.2 to v1.3 you don't have to move anything because your app knows where the database file lives. You just install the new version and that's it.

     

    I do this with my apps and it works well.

     

    Jay