# flags and values that affect this script
#----------------------------------------------------------------------
-VERSION = "2.3.3pre"
+VERSION = "2.3.3pre2"
DESCRIPTION = "Cross platform GUI toolkit for Python"
AUTHOR = "Robin Dunn"
AUTHOR_EMAIL = "Robin Dunn <robin@alldunn.com>"
USE_SWIG = 0 # Should we actually execute SWIG, or just use the
# files already in the distribution?
-USE_UNICODE = 0 # This will pass the 'wxUSE_UNICODE' flag to SWIG.
- # At the moment only tested for 'CORE_ONLY = 1'
+UNICODE = 0 # This will pass the 'wxUSE_UNICODE' flag to SWIG and
+ # will ensure that the right headers are found and the
+ # right libs are linked.
IN_CVS_TREE = 0 # Set to true if building in a full wxWindows CVS
# tree, otherwise will assume all needed files are
# version of wx-config or alternate flags,
# eg. as required by the .deb in-tree build.
+BUILD_BASE = "build"
+
# 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.)
-WXDLLVER = '233' # Version part of DLL name
+WXDLLVER = '233' # Version part of wxWindows DLL name
#----------------------------------------------------------------------
if __name__ == "__main__":
print text
+
def opj(*args):
path = apply(os.path.join, args)
return os.path.normpath(path)
+
def libFlag():
if FINAL:
rv = ''
rv = 'h'
else:
rv = 'd'
- if USE_UNICODE:
+ if UNICODE:
rv = 'u' + rv
return rv
for flag in ['BUILD_GLCANVAS', 'BUILD_OGL', 'BUILD_STC', 'BUILD_XRC',
'BUILD_GIZMOS', 'BUILD_DLLWIDGET',
- 'CORE_ONLY', 'USE_SWIG', 'IN_CVS_TREE', 'USE_UNICODE',
+ '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:
BUILD_DLLWIDGET = 0
-if USE_UNICODE and os.name != 'nt':
+if UNICODE and os.name != 'nt':
print "UNICODE is currently only supported on Win32"
sys.exit()
+
+if UNICODE:
+ BUILD_BASE = BUILD_BASE + '.unicode'
+
+
#----------------------------------------------------------------------
# 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
WXPLAT = '__WXMSW__'
GENDIR = 'msw'
elif bcpp_compiling and not FINAL:
cflags = cflags + ['/Od', '/v', '/y']
- lflags = lflags + ['/v', ] ## '/PDB:NONE']
+ lflags = lflags + ['/v', ]
#'-docstring', '-Sbefore',
'-I./src', '-D'+WXPLAT,
]
-if USE_UNICODE:
+if UNICODE:
swig_args.append('-DwxUSE_UNICODE')
swig_deps = ['src/my_typemaps.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',
- 'filesys.i', 'streams.i', 'utils.i'
+ 'filesys.i', 'streams.i', 'utils.i', 'fonts.i'
]
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/wxc.pyd.manifest', PKGDIR, update=1, verbose=0)
if IN_CVS_TREE: # update the licence files
mkpath('licence')
other_sources = []
swig_sources = run_swig(swig_files, location, GENDIR, PKGDIR,
- USE_SWIG, swig_force, swig_args)
+ USE_SWIG, swig_force, swig_args, swig_deps)
gl_libs = []
if os.name == 'posix':
'oglcanvas.i']
swig_sources = run_swig(swig_files, location, '', PKGDIR,
- USE_SWIG, swig_force, swig_args)
+ USE_SWIG, swig_force, swig_args, swig_deps)
if IN_CVS_TREE:
# make sure local copy of contrib files are up to date
swig_sources = run_swig(swig_files, location, GENDIR, PKGDIR,
USE_SWIG, swig_force,
swig_args + ['-I'+STC_H, '-I'+location],
- [opj(STC_H, 'stc.h')])
+ [opj(STC_H, 'stc.h')] + swig_deps)
# 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.append( ('LINK_LEXERS', None) )
ext = Extension('stc_c',
'%s/scintilla/src/LexAda.cxx' % STCLOC,
'%s/scintilla/src/LexAVE.cxx' % STCLOC,
+ '%s/scintilla/src/LexBaan.cxx' % STCLOC,
+ '%s/scintilla/src/LexBullant.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/LexMatlab.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,
- USE_SWIG, swig_force, swig_args)
+ USE_SWIG, swig_force, swig_args, swig_deps)
ext = Extension('iewinc', ['%s/IEHtmlWin.cpp' % location,
swig_files = ['xrc.i']
swig_sources = run_swig(swig_files, location, '', PKGDIR,
- USE_SWIG, swig_force, swig_args)
+ USE_SWIG, swig_force, swig_args, swig_deps)
xmlres_includes = includes[:]
xmlres_includes.append('%s/expat/xmlparse' % XMLLOC)
swig_files = ['gizmos.i']
swig_sources = run_swig(swig_files, location, '', PKGDIR,
- USE_SWIG, swig_force, swig_args)
+ USE_SWIG, swig_force, swig_args, swig_deps)
gizmos_includes = includes[:]
gizmos_includes.append(GIZMOINC)
swig_files = ['dllwidget_.i']
swig_sources = run_swig(swig_files, location, '', PKGDIR,
- USE_SWIG, swig_force, swig_args)
+ USE_SWIG, swig_force, swig_args, swig_deps)
# copy a contrib project specific py module to the main package dir
copy_file(opj(location, 'dllwidget.py'), PKGDIR, update=1, verbose=0)
ext_package = PKGDIR,
ext_modules = wxpExtensions,
+ options = { 'build' : { 'build_base' : BUILD_BASE }}
+
##data_files = TOOLS,
)