Skip to content
This repository has been archived by the owner on Sep 12, 2022. It is now read-only.

Building

maybites edited this page Jun 6, 2022 · 62 revisions

Build prerequisites

Building SPARCK

recursive clone this repo to make sure you have the required sub-modules.

Notice: This repo is using git LFS: https://www.atlassian.com/git/tutorials/git-lfs#installing-git-lfs

Building c-externals

from commit onward, the c-externals are build via cmake. You can follow these build instructions. .

Building SPARCK application

follow the installation-instructions for flavor 2.

Building for OSX

The scripts numbers inside <SPARCK_REPO>/sparck/build_app/OSX folder correspond the the following steps:

  1. Apply the new version and build number inside Eclipse.

    • navigate to src > com > tecartlab > sparck > misc > Versioner
    • change:
      • the BUILD_NUMBER
      • the VERSION
      • the BUILD_YEAR, BUILD_MONTH, BUILD_DAY
    • Build new sparck.jar by pressing the 'Build All' - icon in the top toolbar.
  2. Execute step_01_buildMaxExportScript.scpt.

    This will create the step_02_maxScriptForExport.txt you will need for the next step

  3. Export SPARCK from Max. For this you need a Max License.

    • open Max
    • open Sparck.maxpat
    • Menu > File > Max Menu
    • Menu > File > Build Collective/Application..
      • press 'Open Script..' and choose step_02_maxScriptForExport.txt
      • press 'Build'
        • choose 'Application' for File Format
        • save inside the build/OSX/build folder and call it SPARCK.app
  4. edit the Info file and apply the new version and build numbers.

    • double click step_03_editInfo.command which will open the /bundle/Info.plist file inside Atom (if you have installed it).
    • go find CFBundleGetInfoString and update the version number.
    • same with CFBundleLongVersionString and
    • same with CFBundleShortVersionString and
    • same with CFBundleVersion

    save and close the document.

  5. finalize the SPARCK app

    • execute the apple script step_04_buildFinalize.scpt.
    • This will create a fully functional SPARCK app. Only the embedded JRE is missing.
  6. add the embedded JRE. This step requires Java 13 installed.

    • load the script step_05_addEmbeddedJRE.scpt
    • check if the path to the JDK is correct.
    • Run the script and a slimmed down JRE is created and embedded inside the application
  7. Test the app first before continuing.

  8. codesign the new app.

    • you need to have an apple developer account
    • you need to have node installed. Use Homebrew -> brew install node
    • open a terminal window
    • drag step_07_codeSign.command to the window
    • add the TeamID from your developer account as a command line argument
    • execute the script. it will execute the step_07_codeSign.js script.
  9. open DropDMG (my preferred tool for creating dmg's)

    • make sure under Preferences > Configurations > signing: the current codesigning certificate is selected
    • drag and drop the app into the app window
    • simplify the dmg file name
  10. Notarize the dmg. (you need to have an apple developer account for this)

    • prerequisites:

      • you might have to update to the latest XCode (10 upwards supports this)
      • you might have to enter 'sudo xcode-select -s /Applications/Xcode.app' inside the terminal if you encounter a 'xcrun: error: unable to find utility "altool"' error.
    • open and run step_09_notarization.scpt

      • enter the bundle id (if you don't want to run with the default)
      • enter your UserID
      • enter your TeamID

      The scripts assumes your password is stored in you keychain as an application password under the name AD_PASSWORD

      • This will take some time (uploading to and notarizing by the apple server)
      • once the upload is finished, the script will return the UUID with which you can check the progress.
  11. check the progress.

    • to check the progress: run step_10_checkNotarizationStatus.scpt and enter the UserID
    • apple will send an email with the UUID once it is finished with the process
    • if there are any problems:
      • run step_10_checkNotarizationInfo.scpt. enter the UUID and UserID to get more detailed infos
  12. staple the dmg.

    • execute the step_11_staple.command
  13. zip the dmg.

    • naming convention: SPARCK_X.Y.Z_(bnn)_OSX.dmg.zip
  14. upload the zip to the server.

Building for WINDOWS

The scripts numbers inside <SPARCK_REPO>/sparck/build_app/WIN correspond the the following steps:

  1. Apply the new version and build number inside Eclipse. (If you haven't done it yet for OSX)

    • navigate to src > com > tecartlab > sparck > misc > Versioner
    • change:
      • the BUILD_NUMBER
      • the VERSION
      • the BUILD_YEAR, BUILD_MONTH, BUILD_DAY
    • Build new sparck.jar by pressing the 'Build All' - icon in the top toolbar.
  2. Execute step_01_buildMaxExportScript.scpt.

    This will create the step_02_maxScriptForExport.txt you will need for the next step

  3. Export SPARCK from Max. For this you need a Max License.

    • open Max
    • open Sparck.maxpat
    • Menu > File > Max Menu
    • Menu > File > Build Collective/Application..
      • press 'Open Script..' and choose step_02_ maxScriptForExport.txt
      • press 'Build'
        • choose 'Application' for File Format
        • save inside the build/WIN/build folder and call it SPARCK.exe
  4. Finalize the building of the SPARCK app. This step requires Java JDK 13 to be installed.

    • check inside the step_03_buildFinalize.bat script if the path to the JDK is correct
    • execute step_03_buildFinalize.bat
      This will create a fully functional SPARCK app, including the building of the embedded JRE.
  5. Test the app first before continuing.

  6. edit the executables properties

    • start RecourceHacker
    • load SPARCK.exe
    • go to Version Info -> 1 : 1033
    • edit the app infos by replacing the following lines:
        FILEVERSION 1,1,0,26
        PRODUCTVERSION 1,1,0,26
      
        VALUE "FileVersion", "1.1.0"
        VALUE "ProductVersion", "1.1.0"
        VALUE "CompanyName", "tecartlab.com"
        VALUE "FileDescription", "Sparck (64bit)"
        VALUE "LegalCopyright", "Copyright © tecartlab 2012-2020"
      
      where 1,1,0 is the version and ,26 is the build number. (they have to be commas!)
    • Compile script (green arrow)
    • save
  7. create the installer

    • open the inno script step_06_buildSparckWin64bit.iss
    • adjust the #define MyAppVersion
    • adjust the #define MyInstallerName with the new version and build number
    • Menu > Project > Compile
  8. upload the exe to the server.

Clone this wiki locally