2007-12-21 18:21 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/bin/pack_src.sh
* try to detect GNU tar
* harbour/make_xmingw.sh
* added new default location for MinGW cross-compiler in Gentoo
distribution
* added auto detection of MinGW cross-compiler installation which
should work in most cases when default location test fails
* harbour/make_tgz.sh
* try to detect GNU make and GNU tar
* harbour/source/rtl/gtwvt/gtwvt.c
* call hb_gt_wvt_InitWindow explicitly to eliminate problems
with ignored WM_CREATE message when new window handler is not
yet registered
This commit is contained in:
@@ -8,6 +8,24 @@
|
||||
2002-12-01 13:30 UTC+0100 Foo Bar <foo.bar@foobar.org>
|
||||
*/
|
||||
|
||||
2007-12-21 18:21 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
|
||||
* harbour/bin/pack_src.sh
|
||||
* try to detect GNU tar
|
||||
|
||||
* harbour/make_xmingw.sh
|
||||
* added new default location for MinGW cross-compiler in Gentoo
|
||||
distribution
|
||||
* added auto detection of MinGW cross-compiler installation which
|
||||
should work in most cases when default location test fails
|
||||
|
||||
* harbour/make_tgz.sh
|
||||
* try to detect GNU make and GNU tar
|
||||
|
||||
* harbour/source/rtl/gtwvt/gtwvt.c
|
||||
* call hb_gt_wvt_InitWindow explicitly to eliminate problems
|
||||
with ignored WM_CREATE message when new window handler is not
|
||||
yet registered
|
||||
|
||||
2007-12-21 18:00 UTC+0200 Mindaugas Kavaliauskas (dbtopas/at/dbtopas.lt)
|
||||
* harbour/source/lang/msgltwin.c
|
||||
* month name typo
|
||||
|
||||
@@ -4,8 +4,19 @@
|
||||
#
|
||||
# This script requires "TAR" utilities for compression.
|
||||
|
||||
hb_archbin="tar"
|
||||
hb_archopt="-cz --ignore-failed-read -f"
|
||||
if tar --version >/dev/null 2>&1; then
|
||||
hb_archbin="tar"
|
||||
hb_gnutar="yes"
|
||||
elif gtar --version >/dev/null 2>&1; then
|
||||
hb_archbin="gtar"
|
||||
hb_gnutar="yes"
|
||||
else
|
||||
hb_archbin="tar"
|
||||
hb_gnutar="no"
|
||||
echo "Warning!!! Cannot find GNU TAR"
|
||||
fi
|
||||
|
||||
hb_archopt="-czf"
|
||||
hb_ext=".tar.gz"
|
||||
if [ -f bin/hb-func.sh ]; then
|
||||
hb_rootdir="."
|
||||
|
||||
@@ -123,18 +123,19 @@ case "$HB_ARCHITECTURE" in
|
||||
esac
|
||||
|
||||
# Select the platform-specific command names
|
||||
INSTALL=install
|
||||
MAKE=make
|
||||
TAR=tar
|
||||
case "$HB_ARCHITECTURE" in
|
||||
darwin)
|
||||
gtar --version >/dev/null 2>&1 && TAR=gtar
|
||||
INSTALL="install -c"
|
||||
;;
|
||||
bsd|hpux)
|
||||
MAKE=gmake
|
||||
;;
|
||||
esac
|
||||
|
||||
if gtar --version >/dev/null 2>&1; then
|
||||
TAR=gtar
|
||||
if ! tar --version >/dev/null 2>&1; then
|
||||
echo "Warning!!! Cannot find GNU TAR"
|
||||
fi
|
||||
if gmake --version >/dev/null 2>&1; then
|
||||
MAKE=gmake
|
||||
if ! make --version >/dev/null 2>&1; then
|
||||
echo "Warning!!! Cannot find GNU MAKE"
|
||||
fi
|
||||
|
||||
# Set other platform-specific build options
|
||||
if [ -z "$HB_GPM_MOUSE" ]; then
|
||||
@@ -240,7 +241,8 @@ fi
|
||||
if [ "${hb_sysdir}" = "yes" ]; then
|
||||
|
||||
mkdir -p $HB_INST_PREF$ETC/harbour
|
||||
$INSTALL -m644 source/rtl/gtcrs/hb-charmap.def $HB_INST_PREF$ETC/harbour/hb-charmap.def
|
||||
cp -f source/rtl/gtcrs/hb-charmap.def $HB_INST_PREF$ETC/harbour/hb-charmap.def
|
||||
chmod 644 $HB_INST_PREF$ETC/harbour/hb-charmap.def
|
||||
|
||||
cat > $HB_INST_PREF$ETC/harbour.cfg <<EOF
|
||||
CC=${CCPREFIX}gcc
|
||||
|
||||
@@ -25,28 +25,63 @@ export C_USR="$CC_C_USR $C_USR"
|
||||
export CC_PRG_USR="-D__PLATFORM__Windows -undef:__PLATFORM__UNIX -undef:__PLATFORM__$UNAME"
|
||||
export PRG_USR="$CC_PRG_USR $PRG_USR"
|
||||
|
||||
# try to detect MinGW cross-compiler location
|
||||
# using some default platform settings
|
||||
if [ -f /etc/debian-version ]; then
|
||||
MINGW_PREFIX=/usr
|
||||
TARGET=i586-mingw32msvc
|
||||
CCPREFIX="$TARGET-"
|
||||
elif [ -f /etc/gentoo-release ]; then
|
||||
MINGW_PREFIX=/opt/xmingw
|
||||
TARGET=i386-mingw32msvc
|
||||
if [ -x /opt/xmingw/bin/i686-mingw32-gcc ]; then
|
||||
MINGW_PREFIX=/opt/xmingw
|
||||
TARGET=i386-mingw32msvc
|
||||
else
|
||||
MINGW_PREFIX=/usr
|
||||
TARGET=i686-mingw32
|
||||
fi
|
||||
CCPREFIX="$TARGET-"
|
||||
elif [ "$UNAME" = "FreeBSD" ]; then
|
||||
MINGW_PREFIX=/usr/local/mingw32
|
||||
TARGET="."
|
||||
CCPREFIX=""
|
||||
UNAMEL=bsd
|
||||
elif find /usr/local/bin -maxdepth 1 -name "i[3456]86-mingw*-gcc" &>/dev/null; then
|
||||
elif [ -x /usr/local/bin/i[3456]86-mingw*-gcc ]; then
|
||||
MINGW_PREFIX=/usr/local
|
||||
TARGET=`find /usr/local/bin -maxdepth 1 -name "i[3456]86-mingw*-gcc" |sed -e '1 !d' -e 's/.*\(i[3456]86-mingw[^-]*\).*/\1/g'`
|
||||
TARGET=`echo /usr/local/bin/i[3456]86-mingw*-gcc|sed -e '1 !d' -e 's/.*\(i[3456]86-mingw[^-]*\).*/\1/g'`
|
||||
CCPREFIX="$TARGET-"
|
||||
else
|
||||
fi
|
||||
|
||||
if [ -z "${MINGW_PREFIX}" ] || \
|
||||
( [ ! -x ${MINGW_PREFIX}/bin/${CCPREFIX}gcc ] && \
|
||||
[ ! -x ${MINGW_PREFIX}/${TARGET}/bin/${CCPREFIX}gcc ] ); then
|
||||
# MinGW cross-compiler not found in default location
|
||||
# scan some usually used locations and names
|
||||
for d in /usr /usr/local /usr/local/mingw32 /opt/xmingw; do
|
||||
if [ -z "${MINGW_PREFIX}" ] && [ -d $d/bin ]; then
|
||||
MINGWGCC=`echo $d/bin/i[3456]86-mingw*-gcc`
|
||||
if [ -x $MINGWGCC ]; then
|
||||
MINGW_PREFIX=$d
|
||||
TARGET=`echo "$MINGWGCC"|sed -e '1 !d' -e 's/.*\(i[3456]86-mingw[^-]*\).*/\1/g'`
|
||||
CCPREFIX="$TARGET-"
|
||||
else
|
||||
MINGWGCC=`echo $d/i[3456]86-mingw*/gcc`
|
||||
if [ -x $MINGWGCC ]; then
|
||||
MINGW_PREFIX=$d
|
||||
TARGET=`echo "$MINGWGCC"|sed -e '1 !d' -e 's!.*\(i[3456]86-mingw[^/]*\).*!\1!g'`
|
||||
CCPREFIX=""
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
if [ ! -x ${MINGW_PREFIX}/bin/${CCPREFIX}gcc ] && \
|
||||
[ ! -x ${MINGW_PREFIX}/${TARGET}/bin/${CCPREFIX}gcc ]; then
|
||||
echo "Can't determine the location for the MinGW32 cross-compiler."
|
||||
echo "Please install it or add your platform to the $0 script."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
CCPATH="$MINGW_PREFIX/bin:$MINGW_PREFIX/$TARGET/bin:"
|
||||
PATH="$CCPATH$PATH"
|
||||
|
||||
@@ -58,11 +93,11 @@ export HB_HOST_BUILD="lib"
|
||||
|
||||
export HB_BIN_COMPILE=/tmp/hb-xmingw-$$
|
||||
rm -fR "${HB_BIN_COMPILE}"
|
||||
trap cleanup EXIT &>/dev/null
|
||||
trap cleanup EXIT >/dev/null 2>&1
|
||||
mkdir ${HB_BIN_COMPILE}
|
||||
|
||||
DIR=`cd $(dirname $0);pwd`
|
||||
if which harbour &> /dev/null; then
|
||||
if which harbour > /dev/null 2>&1; then
|
||||
HB_COMP_PATH=`which harbour 2> /dev/null`
|
||||
else
|
||||
HB_COMP_PATH="$DIR/source/main/$UNAMEL/gcc/harbour"
|
||||
|
||||
@@ -247,6 +247,7 @@ static HFONT hb_gt_wvt_GetFont( char * pszFace, int iHeight, int iWidth, int iWe
|
||||
{
|
||||
LOGFONT logfont;
|
||||
|
||||
memset( &logfont, 0, sizeof( LOGFONT ) );
|
||||
logfont.lfEscapement = 0;
|
||||
logfont.lfOrientation = 0;
|
||||
logfont.lfWeight = iWeight;
|
||||
@@ -342,6 +343,7 @@ static void hb_gt_wvt_ResetWindowSize( PHB_GTWVT pWVT )
|
||||
wi.top = rcWorkArea.top + ( ( rcWorkArea.bottom - rcWorkArea.top - height ) / 2 );
|
||||
}
|
||||
SetWindowPos( pWVT->hWnd, NULL, wi.left, wi.top, width, height, SWP_NOZORDER );
|
||||
HB_GTSELF_EXPOSEAREA( pWVT->pGT, 0, 0, pWVT->ROWS, pWVT->COLS );
|
||||
}
|
||||
|
||||
static void hb_gt_wvt_SetWindowTitle( HWND hWnd, char * title )
|
||||
@@ -1232,6 +1234,7 @@ static HWND hb_gt_wvt_CreateWindow( HINSTANCE hInstance, HINSTANCE hPrevInstance
|
||||
{
|
||||
MessageBox( NULL, TEXT( "Failed to create window." ),
|
||||
TEXT( "HARBOUR_WVT" ), MB_ICONERROR );
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -1286,6 +1289,8 @@ static void hb_gt_wvt_Init( PHB_GT pGT, FHANDLE hFilenoStdin, FHANDLE hFilenoStd
|
||||
hb_errInternal( 10001, "WINAPI CreateWindow() failed", "", "" );
|
||||
}
|
||||
|
||||
hb_gt_wvt_InitWindow( pWVT, WVT_DEFAULT_ROWS, WVT_DEFAULT_COLS );
|
||||
|
||||
#ifndef HB_CDP_SUPPORT_OFF
|
||||
pWVT->hostCDP = hb_cdp_page;
|
||||
pWVT->inCDP = hb_cdp_page;
|
||||
@@ -1356,6 +1361,7 @@ static BOOL hb_gt_wvt_SetMode( PHB_GT pGT, int iRow, int iCol )
|
||||
fResult = hb_gt_wvt_InitWindow( pWVT, iRow, iCol );
|
||||
}
|
||||
DeleteObject( hFont );
|
||||
HB_GTSELF_REFRESH( pGT );
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -1508,6 +1514,7 @@ static BOOL hb_gt_wvt_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo )
|
||||
{
|
||||
hb_gt_wvt_ResetWindowSize( pWVT );
|
||||
hb_gt_wvt_UpdateCaret( pWVT );
|
||||
HB_GTSELF_REFRESH( pGT );
|
||||
}
|
||||
DeleteObject( hFont );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user