2009-02-26 19:44 UTC+0100 Viktor Szakats (harbour.01 syenar hu)

* bin/hb-mkdyn.bat
    * Cleaned tool outputs.
    + Added hbmaindllh lib to included liblist.
      (dunno what this serves, but we had it in non-GNU make)
      Do we need this at all?
    + Added support for msvc64 dll name.
    * Some tweak to owatcom, but it's just guessing, it still
      doesn't work.
    + Added generating hbrun-dll executable.

  * source/vm/hvm.c
  * source/vm/mainstd.c
    * Random tweak for owatcom/win dll support without success.
      Best result so far is:
      "Unrecoverable error 9012: Can't locate the starting procedure: 'MAIN'"

  * source/vm/Makefile
    + Added mainddllp generation for msvc, msvc64, bcc32, owatcom.

  * source/vm/maindllp.c
    + Added msvc64 and msvcia64 .dll names.

  * source/vm/extrap.c
    * Minor tweak to use alternate (documented) CPU detection macro.

  * utils/hbmk2/hbmk2.prg
    + Added msvc64 .dll name.
    * Removed automatic addition of hbcommon lib for shared
      mode for win compilers.

  * utils/hbtest/hbtest.hbm
  * utils/hbrun/hbrun.hbm
    + Added make files.
This commit is contained in:
Viktor Szakats
2009-02-26 18:48:17 +00:00
parent eb214d1e4b
commit 09621b1eed
10 changed files with 118 additions and 28 deletions

View File

@@ -8,6 +8,41 @@
2009-12-31 13:59 UTC+0100 Foo Bar (foo.bar foobar.org)
*/
2009-02-26 19:44 UTC+0100 Viktor Szakats (harbour.01 syenar hu)
* bin/hb-mkdyn.bat
* Cleaned tool outputs.
+ Added hbmaindllh lib to included liblist.
(dunno what this serves, but we had it in non-GNU make)
Do we need this at all?
+ Added support for msvc64 dll name.
* Some tweak to owatcom, but it's just guessing, it still
doesn't work.
+ Added generating hbrun-dll executable.
* source/vm/hvm.c
* source/vm/mainstd.c
* Random tweak for owatcom/win dll support without success.
Best result so far is:
"Unrecoverable error 9012: Can't locate the starting procedure: 'MAIN'"
* source/vm/Makefile
+ Added mainddllp generation for msvc, msvc64, bcc32, owatcom.
* source/vm/maindllp.c
+ Added msvc64 and msvcia64 .dll names.
* source/vm/extrap.c
* Minor tweak to use alternate (documented) CPU detection macro.
* utils/hbmk2/hbmk2.prg
+ Added msvc64 .dll name.
* Removed automatic addition of hbcommon lib for shared
mode for win compilers.
* utils/hbtest/hbtest.hbm
* utils/hbrun/hbrun.hbm
+ Added make files.
2009-02-26 12:54 UTC+0100 Viktor Szakats (harbour.01 syenar hu)
* source/rtl/gtwvt/gtwvt.c
! Attempt to fix SetMode() always returning FALSE when

View File

@@ -18,7 +18,7 @@ if "%HB_COMPILER%" == "" ( echo HB_COMPILER needs to be set. && goto END )
if not "%HB_ARCHITECTURE%" == "win" goto END
set HB_DLL_VERSION=11
set HB_DLL_LIBS=hbcommon hbpp hbrtl hbmacro hblang hbcpage hbpcre hbzlib hbextern hbrdd rddntx rddnsx rddcdx rddfpt hbsix hbhsx hbusrrdd gtcgi gtpca gtstd gtwin gtwvt gtgui
set HB_DLL_LIBS=hbcommon hbpp hbrtl hbmacro hblang hbcpage hbpcre hbzlib hbextern hbrdd rddntx rddnsx rddcdx rddfpt hbsix hbhsx hbusrrdd gtcgi gtpca gtstd gtwin gtwvt gtgui hbmaindllh
set HB_DLL_LIBS_ST=hbvm
set HB_DLL_LIBS_MT=hbvmmt
@@ -93,11 +93,13 @@ for %%f in (%HB_DLL_LIBS_MT%) do (
)
cd ..
set _DST_NAME_ST=harbour-%HB_DLL_VERSION%-vc
set _DST_NAME_MT=harbourmt-%HB_DLL_VERSION%-vc
if "%HB_COMPILER%" == "msvc64" set _DST_NAME_ST=harbour-%HB_DLL_VERSION%-vc-x64
if "%HB_COMPILER%" == "msvc64" set _DST_NAME_MT=harbourmt-%HB_DLL_VERSION%-vc-x64
if not "%HB_COMPILER%" == "msvc64" set _DST_NAME_ST=harbour-%HB_DLL_VERSION%-vc
if not "%HB_COMPILER%" == "msvc64" set _DST_NAME_MT=harbourmt-%HB_DLL_VERSION%-vc
echo Making %_DST_NAME_ST%.dll... && link /dll /out:"%HB_BIN_INSTALL%\%_DST_NAME_ST%.dll" @_hboneut.txt @_hbost.txt user32.lib wsock32.lib advapi32.lib gdi32.lib > nul
echo Making %_DST_NAME_MT%.dll... && link /dll /out:"%HB_BIN_INSTALL%\%_DST_NAME_MT%.dll" @_hboneut.txt @_hbomt.txt user32.lib wsock32.lib advapi32.lib gdi32.lib > nul
echo Making %_DST_NAME_ST%.dll... && link /nologo /dll /out:"%HB_BIN_INSTALL%\%_DST_NAME_ST%.dll" @_hboneut.txt @_hbost.txt user32.lib wsock32.lib advapi32.lib gdi32.lib
echo Making %_DST_NAME_MT%.dll... && link /nologo /dll /out:"%HB_BIN_INSTALL%\%_DST_NAME_MT%.dll" @_hboneut.txt @_hbomt.txt user32.lib wsock32.lib advapi32.lib gdi32.lib
if exist "%HB_BIN_INSTALL%\%_DST_NAME_ST%.lib" move "%HB_BIN_INSTALL%\%_DST_NAME_ST%.lib" "%HB_LIB_INSTALL%\%_DST_NAME_ST%.lib"
if exist "%HB_BIN_INSTALL%\%_DST_NAME_MT%.lib" move "%HB_BIN_INSTALL%\%_DST_NAME_MT%.lib" "%HB_LIB_INSTALL%\%_DST_NAME_MT%.lib"
@@ -118,7 +120,7 @@ del _hboneut.txt
cd ..
rmdir _dll
goto END
goto MK_BINDLL
:DO_BCC32
@@ -217,8 +219,8 @@ set _DST_NAME_MT=harbourmt-%HB_DLL_VERSION%-b32
echo. , "%HB_BIN_INSTALL%\%_DST_NAME_ST%.dll",, cw32mt.lib import32.lib >> _hballst.txt
echo. , "%HB_BIN_INSTALL%\%_DST_NAME_MT%.dll",, cw32mt.lib import32.lib >> _hballmt.txt
echo Making %_DST_NAME_ST%.dll... && ilink32 -Gn -C -aa -Tpd -Gi -x c0d32.obj @_hballst.txt
echo Making %_DST_NAME_MT%.dll... && ilink32 -Gn -C -aa -Tpd -Gi -x c0d32.obj @_hballmt.txt
echo Making %_DST_NAME_ST%.dll... && ilink32 -q -Gn -C -aa -Tpd -Gi -x c0d32.obj @_hballst.txt
echo Making %_DST_NAME_MT%.dll... && ilink32 -q -Gn -C -aa -Tpd -Gi -x c0d32.obj @_hballmt.txt
if exist "%HB_BIN_INSTALL%\%_DST_NAME_ST%.lib" move "%HB_BIN_INSTALL%\%_DST_NAME_ST%.lib" "%HB_LIB_INSTALL%\%_DST_NAME_ST%.lib"
if exist "%HB_BIN_INSTALL%\%_DST_NAME_MT%.lib" move "%HB_BIN_INSTALL%\%_DST_NAME_MT%.lib" "%HB_LIB_INSTALL%\%_DST_NAME_MT%.lib"
@@ -242,7 +244,7 @@ del _hboneut.txt
cd ..
rmdir _dll
goto END
goto MK_BINDLL
:DO_OWATCOM
@@ -258,8 +260,8 @@ for %%f in (%HB_DLL_LIBS%) do (
echo FILE '%HB_LIB_INSTALL%\%%f.lib'>> _hbsmt.txt
)
copy /b /y "%HB_LIB_INSTALL%\%HB_DLL_LIBS_ST%.lib" . && wlib -b "%HB_DLL_LIBS_ST%.lib" - mainstd.obj
copy /b /y "%HB_LIB_INSTALL%\%HB_DLL_LIBS_MT%.lib" . && wlib -b "%HB_DLL_LIBS_MT%.lib" - mainstd.obj
copy /b /y "%HB_LIB_INSTALL%\%HB_DLL_LIBS_ST%.lib" . > nul && wlib -q -b "%HB_DLL_LIBS_ST%.lib" - mainwin.obj
copy /b /y "%HB_LIB_INSTALL%\%HB_DLL_LIBS_MT%.lib" . > nul && wlib -q -b "%HB_DLL_LIBS_MT%.lib" - mainwin.obj
echo FILE '%HB_DLL_LIBS_ST%.lib'>> _hbsst.txt
echo FILE '%HB_DLL_LIBS_MT%.lib'>> _hbsmt.txt
@@ -267,8 +269,8 @@ echo FILE '%HB_DLL_LIBS_MT%.lib'>> _hbsmt.txt
set _DST_NAME_ST=harbour-%HB_DLL_VERSION%-ow
set _DST_NAME_MT=harbourmt-%HB_DLL_VERSION%-ow
echo Making %_DST_NAME_ST%.dll... && wlink SYS NT_DLL NAME '%HB_BIN_INSTALL%\%_DST_NAME_ST%.dll' OP IMPLIB @_hbsst.txt LIB user32.lib, wsock32.lib, advapi32.lib, gdi32.lib > nul
echo Making %_DST_NAME_MT%.dll... && wlink SYS NT_DLL NAME '%HB_BIN_INSTALL%\%_DST_NAME_MT%.dll' OP IMPLIB @_hbsmt.txt LIB user32.lib, wsock32.lib, advapi32.lib, gdi32.lib > nul
echo Making %_DST_NAME_ST%.dll... && wlink OP QUIET SYS NT_DLL NAME '%HB_BIN_INSTALL%\%_DST_NAME_ST%.dll' OP IMPLIB @_hbsst.txt LIB user32.lib, wsock32.lib, advapi32.lib, gdi32.lib
echo Making %_DST_NAME_MT%.dll... && wlink OP QUIET SYS NT_DLL NAME '%HB_BIN_INSTALL%\%_DST_NAME_MT%.dll' OP IMPLIB @_hbsmt.txt LIB user32.lib, wsock32.lib, advapi32.lib, gdi32.lib
if exist "%HB_BIN_INSTALL%\%_DST_NAME_ST%.lib" move "%HB_BIN_INSTALL%\%_DST_NAME_ST%.lib" "%HB_LIB_INSTALL%\%_DST_NAME_ST%.lib"
if exist "%HB_BIN_INSTALL%\%_DST_NAME_MT%.lib" move "%HB_BIN_INSTALL%\%_DST_NAME_MT%.lib" "%HB_LIB_INSTALL%\%_DST_NAME_MT%.lib"
@@ -283,6 +285,11 @@ del _hbsmt.txt
cd ..
rmdir _dll
goto MK_BINDLL
:MK_BINDLL
hbmk2 -q0 -n -shared ..\utils\hbrun\hbrun.prg -o%HB_BIN_INSTALL%\hbrun-dll -lhbcplr -lhbpp -lhbcommon
goto END
:END

View File

@@ -25,6 +25,21 @@ else
endif
endif
ifeq ($(HB_ARCHITECTURE),win)
ifeq ($(HB_COMPILER),bcc32)
DIRS += maindllh
endif
ifeq ($(HB_COMPILER),msvc)
DIRS += maindllh
endif
ifeq ($(HB_COMPILER),msvc64)
DIRS += maindllh
endif
ifeq ($(HB_COMPILER),owatcom)
DIRS += maindllh
endif
endif
C_SOURCES=\
hvm.c \
arrays.c \

View File

@@ -105,7 +105,7 @@ LONG WINAPI hb_win32ExceptionHandler( struct _EXCEPTION_POINTERS * pExceptionInf
errmsg[ 0 ] = '\0';
#if defined(HB_OS_WIN_64) && defined(_M_AMD64)
#if defined(HB_OS_WIN_64) && defined(_M_X64)
{
PCONTEXT pCtx = pExceptionInfo->ContextRecord;

View File

@@ -11071,7 +11071,7 @@ HB_LANG_REQUEST( HB_LANG_DEFAULT )
# define HB_FORCE_LINK_MAIN hb_forceLinkMainWin
#elif defined(__WATCOMC__) && ( defined(HB_OS_LINUX) || defined(HB_OS_OS2) )
#elif defined(__WATCOMC__) && ( defined(HB_OS_LINUX) || defined(HB_OS_OS2) || defined(HB_OS_WIN) )
# define HB_FORCE_LINK_MAIN hb_forceLinkMainStd

View File

@@ -61,11 +61,15 @@
#define HB_DLL_NAME "harbour.dll"
#if defined( __BORLANDC__ )
#define HB_DLL_NAME2 "harbour-11-b32.dll"
#define HB_DLL_NAME2 "harbour-11-b32.dll"
#elif defined( __WATCOMC__ )
#define HB_DLL_NAME2 "harbour-11-ow.dll"
#define HB_DLL_NAME2 "harbour-11-ow.dll"
#elif defined( _MSC_VER ) && defined( _M_X64 )
#define HB_DLL_NAME2 "harbour-11-vc-x64.dll"
#elif defined( _MSC_VER ) && defined( _M_IA64 )
#define HB_DLL_NAME2 "harbour-11-vc-ia64.dll"
#elif defined( _MSC_VER )
#define HB_DLL_NAME2 "harbour-11-vc.dll"
#define HB_DLL_NAME2 "harbour-11-vc.dll"
#endif
#if defined(HB_OS_WIN)

View File

@@ -77,7 +77,7 @@ char ** __crt0_glob_function( char * _arg )
}
#endif
#if defined(__WATCOMC__) && ( defined(HB_OS_LINUX) || defined(HB_OS_OS2) )
#if defined(__WATCOMC__) && ( defined(HB_OS_LINUX) || defined(HB_OS_OS2) || defined(HB_OS_WIN) )
void hb_forceLinkMainStd( void ) {}
#endif

View File

@@ -1195,8 +1195,7 @@ FUNCTION Main( ... )
s_aLIBSHARED := { iif( s_lMT, "harbourmt-" + cDL_Version_NonGNU + "-ow",;
"harbour-" + cDL_Version_NonGNU + "-ow" ),;
"hbmainstd",;
"hbmainwin",;
"hbcommon" }
"hbmainwin" }
IF Len( s_aRESSRC ) > 0
IF Len( s_aRESSRC ) == 1
@@ -1346,8 +1345,7 @@ FUNCTION Main( ... )
s_aLIBSHARED := { iif( s_lMT, "harbourmt-" + cDL_Version_NonGNU + "-b32",;
"harbour-" + cDL_Version_NonGNU + "-b32" ),;
"hbmainstd",;
"hbmainwin",;
"hbcommon" }
"hbmainwin" }
CASE t_cARCH == "win" .AND. t_cCOMP $ "msvc|msvc64"
IF s_lDEBUG
@@ -1384,11 +1382,17 @@ FUNCTION Main( ... )
s_aLIBSYS := ArrayJoin( s_aLIBSYS, { "user32", "wsock32", "advapi32", "gdi32" } )
/* TOFIX: The two build systems should generate the same .dll names, otherwise
we can only be compatible with one of them. non-GNU is the common choice here. */
s_aLIBSHARED := { iif( s_lMT, "harbourmt-" + cDL_Version_NonGNU + "-vc",;
"harbour-" + cDL_Version_NonGNU + "-vc" ),;
"hbmainstd",;
"hbmainwin",;
"hbcommon" }
IF t_cCOMP == "msvc64"
s_aLIBSHARED := { iif( s_lMT, "harbourmt-" + cDL_Version_NonGNU + "-vc-x64",;
"harbour-" + cDL_Version_NonGNU + "-vc-x64" ),;
"hbmainstd",;
"hbmainwin" }
ELSE
s_aLIBSHARED := { iif( s_lMT, "harbourmt-" + cDL_Version_NonGNU + "-vc",;
"harbour-" + cDL_Version_NonGNU + "-vc" ),;
"hbmainstd",;
"hbmainwin" }
ENDIF
cBin_Res := "rc.exe"
cOpt_Res := "/r {LR}"

View File

@@ -0,0 +1,6 @@
#
# $Id$
#
-n
hbrun.prg

View File

@@ -0,0 +1,19 @@
#
# $Id$
#
-n
hbtest.prg
rt_array.prg
rt_date.prg
rt_file.prg
rt_hvm.prg
rt_hvma.prg
rt_math.prg
rt_misc.prg
rt_mt.prg
rt_str.prg
rt_stra.prg
rt_trans.prg
rt_class.prg
rt_miscc.c