From 21514d4707cf3877fd1046d5edd5d693e75c17c7 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Thu, 13 Aug 2009 17:27:34 +0000 Subject: [PATCH] 2009-08-13 19:26 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * INSTALL + Added HB_INSTALL_PREFIX description (this is now optional). + Added HB_BUILD_PKG description. + Added HB_BUILD_IMPLIB description. * log-%HB_COMPILER%.txt log names changed to log.txt. * Cygwin example changed to directly launch make_gnu.sh. ; NOTE: INSTALL still needs some updates. I'll do that while testing new ways of doing things. * config/global.cf + Some new information is shown in the log. (detection results) % exporting HB_HOST_CPU to avoid detecting it in each recursion. + Showing whether HB_ARCHITECTURE/HB_COMPILER values were autodetected. + Showing GNU Make version and targets ("clean"/"install"/"all"). + Showing HB_BUILD_PKG, HB_BUILD_DLL settings. + Added logic to do some presets if HB_BUILD_PKG=yes and check if clean+install was specified. * bin/postinst.cmd * bin/postinst.bat * bin/hb-mkpkg.bat * bin/hb-mkimp.bat * bin/hb-mkdyn.bat + Prefixed all messages coming from our make process with '! ' + Some new messages added to offer better entertainment for builders. - mpkg_gnu.bat * config/global.cf + bin/hb-mkpkg.bat * bin/postinst.bat * mpkg_win.nsi + Updated to work as a child function of postinst.bat instead of being a starter batch file. Now a package build can be initiated the same way as a normal one except that HB_BUILD_PKG=yes setting should be used additionally and 'clean install' is obligatory. In package building scenarios HB_INSTALL_PREFIX will be automatically set by the process, using the pkg// tree to install the build into. * Moved most of the old logic to GNU Make level, so the batch file is very simple now. ; TOFIX: Whole removal of above dir should be solved to avoid leftover old files to be included in the release packages. Ideas are welcome. ; TODO: Integrate into postinst.bat. ; TODO: Move .nsi file to a better place. * bin/postinst.bat * config/rules.cf ! Fixed to respect HB_BUILD_DLL setting. * bin/hb-mkdyn.bat ! Fixed to create temp files in install area so that multiple parallel build runs don't badly interact with each other. ! Some fixes regarding spaces in dirs, although tool support is generally to hectic/buggy to implement that reliably. Spaces are still not recommended in dir. ! Fix for msvc. ! Untested fixes for watcom. ! Fixed leaving two temp file on disk for debuggin purposes. * utils/hbmk2/hbmk2.pt_BR.po * utils/hbmk2/hbmk2.hu_HU.po * utils/hbmk2/hbmk2.prg + Added -vcshead support for Bazaar repositories. * config/global.cf * config/wce/global.cf * config/dos/watcom.cf * config/win/watcom.cf * config/win/global.cf * config/os2/watcom.cf - Deleted no more used HB_CDYNLIB and HB_DYNLIB logic. --- harbour/ChangeLog | 77 ++++++++++++++- harbour/INSTALL | 65 ++++++------- harbour/bin/hb-mkdyn.bat | 144 ++++++++++++++------------- harbour/bin/hb-mkimp.bat | 8 +- harbour/bin/hb-mkpkg.bat | 39 ++++++++ harbour/bin/postinst.bat | 32 ++++-- harbour/bin/postinst.cmd | 2 +- harbour/config/dos/watcom.cf | 2 +- harbour/config/global.cf | 150 ++++++++++++++++++++++------- harbour/config/os2/watcom.cf | 2 +- harbour/config/rules.cf | 22 +++-- harbour/config/wce/global.cf | 4 - harbour/config/win/global.cf | 4 - harbour/config/win/watcom.cf | 2 +- harbour/mpkg_gnu.bat | 94 ------------------ harbour/mpkg_win.nsi | 12 +-- harbour/utils/hbmk2/hbmk2.hu_HU.po | 4 +- harbour/utils/hbmk2/hbmk2.prg | 23 ++++- harbour/utils/hbmk2/hbmk2.pt_BR.po | 4 +- 19 files changed, 412 insertions(+), 278 deletions(-) create mode 100644 harbour/bin/hb-mkpkg.bat delete mode 100644 harbour/mpkg_gnu.bat diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 5b92d4f902..69e10f0e9c 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,81 @@ past entries belonging to author(s): Viktor Szakats. */ +2009-08-13 19:26 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) + * INSTALL + + Added HB_INSTALL_PREFIX description (this is now optional). + + Added HB_BUILD_PKG description. + + Added HB_BUILD_IMPLIB description. + * log-%HB_COMPILER%.txt log names changed to log.txt. + * Cygwin example changed to directly launch make_gnu.sh. + ; NOTE: INSTALL still needs some updates. I'll do that while + testing new ways of doing things. + + * config/global.cf + + Some new information is shown in the log. (detection results) + % exporting HB_HOST_CPU to avoid detecting it in each recursion. + + Showing whether HB_ARCHITECTURE/HB_COMPILER values were autodetected. + + Showing GNU Make version and targets ("clean"/"install"/"all"). + + Showing HB_BUILD_PKG, HB_BUILD_DLL settings. + + Added logic to do some presets if HB_BUILD_PKG=yes and check + if clean+install was specified. + + * bin/postinst.cmd + * bin/postinst.bat + * bin/hb-mkpkg.bat + * bin/hb-mkimp.bat + * bin/hb-mkdyn.bat + + Prefixed all messages coming from our make process with '! ' + + Some new messages added to offer better entertainment for builders. + + - mpkg_gnu.bat + * config/global.cf + + bin/hb-mkpkg.bat + * bin/postinst.bat + * mpkg_win.nsi + + Updated to work as a child function of postinst.bat instead + of being a starter batch file. Now a package build can be + initiated the same way as a normal one except that HB_BUILD_PKG=yes + setting should be used additionally and 'clean install' is + obligatory. + In package building scenarios HB_INSTALL_PREFIX will be automatically + set by the process, using the pkg// tree to install the + build into. + * Moved most of the old logic to GNU Make level, so the batch file + is very simple now. + ; TOFIX: Whole removal of above dir should be solved to avoid + leftover old files to be included in the release packages. + Ideas are welcome. + ; TODO: Integrate into postinst.bat. + ; TODO: Move .nsi file to a better place. + + * bin/postinst.bat + * config/rules.cf + ! Fixed to respect HB_BUILD_DLL setting. + + * bin/hb-mkdyn.bat + ! Fixed to create temp files in install area so that multiple parallel + build runs don't badly interact with each other. + ! Some fixes regarding spaces in dirs, although tool support is generally + to hectic/buggy to implement that reliably. Spaces are still not recommended + in dir. + ! Fix for msvc. + ! Untested fixes for watcom. + ! Fixed leaving two temp file on disk for debuggin purposes. + + * utils/hbmk2/hbmk2.pt_BR.po + * utils/hbmk2/hbmk2.hu_HU.po + * utils/hbmk2/hbmk2.prg + + Added -vcshead support for Bazaar repositories. + + * config/global.cf + * config/wce/global.cf + * config/dos/watcom.cf + * config/win/watcom.cf + * config/win/global.cf + * config/os2/watcom.cf + - Deleted no more used HB_CDYNLIB and HB_DYNLIB logic. + 2009-08-13 15:11 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl) * harbour/config/global.cf * set HB_HOST_ARCH to HB_ARCHITECTURE if it cannot be autodetected @@ -52,7 +127,7 @@ scripts. Maybe I'll even remove included make tools to make things cleaner/leaner. ; TODO: Revise starter .sh scripts. - ; TODO: mpkg_gnu.bat rework to run from postinst. + ; TODO: mpkg_gnu.bat rework to run from postinst. [DONE] ; TODO: Do some cleanup, remove redundancy in settings, etcetc. ; TOFIX: Fix watcom .dll generation. diff --git a/harbour/INSTALL b/harbour/INSTALL index 82fcfa5ef5..d2597a6aa7 100644 --- a/harbour/INSTALL +++ b/harbour/INSTALL @@ -254,6 +254,7 @@ OPTIONS AVAILABLE WHEN BUILDING HARBOUR - HB_USER_AFLAGS User linker options for libraries - HB_USER_MAKEFLAGS User GNU Make options + - HB_INSTALL_PREFIX Target root directory to install Harbour files. - HB_BIN_INSTALL Target directory to install executables - HB_LIB_INSTALL Target directory to install libraries - HB_INC_INSTALL Target directory to install language headers @@ -268,12 +269,9 @@ OPTIONS AVAILABLE WHEN BUILDING HARBOUR appended to compiler directory name, so all filesystem/platform name rules and limits apply. It's valid to use (back)slashes though. - - HB_BUILD_DLL=yes To create a full build with .dlls. - This is only needed and available for - non-GNU Windows compilers. When using this, - full clean + install cycles will automatically - be executed, so you don't have to explicitly - pass them to make_gnu.bat. + - HB_BUILD_PKG=yes Create release packages (requires 'clean install'). + - HB_BUILD_DLL=no Don't create Harbour .dlls. + - HB_BUILD_IMPLIB=yes Create import libraries for external .dll dependencies. - HB_BUILD_DEBUG=yes Create a debug build. - HB_BUILD_OPTIM=no Disable C compiler optimizations. - HB_BUILD_UNICODE=yes Create Unicode build (Windows/Windows CE). @@ -336,7 +334,7 @@ EXAMPLES rem set HB_COMPILER=msvc set HB_INSTALL_PREFIX=C:\hb-%HB_COMPILER% - call make_gnu.bat %1 %2 > log-%HB_COMPILER%.txt 2>&1 + call make_gnu.bat %1 %2 > log.txt 2>&1 --- --- MSVC 2008 @@ -344,7 +342,7 @@ EXAMPLES rem set HB_COMPILER=msvc set HB_INSTALL_PREFIX=C:\hb-%HB_COMPILER% - call make_gnu.bat %1 %2 > log-%HB_COMPILER%.txt 2>&1 + call make_gnu.bat %1 %2 > log.txt 2>&1 --- --- MSVC 2008 x86-64 (requires native x86 Harbour binaries) @@ -354,7 +352,7 @@ EXAMPLES rem set HB_COMPILER=msvc64 set HB_INSTALL_PREFIX=C:\hb-%HB_COMPILER% - call make_gnu.bat %1 %2 > log-%HB_COMPILER%.txt 2>&1 + call make_gnu.bat %1 %2 > log.txt 2>&1 --- --- MSVC 2005 @@ -362,7 +360,7 @@ EXAMPLES rem set HB_COMPILER=msvc set HB_INSTALL_PREFIX=C:\hb-%HB_COMPILER% - call make_gnu.bat %1 %2 > log-%HB_COMPILER%.txt 2>&1 + call make_gnu.bat %1 %2 > log.txt 2>&1 --- --- MSVC .NET 2003 (untested) @@ -372,7 +370,7 @@ EXAMPLES rem set HB_COMPILER=msvc set HB_INSTALL_PREFIX=C:\hb-%HB_COMPILER% - call make_gnu.bat %1 %2 > log-%HB_COMPILER%.txt 2>&1 + call make_gnu.bat %1 %2 > log.txt 2>&1 --- --- MinGW GCC (make sure MSYS (sh.exe) isn't in the PATH) @@ -380,7 +378,7 @@ EXAMPLES rem set HB_COMPILER=mingw set HB_INSTALL_PREFIX=C:\hb-%HB_COMPILER% - call make_gnu.bat %1 %2 > log-%HB_COMPILER%.txt 2>&1 + call make_gnu.bat %1 %2 > log.txt 2>&1 --- --- MinGW GCC + MSYS @@ -388,7 +386,7 @@ EXAMPLES rem set HB_COMPILER=mingw set HB_INSTALL_PREFIX=C:\hb-%HB_COMPILER% - sh make_gnu.sh %1 %2 > log-%HB_COMPILER%.txt 2>&1 + sh make_gnu.sh %1 %2 > log.txt 2>&1 --- --- MinGW GCC for x86-64 (requires native x86 Harbour binaries) @@ -399,7 +397,7 @@ EXAMPLES set HB_COMPILER=mingw64 set HB_CCPREFIX=x86_64-w64-mingw32- set HB_INSTALL_PREFIX=C:\hb-%HB_COMPILER% - call make_gnu.bat %1 %2 > log-%HB_COMPILER%.txt 2>&1 + call make_gnu.bat %1 %2 > log.txt 2>&1 --- --- MinGW GCC for WinCE/ARM (requires native x86 Harbour binaries + Cygwin) @@ -412,7 +410,7 @@ EXAMPLES set HB_COMPILER=mingwarm set HB_CCPREFIX=arm-wince-mingw32ce- set HB_INSTALL_PREFIX=C:\hb-%HB_COMPILER% - call make_gnu.bat %1 %2 > log-%HB_COMPILER%.txt 2>&1 + call make_gnu.bat %1 %2 > log.txt 2>&1 --- --- Cygwin GCC @@ -420,7 +418,7 @@ EXAMPLES rem set HB_COMPILER=cygwin set HB_INSTALL_PREFIX=C:\hb-%HB_COMPILER% - call make_gnu.bat %1 %2 > log-%HB_COMPILER%.txt 2>&1 + sh make_gnu.sh %1 %2 > log.txt 2>&1 --- --- Open Watcom C++ @@ -431,7 +429,7 @@ EXAMPLES rem set HB_COMPILER=watcom set HB_INSTALL_PREFIX=C:\hb-%HB_COMPILER% - call make_gnu.bat %1 %2 > log-%HB_COMPILER%.txt 2>&1 + call make_gnu.bat %1 %2 > log.txt 2>&1 --- --- Intel(R) C++ @@ -439,7 +437,7 @@ EXAMPLES rem set HB_COMPILER=icc set HB_INSTALL_PREFIX=C:\hb-%HB_COMPILER% - call make_gnu.bat %1 %2 > log-%HB_COMPILER%.txt 2>&1 + call make_gnu.bat %1 %2 > log.txt 2>&1 --- --- Intel(R) C++ for IA-64 (requires native x86 Harbour binaries) @@ -449,7 +447,7 @@ EXAMPLES rem set HB_COMPILER=iccia64 set HB_INSTALL_PREFIX=C:\hb-%HB_COMPILER% - call make_gnu.bat %1 %2 > log-%HB_COMPILER%.txt 2>&1 + call make_gnu.bat %1 %2 > log.txt 2>&1 --- --- Borland/CodeGear C++ @@ -457,7 +455,7 @@ EXAMPLES rem set HB_COMPILER=bcc set HB_INSTALL_PREFIX=C:\hb-%HB_COMPILER% - call make_gnu.bat %1 %2 > log-%HB_COMPILER%.txt 2>&1 + call make_gnu.bat %1 %2 > log.txt 2>&1 --- --- Pelles C @@ -467,7 +465,7 @@ EXAMPLES rem set HB_COMPILER=pocc set HB_INSTALL_PREFIX=C:\hb-%HB_COMPILER% - call make_gnu.bat %1 %2 > log-%HB_COMPILER%.txt 2>&1 + call make_gnu.bat %1 %2 > log.txt 2>&1 --- --- Pelles C x86-64 (requires native x86 Harbour binaries) @@ -479,7 +477,7 @@ EXAMPLES rem set HB_COMPILER=pocc64 set HB_INSTALL_PREFIX=C:\hb-%HB_COMPILER% - call make_gnu.bat %1 %2 > log-%HB_COMPILER%.txt 2>&1 + call make_gnu.bat %1 %2 > log.txt 2>&1 --- --- Pelles C WinCE/ARM (requires native x86 Harbour binaries) @@ -492,7 +490,7 @@ EXAMPLES set HB_ARCHITECTURE=wce set HB_COMPILER=poccarm set HB_INSTALL_PREFIX=C:\hb-%HB_COMPILER% - call make_gnu.bat %1 %2 > log-%HB_COMPILER%.txt 2>&1 + call make_gnu.bat %1 %2 > log.txt 2>&1 --- --- Cygwin GCC @@ -502,7 +500,7 @@ EXAMPLES rem set HB_COMPILER=cygwin set HB_INSTALL_PREFIX=/cygdrive/c/hb-%HB_COMPILER% - sh make_gnu.sh %1 %2 > log-%HB_COMPILER%.txt 2>&1 + sh make_gnu.sh %1 %2 > log.txt 2>&1 --- --8<-- @@ -545,10 +543,11 @@ EXAMPLES --8<-- rem ; To create installation packages (.exe + .zip), - rem replace last line (calling make_gnu.bat) with these two: + rem add these lines before above sample scripts and + rem pass 'clean install' to make: set HB_DIR_NSIS=%ProgramFiles%\NSIS\ set HB_DIR_ZIP=C:\info-zip\ - call mpkg_gnu.bat + set HB_BUILD_PKG=yes -->8-- DOS @@ -561,7 +560,7 @@ EXAMPLES set HB_ARCHITECTURE=dos set HB_COMPILER=djgpp set HB_INSTALL_PREFIX=C:\hb-%HB_COMPILER% - call make_gnu.bat %1 %2 > log-%HB_COMPILER%.txt 2>&1 + call make_gnu.bat %1 %2 > log.txt 2>&1 --- --- Open Watcom C++ @@ -588,10 +587,10 @@ EXAMPLES --8<-- rem ; To create installation packages (.zip), - rem replace last line (calling make_gnu.bat) with this one: - rem (this will only work when using Windows NT or upper host) + rem add these lines before above sample scripts and + rem pass 'clean install' to make: set HB_DIR_ZIP=C:\info-zip\ - call mpkg_gnu.bat + set HB_BUILD_PKG=yes -->8-- OS/2 @@ -608,7 +607,7 @@ EXAMPLES rem set HB_COMPILER=watcom set HB_INSTALL_PREFIX=C:\hb-%HB_COMPILER% - call make_gnu_os2.cmd %1 %2 > log-%HB_COMPILER%.txt 2>&1 + call make_gnu_os2.cmd %1 %2 > log.txt 2>&1 --- --- Open Watcom C++ on Windows NT host (requires native Windows Harbour binaries) @@ -624,7 +623,7 @@ EXAMPLES set HB_ARCHITECTURE=os2 set HB_COMPILER=watcom set HB_INSTALL_PREFIX=C:\hb-%HB_COMPILER% - call make_gnu.bat %1 %2 > log-%HB_COMPILER%.txt 2>&1 + call make_gnu.bat %1 %2 > log.txt 2>&1 --- --- Open Watcom C++ on Linux host (requires native Linux Harbour binaries) @@ -660,7 +659,7 @@ EXAMPLES set HB_ARCHITECTURE=linux set HB_COMPILER=watcom set HB_INSTALL_PREFIX=C:\hb-%HB_COMPILER% - call make_gnu.bat %1 %2 > log-%HB_COMPILER%.txt 2>&1 + call make_gnu.bat %1 %2 > log.txt 2>&1 --- diff --git a/harbour/bin/hb-mkdyn.bat b/harbour/bin/hb-mkdyn.bat index 89f62b3479..02c2830890 100644 --- a/harbour/bin/hb-mkdyn.bat +++ b/harbour/bin/hb-mkdyn.bat @@ -12,15 +12,15 @@ rem --------------------------------------------------------------- rem NOTE: .prg files have to be compiled with -n1 rem NOTE: .c files have to be compiled with -DHB_DYNLIB -if not "%OS%" == "Windows_NT" echo This Harbour build script requires Windows NT or upper. +if not "%OS%" == "Windows_NT" echo ! hb-mkdyn.bat Harbour build script requires Windows NT or upper. if not "%OS%" == "Windows_NT" goto :EOF setlocal -if "%HB_ARCHITECTURE%" == "" ( echo HB_ARCHITECTURE needs to be set. && goto END ) -if "%HB_COMPILER%" == "" ( echo HB_COMPILER needs to be set. && goto END ) -if "%HB_BIN_INSTALL%" == "" ( echo HB_BIN_INSTALL needs to be set. && goto END ) -if "%HB_LIB_INSTALL%" == "" ( echo HB_LIB_INSTALL needs to be set. && goto END ) +if "%HB_ARCHITECTURE%" == "" ( echo ! HB_ARCHITECTURE needs to be set. && goto END ) +if "%HB_COMPILER%" == "" ( echo ! HB_COMPILER needs to be set. && goto END ) +if "%HB_BIN_INSTALL%" == "" ( echo ! HB_BIN_INSTALL needs to be set. && goto END ) +if "%HB_LIB_INSTALL%" == "" ( echo ! HB_LIB_INSTALL needs to be set. && goto END ) set HB_DLL_VERSION=20 set HB_DLL_LIBS=source\common source\pp source\rtl source\macro source\lang source\codepage source\hbpcre source\hbzlib source\hbextern source\rdd source\rdd\dbfntx source\rdd\dbfnsx source\rdd\dbfcdx source\rdd\dbffpt source\rdd\hbsix source\rdd\hsx source\rdd\usrrdd source\rtl\gtcgi source\rtl\gtpca source\rtl\gtstd source\rtl\gtwvt source\rtl\gtgui @@ -33,6 +33,9 @@ set HB_OBJ_DIR=obj\%HB_ARCHITECTURE%\%HB_COMPILER%%HB_BUILD_NAME% set HB_OBJ_PREF= set HB_OBJ_POST= +set _LIST_ST=%HB_BIN_INSTALL%\_hballst.txt +set _LIST_MT=%HB_BIN_INSTALL%\_hballmt.txt + set _DST_NAME_ST= set _DST_NAME_MT= if "%HB_ARCHITECTURE%_%HB_COMPILER%" == "win_icc" set _DST_NAME_ST=harbour-%HB_DLL_VERSION% @@ -66,7 +69,7 @@ if "%HB_ARCHITECTURE%_%HB_COMPILER%" == "win_pocc64" set _DST_NAME_MT=harbourm if "%HB_ARCHITECTURE%_%HB_COMPILER%" == "wce_poccarm" set _DST_NAME_ST=harbour-%HB_DLL_VERSION%-arm if "%HB_ARCHITECTURE%_%HB_COMPILER%" == "wce_poccarm" set _DST_NAME_MT=harbourmt-%HB_DLL_VERSION%-arm -if "%_DST_NAME_ST%" == "" ( echo Harbour .dll creation isn't supported for this platform. && goto END ) +if "%_DST_NAME_ST%" == "" ( echo ! Harbour .dll creation isn't supported for this platform. && goto END ) if "%HB_ARCHITECTURE%" == "wce" set HB_DLL_LIBS_WIN= if not "%HB_COMPILER%" == "watcom" set HB_DLL_LIBS_WATCOM= @@ -75,9 +78,6 @@ if "%HB_COMPILER%" == "mingw64" set HB_OBJ_EXT=.o if "%HB_COMPILER%" == "mingwarm" set HB_OBJ_EXT=.o if "%HB_COMPILER%" == "cygwin" set HB_OBJ_EXT=.o -echo.> _hballst.txt -echo.> _hballmt.txt - if "%HB_ARCHITECTURE%_%HB_COMPILER%" == "win_icc" goto DO_MSVC if "%HB_ARCHITECTURE%_%HB_COMPILER%" == "win_iccia64" goto DO_MSVC if "%HB_ARCHITECTURE%_%HB_COMPILER%" == "win_msvc" goto DO_MSVC @@ -94,11 +94,14 @@ if "%HB_ARCHITECTURE%_%HB_COMPILER%" == "win_pocc" goto DO_POCC if "%HB_ARCHITECTURE%_%HB_COMPILER%" == "win_pocc64" goto DO_POCC if "%HB_ARCHITECTURE%_%HB_COMPILER%" == "wce_poccarm" goto DO_POCC -echo Platform %HB_ARCHITECTURE% / %HB_COMPILER% isn't supported. +echo ! Platform %HB_ARCHITECTURE% / %HB_COMPILER% isn't supported. goto END :DO_MSVC +echo.> "%_LIST_ST%" +echo.> "%_LIST_MT%" + call :MAKE_LISTS set _BIN_LINK=link @@ -108,156 +111,163 @@ if "%HB_ARCHITECTURE%_%HB_COMPILER%" == "win_iccia64" set _BIN_LINK=xilink if "%HB_ARCHITECTURE%" == "win" set _SYSLIBS=user32.lib ws2_32.lib advapi32.lib gdi32.lib if "%HB_ARCHITECTURE%" == "wce" set _SYSLIBS=wininet.lib ws2.lib -echo Making %_DST_NAME_ST%.dll... && %_BIN_LINK% /nologo /dll /subsystem:console /out:"%HB_BIN_INSTALL%\%_DST_NAME_ST%.dll" @_hballst.txt %_SYSLIBS% %HB_DLLLIBS% -echo Making %_DST_NAME_MT%.dll... && %_BIN_LINK% /nologo /dll /subsystem:console /out:"%HB_BIN_INSTALL%\%_DST_NAME_MT%.dll" @_hballmt.txt %_SYSLIBS% %HB_DLLLIBS% +echo ! Making %_DST_NAME_ST%.dll... && %_BIN_LINK% /nologo /dll /subsystem:console /out:"%HB_BIN_INSTALL%\%_DST_NAME_ST%.dll" @"%_LIST_ST%" %_SYSLIBS% %HB_DLLLIBS% +echo ! Making %_DST_NAME_MT%.dll... && %_BIN_LINK% /nologo /dll /subsystem:console /out:"%HB_BIN_INSTALL%\%_DST_NAME_MT%.dll" @"%_LIST_MT%" %_SYSLIBS% %HB_DLLLIBS% 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" if exist "%HB_BIN_INSTALL%\%_DST_NAME_ST%.exp" move "%HB_BIN_INSTALL%\%_DST_NAME_ST%.exp" "%HB_LIB_INSTALL%\%_DST_NAME_ST%.exp" if exist "%HB_BIN_INSTALL%\%_DST_NAME_MT%.exp" move "%HB_BIN_INSTALL%\%_DST_NAME_MT%.exp" "%HB_LIB_INSTALL%\%_DST_NAME_MT%.exp" +del "%_LIST_ST%" +del "%_LIST_MT%" + goto END :DO_GCC +echo.> "%_LIST_ST%" +echo.> "%_LIST_MT%" + call :MAKE_LISTS setlocal enabledelayedexpansion set _HBOST= -for /f %%f in (_hballst.txt) do set _HBOST=!_HBOST! %%f +for /f %%f in ("%_LIST_ST%") do set _HBOST=!_HBOST! %%f set _HBOMT= -for /f %%f in (_hballmt.txt) do set _HBOMT=!_HBOMT! %%f +for /f %%f in ("%_LIST_MT%") do set _HBOMT=!_HBOMT! %%f if "%HB_ARCHITECTURE%" == "win" set _SYSLIBS=-luser32 -lws2_32 -ladvapi32 -lgdi32 if "%HB_ARCHITECTURE%" == "wce" set _SYSLIBS=-lwininet -lws2 -echo Making %_DST_NAME_ST%.dll... && %HB_CCPREFIX%gcc -shared -o "%HB_BIN_INSTALL%\%_DST_NAME_ST%.dll" %_HBOST% %HB_USER_LDFLAGS% %_SYSLIBS% %HB_DLLLIBS% -Wl,--output-def,"%HB_BIN_INSTALL%\%_DST_NAME_ST%.def" -echo Making %_DST_NAME_MT%.dll... && %HB_CCPREFIX%gcc -shared -o "%HB_BIN_INSTALL%\%_DST_NAME_MT%.dll" %_HBOMT% %HB_USER_LDFLAGS% %_SYSLIBS% %HB_DLLLIBS% -Wl,--output-def,"%HB_BIN_INSTALL%\%_DST_NAME_MT%.def" +echo ! Making %_DST_NAME_ST%.dll... && %HB_CCPREFIX%gcc -shared -o "%HB_BIN_INSTALL%\%_DST_NAME_ST%.dll" %_HBOST% %HB_USER_LDFLAGS% %_SYSLIBS% %HB_DLLLIBS% -Wl,--output-def,"%HB_BIN_INSTALL%\%_DST_NAME_ST%.def" +echo ! Making %_DST_NAME_MT%.dll... && %HB_CCPREFIX%gcc -shared -o "%HB_BIN_INSTALL%\%_DST_NAME_MT%.dll" %_HBOMT% %HB_USER_LDFLAGS% %_SYSLIBS% %HB_DLLLIBS% -Wl,--output-def,"%HB_BIN_INSTALL%\%_DST_NAME_MT%.def" rem ,--out-implib,"%HB_LIB_INSTALL%\lib%_DST_NAME_ST%.a" rem ,--out-implib,"%HB_LIB_INSTALL%\lib%_DST_NAME_MT%.a" +del "%_LIST_ST%" +del "%_LIST_MT%" + goto END :DO_BCC -echo. c0d32%HB_OBJ_EXT% +> _hballst.txt -echo. c0d32%HB_OBJ_EXT% +> _hballmt.txt +if exist "%_LIST_ST%" del "%_LIST_ST%" +if exist "%_LIST_MT%" del "%_LIST_MT%" set HB_OBJ_PREF= set HB_OBJ_POST= + call :MAKE_LISTS -echo Making %_DST_NAME_ST%.dll... && ilink32 -q -Gn -C -aa -Tpd -Gi -x @_hballst.txt, "%HB_BIN_INSTALL%\%_DST_NAME_ST%.dll",, cw32mt.lib import32.lib %HB_DLLLIBS% -echo Making %_DST_NAME_MT%.dll... && ilink32 -q -Gn -C -aa -Tpd -Gi -x @_hballmt.txt, "%HB_BIN_INSTALL%\%_DST_NAME_MT%.dll",, cw32mt.lib import32.lib %HB_DLLLIBS% +echo. , "%HB_BIN_INSTALL%\%_DST_NAME_ST%.dll",, cw32mt.lib import32.lib %HB_DLLIBS% >> "%_LIST_ST%" +echo. , "%HB_BIN_INSTALL%\%_DST_NAME_MT%.dll",, cw32mt.lib import32.lib %HB_DLLIBS% >> "%_LIST_MT%" + +echo ! Making %_DST_NAME_ST%.dll... && ilink32 -q -Gn -C -aa -Tpd -Gi -x c0d32.obj @%_LIST_ST% +echo ! Making %_DST_NAME_MT%.dll... && ilink32 -q -Gn -C -aa -Tpd -Gi -x c0d32.obj @%_LIST_MT% 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" +del "%_LIST_ST%" +del "%_LIST_MT%" + goto END :DO_WATCOM +echo.> "%_LIST_ST%" +echo.> "%_LIST_MT%" + set HB_OBJ_PREF=FILE ' set HB_OBJ_POST=' call :MAKE_LISTS -echo.> _hbsst.txt -for %%f in (_hballst.txt) do echo FILE '%%f'>> _hbsst.txt -echo.> _hbsmt.txt -for %%f in (_hballst.txt) do echo FILE '%%f'>> _hbsmt.txt - -copy /b /y "%HB_LIB_INSTALL%\%HB_DLL_LIBS_ST%.lib" . > nul && wlib -q -b "%HB_DLL_LIBS_ST%.lib" - mainwin%HB_OBJ_EXT% - mainstd%HB_OBJ_EXT% -copy /b /y "%HB_LIB_INSTALL%\%HB_DLL_LIBS_MT%.lib" . > nul && wlib -q -b "%HB_DLL_LIBS_MT%.lib" - mainwin%HB_OBJ_EXT% - mainstd%HB_OBJ_EXT% - -echo FILE '%HB_DLL_LIBS_ST%.lib'>> _hbsst.txt -echo FILE '%HB_DLL_LIBS_MT%.lib'>> _hbsmt.txt - -echo Making %_DST_NAME_ST%.dll... && wlink OP QUIET SYS NT_DLL OP IMPLIB NAME '%HB_BIN_INSTALL%\%_DST_NAME_ST%.dll' @_hballst.txt LIB user32.lib, ws2_32.lib, advapi32.lib, gdi32.lib -echo Making %_DST_NAME_MT%.dll... && wlink OP QUIET SYS NT_DLL OP IMPLIB NAME '%HB_BIN_INSTALL%\%_DST_NAME_MT%.dll' @_hballmt.txt LIB user32.lib, ws2_32.lib, advapi32.lib, gdi32.lib +echo ! Making %_DST_NAME_ST%.dll... && wlink OP QUIET SYS NT_DLL OP IMPLIB NAME '%HB_BIN_INSTALL%\%_DST_NAME_ST%.dll' @"%_LIST_ST%" LIB user32.lib, ws2_32.lib, advapi32.lib, gdi32.lib +echo ! Making %_DST_NAME_MT%.dll... && wlink OP QUIET SYS NT_DLL OP IMPLIB NAME '%HB_BIN_INSTALL%\%_DST_NAME_MT%.dll' @"%_LIST_MT%" LIB user32.lib, ws2_32.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" -del %HB_DLL_LIBS_ST%.lib -del %HB_DLL_LIBS_MT%.lib - -del _hbsst.txt -del _hbsmt.txt +del "%_LIST_ST%" +del "%_LIST_MT%" goto END :DO_POCC +echo.> "%_LIST_ST%" +echo.> "%_LIST_MT%" + call :MAKE_LISTS if "%HB_ARCHITECTURE%" == "win" set _SYSLIBS=user32.lib ws2_32.lib advapi32.lib gdi32.lib if "%HB_ARCHITECTURE%" == "wce" set _SYSLIBS=wininet.lib ws2.lib -echo Making %_DST_NAME_ST%.dll... && polink /nologo /dll /out:"%HB_BIN_INSTALL%\%_DST_NAME_ST%.dll" @_hballst.txt %_SYSLIBS% %HB_DLLLIBS% -echo Making %_DST_NAME_MT%.dll... && polink /nologo /dll /out:"%HB_BIN_INSTALL%\%_DST_NAME_MT%.dll" @_hballmt.txt %_SYSLIBS% %HB_DLLLIBS% +echo ! Making %_DST_NAME_ST%.dll... && polink /nologo /dll /out:"%HB_BIN_INSTALL%\%_DST_NAME_ST%.dll" @%_LIST_ST% %_SYSLIBS% %HB_DLLLIBS% +echo ! Making %_DST_NAME_MT%.dll... && polink /nologo /dll /out:"%HB_BIN_INSTALL%\%_DST_NAME_MT%.dll" @%_LIST_MT% %_SYSLIBS% %HB_DLLLIBS% polib "%HB_BIN_INSTALL%\%_DST_NAME_ST%.dll" /out:"%HB_LIB_INSTALL%\%_DST_NAME_ST%.lib" polib "%HB_BIN_INSTALL%\%_DST_NAME_MT%.dll" /out:"%HB_LIB_INSTALL%\%_DST_NAME_MT%.lib" +del "%_LIST_ST%" +del "%_LIST_MT%" + goto END :MAKE_LISTS -echo Making .dlls for %HB_ARCHITECTURE% / %HB_COMPILER%... +echo ! Making .dlls for %HB_ARCHITECTURE% / %HB_COMPILER%... rem ; Extract neutral objects for %%f in (%HB_DLL_LIBS% %HB_DLL_LIBS_WIN%) do ( if exist "%%f\%HB_OBJ_DIR%" ( - echo Processing directory: %%f\%HB_OBJ_DIR% - dir /b "%%f\%HB_OBJ_DIR%\*_dyn%HB_OBJ_EXT%" > _hboraw.txt - for /F %%p in (_hboraw.txt) do ( + echo ! Processing directory: %%f\%HB_OBJ_DIR% + dir /b "%%f\%HB_OBJ_DIR%\*_dyn%HB_OBJ_EXT%" > "%HB_BIN_INSTALL%\_hboraw.txt" + for /F %%p in (%HB_BIN_INSTALL%\_hboraw.txt) do ( if not "%%p" == "hbpp_dyn%HB_OBJ_EXT%" ( - echo %HB_OBJ_PREF%%%f\%HB_OBJ_DIR%\%%p%HB_OBJ_POST%>> _hballst.txt - echo %HB_OBJ_PREF%%%f\%HB_OBJ_DIR%\%%p%HB_OBJ_POST%>> _hballmt.txt + echo %HB_OBJ_PREF%%%f\%HB_OBJ_DIR%\%%p%HB_OBJ_POST%>> "%_LIST_ST%" + echo %HB_OBJ_PREF%%%f\%HB_OBJ_DIR%\%%p%HB_OBJ_POST%>> "%_LIST_MT%" ) ) - del _hboraw.txt - ) else ( echo Directory not found: %%f\%HB_OBJ_DIR% ) + del "%HB_BIN_INSTALL%\_hboraw.txt" + ) else ( echo ! Directory not found: %%f\%HB_OBJ_DIR% ) ) rem ; Extract ST objects for %%f in (%HB_DLL_LIBS_ST%) do ( if exist "%%f\%HB_OBJ_DIR%" ( - echo Processing directory: %%f\%HB_OBJ_DIR% - dir /b "%%f\%HB_OBJ_DIR%\*_dyn%HB_OBJ_EXT%" > _hboraw.txt - for /F %%p in (_hboraw.txt) do ( - if not "%%p" == "maindll_dyn%HB_OBJ_EXT%" ( - if not "%%p" == "maindllp_dyn%HB_OBJ_EXT%" ( - echo %HB_OBJ_PREF%%%f\%HB_OBJ_DIR%\%%p%HB_OBJ_POST%>> _hballst.txt + echo ! Processing directory: %%f\%HB_OBJ_DIR% + dir /b "%%f\%HB_OBJ_DIR%\*_dyn%HB_OBJ_EXT%" > "%HB_BIN_INSTALL%\_hboraw.txt" + for /F %%p in (%HB_BIN_INSTALL%\_hboraw.txt) do ( + if not "%HB_COMPILER%-%%p" == "watcom-mainstd_dyn%HB_OBJ_EXT%" ( + if not "%HB_COMPILER%-%%p" == "watcom-mainwin_dyn%HB_OBJ_EXT%" ( + echo %HB_OBJ_PREF%%%f\%HB_OBJ_DIR%\%%p%HB_OBJ_POST%>> "%_LIST_ST%" ) ) ) - del _hboraw.txt - ) else ( echo Directory not found: %%f\%HB_OBJ_DIR% ) + del "%HB_BIN_INSTALL%\_hboraw.txt" + ) else ( echo ! Directory not found: %%f\%HB_OBJ_DIR% ) ) rem ; Extract MT objects for %%f in (%HB_DLL_LIBS_MT%) do ( if exist "%%f\%HB_OBJ_DIR%" ( - echo Processing directory: %%f\%HB_OBJ_DIR% - dir /b "%%f\%HB_OBJ_DIR%\*_dyn%HB_OBJ_EXT%" > _hboraw.txt - for /F %%p in (_hboraw.txt) do ( - if not "%%p" == "maindll_dyn%HB_OBJ_EXT%" ( - if not "%%p" == "maindllp_dyn%HB_OBJ_EXT%" ( - echo %HB_OBJ_PREF%%%f\%HB_OBJ_DIR%\%%p%HB_OBJ_POST%>> _hballmt.txt + echo ! Processing directory: %%f\%HB_OBJ_DIR% + dir /b "%%f\%HB_OBJ_DIR%\*_dyn%HB_OBJ_EXT%" > "%HB_BIN_INSTALL%\_hboraw.txt" + for /F %%p in (%HB_BIN_INSTALL%\_hboraw.txt) do ( + if not "%HB_COMPILER%-%%p" == "watcom-mainstd_dyn%HB_OBJ_EXT%" ( + if not "%HB_COMPILER%-%%p" == "watcom-mainwin_dyn%HB_OBJ_EXT%" ( + echo %HB_OBJ_PREF%%%f\%HB_OBJ_DIR%\%%p%HB_OBJ_POST%>> "%_LIST_MT%" ) ) ) - del _hboraw.txt - ) else ( echo Directory not found: %%f\%HB_OBJ_DIR% ) + del "%HB_BIN_INSTALL%\_hboraw.txt" + ) else ( echo ! Directory not found: %%f\%HB_OBJ_DIR% ) ) goto :EOF :END -rem del _hballst.txt -rem del _hballmt.txt - endlocal diff --git a/harbour/bin/hb-mkimp.bat b/harbour/bin/hb-mkimp.bat index dee9f81624..da62aa4799 100644 --- a/harbour/bin/hb-mkimp.bat +++ b/harbour/bin/hb-mkimp.bat @@ -6,6 +6,8 @@ rem --------------------------------------------------------------- rem Copyright 2009 Viktor Szakats (harbour.01 syenar.hu) +rem See COPYING for licensing terms. +rem rem script to create import libs for various compilers rem rem This script requires: @@ -14,15 +16,15 @@ rem - C compiler in PATH rem - HB_COMPILER and HB_LIB_INSTALL envvars set rem - HB_DIR_* envvars pointing to installed 3rd party packages rem - GNU sed (sed.exe) for some msvc and msvc64 targets -rem -rem See COPYING for licensing terms. rem --------------------------------------------------------------- -if not "%OS%" == "Windows_NT" echo This Harbour build script requires Windows NT or upper. +if not "%OS%" == "Windows_NT" echo ! hb-mkimp.bat Harbour build script requires Windows NT or upper. if not "%OS%" == "Windows_NT" goto END if not "%HB_LIB_INSTALL%" == "" ( + echo ! Creating import libs... + if "%HB_COMPILER%" == "bcc" ( if exist "%HB_DIR_ADS%\Redistribute\ace32.dll" implib "%HB_LIB_INSTALL%\ace32.lib" "%HB_DIR_ADS%\Redistribute\ace32.dll" diff --git a/harbour/bin/hb-mkpkg.bat b/harbour/bin/hb-mkpkg.bat new file mode 100644 index 0000000000..ef48891148 --- /dev/null +++ b/harbour/bin/hb-mkpkg.bat @@ -0,0 +1,39 @@ +@rem +@rem $Id$ +@rem + +@echo off + +rem --------------------------------------------------------------- +rem Copyright 2009 Viktor Szakats (harbour.01 syenar.hu) +rem See COPYING for licensing terms. +rem +rem Harbour Project installer creator script (for Windows/DOS) +rem +rem This script requires: +rem - Windows NT or upper +rem - Info-ZIP zip.exe in PATH +rem or HB_DIR_ZIP envvar set to its dir with an ending backslash. +rem https://sourceforge.net/project/showfiles.php?group_id=118012 +rem - NullSoft Installer installed (NSIS) +rem https://sourceforge.net/project/showfiles.php?group_id=22049&package_id=15374 +rem (only for Windows builds) +rem - makensis.exe (part of NSIS) in PATH +rem or HB_DIR_NSIS envvar set to its dir with an ending backslash. +rem (only for Windows builds) +rem --------------------------------------------------------------- + +if not "%OS%" == "Windows_NT" echo ! hb-mkpkg.bat Harbour build script requires Windows NT or upper. +if not "%OS%" == "Windows_NT" goto END + +echo ! Harbour .zip install package creation: '%HB_PKGPATH%.zip' +if exist "%HB_PKGPATH%.zip" del "%HB_PKGPATH%.zip" +pushd +cd "%HB_PKGBASE%" +"%HB_DIR_ZIP%zip.exe" -q -9 -X -r -o "%HB_PKGPATH%.zip" . -i "%HB_PKGNAME%\*" -x *.tds -x *.exp +popd + +if not "%HB_ARCHITECTURE%" == "dos" echo ! Harbour .exe install package creation: '%HB_PKGPATH%.exe' +if not "%HB_ARCHITECTURE%" == "dos" "%HB_DIR_NSIS%makensis.exe" /V2 "%~dp0..\mpkg_win.nsi" + +:END diff --git a/harbour/bin/postinst.bat b/harbour/bin/postinst.bat index 8ec2b99754..c2e0117a85 100644 --- a/harbour/bin/postinst.bat +++ b/harbour/bin/postinst.bat @@ -16,7 +16,7 @@ rem --------------------------------------------------------------- if "%HB_BIN_INSTALL%" == "" echo HB_BIN_INSTALL needs to be set. if "%HB_BIN_INSTALL%" == "" goto END -echo Generating %HB_BIN_INSTALL%\hbmk.cfg... +echo ! Generating %HB_BIN_INSTALL%\hbmk.cfg... echo # Harbour Make configuration> %HB_BIN_INSTALL%\hbmk.cfg echo # Generated by Harbour build process>> %HB_BIN_INSTALL%\hbmk.cfg echo.>> %HB_BIN_INSTALL%\hbmk.cfg @@ -32,7 +32,7 @@ goto INST_%HB_ARCHITECTURE% rem Windows post install part - if not "%OS%" == "Windows_NT" echo This Harbour build script requires Windows NT or upper. + if not "%OS%" == "Windows_NT" echo ! postinst.bat Harbour build script requires Windows NT or upper. if not "%OS%" == "Windows_NT" goto END rem ; Post-build installation @@ -42,20 +42,27 @@ goto INST_%HB_ARCHITECTURE% if not "%HB_INSTALL_PREFIX%" == "" copy INSTALL "%HB_INSTALL_PREFIX%\" > nul if not "%HB_INSTALL_PREFIX%" == "" copy TODO "%HB_INSTALL_PREFIX%\" > nul - call "%~dp0hb-mkdyn.bat" + if "%HB_BUILD_DLL%" == "no" goto _SKIP_DLL_BIN - if exist "%HB_BIN_INSTALL%\*.dll" ( - "%HB_HOST_BIN_DIR%\hbmk2" -q0 -lng=en-EN -shared "-o%HB_BIN_INSTALL%\hbrun-dll" "%~dp0..\utils\hbrun\hbrun.hbp" - "%HB_HOST_BIN_DIR%\hbmk2" -q0 -lng=en-EN -shared "-o%HB_BIN_INSTALL%\hbmk2-dll" "%~dp0..\utils\hbmk2\hbmk2.hbp" - "%HB_HOST_BIN_DIR%\hbmk2" -q0 -lng=en-EN -shared "-o%HB_BIN_INSTALL%\hbtest-dll" "%~dp0..\utils\hbtest\hbtest.hbp" - "%HB_HOST_BIN_DIR%\hbmk2" -q0 -lng=en-EN -shared "-o%HB_BIN_INSTALL%\hbi18n-dll" "%~dp0..\utils\hbi18n\hbi18n.hbp" - "%HB_HOST_BIN_DIR%\hbmk2" -q0 -lng=en-EN -shared "-o%HB_BIN_INSTALL%\hbformat-dll" "%~dp0..\utils\hbformat\hbformat.hbp" - ) + call "%~dp0hb-mkdyn.bat" + + if exist "%HB_BIN_INSTALL%\*.dll" ( + echo ! Creating dynamic version of Harbour binaries... + "%HB_HOST_BIN_DIR%\hbmk2" -q0 -lng=en-EN -shared "-o%HB_BIN_INSTALL%\hbrun-dll" "%~dp0..\utils\hbrun\hbrun.hbp" + "%HB_HOST_BIN_DIR%\hbmk2" -q0 -lng=en-EN -shared "-o%HB_BIN_INSTALL%\hbmk2-dll" "%~dp0..\utils\hbmk2\hbmk2.hbp" + "%HB_HOST_BIN_DIR%\hbmk2" -q0 -lng=en-EN -shared "-o%HB_BIN_INSTALL%\hbtest-dll" "%~dp0..\utils\hbtest\hbtest.hbp" + "%HB_HOST_BIN_DIR%\hbmk2" -q0 -lng=en-EN -shared "-o%HB_BIN_INSTALL%\hbi18n-dll" "%~dp0..\utils\hbi18n\hbi18n.hbp" + "%HB_HOST_BIN_DIR%\hbmk2" -q0 -lng=en-EN -shared "-o%HB_BIN_INSTALL%\hbformat-dll" "%~dp0..\utils\hbformat\hbformat.hbp" + ) + + :_SKIP_DLL_BIN rem ; We build this here, because GNU Make wouldn't add the icon. + echo ! Creating hbrun with embedded icon... "%HB_HOST_BIN_DIR%\hbmk2" -q0 -lng=en-EN "-o%HB_BIN_INSTALL%\hbrun" "%~dp0..\utils\hbrun\hbrun.hbp" if "%HB_BUILD_IMPLIB%" == "yes" call "%~dp0hb-mkimp.bat" + if "%HB_BUILD_PKG%" == "yes" call "%~dp0hb-mkpkg.bat" goto END @@ -68,6 +75,8 @@ goto INST_%HB_ARCHITECTURE% if not "%HB_INSTALL_PREFIX%" == "" copy INSTALL %HB_INSTALL_PREFIX% > nul if not "%HB_INSTALL_PREFIX%" == "" copy TODO %HB_INSTALL_PREFIX% > nul + if "%HB_BUILD_PKG%" == "yes" call "%~dp0hb-mkpkg.bat" + rem DOS post install part goto END @@ -76,4 +85,7 @@ goto INST_%HB_ARCHITECTURE% goto END :INST_ + + goto END + :END diff --git a/harbour/bin/postinst.cmd b/harbour/bin/postinst.cmd index baf364c5ec..46e6979e99 100644 --- a/harbour/bin/postinst.cmd +++ b/harbour/bin/postinst.cmd @@ -15,7 +15,7 @@ rem --------------------------------------------------------------- if "%HB_BIN_INSTALL%" == "" goto END -echo Generating %HB_BIN_INSTALL%\hbmk.cfg... +echo ! Generating %HB_BIN_INSTALL%\hbmk.cfg... echo # Harbour Make configuration> %HB_BIN_INSTALL%\hbmk.cfg echo # Generated by Harbour build process>> %HB_BIN_INSTALL%\hbmk.cfg echo.>> %HB_BIN_INSTALL%\hbmk.cfg diff --git a/harbour/config/dos/watcom.cf b/harbour/config/dos/watcom.cf index ad2b5b19e7..857c2f4c70 100644 --- a/harbour/config/dos/watcom.cf +++ b/harbour/config/dos/watcom.cf @@ -60,7 +60,7 @@ endif ifeq ($(CC),wcc386) ifneq ($(HB_HOST_ARCH),linux) CPPFLAGS := $(subst /,\,$(CPPFLAGS)) - CC_RULE = $(CC) $(CPPFLAGS) $(subst /,\,$(CFLAGS)) $(HB_CDBG) $(subst /,\,$(HB_USER_CFLAGS)) $(HB_CDYNLIB) $(HB_CUNICODE) $(CC_IN)$(subst /,\,$<) $(CC_OUT)$( nul -set HB_INSTALL_PREFIX=%HB_INSTALL_BASE%\%HB_DIRNAME% - -rem ; Post-build cleanup -if exist "%HB_INSTALL_PREFIX%\bin\*.lib" del "%HB_INSTALL_PREFIX%\bin\*.lib" - -rem ; Build .zip package -echo Harbour .zip install package creation: '%HB_PKGNAME%.zip' -if exist "%HB_PKGNAME%.zip" del "%HB_PKGNAME%.zip" -pushd -cd "%HB_INSTALL_BASE%" -"%HB_DIR_ZIP%zip.exe" -q -9 -X -r -o "%~dp0%HB_PKGNAME%.zip" . -i "%HB_DIRNAME%\*" -x *.tds -x *.exp -popd - -rem ; Build installer package -if not "%HB_ARCHITECTURE%" == "dos" echo Harbour .exe install package creation: '%HB_PKGNAME%.exe' -if not "%HB_ARCHITECTURE%" == "dos" "%HB_DIR_NSIS%makensis.exe" /V2 "%~dp0mpkg_win.nsi" - -:MK_ERROR - -rem ; Cleanup -if "%1" == "--deltemp" rmdir /q /s "%HB_INSTALL_PREFIX%" -if "%1" == "--deltemp" rmdir /q "%HB_INSTALL_BASE%" - -endlocal - -:END diff --git a/harbour/mpkg_win.nsi b/harbour/mpkg_win.nsi index 131b1d39f3..e6ad753393 100644 --- a/harbour/mpkg_win.nsi +++ b/harbour/mpkg_win.nsi @@ -30,9 +30,9 @@ CRCCheck on Name "Harbour Project" ; The file to write -OutFile "$%HB_PKGNAME%.exe" +OutFile "$%HB_PKGPATH%.exe" -InstallDir C:\$%HB_DIRNAME% +InstallDir C:\$%HB_PKGNAMI% ;-------------------------------- ; Interface Settings @@ -122,10 +122,10 @@ Section "Start Menu and Desktop icons" hb_shortcuts CreateShortCut "$DESKTOP\Harbour Project.lnk" "$INSTDIR" "" "$INSTDIR" 0 CreateDirectory "$SMPROGRAMS\Harbour Project" - CreateShortCut "$SMPROGRAMS\Harbour Project\Uninstall.lnk" "$INSTDIR\uninstall.exe" "" "$INSTDIR\uninstall.exe" 0 - CreateShortCut "$SMPROGRAMS\Harbour Project\Harbour Project (Command line).lnk" "cmd.exe" "/k cd $INSTDIR\bin" "cmd.exe" 0 - CreateShortCut "$SMPROGRAMS\Harbour Project\Harbour Project.lnk" "$INSTDIR" "" "$INSTDIR" 0 - CreateShortCut "$SMPROGRAMS\Harbour Project\hbrun.lnk" "$INSTDIR\bin\hbrun.exe" "-v" "$INSTDIR\bin\hbrun.exe" 0 + CreateShortCut "$SMPROGRAMS\Harbour Project\Uninstall.lnk" "$INSTDIR\uninstall.exe" "" "$INSTDIR\uninstall.exe" 0 + CreateShortCut "$SMPROGRAMS\Harbour Project\Harbour Project (Command line).lnk" "cmd.exe" "/k cd $INSTDIR\bin" "cmd.exe" 0 + CreateShortCut "$SMPROGRAMS\Harbour Project\Harbour Project.lnk" "$INSTDIR" "" "$INSTDIR" 0 + CreateShortCut "$SMPROGRAMS\Harbour Project\hbrun.lnk" "$INSTDIR\bin\hbrun.exe" "-v" "$INSTDIR\bin\hbrun.exe" 0 CreateDirectory "$SMPROGRAMS\Harbour Project\Links" WriteINIStr "$SMPROGRAMS\Harbour Project\Links\Homepage.url" "InternetShortcut" "URL" "http://www.harbour-project.org/" WriteINIStr "$SMPROGRAMS\Harbour Project\Links\User Forums.url" "InternetShortcut" "URL" "http://sourceforge.net/apps/phpbb/harbour-project/" diff --git a/harbour/utils/hbmk2/hbmk2.hu_HU.po b/harbour/utils/hbmk2/hbmk2.hu_HU.po index 8f6ba46b2e..f5396aa0c0 100644 --- a/harbour/utils/hbmk2/hbmk2.hu_HU.po +++ b/harbour/utils/hbmk2/hbmk2.hu_HU.po @@ -99,8 +99,8 @@ msgstr "Hiba: Ismeretlen ford #: hbmk2.prg:5758 hbmk2.prg:6471 #, c-format -msgid "generate .ch header file with local repository information. SVN, Git and Mercurial are currently supported. Generated header will define macro _HBMK_VCS_TYPE_ with the name of detected VCS and _HBMK_VCS_ID_ with the unique ID of local repository" -msgstr "hozzon létre egy .ch fejlécet a helyi források verziókövető (VCS) adatbázisbeli adataival. SVN, Git és Mercurial támogatottak. Generált fejléc _HBMK_VCS_TYPE_ makrója adja vissza a VCS típusát, míg _HBMK_VCS_ID_ az aktuális állapot egyedi azonosítóját" +msgid "generate .ch header file with local repository information. SVN, CVS, Git, Mercurial and Bazaar are currently supported. Generated header will define macro _HBMK_VCS_TYPE_ with the name of detected VCS and _HBMK_VCS_ID_ with the unique ID of local repository" +msgstr "hozzon létre egy .ch fejlécet a helyi források verziókövető (VCS) adatbázisbeli adataival. SVN, CVS, Git, Mercurial és Bazaar támogatottak. Generált fejléc _HBMK_VCS_TYPE_ makrója adja vissza a VCS típusát, míg _HBMK_VCS_ID_ az aktuális állapot egyedi azonosítóját" #: hbmk2.prg:737 hbmk2.prg:914 #, c-format diff --git a/harbour/utils/hbmk2/hbmk2.prg b/harbour/utils/hbmk2/hbmk2.prg index ef9839adce..3976122d91 100644 --- a/harbour/utils/hbmk2/hbmk2.prg +++ b/harbour/utils/hbmk2/hbmk2.prg @@ -6274,6 +6274,7 @@ STATIC FUNCTION GenHBL( hbmk, aFiles, cFileOut, lEmpty ) #define _VCS_GIT 2 #define _VCS_MERCURIAL 3 #define _VCS_CVS 4 +#define _VCS_BAZAAR 5 STATIC FUNCTION VCSDetect( cDir ) @@ -6287,6 +6288,7 @@ STATIC FUNCTION VCSDetect( cDir ) CASE hb_DirExists( cDir + ".svn" ) ; RETURN _VCS_SVN CASE hb_DirExists( cDir + ".git" ) ; RETURN _VCS_GIT CASE hb_DirExists( cDir + ".hg" ) ; RETURN _VCS_MERCURIAL + CASE hb_DirExists( cDir + ".bzr" ) ; RETURN _VCS_BAZAAR CASE hb_DirExists( cDir + "CVS" ) ; RETURN _VCS_CVS CASE hb_DirExists( cDir + "_svn" ) ; RETURN _VCS_SVN /* NOTE: When SVN_ASP_DOT_NET_HACK envvar is set. [vszakats] */ ENDCASE @@ -6317,6 +6319,10 @@ STATIC FUNCTION VCSID( cDir, cVCSHEAD, /* @ */ cType ) CASE _VCS_CVS cType := "cvs" EXIT + CASE _VCS_BAZAAR + cType := "bazaar" + cCommand := "bzr version-info" + iif( Empty( cDir ), "", " " + cDir ) + EXIT OTHERWISE /* No version control system detected, roll our own. */ cType := "hbmk" @@ -6361,6 +6367,21 @@ STATIC FUNCTION VCSID( cDir, cVCSHEAD, /* @ */ cType ) cResult := AllTrim( StrTran( cStdOut, "changeset:" ) ) ENDIF EXIT + CASE _VCS_BAZAAR + /* revision-id: pqm@pqm.ubuntu.com-20090813025005-k2k8pa2o38b8m0l8 + date: 2009-08-13 03:50:05 +0100 + build-date: 2009-08-13 16:53:32 +0200 + revno: 4602 + branch-nick: bzr */ + tmp := At( "revno: ", cStdOut ) + IF tmp > 0 + cStdOut := SubStr( cStdOut, tmp + Len( "revno: " ) + 1 ) + tmp := At( Chr( 10 ), cStdOut ) + IF tmp > 0 + cResult := Left( cStdOut, tmp - 1 ) + ENDIF + ENDIF + EXIT ENDSWITCH ENDIF ENDIF @@ -6607,7 +6628,7 @@ STATIC PROCEDURE ShowHelp( hbmk, lLong ) { "-traceonly" , I_( "show commands to be executed, but don't execute them" ) },; { "-[no]compr[=lev]" , I_( "compress executable/dynamic lib (needs UPX)\n can be: min, max, def" ) },; { "-[no]run" , I_( "run/don't run output executable" ) },; - { "-vcshead=" , I_( "generate .ch header file with local repository information. SVN, Git and Mercurial are currently supported. Generated header will define macro _HBMK_VCS_TYPE_ with the name of detected VCS and _HBMK_VCS_ID_ with the unique ID of local repository" ) },; + { "-vcshead=" , I_( "generate .ch header file with local repository information. SVN, CVS, Git, Mercurial and Bazaar are currently supported. Generated header will define macro _HBMK_VCS_TYPE_ with the name of detected VCS and _HBMK_VCS_ID_ with the unique ID of local repository" ) },; { "-tshead=" , I_( "generate .ch header file with timestamp information. Generated header will define macros _HBMK_BUILD_DATE_, _HBMK_BUILD_TIME_, _HBMK_BUILD_TIMESTAMP_ with the date/time of build" ) },; { "-icon=" , I_( "set as application icon. should be a supported format on the target platform (experimental)" ) },; { "-instpath=" , I_( "copy target to . if is a directory, it should end with path separator. can be specified multiple times" ) },; diff --git a/harbour/utils/hbmk2/hbmk2.pt_BR.po b/harbour/utils/hbmk2/hbmk2.pt_BR.po index b0e31ce3f2..05300624e9 100644 --- a/harbour/utils/hbmk2/hbmk2.pt_BR.po +++ b/harbour/utils/hbmk2/hbmk2.pt_BR.po @@ -88,8 +88,8 @@ msgstr "Erro: HB_INSTALL_PREFIX n #: hbmk2.prg:6687 #, c-format -msgid "generate .ch header file with local repository information. SVN, Git and Mercurial are currently supported. Generated header will define macro _HBMK_VCS_TYPE_ with the name of detected VCS and _HBMK_VCS_ID_ with the unique ID of local repository" -msgstr "gera um arquivo .ch com informa‡äes do reposit˘rio local. SVN, Git e Mercurial estĆo entre as ferramentas atualmente suportadas. O arquivo gerado conter  a diretriva _HBMK_VCS_TYPE_ com o nome do VCS detectado e _HBMK_VCS_ID_ com o unique ID do reposit˘rio local" +msgid "generate .ch header file with local repository information. SVN, CVS, Git, Mercurial and Bazaar are currently supported. Generated header will define macro _HBMK_VCS_TYPE_ with the name of detected VCS and _HBMK_VCS_ID_ with the unique ID of local repository" +msgstr "gera um arquivo .ch com informa‡äes do reposit˘rio local. SVN, CVS, Git, Mercurial e Bazaar estĆo entre as ferramentas atualmente suportadas. O arquivo gerado conter  a diretriva _HBMK_VCS_TYPE_ com o nome do VCS detectado e _HBMK_VCS_ID_ com o unique ID do reposit˘rio local" #: hbmk2.prg:1205 #, c-format