FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveMac / FivePhone (iPhone, iPad) Making a installer package for distribution
Posts: 166
Joined: Wed Nov 25, 2015 07:13 PM
Making a installer package for distribution
Posted: Tue Jun 27, 2017 09:09 PM
I want to share my experience with making a installer package for an app, made with FiveMac. There are a few steps you need to take if you want to distribute your app to other users. I use this constants

    the app is put/installed in the program folder
    the databases is put in the $USER folder
    the package is made using Packages: http://s.sudre.free.fr/Software/documentation/Packages/en/My_First_Distribution.html
    the app can be downloaded from a website[/list:u]

    An app is actually a folder with other folders in it. If you rightclick on the app you can choose 'show Package Content'. There are the next folders in the app:
      Contents
        folder: MacOs (the actual app)
        folder: Resources (here you can put all files you need with your app)
        File: info.plist[/list:u][/list:u]

        You need to follow these steps
          make a copy.ch file where you can make your databases folders in the $USER folder and move the databases from Users/shared to $USER/DatabaseFolder (see example below)
          put this file in your app in the folder 'Resources'
          In your app check if your folder $USER/DatabaseFolder exists
          If the folder is not there call the copy.ch in your code with TaskExec( "/bin/sh", ResPath()+"/copy.sh", )[/list:u]

          Code (fw): Select all Collapse
          mkdir /Users/$USER/plantenkennis
          mkdir /Users/$USER/plantenkennis/databases
          # now move the files from  users/shared/Plantenkennis to /users/$user/Plantenkennis
          
          mv /Users/shared/plantenkennis/databases/*.dbf /Users/$USER/plantenkennis/databases
          mv /Users/shared/plantenkennis/databases/*.dbt /Users/$USER/plantenkennis/databases

          With Packages you can't put your databases in the $USER folder, only in the Users/shared folder. That is why you have to copy them the first time your user starts the app.

          To distribute your app via the web, you need te sign your package with a certificate. You can get a certificate from Apple if you have a developer account. There are different certificates and you need a Mac Production Developer certificate.

          Once you have this certificate you can sign your package withe the next command:
          productsign --sign 'Your certificate' YourPackage.pkg YourPackageSigned.pkg


          Hope these steps are useful for others, if you have any questions, please ask
Kind regards,



René Koot
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Making a installer package for distribution
Posted: Wed Jun 28, 2017 02:13 PM

René,

many thanks for sharing this info with all of us :-)

regards, saludos

Antonio Linares
www.fivetechsoft.com

Continue the discussion