blob: 9e5e269e3e720bb6f1fc419f5cff79d9b01b52b6 (
plain)
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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
|
#!/bin/sh
#
# This script is meant to be run under debian unstable, with the mingw
# package installed, as well as a bunch of other packages, including but
# not limited to, mysql-client-dev, imagemagick-dev, and oracle-occi
#
githostname="git.grumpycoder.net"
localhostname=`hostname`
if [ "x$USER" = "xpixel" ] || [ "x$USER" = "xnnoble" ] ; then
if [ "x$localhostname" = "xgrumpy" ] ; then
githostname=""
else
prefix="ssh+git://pixel@"
fi
path="/pub/repo.git"
else
prefix="http://"
path=""
fi
tar xvfz Mesa-7.4.4-osmesa-linux-precomp.tar.gz
tar xvfz tinyxml-src.tar.gz
git clone ${prefix}${githostname}${path}/Baltisot
git clone ${prefix}${githostname}${path}/mogltk
git clone ${prefix}${githostname}${path}/lua-interface
git clone ${prefix}${githostname}${path}/lua-modules
git clone ${prefix}${githostname}${path}/lua-modules-cd-tool
git clone ${prefix}${githostname}${path}/PSX-Bundle
git clone ${prefix}${githostname}${path}/lua-modules-iup
git clone ${prefix}${githostname}${path}/LuaJIT
cd Baltisot/lib/
./genloadlib.sh > loadlualibs.ii
cd ../..
mkdir -p lua-interface-distrib/linux
###############################
## prepare win32 compilation ##
## skip if you don't want it ##
###############################
git clone lua-interface lua-interface-win32
git clone lua-interface lua-interface-win32-light
ln -s ../lua-interface-win32/lua-interface.a lua-interface
git clone lua-modules lua-modules-win32
git clone lua-modules-cd-tool lua-modules-cd-tool-win32
git clone lua-modules-iup lua-modules-iup-win32
git clone LuaJIT LuaJIT-win32
###############################
#################################
## prepare darwin9 compilation ##
## skip if you don't want it ##
#################################
git clone lua-interface lua-interface-darwin9
git clone lua-modules lua-modules-darwin9
git clone lua-modules-cd-tool lua-modules-cd-tool-darwin9
git clone lua-modules-iup lua-modules-iup-darwin9
ln -s ../lua-interface-darwin9/lua-interface.dylib lua-modules-darwin9
ln -s ../lua-interface-darwin9/lua-interface.dylib lua-modules-cd-tool-darwin9
ln -s ../lua-interface-darwin9/lua-interface.dylib lua-modules-iup-darwin9
git clone LuaJIT LuaJIT-darwin9
###############################
cd LuaJIT
make BUILDMODE=static || exit -1
cd ..
cd lua-interface
colormake || exit -1
./lua-interface -e 'print "Hello, world!"'
cp lua-interface luac ../lua-interface-distrib/linux
cd ..
cd lua-modules
cp ../lua-interface/lua-interface.so .
colormake || exit -1
cp *.so ../lua-interface-distrib/linux
cd ..
cd lua-modules-cd-tool
cp ../lua-interface/lua-interface.so .
colormake || exit -1
cp *.so ../lua-interface-distrib/linux
cd ..
cd lua-modules-iup
cp ../lua-interface/lua-interface.so .
colormake || exit -1
cp *.so ../lua-interface-distrib/linux
cd ..
########################################
## linux version done - next is win32 ##
########################################
tar xvfz Mesa-7.0.3-osmesa-win32-precomp.tar.gz
tar xvfz ftgl-win32-precomp.tar.gz
tar xvfz freetype-win32-precomp.tar.gz
tar xvfz mysql-5.0.51b-win32-precomp.tar.gz
tar xvfz pthreads-w32-2-8-0-release-win32-precomp.tar.gz
tar xvfz gnuwin32-digested-tar.gz
gunzip libreadline-static.a.gz
mkdir -p lua-interface-distrib/win32
mkdir -p lua-interface-distrib/win32-light
cd LuaJIT-win32
make CROSS=i586-mingw32msvc- TARGET_SYS=Windows BUILDMODE=static || exit -1
cd ..
cd lua-interface-win32
make -f Makefile.mingw32 || exit -1
cp *.exe *.dll ../lua-interface-distrib/win32
cd ..
cd lua-modules-win32
make -f Makefile.mingw32 || exit -1
cp *.dll ../lua-interface-distrib/win32
cd ..
cd lua-modules-cd-tool-win32
make -f Makefile.mingw32 || exit -1
cp *.dll ../lua-interface-distrib/win32
cd ..
cd lua-modules-iup-win32
make -f Makefile.mingw32 || exit -1
cp *.dll ../lua-interface-distrib/win32
cd ..
cd lua-interface-win32-light
make -f Makefile.mingw32 lua-interface-light.exe || exit -1
cp *.exe *.dll ../lua-interface-distrib/win32-light
cd ..
cp win32-dlls/* lua-interface-distrib/win32
##########################################
## win32 version done - next is darwin9 ##
##########################################
tar xvfz Mesa-7.4.4-osmesa-darwin9-precomp.tar.gz
mkdir -p lua-interface-distrib/darwin9
cd LuaJIT-darwin9
make CROSS=i686-apple-darwin9- TARGET_SYS=Darwin BUILDMODE=static TARGET_XLDOPTS=-mmacosx-version-min=10.5 || exit -1
cd ..
cd lua-interface-darwin9
SYSTEM=Darwin make || exit -1
cp lua-interface *.dylib ../lua-interface-distrib/darwin9
cd ..
cd lua-modules-darwin9
SYSTEM=Darwin make || exit -1
cp *.dylib ../lua-interface-distrib/darwin9
cd ..
cd lua-modules-cd-tool-darwin9
SYSTEM=Darwin make || exit -1
cp *.dylib ../lua-interface-distrib/darwin9
cd ..
cd lua-modules-iup-darwin9
SYSTEM=Darwin make || exit -1
cp *.dylib ../lua-interface-distrib/darwin9
cd ..
##########################
## All done, packing up ##
##########################
cp lua-interface/lua-interface.lua lua-interface-distrib/linux
cp lua-interface/lua-interface.lua lua-interface-distrib/win32
cp lua-interface/lua-interface.lua lua-interface-distrib/win32-light
cp lua-interface/lua-interface.lua lua-interface-distrib/darwin9
cp PSX-Bundle/COPYING Baltisot/AUTHORS lua-interface-distrib/linux
cp PSX-Bundle/COPYING Baltisot/AUTHORS lua-interface-distrib/win32
cp PSX-Bundle/COPYING Baltisot/AUTHORS lua-interface-distrib/win32-light
cp PSX-Bundle/COPYING Baltisot/AUTHORS lua-interface-distrib/darwin9
cp lua-interface-distrib/win32/luacd.dll lua-interface-distrib/win32-light
cp lua-interface-distrib/win32/luapsx.dll lua-interface-distrib/win32-light
cp lua-interface-distrib/win32/pthreadGC2.dll lua-interface-distrib/win32-light
cp lua-interface-distrib/win32/ucl1.dll lua-interface-distrib/win32-light
cp lua-interface-distrib/win32/zlib1.dll lua-interface-distrib/win32-light
cd lua-interface-distrib
mv linux lua-interface
strip --strip-unneeded lua-interface/*
zip -r lua-interface-linux.zip lua-interface
mv lua-interface linux
mv win32 lua-interface
i586-mingw32msvc-strip --strip-unneeded lua-interface/*
zip -r lua-interface-win32.zip lua-interface
mv lua-interface win32
mv win32-light lua-interface-light
i586-mingw32msvc-strip --strip-unneeded lua-interface-light/*
zip -r lua-interface-win32-light.zip lua-interface-light
mv lua-interface-light win32-light
mv darwin9 lua-interface
i686-apple-darwin9-strip -x lua-interface/*
rm lua-interface/lua-interface-mesa.dylib
zip -r lua-interface-darwin9.zip lua-interface
mv lua-interface darwin9
|