Last active
February 14, 2018 10:40
-
-
Save kthoms/d471f94b11245d1d8287ca49aac885ac to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Install required packages | |
sudo apt-get update | |
sudo apt-get --assume-yes install git g++ cmake autoconf libtool doxygen graphviz pkg-config openjdk-8-jdk asciidoc | |
# Define version variables | |
export VERSION_DBUS=1.10.24 | |
export VERSION_CAPICXX_CORE_RUNTIME=3.1.12.4 | |
export VERSION_CAPICXX_CORE_GENERATOR=3.1.12.2 | |
export VERSION_CAPICXX_DBUS_RUNTIME=3.1.12.4 | |
export VERSION_CAPICXX_DBUS_GENERATOR=3.1.12.1 | |
# Get and build capicxx-core-runtime | |
mkdir capicxx | |
cd capicxx | |
export CAPICXX_ROOT=$(pwd) | |
echo "CAPICXX_ROOT=$CAPICXX_ROOT" | |
# Get and build Expat | |
cd $CAPICXX_ROOT | |
git clone https://github.com/libexpat/libexpat.git | |
cd libexpat/expat | |
./buildconf.sh && ./configure && cd lib && make && sudo make install | |
cd $CAPICXX_ROOT | |
git clone https://github.com/itemis/dbus.git | |
cd dbus | |
git checkout -b dbus-1.10.24-capicxx origin/dbus-1.10.24-capicxx | |
./configure && make && sudo make install | |
sudo ln -s /usr/local/lib/dbus-1.0/include/dbus/dbus-arch-deps.h /usr/local/include/dbus-1.0/dbus | |
cd $CAPICXX_ROOT | |
git clone https://github.com/GENIVI/capicxx-core-runtime.git | |
cd capicxx-core-runtime | |
git checkout -b r$VERSION_CAPICXX_CORE_RUNTIME $VERSION_CAPICXX_CORE_RUNTIME | |
mkdir -p build && cd build && rm -rf * && cmake .. && make && sudo make install | |
# Get capicxx-dbus-runtime | |
cd $CAPICXX_ROOT | |
git clone https://github.com/GENIVI/capicxx-dbus-runtime.git | |
cd capicxx-dbus-runtime | |
# 3.1.12.4 introduces an incompatible change in DBusStubAdapterHelper.hpp | |
git checkout -b r$VERSION_CAPICXX_DBUS_RUNTIME $VERSION_CAPICXX_DBUS_RUNTIME | |
mkdir -p build && cd build && rm -rf * && cmake .. && make && sudo make install | |
# Build | |
cd $CAPICXX_ROOT | |
git clone https://github.com/itemis/capicxx-dbus-tools.git | |
cd capicxx-dbus-tools | |
git checkout -b develop origin/develop | |
# Install commonapi-core-generator | |
cd $CAPICXX_ROOT | |
rm -rf commonapi-core-generator && mkdir commonapi-core-generator && cd commonapi-core-generator | |
wget https://github.com/GENIVI/capicxx-core-tools/releases/download/$VERSION_CAPICXX_CORE_GENERATOR/commonapi-generator.zip | |
unzip commonapi-generator.zip | |
sudo ln -sf $(pwd)/commonapi-generator-linux-x86_64 /usr/local/bin/commonapi-generator | |
# Install commonapi_dbus_generator | |
cd $CAPICXX_ROOT | |
rm -rf commonapi-dbus-generator && mkdir commonapi-dbus-generator && cd commonapi-dbus-generator | |
wget https://github.com/GENIVI/capicxx-dbus-tools/releases/download/$VERSION_CAPICXX_DBUS_GENERATOR/commonapi_dbus_generator.zip | |
unzip commonapi_dbus_generator.zip | |
sudo ln -sf $(pwd)/commonapi-dbus-generator-linux-x86_64 /usr/local/bin/commonapi-dbus-generator | |
# Build Hello World | |
# RUNTIME_PATH and DBUS_PATH are used by CMakeLists.txt in HelloWorldDbus example | |
export RUNTIME_PATH=$CAPICXX_ROOT | |
export DBUS_PATH=$CAPICXX_ROOT/dbus | |
cd $CAPICXX_ROOT/capicxx-dbus-tools/CommonAPI-Examples/HelloWorldDbus | |
# option -sk only available from 3.1.12.2 | |
rm -rf src-gen | |
commonapi-generator -sk ./fidl/HelloWorld.fidl | |
commonapi-dbus-generator ./fidl/HelloWorld.fidl | |
mkdir -p build && cd build && rm -rf * && cmake .. | |
make | |
# Download Eclipse | |
cd $CAPICXX_ROOT | |
wget http://www.mirrorservice.org/sites/download.eclipse.org/eclipseMirror/technology/epp/downloads/release/oxygen/2/eclipse-cpp-oxygen-2-linux-gtk-x86_64.tar.gz | |
tar -xzf eclipse-cpp-oxygen-2-linux-gtk-x86_64.tar.gz && cd eclipse | |
export ECLIPSE_ROOT=$(pwd) | |
# Install features on Eclipse, may take a while | |
./eclipse -noSplash -consoleLog -application org.eclipse.equinox.p2.director\ | |
-repository \ | |
http://kbirken.github.io/dbus-emf-model/releases\ | |
,http://franca.github.io/franca/update_site/releases/0.9.1\ | |
,http://genivi.github.io/capicxx-core-tools/updatesite\ | |
,http://genivi.github.io/capicxx-dbus-tools/updatesite\ | |
,http://download.eclipse.org/modeling/tmf/xtext/updates/composite/releases\ | |
,http://download.eclipse.org/releases/oxygen\ | |
-installIUs \ | |
model.emf.dbusxml.feature.feature.group\ | |
,org.eclipse.xtext.ui.feature.group\ | |
,org.genivi.commonapi.core.feature.feature.group\ | |
,org.genivi.commonapi.core.validator.feature.feature.group\ | |
,org.genivi.commonapi.dbus.feature.feature.group\ | |
,org.genivi.commonapi.dbus.validator.feature.feature.group | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment