Changeset 30614 in webkit


Ignore:
Timestamp:
Feb 26, 2008 5:56:38 PM (16 years ago)
Author:
kevino@webkit.org
Message:

Improvements to the wx build script.

http://bugs.webkit.org/show_bug.cgi?id=17492

Location:
trunk/WebKitTools
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebKitTools/ChangeLog

    r30597 r30614  
     12008-02-26  Robin Dunn <robin@alldunn.com>
     2
     3        Reviewed by Kevin Ollivier.
     4
     5        Improvements to the wx build script.
     6
     7        http://bugs.webkit.org/show_bug.cgi?id=17492
     8
     9        * wx/build-wxwebkit:
     10        - Update the Windows dll copying logic to copy dlls inside WebKitLibraries/win
     11        - Allow the build script to properly find wxPython includes under different setups
     12        - Make sure WX_PREFIX is set to WXWIN (wxWindows dir environment var.) if not defined
     13
    1142008-02-26  Timothy Hatcher  <timothy@apple.com>
    215
  • trunk/WebKitTools/wx/build-wxwebkit

    r29391 r30614  
    4242fi
    4343
    44 WINDEPS="pthreads/lib/pthreadVC2.dll icu/bin/icuuc34.dll icu/bin/icudt34.dll libcurl/*.dll sqlite3/sqlite3.dll"
     44WKWINLIBS=WebKitLibraries/win
     45WINDEPS="         $WKWINLIBS/lib/pthreadVC2.dll"
     46WINDEPS="$WINDEPS $WKWINLIBS/bin/icuuc34.dll $WKWINLIBS/bin/icudt34.dll $WKWINLIBS/bin/icuin34.dll"
     47WINDEPS="$WINDEPS $WKWINLIBS/bin/libcurl.dll $WKWINLIBS/bin/libeay32.dll $WKWINLIBS/bin/ssleay32.dll $WKWINLIBS/bin/zlib1.dll"
     48WINDEPS="$WINDEPS $WKWINLIBS/lib/sqlite3.dll"
     49WINDEPS="$WINDEPS $WKWINLIBS/bin/libxml2.dll $WKWINLIBS/bin/libxslt.dll"
     50WINDEPS="$WINDEPS $WKWINLIBS/bin/iconv.dll"
    4551
    4652# TODO: check that we are running from the root of the source tree...
     
    5763        echo "Error, you must set WXWIN to your wxWidgets root directory."
    5864        exit 1
     65    fi
     66    if [ -z $WX_PREFIX ]; then
     67        WX_PREFIX=$WXWIN
    5968    fi
    6069    if [ -z $BAKEFILE_PATHS ]; then
     
    158167}
    159168
     169# output the first parameter that is a dir and exists
     170function find_existing_dir {
     171    for arg in $*; do
     172        tester=$arg
     173        if [ $OSTYPE == cygwin ]; then
     174            tester=`cygpath -u $arg`
     175        fi
     176        if [ -d $tester ]; then
     177            echo $arg
     178            return
     179        fi
     180    done
     181}
     182
     183
    160184olddir=$PWD
    161185
     
    231255    fi
    232256   
    233     PLATFORM_OS="win"
    234     if [ "${OSTYPE:0:6}" == "darwin" ]; then
     257    if [ "${OSTYPE:0:6}" == "cygwin" ]; then
     258        PLATFORM_OS="win"
     259    elif [ "${OSTYPE:0:6}" == "darwin" ]; then
    235260        PLATFORM_OS="mac"
    236261    else
     
    277302                WEBKIT_INCLUDE="-I`cygpath -d $WK_ROOT/WebKit/wx`"
    278303            fi
    279             $SWIG $SWIG_FLAGS -I$WX_PREFIX/include/wx-2.8/wx/wxPython/i_files $WEBKIT_INCLUDE -o webview.cpp webview.i
    280             #$SWIG -I$WX_PREFIX/include/wx-2.8/wx/wxPython/i_files $WEBKIT_INCLUDE -xml -o webview.xml webview.i
    281                        
    282            
    283             PY_INCLUDE=`python -c "import distutils.sysconfig; print distutils.sysconfig.get_python_inc()"`
    284             PY_VERSION=`python -c "import sys;  print str(sys.version_info[0]) + str(sys.version_info[1])"`
     304           
     305            # Determine which include path to use for wxPython's *.i files
     306            # Options are:
     307            #    wxPython installed on a posix system
     308            #    the wxPython win32 devel tarball
     309            #    a wx source tree from a tarball where wxPython is in the wx dir
     310            #    a wx source tree from SVN where wxPython is a sibling of the wx dir
     311            WXPY_INCLUDE=`find_existing_dir \
     312                $WX_PREFIX/include/wx-2.8/wx/wxPython/i_files \
     313                $WX_PREFIX/include/wx/wxPython/i_files \
     314                $WX_PREFIX/wxPython/src \
     315                $WX_PREFIX/../wxPython/src`
     316            if [ -z $WXPY_INCLUDE ]; then
     317                echo "ERROR: Unable to find wxPython's *.i files"
     318                exit 1
     319            fi
     320           
     321            # Run SWIG
     322            $SWIG $SWIG_FLAGS -I$WXPY_INCLUDE $WEBKIT_INCLUDE -o webview.cpp webview.i
     323                                   
     324            PY_INCLUDE=`python -c "import sys,distutils.sysconfig; sys.stdout.write(distutils.sysconfig.get_python_inc())"`
     325            PY_VERSION=`python -c "import sys;  sys.stdout.write(str(sys.version_info[0]) + str(sys.version_info[1]))"`
    285326            PY_LIBDIR=`python -c "import distutils.sysconfig; import sys; sys.stdout.write(distutils.sysconfig.PREFIX)"`
    286327           
     
    291332            fi
    292333           
    293             do_make $WK_ROOT/WebKit/wx/bindings/python  "-DBUILDING_WX__=1 -DWXUSINGDLL=1 -DWXUSINGDLL_WEBKIT=1 -I$PY_INCLUDE $WXGC_DEFINE" \
    294                     WX_DEBUG=$wxdebug WEBKIT_ROOT=$WK_ROOTDIR PLATFORM_OS=$PLATFORM_OS PYTHON_VERSION=$PY_VERSION PYTHON_LIBDIR=$PY_LIBDIR $other_args
     334            do_make $WK_ROOT/WebKit/wx/bindings/python "-DBUILDING_WX__=1 -DWXUSINGDLL=1 -DWXUSINGDLL_WEBKIT=1 -I$PY_INCLUDE -I$WX_PREFIX/wxPython/include -I$WX_PREFIX/../wxPython/include $WXGC_DEFINE" \
     335                WX_DEBUG=$wxdebug WEBKIT_ROOT=$WK_ROOTDIR PLATFORM_OS=$PLATFORM_OS PYTHON_VERSION=$PY_VERSION PYTHON_LIBDIR=$PY_LIBDIR $other_args
    295336            if [ "${OSTYPE:0:6}" == "cygwin" ]; then
    296337                if [ -f $WEBKITOUTPUTDIR/_webview.pyd -a -f $WEBKITOUTPUTDIR/_webview.dll ]; then
     
    305346            echo "Copying necessary DLLs to run test and sample applications..."
    306347            cd $WK_ROOT
    307             cp $WINDEPS $WEBKITOUTPUTDIR
     348            cp $WINDEPS `cygpath -u $WEBKITOUTPUTDIR`
     349            chmod +x `cygpath -u $WEBKITOUTPUTDIR/`*.dll
    308350        fi
    309351       
Note: See TracChangeset for help on using the changeset viewer.