diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 5f9e761d74..233dea4460 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -8,6 +8,39 @@ 2009-12-31 13:59 UTC+0100 Foo Bar (foo.bar foobar.org) */ +2009-03-03 20:05 UTC+0100 Viktor Szakats (harbour.01 syenar hu) + * INSTALL + + Extended 'HOW TO ENABLE OPTIONAL COMPONENTS BEFORE BUILD' + section a bit. (HB_DIR_* stuff still not included as it's + early to document it yet, refer to the ChangeLog for info + on it). + + * bin/hbmk.bat + - Removed -n switch. + + + mpkg_win.bat + + Added Windows installer creator script. + ; TODO: Move all mpkg_*.* and related files to new /package dir. + + * mpkg_win.nsi + + Changed to use HB_*_INSTALL envvars for source file locations. + ! Fixed to exclude .tds files. + + Will now will include version number, architecture and compiler + in installer .exe name. + + Default install destination will now include compiler name. + + * source/compiler/hbmain.c + * source/compiler/cmdcheck.c + * source/compiler/gencobj.c + * source/compiler/hbusage.c + + Marked -go option as HB_LEGACY_LEVEL2. Deprecated text + shown on help screen. + + * utils/hbmk2/hbmk2.prg + ! Fixed entry func autodetection problem with gcc when + source file is passed without .prg extension. + Reported by Maurilio. + 2009-03-03 19:54 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl) * harbour/source/rtl/hbproces.c * check if some define constants exists before use - it should diff --git a/harbour/INSTALL b/harbour/INSTALL index 0e91ec21d2..6c987f0642 100644 --- a/harbour/INSTALL +++ b/harbour/INSTALL @@ -104,10 +104,16 @@ HOW TO BUILD AND INSTALL HARBOUR HOW TO ENABLE OPTIONAL COMPONENTS BEFORE BUILD ============================================== - On *nix systems most of these will be automatically picked up if - installed in some well-known standard system locations. + Some Harbour parts (typically contrib libraries) depend on 3rd + party components. To make these Harbour parts built, you need + to tell Harbour where to find the required 3rd party components + (typically headers). - You only need to use manual setup, if the dependency isn't available + On *nix systems most of these 3rd party components will + automatically be picked up if installed in some well-known + standard system locations. + + You only need to use manual setup if the dependency isn't available on your platform on a system location, or you wish to use a non-standard location. Typically you need to do that on non-*nix (Windows/DOS/OS2) systems for all packages and for a few packages on diff --git a/harbour/bin/hbmk.bat b/harbour/bin/hbmk.bat index eb218187fa..3e3d7c55fe 100644 --- a/harbour/bin/hbmk.bat +++ b/harbour/bin/hbmk.bat @@ -2,4 +2,4 @@ @rem $Id$ @rem -@"%~dp0hbmk2.exe" -n %* +@"%~dp0hbmk2.exe" %* diff --git a/harbour/mpkg_win.bat b/harbour/mpkg_win.bat new file mode 100644 index 0000000000..1b42decc5f --- /dev/null +++ b/harbour/mpkg_win.bat @@ -0,0 +1,32 @@ +@rem +@rem $Id$ +@rem + +@echo off + +rem --------------------------------------------------------------- +rem Installer creator for Harbour Project +rem +rem This script requires: +rem - NullSoft Installer +rem http://nsis.sourceforge.net +rem - makensis.exe in PATH. +rem - Windows NT or upper. +rem +rem Copyright 2009 Viktor Szakats (harbour.01 syenar.hu) +rem See doc/license.txt for licensing terms. +rem --------------------------------------------------------------- + +if not "%OS%" == "Windows_NT" goto END + +if "%HB_INSTALL_PREFIX%" == "" set HB_INSTALL_PREFIX=%~dp0_install + +set HB_BUILD_DLL=yes + +call make_gnu.bat + +set HB_VERSION=1.1.0dev + +makensis.exe %~dp0mpkg_win.nsi + +:END diff --git a/harbour/mpkg_win.nsi b/harbour/mpkg_win.nsi index 3f543f4030..7750b5315b 100644 --- a/harbour/mpkg_win.nsi +++ b/harbour/mpkg_win.nsi @@ -29,14 +29,9 @@ CRCCheck on Name "Harbour Project" ; The file to write -OutFile "harbour-setup.exe" +OutFile "harbour-$%HB_VERSION%-$%HB_ARCHITECTURE%-$%HB_COMPILER%.exe" -InstallDir C:\harbour - -Var HB_BIN_INSTALL -Var HB_LIB_INSTALL -Var HB_INC_INSTALL -Var HB_DOC_INSTALL +InstallDir C:\harbour-$%HB_COMPILER% ;-------------------------------- ;Interface Settings @@ -66,7 +61,7 @@ Var HB_DOC_INSTALL ;-------------------------------- ;License Language String -LicenseLangString MUILicense ${LANG_ENGLISH} "doc\license.txt" +LicenseLangString MUILicense ${LANG_ENGLISH} "$%HB_DOC_INSTALL%\license.txt" ;-------------------------------- ; The stuff to install @@ -75,26 +70,21 @@ Section "Main components" hb_main SectionIn RO - ReadEnvStr $HB_BIN_INSTALL HB_BIN_INSTALL - ReadEnvStr $HB_LIB_INSTALL HB_LIB_INSTALL - ReadEnvStr $HB_INC_INSTALL HB_INC_INSTALL - ReadEnvStr $HB_DOC_INSTALL HB_DOC_INSTALL - ; Set output path to the installation directory. SetOutPath $INSTDIR - File /oname=COPYING "doc\license.txt" + File /oname=COPYING "$%HB_DOC_INSTALL%\license.txt" SetOutPath $INSTDIR\bin - File "bin\*.*" + File /x *.tds "$%HB_BIN_INSTALL%\*.*" SetOutPath $INSTDIR\lib - File "lib\*.*" + File "$%HB_LIB_INSTALL%\*.*" SetOutPath $INSTDIR\include - File "include\*.*" + File "$%HB_INC_INSTALL%\*.*" SetOutPath $INSTDIR\doc - File /r "doc\*.*" + File /r "$%HB_DOC_INSTALL%\*.*" ; Write the installation path into the registry ; WriteRegStr HKLM "Software\Harbour" "Install_Dir" "$INSTDIR" diff --git a/harbour/source/compiler/cmdcheck.c b/harbour/source/compiler/cmdcheck.c index b7c16c7323..8b3d0ae553 100644 --- a/harbour/source/compiler/cmdcheck.c +++ b/harbour/source/compiler/cmdcheck.c @@ -284,6 +284,7 @@ static void hb_compChkEnvironVar( HB_COMP_DECL, const char *szSwitch ) } break; +#ifdef HB_LEGACY_LEVEL2 case 'o': case 'O': HB_COMP_PARAM->iLanguage = HB_LANG_OBJ_MODULE; @@ -311,6 +312,7 @@ static void hb_compChkEnvironVar( HB_COMP_DECL, const char *szSwitch ) hb_compGenError( HB_COMP_PARAM, hb_comp_szErrors, 'F', HB_COMP_ERR_BADOPTION, s, NULL ); } break; +#endif case 'h': case 'H': diff --git a/harbour/source/compiler/gencobj.c b/harbour/source/compiler/gencobj.c index cd3ca88c3d..c109ec9fae 100644 --- a/harbour/source/compiler/gencobj.c +++ b/harbour/source/compiler/gencobj.c @@ -29,6 +29,8 @@ #include "hbcomp.h" #include "hb_io.h" +#ifdef HB_LEGACY_LEVEL2 + #define HB_CFG_FILENAME "harbour.cfg" /* QUESTION: Allocate buffer dynamically ? */ @@ -336,3 +338,5 @@ void hb_compGenCObj( HB_COMP_DECL, PHB_FNAME pFileName ) hb_xfree( ( void * ) pszCfgFileName ); } + +#endif diff --git a/harbour/source/compiler/hbmain.c b/harbour/source/compiler/hbmain.c index 0ed9be80d4..e06def3d1d 100644 --- a/harbour/source/compiler/hbmain.c +++ b/harbour/source/compiler/hbmain.c @@ -3724,9 +3724,11 @@ static void hb_compGenOutput( HB_COMP_DECL, int iLanguage ) hb_compGenBufPortObj( HB_COMP_PARAM, &HB_COMP_PARAM->pOutBuf, &HB_COMP_PARAM->ulOutBufSize ); break; +#ifdef HB_LEGACY_LEVEL2 case HB_LANG_OBJ_MODULE: hb_compGenCObj( HB_COMP_PARAM, HB_COMP_PARAM->pFileName ); break; +#endif } } diff --git a/harbour/source/compiler/hbusage.c b/harbour/source/compiler/hbusage.c index 0fd0fcfdcf..4ad8b27634 100644 --- a/harbour/source/compiler/hbusage.c +++ b/harbour/source/compiler/hbusage.c @@ -73,7 +73,10 @@ void hb_compPrintUsage( HB_COMP_DECL, const char * szSelf ) "\n %cgc[] output type: C source (.c) (default)", "\n : 0=compact (default) 1=normal 2=verbose", "\n 3=generate real C code", +#ifdef HB_LEGACY_LEVEL2 "\n %cgo output type: Platform dependant object module", + "\n Deprecated. Please use hbmk2", +#endif #ifdef HB_GEN_OBJ32 "\n %cgw output type: Windows/DOS OBJ32 (.obj)", #endif diff --git a/harbour/utils/hbmk2/hbmk2.prg b/harbour/utils/hbmk2/hbmk2.prg index 60d772e62d..a4bf9c4660 100644 --- a/harbour/utils/hbmk2/hbmk2.prg +++ b/harbour/utils/hbmk2/hbmk2.prg @@ -1535,7 +1535,7 @@ FUNCTION Main( ... ) /* Do entry function detection on platform required and supported */ IF s_cMAIN == NIL - tmp := iif( Lower( FN_ExtGet( s_cFIRST ) ) == ".prg", FN_ExtSet( s_cFIRST, ".c" ), s_cFIRST ) + tmp := iif( Lower( FN_ExtGet( s_cFIRST ) ) == ".prg" .OR. Empty( FN_ExtGet( s_cFIRST ) ), FN_ExtSet( s_cFIRST, ".c" ), s_cFIRST ) IF ! Empty( tmp := getFirstFunc( tmp ) ) s_cMAIN := tmp ENDIF