| 1 |
< |
from __future__ import print_function |
| 1 |
> |
from __future__ import division, print_function, unicode_literals |
| 2 |
|
|
| 3 |
|
import os |
| 4 |
|
|
| 13 |
|
''') |
| 14 |
|
env.Exit() |
| 15 |
|
|
| 16 |
+ |
def find_pyinstaller(env): |
| 17 |
+ |
if os.name != 'nt': |
| 18 |
+ |
return |
| 19 |
+ |
conf = SConf(env) |
| 20 |
+ |
oldpath = (env['ENV'].get('PATH')) |
| 21 |
+ |
try: |
| 22 |
+ |
env['ENV']['PATH'] = os.environ['PATH'] |
| 23 |
+ |
pyinst = conf.CheckProg('pyinstaller.exe') |
| 24 |
+ |
if pyinst: |
| 25 |
+ |
env['PYINSTALLER'] = pyinst |
| 26 |
+ |
env['PYSCRIPTS'] = [] |
| 27 |
+ |
env = conf.Finish() |
| 28 |
+ |
finally: |
| 29 |
+ |
env['ENV']['PATH'] = oldpath |
| 30 |
+ |
|
| 31 |
|
def find_x11(env): |
| 32 |
|
# Search for libX11, remember the X11 library and include dirs |
| 33 |
|
for d in ('/usr/X11R6', '/usr/X11', '/usr/openwin'): |
| 61 |
|
if incdir: env.Prepend(CPPPATH=[incdir]) # add temporarily |
| 62 |
|
if libdir: env.Prepend(LIBPATH=[libdir]) |
| 63 |
|
conf = SConf(env) |
| 64 |
< |
if conf.CheckLibWithHeader('GL', 'GL/gl.h', 'C', autoadd=0): |
| 64 |
> |
if (conf.CheckLib('GL') |
| 65 |
> |
or conf.CheckLib('opengl32') |
| 66 |
> |
or conf.CheckCHeader('OpenGL/gl.h') |
| 67 |
> |
or conf.CheckCHeader('GL/gl.h')): |
| 68 |
|
env['OGL'] = 1 |
| 69 |
+ |
if os.name == 'nt': |
| 70 |
+ |
if (conf.CheckLib('GLU') # for winrview |
| 71 |
+ |
or conf.CheckLib('glu32') |
| 72 |
+ |
or conf.CheckCHeader('OpenGL/glu.h')): |
| 73 |
+ |
env['GLU'] = 1 |
| 74 |
|
if incdir: env['CPPPATH'].remove(incdir) # not needed for now |
| 75 |
|
if libdir: env['LIBPATH'].remove(libdir) |
| 76 |
|
if env.has_key('OGL'): |
| 77 |
|
if incdir: env.Replace(OGLINCLUDE=[incdir]) |
| 78 |
+ |
if env.has_key('GLU'): |
| 79 |
+ |
if incdir: env.Replace(GLUINCLUDE=[incdir]) |
| 80 |
|
#if libdir: env.Replace(OGLLIB=[libdir]) |
| 81 |
|
conf.Finish() |
| 82 |
|
break |
| 111 |
|
conf.Finish() |
| 112 |
|
break |
| 113 |
|
conf.Finish() |
| 114 |
+ |
|
| 115 |
+ |
# vi: set ts=4 sw=4 : |
| 116 |
|
|