mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2025-12-15 17:20:07 +01:00
Move the Cygwin location code into a function
Add a note to README about the need for Cygwin
This commit is contained in:
16
README.rst
16
README.rst
@@ -55,12 +55,18 @@ decoding errors. For example::
|
||||
chcp 1252
|
||||
python build.py <build commands>...
|
||||
|
||||
In addition, some tasks within the build currently expect to be able to use
|
||||
Cygwin on Windows (https://www.cygwin.com/) to do its work. If you have
|
||||
Cygwin installed in one of the default locations (c:\cygwin or c:\cygwin64)
|
||||
then all is well. If you have it installed somewhere else then you can set
|
||||
CYGWIN_BASE in the environment and the build tool will use that for the base
|
||||
dir.
|
||||
|
||||
If you just want to do a standard setuptools-style build using setup.py and
|
||||
are using a full source tarball, then you can stop reading at this point. If
|
||||
you want to build from a source repository checkout, or need to make changes
|
||||
and/or to regenerate some of the generated source files, then please continue
|
||||
reading.
|
||||
On the other hand, if you just want to do a standard setuptools-style build
|
||||
using setup.py and are using a full source tarball, then you can stop reading
|
||||
at this point. If you want to build from a source repository checkout, or
|
||||
need to make changes and/or to regenerate some of the generated source files,
|
||||
then please continue reading.
|
||||
|
||||
|
||||
Building wxWidgets
|
||||
|
||||
28
build.py
28
build.py
@@ -85,13 +85,6 @@ doxygenMD5 = {
|
||||
# And the location where they can be downloaded from
|
||||
toolsURL = 'http://wxpython.org/Phoenix/tools'
|
||||
|
||||
# Cygwin is needed on Windows. This tool assumes it is installed in
|
||||
# the default location. Try to at least guess if we are using 32 bit
|
||||
# or 64 bit builds.
|
||||
if isWindows:
|
||||
cygwin_path_32 = 'c:/cygwin'
|
||||
cygwin_path_64 = 'c:/cygwin64'
|
||||
cygwin_path = cygwin_path_64 if os.path.isdir(cygwin_path_64) else cygwin_path_32
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
@@ -248,7 +241,7 @@ def setPythonVersion(args):
|
||||
#
|
||||
TOOLS = os.environ.get('TOOLS')
|
||||
if 'cygdrive' in TOOLS:
|
||||
TOOLS = runcmd(cygwin_path+'/bin/cygpath -w '+TOOLS, True, False)
|
||||
TOOLS = runcmd(getCygwinPath()+'/bin/cygpath -w '+TOOLS, True, False)
|
||||
use64flag = '--x64' in args
|
||||
if use64flag:
|
||||
args.remove('--x64')
|
||||
@@ -715,6 +708,24 @@ def getWafBuildBase():
|
||||
return base
|
||||
|
||||
|
||||
def getCygwinPath():
|
||||
"""
|
||||
Try to locate the path where cygwin is installed.
|
||||
|
||||
If CYGWIN_BASE is set in the environment then use that. Otherwise look in
|
||||
default install locations.
|
||||
"""
|
||||
if os.environ.get('CYGWIN_BASE'):
|
||||
return os.environ.get('CYGWIN_BASE')
|
||||
|
||||
for path in ['c:/cygwin', 'c:/cygwin64']:
|
||||
if os.path.isdir(path):
|
||||
return path
|
||||
|
||||
return None
|
||||
|
||||
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Command functions and helpers
|
||||
#---------------------------------------------------------------------------
|
||||
@@ -725,6 +736,7 @@ def _doDox(arg):
|
||||
doxCmd = os.path.abspath(doxCmd)
|
||||
|
||||
if isWindows:
|
||||
cygwin_path = getCygwinPath()
|
||||
doxCmd = doxCmd.replace('\\', '/')
|
||||
doxCmd = runcmd(cygwin_path+'/bin/cygpath -u '+doxCmd, True, False)
|
||||
os.environ['DOXYGEN'] = doxCmd
|
||||
|
||||
Reference in New Issue
Block a user