Skip to content
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
executable file 144 lines (105 sloc) 3.68 KB
# This script will create a folder named "tf" in your home directory,
# clone all of the tinkerforge gits, install all packages to build,
# the Bindings, the distribution zips, the documentation, Brick firmwares,
# Bricklet plugins, Brick Viewer and Brick Daemon.
# You will also be able to open, view and edit the schematics and layouts
# for Bricks and Bricklets as well as the design files of the cases.
# It was tested in a Ubuntu 15.04 VirtualBox image from
cd ~
sudo apt-get update
# Packages for general use
sudo apt-get -y install python git
# Packages for "generators/"
sudo apt-get -y install php5 # in older Ubuntu there was a package named php5
sudo apt-get -y install php # in newer Ubuntu there is a meta package named php that depends on php7.0
sudo apt-get -y install build-essential mono-complete mono-reference-assemblies-2.0 python3 perl default-jre default-jdk nodejs npm php-pear ruby zip
sudo npm install -g browserify
sudo ln -s /usr/bin/nodejs /usr/local/bin/node
# Packages for "generators/"
sudo apt-get -y install libxml2-utils libgd-dev libgd-perl libterm-readkey-perl libb-lint-perl
# Packages for "$:~/doc/ make html"
sudo apt-get -y install python-sphinx python-sphinxcontrib.spelling
# Packages for building and running brickv
sudo apt-get -y install python-qt4 python-qt4-gl python-opengl python-serial python-setuptools pyqt4-dev-tools
# Packages for building and running brickd
sudo apt-get -y install pkg-config libusb-1.0-0-dev libudev-dev pm-utils
# Packages for building Brick firmwares and Bricklet plugins
sudo apt-get -y install cmake gcc-arm-none-eabi
# Packages for hardware development (schematic, layout, case design)
sudo apt-get -y install kicad freecad
# Clone all necessary gits
cat > ${gitgetter} <<- EOF
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import urllib2
import json
page = 1
repos = []
names = []
while True:
request = urllib2.urlopen('{0}&per_page=100'.format(page))
data =
decoded = json.loads(data)
repos += decoded
if len(decoded) < 100:
page += 1
for repo in repos:
name = repo['name'].replace('Tinkerforge/', '')
if not name.startswith('red-brick-'):
print ' '.join(names)
chmod +x ${gitgetter}
gits=( $(${gitgetter}) )
rm ${gitgetter}
mkdir tf
cd tf
for g in "${gits[@]}"
git clone$g.git
# Generate Bindings and Copy examples to documentation
cd ~/tf/generators/
# Install additional pygments lexers
cd ~/tf/doc/pygments-mathematica/
sudo python install
cd ~/tf/doc/pygments-octave-fixed/
sudo python install
# Generate doc
cd ~/tf/doc/
make html
# Generate brickv GUI
cd ~/tf/brickv/src/
# Build brickd
cd ~/tf/brickd/src/
ln -s ../../daemonlib/ .
cd ~/tf/brickd/src/brickd/
# To show how it works we set up one Brick for use with kicad and one
# Brick as well as one Bricklet to compile with gcc.
# Build Master Brick
cd ~/tf/master-brick/software/src/
ln -s ../../../bricklib/ .
cd ~/tf/master-brick/software/
# Build Temperature Bricklet
cd ~/tf/temperature-bricklet/software/src/
ln -s ../../../bricklib/ .
ln -s ../../../brickletlib/ .
cd ~/tf/temperature-bricklet/software/
# Set up hardware design files for Master Brick
cd ~/tf/master-brick/hardware/
ln -s ../../kicad-libraries/ .
# To open schematics and layout:
# kicad ~/tf/master-brick/hardware/
# Cases can be found in ~/tf/cases and directly opend with freecad. e.g.:
# freecad ~/tf/cases/ambient_light/ambient_light.fcstd
cd ~
echo done
You can’t perform that action at this time.