File tree Expand file tree Collapse file tree 7 files changed +73
-26
lines changed Expand file tree Collapse file tree 7 files changed +73
-26
lines changed Original file line number Diff line number Diff line change 2
2
3
3
export LC_ALL=C
4
4
5
- for category in $( find ../../examples/ -maxdepth 1 -type d )
5
+ OFDIR=" $( cd " $( dirname " ${BASH_SOURCE[0]} " ) " && pwd ) "
6
+ OFDIR=" $( realpath " $OF_DIR /../.." ) "
7
+ OFCORE_EXAMPLES_DIR=" $( realpath " $OF_DIR /examples" ) "
8
+
9
+ for category in $( find " ${OFCORE_EXAMPLES_DIR} /" -maxdepth 1 -type d )
6
10
do
7
- if [ " $category " = " ../../examples/ android" -o " $category " = " ../../examples/ ios" -o " $category " = " ../../examples/ " -o " $category " = " ../../examples /tvOS" ]; then
11
+ if [ " $category " = " ${OFCORE_EXAMPLES_DIR} / android" -o " $category " = " ${OFCORE_EXAMPLES_DIR} / ios" -o " $category " = " ${OFCORE_EXAMPLES_DIR} / " -o " $category " = " ${OFCORE_EXAMPLES_DIR} /tvOS" ]; then
8
12
continue
9
13
fi
10
14
Original file line number Diff line number Diff line change 1
1
DIR=" $( cd " $( dirname " ${BASH_SOURCE[0]} " ) " && pwd ) "
2
2
PARENT_DIR=" $( dirname " $DIR " ) "
3
+
4
+ OFDIR=" $( cd " $( dirname " ${BASH_SOURCE[0]} " ) " && pwd ) "
5
+ OFDIR=" $( realpath " $OF_DIR /../.." ) "
6
+ OFCORE_EXAMPLES_DIR=" $( realpath " $OF_DIR /examples" ) "
7
+
3
8
MAKEFILE_PATH=$PARENT_DIR /templates/linuxarmv6l/Makefile
4
- cd ${DIR} /../../examples
9
+ cd ${OFCORE_EXAMPLES_DIR}
5
10
6
11
for category in $( ls -1d * )
7
12
do
Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
3
+ OFDIR=" $( cd " $( dirname " ${BASH_SOURCE[0]} " ) " && pwd ) "
4
+ OFDIR=" $( realpath " $OF_DIR /../.." ) "
5
+ OFCORE_EXAMPLES_DIR=" $( realpath " $OF_DIR /examples" ) "
6
+
3
7
for category in $( find ../../examples/ -maxdepth 1 -type d )
4
8
do
5
- if [ " $category " = " ../../examples/ android" -o " $category " = " ../../examples/ ios" -o " $category " = " ../../examples /" ]; then
9
+ if [ " $category " = " ${OFCORE_EXAMPLES_DIR} / android" -o " $category " = " ${OFCORE_EXAMPLES_DIR} / ios" -o " $category " = " ${OFCORE_EXAMPLES_DIR} /" ]; then
6
10
continue
7
11
fi
8
12
Original file line number Diff line number Diff line change 1
1
#! /usr/bin/env bash
2
2
3
3
export LC_ALL=C
4
+ OFDIR=" $( cd " $( dirname " ${BASH_SOURCE[0]} " ) " && pwd ) "
5
+ OFDIR=" $( realpath " $OF_DIR /../.." ) "
4
6
5
7
ARCH=$( uname -m)
6
- if [ " $ARCH " = " x86_64" ]; then
7
- LIBSPATH=linux64
8
- else
9
- LIBSPATH=linux
8
+ if [ " $ARCH " == " " ]; then
9
+ if [ " $ARCH " = " x86_64" ]; then
10
+ LIBSPATH=linux/64
11
+ elif [ " $ARCH " = " arm64" ]; then
12
+ LIBSPATH=linux/arm64
13
+ elif [ " $ARCH " = " jetson" ]; then
14
+ LIBSPATH=linux/jetson
15
+ else
16
+ LIBSPATH=linux
17
+ fi
10
18
fi
11
19
12
20
pushd ` dirname $0 ` > /dev/null
@@ -18,13 +26,13 @@ JOBS=1
18
26
while getopts tj: opt ; do
19
27
case " $opt " in
20
28
t) # testing, only build Debug
21
- BUILD=" test" ;;
29
+ BUILD=" test" ;;
22
30
j) # make job count for parallel build
23
- JOBS=" $OPTARG "
31
+ JOBS=" $OPTARG "
24
32
esac
25
33
done
26
34
27
- cd " ${SCRIPTPATH} /../.. /libs/openFrameworksCompiled/project"
35
+ cd " ${OFDIR} /libs/openFrameworksCompiled/project"
28
36
make -j$JOBS Debug
29
37
exit_code=$?
30
38
if [ $exit_code != 0 ]; then
@@ -34,11 +42,11 @@ if [ $exit_code != 0 ]; then
34
42
fi
35
43
36
44
if [ " $BUILD " == " install" ]; then
37
- make -j$JOBS Release
38
- exit_code=$?
39
- if [ $exit_code != 0 ]; then
40
- echo " there has been a problem compiling Release OF library"
41
- echo " please report this problem in the forums"
42
- exit $exit_code
43
- fi
45
+ make -j$JOBS Release
46
+ exit_code=$?
47
+ if [ $exit_code != 0 ]; then
48
+ echo " there has been a problem compiling Release OF library"
49
+ echo " please report this problem in the forums"
50
+ exit $exit_code
51
+ fi
44
52
fi
Original file line number Diff line number Diff line change 2
2
3
3
export LC_ALL=C
4
4
5
- OF_ROOT=$( cd $( dirname $0 ) /../..; pwd -P)
5
+ OFDIR=" $( cd " $( dirname " ${BASH_SOURCE[0]} " ) " && pwd ) "
6
+ OF_ROOT=" $( realpath " $OF_DIR /../.." ) "
7
+ OF_PG_DIR=" $( realpath " $OF_DIR /apps/projectGenerator" ) "
6
8
7
- make Release -C ${OF_ROOT} /apps/projectGenerator /commandLine
9
+ make Release -C ${OF_PG_DIR} /commandLine
8
10
ret=$?
9
11
if [ $ret -ne 0 ]; then
10
12
echo " There has been a problem compiling the command line projectGenerator."
@@ -18,7 +20,7 @@ read -p "Do you want to install the command line project generator? [Y/n] " -r
18
20
echo
19
21
if [[ $REPLY =~ ^[Yy]$ ]]; then
20
22
echo " To copy the command line project generator we need root permission."
21
- sudo cp ${OF_ROOT} /apps/projectGenerator /commandLine/bin/projectGenerator /usr/local/bin/projectGenerator
23
+ sudo cp ${OF_PG_DIR} /commandLine/bin/projectGenerator /usr/local/bin/projectGenerator
22
24
if [ ! $? -eq 0 ]; then
23
25
echo " Failed to copy the projectGenerator file."
24
26
exit
Original file line number Diff line number Diff line change 1
- rm -r ../../libs/fmod
2
- rm ../../export/linux/libs/libfmod*
3
- rm ../../export/linux64/libs/libfmod*
1
+ #! /bin/bash
2
+ OFDIR=" $( cd " $( dirname " ${BASH_SOURCE[0]} " ) " && pwd ) "
3
+ OFDIR=" $( realpath " $OF_DIR /../.." ) "
4
+
5
+ if [ -d " ${OFDIR} /libs/fmod" ]; then
6
+ rm -r " ${OFDIR} /libs/fmod"
7
+ echo " Deleted ${OFDIR} /libs/fmod"
8
+ fi
9
+
10
+ if [ -d " ${OFDIR} /export/linux/libs" ]; then
11
+ if ls ${OFDIR} /export/linux/libs/libfmod* 1> /dev/null 2>&1 ; then
12
+ rm ${OFDIR} /export/linux/libs/libfmod*
13
+ echo " Deleted files in ${OFDIR} /export/linux/libs/"
14
+ fi
15
+ fi
16
+
17
+ if [ -d " ${OFDIR} /export/linux64/libs" ]; then
18
+ if ls ${OFDIR} /export/linux64/libs/libfmod* 1> /dev/null 2>&1 ; then
19
+ rm ${OFDIR} /export/linux64/libs/libfmod*
20
+ echo " Deleted files in ${OFDIR} /export/linux64/libs/"
21
+ fi
22
+ fi
Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
3
3
export LC_ALL=C
4
- cd ../../examples
4
+ OFDIR=" $( cd " $( dirname " ${BASH_SOURCE[0]} " ) " && pwd ) "
5
+ OFDIR=" $( realpath " $OF_DIR /../.." ) "
6
+ OFCORE_EXAMPLES_DIR=" $( realpath " $OF_DIR /examples" ) "
7
+
8
+ cd ${OFCORE_EXAMPLES_DIR}
5
9
6
10
for category in $( ls . )
7
11
do
16
20
continue
17
21
fi
18
22
echo " -----------------------------------------------------------------"
19
- echo " building " + $example
23
+ echo " building [ " + $example " ] "
20
24
cd $example
21
25
make Debug
22
26
ret=$?
30
34
echo error compiling $example
31
35
exit
32
36
fi
37
+ echo " build success [" + $example " ]"
33
38
cd bin
34
39
./$example
35
40
cd ../../
You can’t perform that action at this time.
0 commit comments