-
Notifications
You must be signed in to change notification settings - Fork 2
HowTo Modify installAlcommon For New NaoQi
Patrick de Kok edited this page Mar 30, 2015
·
1 revision
From time to time, Aldebaren releases a new version of NaoQi SDK. It is (relatively) easy to update BHuman's installAlcommon to copy all used header files from Aldebaran and their used version of Boost.
- Go to the naoqi sdk archive. Check that it is the 32 bit linux version.
- Extract it:
tar xf ${NAOQI_ARCHIVE}
- Go to the extracted folder.
- Go to
include/in that folder. - Store this in a variable:
export ${NAOQI_INCLUDE}=`pwd`
- List all the folders with a
-ein front (for later use in grep):
export NAOQI_INCLUDE_DIRS=`ls -p | grep '/'
export GREPVARS=`echo ${NAOQI_INCLUDE_DIRS} | sed -e 's/\s/ -e /g'`
- Go to the BHuman folder.
- Go to
Src/in that folder. - Find all files including any of the naoqi headers:
grep -rE ${grepvars}
- Store all included files from the NaoQi SDK in some variable
${INCLUDED_NAOQI}. - Go to
${NAOQI_INCLUDE}:
cd ${NAOQI_INCLUDE}
- Find all included header files recursively:
g++ -I${NAOQI_INCLUDE} -M ${INCLUDED_NAOQI} > included_headers
- Open the file with vim:
vim included_headers
- Remove the
.o's from the file:
:%s/^.*\.o://g
- Put each file on a single line:
:%s/ \\$//g
:%s/\n//g
:%s/ / \\\r/g
- Remove all system dependencies, these are on lines starting with a
/:
:%s/^\/.*$\n//g
- Append
include/to the front:
:%s/^/include\//g
- Remove all duplicate lines and sort all lines:
:sort u
- Save this all, and close:
:wq
- Make a version with only Boost header files:
grep 'boost' included_headers > included_boost_headers
- Remove the boost headers from the original version:
vim included_headers
:%s/^boost.*$\n//g
:wq
- Go to the BHuman folder.
- Go to
Install/. - Edit installAlcommon and...
- replace the value of includesAlcommon with those of included_headers;
- replace the value of includesBoost with those of included_boost_headers;
- replace defaultArchive with your current NaoQi version's archive name.