-
Notifications
You must be signed in to change notification settings - Fork 4
Build System
-
We need to have a simple build system that is easy to maintain.
-
The build system needs to allow us to build just libIntegra, libIntegra and Integra Server, or the entirety of Integra Live
Integra Live should be deployed by means of OS-specific installers. Each OS-specific installer has the following responsibilities:
- Copying the entire directory structure created under build/ (as described above) into the target destination
- Associating the file extensions .ixd, .tixd, .bixd and .mixd with the application, and with the Integra Live document icon.
- Creating startup shortcuts in the normal manner for the OS being targeted.
- We have one version number that is applied across everything. This consists of <major version>.<minor version>.<fix version>.<build number>
- <fix version> may increment up to 2 digits. This is a user-facing version, so anything more than .99 is too much
- This number applies to the GUI, the complete application (installer), and libIntegra. Modules do not have version numbers - future versions of integra should be able to load all legacy modules.
- For a given Integra Live version, we specify dependency versions in terms of >=, e.g. Integra Live requires liblo >= 0.26
-
The base version number (X.X.XX) is stored in a text file called BASEVERSION, located at the root of the repository.
-
A copy of the base version number with build number (X.X.XX.XXXX) is stored in a text file called FULLVERSION, also located at the root of the repository.
-
The build systems for each platform automatically copy these version numbers into the files GUI/src/IntegraLive-app.xml and sdk/ModuleCreator/src/ModuleCreator-app.xml
-
The build systems for Windows and OS-X each take responsibility for copying these version numbers into all built components and OS-specific installers.
- Install Visual Studio (2017 or later)
- Install the Windows WDK
- Install the Wix Toolset
- Install the WiX VS Extension
- Install Flash Builder 4.7
- Install pandoc http://johnmacfarlane.net/pandoc/installing.html.
- Install Java
- Install mingw (including msys, gcc and pthreads)
- Download the latest pthread-win32 and install following the instructions here: http://web.cs.du.edu/~sturtevant/pthread.html
- AIR_SDK_PATH should point to the installed air SDK, EG C:\Program Files\Adobe\Adobe Flash Builder 4.7\sdks\4.6.0. Note - this path must not be enclosed in quotation marks!
- FLEX_SDK_PATH should point to the installed flex SDK, EG C:\Program Files\Adobe\Adobe Flash Builder 4.7\sdks\4.6.0. Note - this path must not be enclosed in quotation marks!
- JRE/BIN should be in the PATH variable
- msys/1.0/bin/ should be in the PATH variable
- MinGW/bin/ should be in the PATH variable
- Download source tree from Git https://github.com/BirminghamConservatoire/IntegraLive
The IntegraLive repository contains submodules: libpd, libsndfile, liblo. To download these submodules, use the git command "git submodule update --init --recursive"
The ASIO SDK is needed by portaudio in order provide low-latency audio I/O in windows. The ASIO SDK is published by Steinberg, who do not permit the redistribution of its source code. So you need to create a Steinberg developer account, download it from http://www.steinberg.net/nc/en/company/developer/sdk_download_portal.html, and extract it to [IntegraLive.git]/libIntegra/externals/portaudio/src/hostapi/asio/ASIOSDK.
- Open Flash Builder, choose File → Import → Flash Builder → Flash Builder Project → Project Folder and choose the directory IntegraLive/gui. Repeat for Module Creator: IntegraLive/sdk/ModuleCreator
- To build the entire system (c components libIntegra, integra server and bridge dlls + gui), and to recreate the built directory structure described above, open IntegraLive.sln in Visual Studio and hit build. If you set the configuration to Release Build, a windows-specific installer will also be created.
- In the project's properties, choose Flex Build Path -> Library Path and set the output folder to IntegraLive/build/Debug/gui-debug
- You should now be able to start a debug session in Flash Builder. It should automatically startup the debug version of the backend to test against.
- To debug the backend, either start a debug session of the GUI in Flash Builder, or simply execute a built version of the GUI from build/debug/GUI. Then in Visual Studio choose Debug → Attach to Process and select the integra server process, to attach Visual Studio's debugger to integra server.
- Note that this technique will not allow debugging of the backend's startup process, as it will have already started up by the time the debugger is attached! In order to debug the backend's startup process, simply start the backend in Visual Studio's debugger. Ensure that all necessary command-line parameters are provided.
This tutorial assumes you have a basic knowledge of how to use the OS X GUI, and some experience using bash commands from the Terminal. For a good introduction to the command line see this introduction.
Xcode is also required. Xcode can be installed from the Mac App Store.
Download the Java SE Development Kit from the following link and install it:
Download the Adobe Flex SDK from the following location and extract it to /Library/Frameworks/:
Additionally, a small hack needs to made to Adobe Flex to make it work with the latest Java. See: http://stackoverflow.com/a/13302428/172218
Download the Adobe AIR SDK from the following location and extract it to /Library/Frameworks/AIRSDK_Compiler:
Open terminal and run the below code
cd ~
git clone https://github.com/BirminghamConservatoire/IntegraLive.git
This may take a few minutes. At the end of your process, you should end up with a directory called IntegraLive containing a clone of the IntegraLive repository.
Most of Integra Live's build system is common to all platforms, but some configuration needs to added locally.
Change directory to the GUI folder within the IntegraLive tree, from the terminal:
cd <path>/<to>/IntegraLive/GUI/src
Now create a file called Make.config
nano Make.config
And in the text editor, copy and paste the following text, replacing flex_sdk_4 with the name of your Flex SDK folder if necessary:
SVNROOT=../..
FLEX_SDK_PATH=/Library/Frameworks/flex_sdk_4
AIR_SDK_PATH=/Library/Frameworks/AIRSDK_Compiler
This step is not necessary if you want to build Integra Live for your own use, but if you wish to distribute it to others, it needs to be signed with a valid Mac Developer ID
To set this:
cd IntegraLive/IntegraLive/macosx
nano Make.config
And in the text editor, type the following:
CERTIFICATENAME="<developer ID>"
Where is the name of your developer ID stored in your Keychain e.g.
CERTIFICATENAME="Developer ID Application: James Bullock"
Type ctrl-x to save the file.
In order to generate the Integra Live documentation, the ImageMagick and Pandoc tools are required.
The easiest way to get these is to install Hombrew from here
And then type:
brew install pandoc
brew install imagemagick
To build a nice DMG it is useful to use the tool DropDMG. This must be installed with command line tools added.
Once DropDMG has been installed, merge the contents of IntegraLive/macosx/DropDMG
into /Users/<username>/Library/Application Support/DropDMG/
Then a DMG can be built with:
make dropdmg
From the directory IntegraLive/IntegraLive/macosx, type:
make release
This should create a directory called Integra\ Live.app. You can now run the application by typing:
open Integra\ Live.app
To make a DMG release type:
make dmg
Other standard make targets can be found in the Makefile, for example: make clean, make debug etc
To make a build with debugging symbols included in the binary files, and assertions enabled, use make debug instead of make release. make clean will remove all existing build files and build from scratch.
make clean
make debug
The most straightforward way to debug Unix applications is using the gdb command line debugger. A gdb primer can be found here.
To debug Integra Live, the 'backend' (server and host), and GUI must be started separately. To prevent the GUI from opening the backend automatically, first edit the GUI config file
cd <path>/<to>/IntegraLive/GUI/trunk/src/assets
nano IntegraLiveConfig.xml
Comment out the line that contains the Mac server command by inserting <!-- and -->.
<!-- <serverpath>server/bin/integra_server</serverpath> -->
Now save the file by typing ctrl-x, and rebuild Integra Live as shown here.
To start the backend under the debugger:
cd Integra\ Live.app/Contents/Resources/server/bin
gdb --args integra_server -bridge=../lib/integra/integra_osc_bridge.so -xmlrpc_server_port=8000 -osc_server_port=8001 -osc_client_port=8002 -osc_client_url=127.0.0.1 -iid_paths=../share/libintegra/interfaces/ -host=../../host/bin/pd -hostargs Integra_Host.pd
The debugger should open and you can add a breakpoint e.g.
break server.c:100
And start the backend by typing “r”.
To run the GUI, open another Terminal, and navigate to the GUI executable:
cd <path>/<to>/IntegraLive/autobuild/Integra\ Live.app/Contents/MacOS
./Integra\ Live