|
From: Marcel T. <te...@us...> - 2004-10-25 13:37:03
|
Update of /cvsroot/openwince/tools/ibisa/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20263/src Modified Files: owce-config owce-install owce-run Log Message: 2004-10-25 Marcel Telka <ma...@te...> * src/owce-config: Added support for CEPBDir into openwince configurations. * src/owce-install: Ditto. * src/owce-run: Ditto. Index: owce-install =================================================================== RCS file: /cvsroot/openwince/tools/ibisa/src/owce-install,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- owce-install 4 Nov 2003 15:34:40 -0000 1.4 +++ owce-install 25 Oct 2004 13:36:53 -0000 1.5 @@ -3,6 +3,7 @@ # $Id$ # # Copyright (C) 2003 ETC s.r.o. +# Copyright (C) 2004 Elcom s.r.o. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License @@ -19,7 +20,7 @@ # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # -# Written by Marcel Telka <ma...@te...>, 2003. +# Written by Marcel Telka <ma...@te...>, 2003, 2004. # CFGROOT=~/.openwince @@ -41,8 +42,9 @@ _WINCEROOT=$1 mkdir -p "$CFGROOT" +[ ! -d "$CFGROOT" ] && echo "Unable to create '$CFGROOT'." && exit 1 OWCECFG=$(basename $(mktemp -d "$CFGROOT/ibisa.XXXXXX")) -owce-config $OWCECFG $_WINCEROOT NOCPU COMMON NOPLAT +owce-config $OWCECFG $_WINCEROOT NOCPU COMMON NOPLAT $_WINCEROOT VER=`owce-run $OWCECFG echo \\$_WINCEOSVER` owce-config -d $OWCECFG > /dev/null Index: owce-run =================================================================== RCS file: /cvsroot/openwince/tools/ibisa/src/owce-run,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- owce-run 16 Mar 2004 07:05:44 -0000 1.11 +++ owce-run 25 Oct 2004 13:36:53 -0000 1.12 @@ -3,6 +3,7 @@ # $Id$ # # Copyright (C) 2003 ETC s.r.o. +# Copyright (C) 2004 Elcom s.r.o. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License @@ -31,6 +32,7 @@ -h Display this help configname Open openwince window for this configuration +configname ... Run specified command with parameters in the configname context EOF } @@ -74,8 +76,15 @@ && echo "Configuration '$OWCE_CFGNAME' is not valid. Please run \`owce-config -l \"$OWCE_CFGNAME\"\`" \ && exit 1 +CEPBDir= +[ -f "$OWCE_CFGNAME/CEPBDir" ] && CEPBDir=`cat "$OWCE_CFGNAME/CEPBDir"` +[ -z "$CEPBDir" ] \ + && echo "Configuration '$OWCE_CFGNAME' is not valid. Please run \`owce-config -l \"$OWCE_CFGNAME\"\`" \ + && exit 1 + WINCEBAT=`cygpath -w "$_WINCEROOT/public/common/oak/misc/wince.bat"` export _WINCEROOT=`cygpath -w "$_WINCEROOT"` +export CEPBDir=`cygpath -w "$CEPBDir"` TMP1=`mktemp /tmp/owce.XXXXXX` TMP1_W=`cygpath -w $TMP1` TMP2=`mktemp /tmp/owce.XXXXXX` Index: owce-config =================================================================== RCS file: /cvsroot/openwince/tools/ibisa/src/owce-config,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- owce-config 4 Nov 2003 15:34:40 -0000 1.4 +++ owce-config 25 Oct 2004 13:36:53 -0000 1.5 @@ -3,6 +3,7 @@ # $Id$ # # Copyright (C) 2003 ETC s.r.o. +# Copyright (C) 2004 Elcom s.r.o. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License @@ -19,14 +20,14 @@ # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # -# Written by Marcel Telka <ma...@te...>, 2003. +# Written by Marcel Telka <ma...@te...>, 2003, 2004. # CFGROOT=~/.openwince help() { cat <<EOF -Usage: owce-config [option] [configname [_WINCEROOT _TGTCPU _TGTPROJ _TGTPLAT]] +Usage: owce-config [option] [configname [_WINCEROOT _TGTCPU _TGTPROJ _TGTPLAT CEPBDir]] Handle openwince configurations Valid parameter combinations: @@ -34,6 +35,7 @@ -l List all available configurations -l configname Display settings for configname configname Run interactive configuration for configname + configname ... Create configuration for configname (non-interactive) -d configname Delete specified configuration EOF } @@ -66,11 +68,12 @@ [ "$#" -gt "0" ] && OWCE_CFGNAME="$1" && shift -if [ "$OWCE_CFGNAME" -a -z "$OWCE_LIST$OWCE_DEL" -a "$#" -eq "4" ] ; then +if [ "$OWCE_CFGNAME" -a -z "$OWCE_LIST$OWCE_DEL" -a "$#" -eq "5" ] ; then _WINCEROOT="$1" _TGTCPU="$2" _TGTPROJ="$3" _TGTPLAT="$4" + CEPBDir="$5" else [ "$#" -gt "0" ] && help && exit 1 fi @@ -81,6 +84,7 @@ fi mkdir -p "$CFGROOT" +[ ! -d "$CFGROOT" ] && echo "Unable to create '$CFGROOT'." && exit 1 cd "$CFGROOT" # -l @@ -106,6 +110,7 @@ printconfig "$OWCE_CFGNAME" _TGTCPU printconfig "$OWCE_CFGNAME" _TGTPROJ printconfig "$OWCE_CFGNAME" _TGTPLAT + printconfig "$OWCE_CFGNAME" CEPBDir exit 0 fi @@ -124,11 +129,12 @@ mkdir -p "$OWCE_CFGNAME" fi -if [ "$#" -eq "4" ] ; then +if [ "$#" -eq "5" ] ; then echo "`cygpath "$_WINCEROOT"`" > "$OWCE_CFGNAME/_WINCEROOT" echo "$_TGTCPU" > "$OWCE_CFGNAME/_TGTCPU" echo "$_TGTPROJ" > "$OWCE_CFGNAME/_TGTPROJ" echo "$_TGTPLAT" > "$OWCE_CFGNAME/_TGTPLAT" + echo "$CEPBDir" > "$OWCE_CFGNAME/CEPBDir" exit 0 fi @@ -197,3 +203,31 @@ done echo "$R" > "$OWCE_CFGNAME/_TGTPLAT" + + +# configure CEPBDir +CED= +[ -f "$OWCE_CFGNAME/CEPBDir" ] && CED=`cat "$OWCE_CFGNAME/CEPBDir"` +if [ "$CED" ] ; then + echo "CEPBDir for openwince is set to '$CED' (`cygpath -w "$CED"`)" +else + echo "CEPBDir for openwince is not set" +fi + +if [ "$CEPBDir" ] ; then + CED=`cygpath "$CEPBDir"` + echo "CEPBDir environment variable is set to '$CEPBDir' ($CED)" +else + echo "CEPBDir environment variable is not set" +fi + +CED1= +while [ -z "$CED1" ] ; do + read -e -p "Enter CEPBDir value for openwince [$CED]: " CED1 + [ -z "$CED1" ] && CED1="$CED" + [ "$CED1" -a ! -d "$CED1" ] && echo "'$CED1' is not a directory" && CED1= +done + +CED=`cygpath "$CED1"` +echo "Configuring CEPBDir for openwince to '$CED'" +echo "$CED" > "$OWCE_CFGNAME/CEPBDir" |