# flags and values that affect this script
#----------------------------------------------------------------------
# flags and values that affect this script
#----------------------------------------------------------------------
DESCRIPTION = "Cross platform GUI toolkit for Python"
AUTHOR = "Robin Dunn"
AUTHOR_EMAIL = "Robin Dunn <robin@alldunn.com>"
DESCRIPTION = "Cross platform GUI toolkit for Python"
AUTHOR = "Robin Dunn"
AUTHOR_EMAIL = "Robin Dunn <robin@alldunn.com>"
BUILD_STC = 1 # If true, build the contrib/stc extension module
BUILD_XRC = 1 # XML based resource system
BUILD_GIZMOS = 1 # Build a module for the gizmos contrib library
BUILD_STC = 1 # If true, build the contrib/stc extension module
BUILD_XRC = 1 # XML based resource system
BUILD_GIZMOS = 1 # Build a module for the gizmos contrib library
USE_SWIG = 0 # Should we actually execute SWIG, or just use the
# files already in the distribution?
USE_SWIG = 0 # Should we actually execute SWIG, or just use the
# files already in the distribution?
IN_CVS_TREE = 0 # Set to true if building in a full wxWindows CVS
# tree, otherwise will assume all needed files are
# available in the wxPython source distribution
IN_CVS_TREE = 0 # Set to true if building in a full wxWindows CVS
# tree, otherwise will assume all needed files are
# available in the wxPython source distribution
# version of wx-config or alternate flags,
# eg. as required by the .deb in-tree build.
# version of wx-config or alternate flags,
# eg. as required by the .deb in-tree build.
# Some MSW build settings
FINAL = 1 # Mirrors use of same flag in wx makefiles,
# Some MSW build settings
FINAL = 1 # Mirrors use of same flag in wx makefiles,
# wxWindows must have been built with /MD, not /MDd
# (using FINAL=hybrid will do it.)
# wxWindows must have been built with /MD, not /MDd
# (using FINAL=hybrid will do it.)
def opj(*args):
path = apply(os.path.join, args)
return os.path.normpath(path)
def opj(*args):
path = apply(os.path.join, args)
return os.path.normpath(path)
for flag in ['BUILD_GLCANVAS', 'BUILD_OGL', 'BUILD_STC', 'BUILD_XRC',
'BUILD_GIZMOS', 'BUILD_DLLWIDGET',
for flag in ['BUILD_GLCANVAS', 'BUILD_OGL', 'BUILD_STC', 'BUILD_XRC',
'BUILD_GIZMOS', 'BUILD_DLLWIDGET',
- 'CORE_ONLY', 'USE_SWIG', 'IN_CVS_TREE',
+ 'CORE_ONLY', 'USE_SWIG', 'IN_CVS_TREE', 'UNICODE',
'FINAL', 'HYBRID', ]:
for x in range(len(sys.argv)):
if string.find(sys.argv[x], flag) == 0:
'FINAL', 'HYBRID', ]:
for x in range(len(sys.argv)):
if string.find(sys.argv[x], flag) == 0:
#----------------------------------------------------------------------
# Setup some platform specific stuff
#----------------------------------------------------------------------
if os.name == 'nt':
# Set compile flags and such for MSVC. These values are derived
#----------------------------------------------------------------------
# Setup some platform specific stuff
#----------------------------------------------------------------------
if os.name == 'nt':
# Set compile flags and such for MSVC. These values are derived
- # from the wxWindows makefiles for MSVC, others will probably
- # vary...
- WXDIR = os.environ['WXWIN']
+ # from the wxWindows makefiles for MSVC, other compilers settings
+ # will probably vary...
+ if os.environ.has_key('WXWIN'):
+ WXDIR = os.environ['WXWIN']
+ else:
+ msg("WARNING: WXWIN not set in environment.")
+ WXDIR = '..' # assumes in CVS tree
elif bcpp_compiling and not FINAL:
cflags = cflags + ['/Od', '/v', '/y']
elif bcpp_compiling and not FINAL:
cflags = cflags + ['/Od', '/v', '/y']
'misc.i', 'misc2.i', 'gdi.i', 'mdi.i', 'controls.i',
'controls2.i', 'cmndlgs.i', 'stattool.i', 'frames.i', 'image.i',
'printfw.i', 'sizers.i', 'clip_dnd.i',
'misc.i', 'misc2.i', 'gdi.i', 'mdi.i', 'controls.i',
'controls2.i', 'cmndlgs.i', 'stattool.i', 'frames.i', 'image.i',
'printfw.i', 'sizers.i', 'clip_dnd.i',
]
swig_sources = run_swig(swig_files, 'src', GENDIR, PKGDIR,
]
swig_sources = run_swig(swig_files, 'src', GENDIR, PKGDIR,
copy_file('src/__init__.py', PKGDIR, update=1, verbose=0)
copy_file('src/__version__.py', PKGDIR, update=1, verbose=0)
copy_file('src/__init__.py', PKGDIR, update=1, verbose=0)
copy_file('src/__version__.py', PKGDIR, update=1, verbose=0)
other_sources = []
swig_sources = run_swig(swig_files, location, GENDIR, PKGDIR,
other_sources = []
swig_sources = run_swig(swig_files, location, GENDIR, PKGDIR,
'oglcanvas.i']
swig_sources = run_swig(swig_files, location, '', PKGDIR,
'oglcanvas.i']
swig_sources = run_swig(swig_files, location, '', PKGDIR,
swig_sources = run_swig(swig_files, location, GENDIR, PKGDIR,
USE_SWIG, swig_force,
swig_args + ['-I'+STC_H, '-I'+location],
swig_sources = run_swig(swig_files, location, GENDIR, PKGDIR,
USE_SWIG, swig_force,
swig_args + ['-I'+STC_H, '-I'+location],
# copy a contrib project specific py module to the main package dir
copy_file(opj(location, 'stc.py'), PKGDIR, update=1, verbose=0)
# copy a contrib project specific py module to the main package dir
copy_file(opj(location, 'stc.py'), PKGDIR, update=1, verbose=0)
stc_defines = defines[:]
stc_defines.append( ('__WX__', None) )
stc_defines.append( ('SCI_LEXER', None) )
stc_defines = defines[:]
stc_defines.append( ('__WX__', None) )
stc_defines.append( ('SCI_LEXER', None) )
'%s/scintilla/src/LexAda.cxx' % STCLOC,
'%s/scintilla/src/LexAVE.cxx' % STCLOC,
'%s/scintilla/src/LexAda.cxx' % STCLOC,
'%s/scintilla/src/LexAVE.cxx' % STCLOC,
'%s/scintilla/src/LexCPP.cxx' % STCLOC,
'%s/scintilla/src/LexConf.cxx' % STCLOC,
'%s/scintilla/src/LexCrontab.cxx' % STCLOC,
'%s/scintilla/src/LexCPP.cxx' % STCLOC,
'%s/scintilla/src/LexConf.cxx' % STCLOC,
'%s/scintilla/src/LexCrontab.cxx' % STCLOC,
'%s/scintilla/src/LexHTML.cxx' % STCLOC,
'%s/scintilla/src/LexLisp.cxx' % STCLOC,
'%s/scintilla/src/LexLua.cxx' % STCLOC,
'%s/scintilla/src/LexHTML.cxx' % STCLOC,
'%s/scintilla/src/LexLisp.cxx' % STCLOC,
'%s/scintilla/src/LexLua.cxx' % STCLOC,
'%s/scintilla/src/LexOthers.cxx' % STCLOC,
'%s/scintilla/src/LexPascal.cxx' % STCLOC,
'%s/scintilla/src/LexPerl.cxx' % STCLOC,
'%s/scintilla/src/LexOthers.cxx' % STCLOC,
'%s/scintilla/src/LexPascal.cxx' % STCLOC,
'%s/scintilla/src/LexPerl.cxx' % STCLOC,
swig_files = ['iewin.i', ]
swig_sources = run_swig(swig_files, location, '', PKGDIR,
swig_files = ['iewin.i', ]
swig_sources = run_swig(swig_files, location, '', PKGDIR,
swig_files = ['xrc.i']
swig_sources = run_swig(swig_files, location, '', PKGDIR,
swig_files = ['xrc.i']
swig_sources = run_swig(swig_files, location, '', PKGDIR,
swig_files = ['gizmos.i']
swig_sources = run_swig(swig_files, location, '', PKGDIR,
swig_files = ['gizmos.i']
swig_sources = run_swig(swig_files, location, '', PKGDIR,
swig_files = ['dllwidget_.i']
swig_sources = run_swig(swig_files, location, '', PKGDIR,
swig_files = ['dllwidget_.i']
swig_sources = run_swig(swig_files, location, '', PKGDIR,
# copy a contrib project specific py module to the main package dir
copy_file(opj(location, 'dllwidget.py'), PKGDIR, update=1, verbose=0)
# copy a contrib project specific py module to the main package dir
copy_file(opj(location, 'dllwidget.py'), PKGDIR, update=1, verbose=0)