Building a Signed Mac Application


In this page I will be showing you how to build a signed mac application for Scilab.

Pre-requisites


  1. Compiled Scilab files.
  2. A Developer ID issued by Apple

Major Changes at a glance

  1. All the compiled code is moved to Resources folder.(the script manages the work of moving files to correct places you don't need to worry.)
  2. A new Info.plist file which is created according to the version number, I created a new Info.plist because the one available as a thirdparty was not in accordance with Apple Guidelines.
    It can be found here: https://github.com/dvkcool/scilabAppCreator/blob/master/etc/Info.plist
  3. Removal of checkmacosx.applescript, this file was an outdated apple script which creates error while codesigning. I did incorporate the applescript part in the scilab starter script using osascript - a modernly to use AppleScript features through shell script.:
    Old method:

    New method:

    The complete new starter script can be found here: https://github.com/dvkcool/scilabAppCreator/blob/master/etc/bin/scilab

Procedure

  1. Download my project from github using following command.
    git clone https://github.com/dvkcool/scilabAppCreator.git
  2. Paste the scilab compiled files in the src folder of my project.
  3. Run the main shell script, using sudo sh createApp.sh
  4. Answer the questions like build version and signing key.
Congratulations you have your DMG created in outputs folder of the project.
You don't need to worry about anythig including the folder structure, the script takes care of everything and creates a nice Ready to Distribute dmg.

Video demo of the process

Here is a video which shows exactly how to do these steps.


Important points to be Noted

  1. Be sure to backup your Developer ID certificate(because once it gets lost, it gets really troublesome to get a new one)
  2. Keep in mind to export your private keys (related to the certificate too).
Here, a video of how to properly export and import your certificates.


A compiled dmg for Scilab 6.0 can be found here: https://drive.google.com/open?id=1Gl4dRngHxGvSTOHOg_U8GX4yJlSu4LZU

In case of any queries/doubts feel free to drop me a mail at divyanshukumarg@gmail.com

Hoping for Best.
Happily Coding
Divyanshu Kumar