-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathbuild.sh
99 lines (75 loc) · 2.22 KB
/
build.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
#!/bin/sh
set -e
# if you compile first time you must change variable "lazpath" and "lcl"
# after it execute this script with parameter "all" at lazview dir
# "./build.sh all" it build lazview
# by Segator
# You can execute this script with different parameters:
# default - compiling LazView only (using by default)
# path to lazbuild
export lazbuild=$(which lazbuild)
# Set up widgetset: gtk or gtk2 or qt
# Set up processor architecture: i386 or x86_64
if [ $2 ]
then export lcl=$2
fi
if [ $lcl ] && [ $CPU_TARGET ]
then export lazview_ARCH=$(echo "--widgetset=$lcl")" "$(echo "--cpu=$CPU_TARGET")
elif [ $lcl ]
then export lazview_ARCH=$(echo "--widgetset=$lcl")
elif [ $CPU_TARGET ]
then export lazview_ARCH=$(echo "--cpu=$CPU_TARGET")
fi
build_default()
{
$lazbuild src/lazview.lpi $lazview_ARCH
strip lazview
}
build_beta()
{
# Build versionitis
#$lazbuild src/versionitis.lpi
# Update version
#src/versionitis -verbose
# Build lazview
$lazbuild src/lazview.lpi --bm=beta $lazview_ARCH
# Build Dwarf LineInfo Extractor
#$lazbuild tools/extractdwrflnfo.lpi
# Extract debug line info
#chmod a+x tools/extractdwrflnfo
#if [ -f lazview.dSYM/Contents/Resources/DWARF/lazview ]; then
# mv -f lazview.dSYM/Contents/Resources/DWARF/lazview $(pwd)/lazview.dbg
#fi
#tools/extractdwrflnfo lazview.dbg
# Strip debug info
strip lazview
}
build_release()
{
# Build versionitis
#$lazbuild src/versionitis.lpi
# Update version
#src/versionitis -verbose
# Build lazview
$lazbuild src/lazview.lpi --bm=release $lazview_ARCH
# Build Dwarf LineInfo Extractor
#$lazbuild tools/extractdwrflnfo.lpi
# Extract debug line info
#chmod a+x tools/extractdwrflnfo
#if [ -f lazview.dSYM/Contents/Resources/DWARF/lazview ]; then
#mv -f lazview.dSYM/Contents/Resources/DWARF/lazview $(pwd)/lazview.dbg
#fi
#tools/extractdwrflnfo lazview.dbg
# Strip debug info
strip lazview
}
build_all()
{
build_default
}
case $1 in
beta) build_beta;;
release) build_release;;
all) build_all;;
*) build_default;;
esac