-
Notifications
You must be signed in to change notification settings - Fork 3
Building
- Instructions on how to build openCV for SPARCK.
- Setting Up Eclipse for SPARCK to compile the java externals.
- Compiling externals for Windows.
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
from commit onward, the c-externals are build via cmake. You can follow these build instructions. .
follow the installation-instructions for flavor 2.
The scripts numbers inside <SPARCK_REPO>/sparck/build_app/OSX folder correspond the the following steps:
-
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.
-
Execute step_01_buildMaxExportScript.scpt.
This will create the step_02_maxScriptForExport.txt you will need for the next step
-
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
-
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.
-
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.
-
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
-
Test the app first before continuing.
-
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.
-
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
-
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.
-
-
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
-
staple the dmg.
- execute the step_11_staple.command
-
zip the dmg.
- naming convention: SPARCK_X.Y.Z_(bnn)_OSX.dmg.zip
-
upload the zip to the server.
The scripts numbers inside <SPARCK_REPO>/sparck/build_app/WIN correspond the the following steps:
-
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.
-
Execute step_01_buildMaxExportScript.scpt.
This will create the step_02_maxScriptForExport.txt you will need for the next step
-
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
-
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.
-
Test the app first before continuing.
-
edit the executables properties
- start RecourceHacker
- load SPARCK.exe
- go to Version Info -> 1 : 1033
- edit the app infos by replacing the following lines:
where 1,1,0 is the version and ,26 is the build number. (they have to be commas!)
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"
- Compile script (green arrow)
- save
-
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
-
upload the exe to the server.
(c) by Martin Froehlich maybites