Creating a signed dmg for Scilab


This document will guide you to create a signed dmg/app for Scilab.

Prerequisites

  1. Scilab source - the one to compile
  2. The tools required to compile Scilab
    You can use my script to install all these tools from scratch and can be found here: https://github.com/dvkcool/scilab-work/blob/master/Script/scilabDependencies.sh
  3. JDK 1.8-171
  4. Create-dmg - An open-source script to create a dmg from .app(already being used at Scilab too) can be found here https://github.com/andreyvit/yoursway-create-dmg

Steps

  1. Consider the folder location to be Main (work folder)
  2. Add the source and make necessary modifications to source code of Scilab if you like.
    Place it in Main/scilab
  3. Place the create-dmg folder in Main/scilab/scilab/create-dmg
  4. Modify the Info.plist of the jdk1.8 (to solve the JAVA SE 6 issue) as:
    <key>JVMCapabilities</key>
    <array>
    <string>CommandLine</string>
    <string>JNI</string>
    <string>BundledApp</string>
    <string>WebStart</string>
    <string>Applets</string>
    </array>
    The complete Info.plist can be found here https://github.com/dvkcool/scilab-work/blob/master/Script/Info.plist
    and should look like:
  5. Also slight modification is required in starter script of Scilab to be placed at Main/scilab/scilab/bin/scilab
    The file can be found here: https://github.com/dvkcool/scilab-work/blob/master/Script/scilab
  6. Then add my script in Main folder, which can be found here https://github.com/dvkcool/scilab-work/blob/master/Script/bundlerSigner.sh
    And it will look like following:
  7. Type following command in terminal: sudo sh builderSigner.sh and sit back.
  8. Congratulations you have got signed DMG in following folder: Main/scilab/scilab/create-dmg/ScilabInstaller.dmg
    and app can be found in folder Main/scilab/scilab/Scilab.app

The signed DMG output can be found here: https://drive.google.com/open?id=19uPoTHI7TeWqb2xlzWxs32w_HSP_BF6n
If you have any doubts/queries feel free to drop me a mail at: divyanshukumarg@gmail.com

Hoping for Best.
Happily Coding
Divyanshu Kumar