#!/bin/bash # This stuff forces us to not reset the environment variables more # than once. It would cause some vars to get longer than 127 chars # (the longest possible batch line) to run this stuff more than once. if [ "$1" != "-force" ]; then if [ "$MOZSETENV" = "ARMDEVICE" ]; then echo "environment already set up for Pocket PC" exit 0 fi fi echo setting up environment... export MOZSETENV=ARMDEVICE export HOME="C:\builds" export MOZ_TOOLS="C:\builds\moztools\vc7.jvw" # jc@jcomeau.com added current cygwin path to make sure we have all commands export PATH="$(cygpath -pu "C:\WINDOWS;C:\WINDOWS\System32\Wbem"):$PATH" export PATH="$(cygpath -pu "C:\WINDOWS\system32"):$PATH" export PATH="$(cygpath -pu "$MOZ_TOOLS\bin;c:\builds\wince\tools"):$PATH" export PLATFORM="POCKET PC 2003" export WCEROOT="C:\Program Files\Microsoft eMbedded C++ 4.0" export SDKROOT="C:\Program Files\Windows CE Tools" # "c:\Program Files\Microsoft eMbedded C++ 4.0\EVC\wce420\bin\WCEARMV4.BAT" # Set environment for the ARMV4 target # This batch file serves as a template only. # Title WCE ARMV4 Environment cat </dev/null This batch file sets up an environment for building for a specific CPU from the command line. The build environment defaults to the SDK for Pocket PC 2003 platform. The macros that control the platform are: PLATFORM, OSVERSION, WCEROOT and SDKROOT. The SDK for Pocket PC 2003 default settings are as follows: PLATFORM=POCKET PC 2003 OSVERSION=WCE420 WCEROOT=C:\Windows CE Tools //Root dir for VCCE SDKROOT=C:\Windows CE Tools //Root dir for Pocket PC 2003 SDK The batch file uses these macros to set the PATH, INCLUDE, LIB macros for the default platform. Please note that if the default setup options were altered during installation (for example, if the install directories were changed), then the user needs to modify these macros accordingly. EOT [ "$OSVERSION" = "" ] && export OSVERSION=WCE420 [ "$PLATFORM" = "" ] && export PLATFORM="POCKET PC 2003" [ "$WCEROOT" = "" ] && \ export WCEROOT="C:\Program Files\Microsoft eMbedded C++ 4.0" [ "$SDKROOT" = "" ] && export SDKROOT="C:\Windows CE Tools\eVC4" export PATH="$(cygpath -pu "$WCEROOT\EVC\\$OSVERSION\bin"):$PATH" export PATH="$(cygpath -pu "$WCEROOT\COMMON\EVC\bin"):$PATH" export INCLUDE="$SDKROOT\\$OSVERSION\\$PLATFORM\include\ARMV4" export INCLUDE="$INCLUDE;$SDKROOT\\$OSVERSION\\$PLATFORM\MFC\include" export INCLUDE="$INCLUDE;$SDKROOT\\$OSVERSION\\$PLATFORM\ATL\include" export LIB="$SDKROOT\\$OSVERSION\\$PLATFORM\lib\ARMV4" export LIB="$LIB;$SDKROOT\\$OSVERSION\\$PLATFORM\MFC\lib\ARMV4" export LIB="$LIB;$SDKROOT\\$OSVERSION\\$PLATFORM\ATL\lib\ARMV4" export CC=clarm.exe export TARGETCPU=ARMV4 export CFG=none # end of imported batch file export CC= doskey # if this isn't set properly your build will get # "file './config/WIN' not found" export MOZ_BITS=32 export MOZ_GOLD=1 export MOZ_MEDIUM=1 export NO_SECURITY=1 export NSPR20=1 # don't set this if you want to make an optimized release build export MOZ_DEBUG=1 # set if running NT 3.51, don't set otherwise # set MOZ_NT=351 # top of your tree, drive letter and path, i.e. set c:\builds\wince. # The topmost directory under this should be mozilla export MOZ_SRC=c:/builds/wince/mozilla export TOPSRCDIR=C:/builds/wince/mozilla # location of resulting executable and totally optional. # If you don't set this, mozilla.exe will be generated into # mozilla\cmd\winfe\mkfiles32\x86dbg (or x86rel for optimized builds) export MOZ_OUT="$TOPSRCDIR/../arm_ppc" export MOZCONFIG=/cygdrive/c/builds/arm_ppc_mozconfig # location of the bin directory containing your GNU tools. The build # looks for MOZ_TOOLS\bin\gmake.exe, so after you download and unpack # wintools.zip, make some directory called "bin", put your new # uname.exe, shmsdos.exe, and gmake.exe in it, and set MOZ_TOOLS to # the place where you put it. export MOZ_TOOLS="c:\builds\MozTools\vc7.jvw" # where to find cp.exe and rm.exe, aka gnu tools for windows export gnuTools="c:\cygwin\bin" export HOME="C:\builds" export HOMEDRIVE=C: export GLIB_PREFIX="$MOZ_TOOLS\vc7.jvw" export LIBIDL_PREFIX="$MOZ_TOOLS\vc7.jvw" cp -f wince/tools/arm_ppc_tools/* wince/tools chmod 777 wince/tools/*.exe