Adding triangle entity
[Procustean.git] / get-ecl.py
blob066664004028f4aa49794a13741cc50a1654215f
2 # simple script to download and build g3d in-place
4 import sys
5 import os
6 import urllib2
7 import tarfile
8 import popen2
10 print "Connecting to http://downloads.sourceforge.net"
11 response = urllib2.urlopen("http://downloads.sourceforge.net/ecls/ecl-0.9l.tgz")
12 print "Connected"
13 ecl_src = open("ecl-0.9l.tgz","wb")
14 print "Downloading ECL.."
15 ecl_src.write( response.read() )
16 ecl_src.close()
17 print "Downloaded."
18 dir = os.getcwd()
19 targzipf = tarfile.open("ecl-0.9l.tgz", "r:gz")
20 targzipf.extractll()
21 targzipf.close()
22 os.chdir("ecl-0.9l")
23 (config_out, config_in) = popen2.popen2("./configure -prefix=" + dir)
24 for line in config_out:
25 print line
26 (make_out, make_in) = popen2.popen2("make" + dir)
27 for line in config_out:
28 print line
29 os.chdir("..")
30 # TO DO .. copy dlls to .exe dir