build.sh 1.34 KB
Newer Older
Bas Lijnse's avatar
Bas Lijnse committed
1
#!/bin/sh
2
set -e
Bas Lijnse's avatar
Bas Lijnse committed
3
4
5
6
mkdir -p target/clean-lib-itasks

# Add libraries
mkdir -p target/clean-lib-itasks/lib/iTasks
7
cp -r src/itasks-sdk/Libraries/iTasks* target/clean-lib-itasks/lib/iTasks/
Bas Lijnse's avatar
Bas Lijnse committed
8
9
10
11

# Add examples
mkdir -p target/clean-lib-itasks/examples/iTasks
cp -r src/itasks-sdk/Examples/* target/clean-lib-itasks/examples/iTasks/
Mart Lubbers's avatar
Mart Lubbers committed
12
13
14
find target/clean-lib-itasks -name "*.prj.default" | while read f; do
		mv "$f" "$(dirname $f)/$(basename -s .prj.default $f)".prj
	done
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31

# Build tools
mkdir -p build/clean
cp -r dependencies/clean/* build/clean/

export CLEAN_HOME=`pwd`/build/clean
export PATH=$CLEAN_HOME/bin:$PATH

# Web collector
mkdir -p build/itasks-web-collector
mkdir -p target/clean-lib-itasks/lib/exe
cp -r src/itasks-sdk/Tools/WebResourceCollector.icl build/itasks-web-collector/
(cd build/itasks-web-collector
    clm -nr -nt -IL Generics -IL Platform WebResourceCollector -o itasks-web-collector 
)
cp build/itasks-web-collector/itasks-web-collector target/clean-lib-itasks/lib/exe/itasks-web-collector

32
33
34
35
36
37
# BasicAPIExamples
(cd src/itasks-sdk/Examples
	clm -nr -nt -IL Platform CreateBasicAPIExamples -o CreateBasicAPIExamples
	./CreateBasicAPIExamples > ../../../target/clean-lib-itasks/examples/iTasks/BasicAPIExamples.icl
)

38
39
# Add environments
mkdir -p target/clean-lib-itasks/etc
40
cp src/itasks-sdk/Config/macos-x64/iTasks.env target/clean-lib-itasks/etc/iTasks.env