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/<arch>/<comp> 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.
This commit is contained in:
@@ -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/<arch>/<comp> 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.
|
||||
|
||||
|
||||
@@ -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
|
||||
---
|
||||
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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"
|
||||
|
||||
39
harbour/bin/hb-mkpkg.bat
Normal file
39
harbour/bin/hb-mkpkg.bat
Normal file
@@ -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
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)$(<F:.c=$(OBJ_EXT))
|
||||
CC_RULE = $(CC) $(CPPFLAGS) $(subst /,\,$(CFLAGS)) $(HB_CDBG) $(subst /,\,$(HB_USER_CFLAGS)) $(HB_CUNICODE) $(CC_IN)$(subst /,\,$<) $(CC_OUT)$(<F:.c=$(OBJ_EXT))
|
||||
endif
|
||||
endif
|
||||
|
||||
|
||||
@@ -170,8 +170,29 @@ ifneq ($(HB_BUILD_NAME),)
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(HB_CONFIG_SHOWN),)
|
||||
ifeq ($(HB_BUILD_PKG),yes)
|
||||
|
||||
# 'clean' and 'install' are required when building a release package
|
||||
ifeq ($(findstring clean,$(MAKECMDGOALS)),)
|
||||
export HB_BUILD_PKG := no
|
||||
else
|
||||
ifeq ($(findstring install,$(MAKECMDGOALS)),)
|
||||
export HB_BUILD_PKG := no
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(HB_BUILD_PKG),no)
|
||||
$(warning ! Warning: You have to use 'clean install' to create a release package.)
|
||||
endif
|
||||
|
||||
# Enforce some basic setting for release packages
|
||||
export HB_BUILD_DLL := yes
|
||||
export HB_BUILD_IMPLIB := no
|
||||
export HB_BUILD_OPTIM := yes
|
||||
export HB_BUILD_DEBUG := no
|
||||
endif
|
||||
|
||||
ifeq ($(HB_CONFIG_SHOWN),)
|
||||
ifneq ($(MAKE_381),)
|
||||
|
||||
# Some additional ones to be given a standard name:
|
||||
@@ -182,10 +203,7 @@ ifeq ($(HB_CONFIG_SHOWN),)
|
||||
# Macros:
|
||||
# -DHB_PCRE_REGEX, -DHB_POSIX_REGEX, -DHB_EXT_ZLIB, -DHB_HAS_GPM
|
||||
|
||||
ifeq ($(HB_DYNLIB),yes)
|
||||
$(info ! Dynamic library creation phase)
|
||||
endif
|
||||
$(info ! MAKE: $(MAKE))
|
||||
$(info ! MAKE: $(MAKE) $(MAKE_VERSION) $(MAKECMDGOALS))
|
||||
ifneq ($(HB_USER_PRGFLAGS),)
|
||||
$(info ! HB_USER_PRGFLAGS: $(HB_USER_PRGFLAGS))
|
||||
endif
|
||||
@@ -219,6 +237,12 @@ ifeq ($(HB_CONFIG_SHOWN),)
|
||||
ifneq ($(HB_BUILD_NAME),)
|
||||
$(info ! HB_BUILD_NAME: $(HB_BUILD_NAME))
|
||||
endif
|
||||
ifneq ($(HB_BUILD_PKG),)
|
||||
$(info ! HB_BUILD_PKG: $(HB_BUILD_PKG))
|
||||
endif
|
||||
ifneq ($(HB_BUILD_DLL),)
|
||||
$(info ! HB_BUILD_DLL: $(HB_BUILD_DLL))
|
||||
endif
|
||||
ifneq ($(HB_BUILD_DEBUG),)
|
||||
$(info ! HB_BUILD_DEBUG: $(HB_BUILD_DEBUG))
|
||||
endif
|
||||
@@ -244,8 +268,6 @@ ifeq ($(HB_CONFIG_SHOWN),)
|
||||
$(info ! HB_EXTERNAL_ADDONS: $(HB_EXTERNAL_ADDONS))
|
||||
endif
|
||||
endif
|
||||
|
||||
export HB_CONFIG_SHOWN := yes
|
||||
endif
|
||||
|
||||
# Shell detection
|
||||
@@ -340,6 +362,13 @@ ifeq ($(HB_HOST_ARCH),)
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(HB_CONFIG_SHOWN),)
|
||||
ifneq ($(MAKE_381),)
|
||||
$(info ! HB_HOST_ARCH: $(HB_HOST_ARCH))
|
||||
$(info ! HB_SHELL: $(HB_SHELL))
|
||||
endif
|
||||
endif
|
||||
|
||||
ifneq ($(findstring $(HB_HOST_ARCH),win wce dos os2),)
|
||||
HB_HOST_BIN_EXT := .exe
|
||||
else
|
||||
@@ -348,8 +377,7 @@ endif
|
||||
|
||||
ifeq ($(HB_BUILD_VERBOSE),yes)
|
||||
ifneq ($(MAKE_381),)
|
||||
$(info ! Detected host platform: $(HB_HOST_ARCH))
|
||||
$(info ! Detected shell: $(HB_SHELL))
|
||||
$(info ! Detected host executable extension: $(HB_HOST_BIN_EXT))
|
||||
endif
|
||||
endif
|
||||
|
||||
@@ -386,6 +414,7 @@ ifeq ($(HB_BUILD_VERBOSE),yes)
|
||||
endif
|
||||
endif
|
||||
|
||||
HB_ARCH_AUTO :=
|
||||
ifeq ($(HB_ARCHITECTURE),)
|
||||
HB_ARCHITECTURE := $(HB_HOST_ARCH)
|
||||
ifeq ($(HB_COMPILER),msvcarm)
|
||||
@@ -399,18 +428,23 @@ ifeq ($(HB_ARCHITECTURE),)
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
ifneq ($(HB_ARCHITECTURE),)
|
||||
HB_ARCH_AUTO := (autodetected)
|
||||
endif
|
||||
endif
|
||||
|
||||
HB_COMP_AUTO :=
|
||||
ifeq ($(HB_COMPILER),)
|
||||
ifeq ($(HB_ARCHITECTURE),win)
|
||||
ifneq ($(call find_in_path,arm-wince-mingw32ce-gcc),)
|
||||
HB_COMPILER := mingwarm
|
||||
HB_ARCHITECTURE := wce
|
||||
export HB_CCPREFIX := arm-wince-mingw32ce-
|
||||
HB_CCPREFIX := arm-wince-mingw32ce-
|
||||
else
|
||||
ifneq ($(call find_in_path,arm-mingw32ce-gcc),)
|
||||
HB_COMPILER := mingwarm
|
||||
HB_ARCHITECTURE := wce
|
||||
export HB_CCPREFIX := arm-mingw32ce-
|
||||
HB_CCPREFIX := arm-mingw32ce-
|
||||
else
|
||||
ifneq ($(call find_in_path,cygstart),)
|
||||
HB_COMPILER := cygwin
|
||||
@@ -441,7 +475,7 @@ ifeq ($(HB_COMPILER),)
|
||||
else
|
||||
ifneq ($(call find_in_path,x86_64-w64-mingw32-gcc),)
|
||||
HB_COMPILER := mingw64
|
||||
export HB_CCPREFIX := x86_64-w64-mingw32-
|
||||
HB_CCPREFIX := x86_64-w64-mingw32-
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
@@ -454,6 +488,7 @@ ifeq ($(HB_COMPILER),)
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
export HB_CCPREFIX
|
||||
else
|
||||
ifeq ($(HB_ARCHITECTURE),linux)
|
||||
ifneq ($(call find_in_path,wpp386),)
|
||||
@@ -503,8 +538,8 @@ ifeq ($(HB_COMPILER),)
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
ifneq ($(MAKE_381),)
|
||||
$(info ! Autodetected C compiler: $(HB_COMPILER))
|
||||
ifneq ($(HB_COMPILER),)
|
||||
HB_COMP_AUTO := (autodetected)
|
||||
endif
|
||||
endif
|
||||
|
||||
@@ -515,6 +550,13 @@ ifeq ($(HB_COMPILER),)
|
||||
$(error ! HB_COMPILER not set, couldn't autodetect.)
|
||||
endif
|
||||
|
||||
ifeq ($(HB_CONFIG_SHOWN),)
|
||||
ifneq ($(MAKE_381),)
|
||||
$(info ! HB_ARCHITECTURE: $(HB_ARCHITECTURE) $(HB_ARCH_AUTO))
|
||||
$(info ! HB_COMPILER: $(HB_COMPILER) $(HB_COMP_AUTO))
|
||||
endif
|
||||
endif
|
||||
|
||||
export HB_ARCHITECTURE
|
||||
export HB_COMPILER
|
||||
|
||||
@@ -565,12 +607,6 @@ else
|
||||
HB_UNIX_COMPATIBLE := yes
|
||||
endif
|
||||
|
||||
ifeq ($(HB_BUILD_VERBOSE),yes)
|
||||
ifneq ($(MAKE_381),)
|
||||
$(info ! Detected host executable extension: $(HB_HOST_BIN_EXT))
|
||||
endif
|
||||
endif
|
||||
|
||||
HB_CROSS_BUILD :=
|
||||
ifneq ($(HB_HOST_ARCH)$(HB_HOST_CPU),$(HB_ARCHITECTURE)$(HB_CPU))
|
||||
ifeq ($(HB_BIN_COMPILE),)
|
||||
@@ -698,25 +734,62 @@ ifneq ($(HB_DB_DRVEXT),)
|
||||
HB_RDD_DIRS += $(HB_DB_DRVEXT)
|
||||
endif
|
||||
|
||||
# Fill it automatically if not specified
|
||||
ifeq ($(HB_INSTALL_PREFIX),)
|
||||
ifneq ($(HB_HOST_ARCH),dos)
|
||||
HB_VERSION := 2.0.0beta2
|
||||
HB_PKGNAME := harbour-$(HB_VERSION)-$(HB_ARCHITECTURE)-$(HB_COMPILER)
|
||||
HB_PKGNAMI := $(HB_PKGNAME)
|
||||
else
|
||||
# Use short names in DOS
|
||||
HB_VERSION := 2b2
|
||||
HB_PKGNAME := hb$(HB_VERSION)
|
||||
# Ugly solution
|
||||
ifeq ($(HB_COMPILER),djgpp)
|
||||
HB_PKGNAME += dj
|
||||
else
|
||||
ifeq ($(HB_COMPILER),watcom)
|
||||
HB_PKGNAME += wa
|
||||
endif
|
||||
endif
|
||||
HB_PKGNAMI := $(HB_PKGNAME)
|
||||
endif
|
||||
|
||||
HB_INSTALL_PREFIX := $(realpath $(TOP)$(ROOT))
|
||||
export HB_VERSION
|
||||
export HB_PKGNAME
|
||||
export HB_PKGNAMI
|
||||
|
||||
# Use names which are not likely to be used by users to
|
||||
# avoiding accidental overwrites of existing installations
|
||||
# ifeq ($(HB_ARCHITECTURE),dos)
|
||||
# HB_INSTALL_PREFIX := C:\hbauto
|
||||
# else
|
||||
# ifeq ($(HB_UNIX_COMPATIBLE),no)
|
||||
# HB_INSTALL_PREFIX := C:$(DIRSEP)hb-auto-$(HB_ARCHITECTURE)-$(HB_COMPILER)
|
||||
ifeq ($(HB_BUILD_PKG),yes)
|
||||
PKG_DIR := $(subst /,$(DIRSEP),$(TOP)$(ROOT))pkg
|
||||
export HB_PKGBASE := $(PKG_DIR)$(DIRSEP)$(HB_ARCHITECTURE)$(DIRSEP)$(HB_COMPILER)
|
||||
export HB_PKGPATH := $(subst /,$(DIRSEP),$(abspath $(PKG_DIR)$(DIRSEP)$(HB_PKGNAME)))
|
||||
HB_INSTALL_PREFIX := $(HB_PKGBASE)$(DIRSEP)$(HB_PKGNAME)
|
||||
|
||||
.PHONY: clean
|
||||
|
||||
HB_BIN_INSTALL :=
|
||||
HB_INC_INSTALL :=
|
||||
HB_LIB_INSTALL :=
|
||||
HB_DOC_INSTALL :=
|
||||
else
|
||||
# Fill it automatically if not specified
|
||||
ifeq ($(HB_INSTALL_PREFIX),)
|
||||
|
||||
HB_INSTALL_PREFIX := $(realpath $(TOP)$(ROOT))
|
||||
|
||||
# Use names which are not likely to be used by users to
|
||||
# avoiding accidental overwrites of existing installations
|
||||
# ifeq ($(HB_ARCHITECTURE),dos)
|
||||
# HB_INSTALL_PREFIX := C:\hbauto
|
||||
# else
|
||||
# HB_INSTALL_PREFIX := $(HOME)$(DIRSEP)hb-auto-$(HB_ARCHITECTURE)-$(HB_COMPILER)
|
||||
# ifeq ($(HB_UNIX_COMPATIBLE),no)
|
||||
# HB_INSTALL_PREFIX := C:$(DIRSEP)hb-auto-$(HB_ARCHITECTURE)-$(HB_COMPILER)
|
||||
# else
|
||||
# HB_INSTALL_PREFIX := $(HOME)$(DIRSEP)hb-auto-$(HB_ARCHITECTURE)-$(HB_COMPILER)
|
||||
# endif
|
||||
# endif
|
||||
# endif
|
||||
|
||||
ifneq ($(MAKE_381),)
|
||||
$(info ! HB_INSTALL_PREFIX automatically set to $(HB_INSTALL_PREFIX))
|
||||
ifneq ($(MAKE_381),)
|
||||
$(info ! HB_INSTALL_PREFIX automatically set to $(HB_INSTALL_PREFIX))
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
@@ -730,8 +803,6 @@ ifneq ($(HB_INSTALL_PREFIX),)
|
||||
HB_INSTALL_PREFIX := $(subst {HB_COMP},$(HB_COMPILER),$(HB_INSTALL_PREFIX))
|
||||
HB_INSTALL_PREFIX := $(subst {HB_CPU},$(HB_CPU),$(HB_INSTALL_PREFIX))
|
||||
|
||||
export HB_INSTALL_PREFIX
|
||||
|
||||
ifeq ($(HB_UNIX_COMPATIBLE),no)
|
||||
LIBPOSTFIX := $(DIRSEP)$(subst /,$(DIRSEP),$(ARCH_COMP))
|
||||
else
|
||||
@@ -762,6 +833,8 @@ ifneq ($(HB_INSTALL_PREFIX),)
|
||||
endif
|
||||
endif
|
||||
|
||||
export HB_INSTALL_PREFIX
|
||||
|
||||
ifeq ($(HB_BIN_COMPILE),)
|
||||
HB_HOST_BIN_DIR := $(BIN_DIR)
|
||||
else
|
||||
@@ -776,6 +849,7 @@ HB_DYN_COMPILE := no
|
||||
|
||||
# export some variables to eliminate repeated setting in recursive calls
|
||||
export HB_HOST_ARCH
|
||||
export HB_HOST_CPU
|
||||
export HB_HOST_BIN_DIR
|
||||
|
||||
# clear these options for an unambiguous Harbour enviornment
|
||||
@@ -784,9 +858,11 @@ export HARBOURCMD :=
|
||||
export CLIPPER :=
|
||||
export CLIPPERCMD :=
|
||||
|
||||
# relevant only for non-*nix hosts
|
||||
# relevant only on non-*nix hosts
|
||||
MKFLAGS := --no-print-directory
|
||||
|
||||
export HB_CONFIG_SHOWN := yes
|
||||
|
||||
include $(TOP)$(ROOT)config/$(HB_ARCHITECTURE)/global.cf
|
||||
include $(TOP)$(ROOT)config/globsh.cf
|
||||
|
||||
|
||||
@@ -62,7 +62,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)$(<F:.c=$(OBJ_EXT))
|
||||
CC_RULE = $(CC) $(CPPFLAGS) $(subst /,\,$(CFLAGS)) $(HB_CDBG) $(subst /,\,$(HB_USER_CFLAGS)) $(HB_CUNICODE) $(CC_IN)$(subst /,\,$<) $(CC_OUT)$(<F:.c=$(OBJ_EXT))
|
||||
endif
|
||||
endif
|
||||
|
||||
|
||||
@@ -33,16 +33,18 @@ HB_RULE = $(HB) $? -n1 $(HB_INC_DEPEND) $(HB_FLAGS) -gc$(HB_GCMODE) $(HB_FLAGSEX
|
||||
|
||||
# The rule to compile a C source file.
|
||||
ifeq ($(CC_RULE),)
|
||||
CC_RULE = $(CC) $(HB_INC_DEPEND) $(CPPFLAGS) $(CFLAGS) $(HB_CDBG) $(HB_USER_CFLAGS) $(HB_CDYNLIB) $(HB_CUNICODE) $(CC_OUT)$(<F:.c=$(OBJ_EXT)) $(CC_IN) $<
|
||||
ifeq ($(HB_DYN_COMPILE),yes)
|
||||
ifneq ($(LIBNAME),)
|
||||
ifneq ($(findstring $(LIBNAME),$(HB_DYN_LIBS)),)
|
||||
define cc_comp_all
|
||||
$(CC) $(HB_INC_DEPEND) $(CPPFLAGS) $(CFLAGS) $(HB_CDBG) $(HB_USER_CFLAGS) $(HB_CUNICODE) $(CC_OUT)$(<F:.c=$(OBJ_EXT)) $(CC_IN) $<
|
||||
$(CC) $(HB_INC_DEPEND) $(CPPFLAGS) $(CFLAGS) $(HB_CDBG) $(HB_USER_CFLAGS) $(HB_CUNICODE) $(CC_OUT)$(<F:.c=_dyn$(OBJ_EXT)) -DHB_DYNLIB $(CC_IN) $<
|
||||
endef
|
||||
CC_RULE = $(CC) $(HB_INC_DEPEND) $(CPPFLAGS) $(CFLAGS) $(HB_CDBG) $(HB_USER_CFLAGS) $(HB_CUNICODE) $(CC_OUT)$(<F:.c=$(OBJ_EXT)) $(CC_IN) $<
|
||||
ifneq ($(HB_BUILD_DLL),no)
|
||||
ifeq ($(HB_DYN_COMPILE),yes)
|
||||
ifneq ($(LIBNAME),)
|
||||
ifneq ($(findstring $(LIBNAME),$(HB_DYN_LIBS)),)
|
||||
define cc_comp_all
|
||||
$(CC) $(HB_INC_DEPEND) $(CPPFLAGS) $(CFLAGS) $(HB_CDBG) $(HB_USER_CFLAGS) $(HB_CUNICODE) $(CC_OUT)$(<F:.c=$(OBJ_EXT)) $(CC_IN) $<
|
||||
$(CC) $(HB_INC_DEPEND) $(CPPFLAGS) $(CFLAGS) $(HB_CDBG) $(HB_USER_CFLAGS) $(HB_CUNICODE) $(CC_OUT)$(<F:.c=_dyn$(OBJ_EXT)) -DHB_DYNLIB $(CC_IN) $<
|
||||
endef
|
||||
|
||||
CC_RULE = $(cc_comp_all)
|
||||
CC_RULE = $(cc_comp_all)
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
@@ -50,7 +52,7 @@ endif
|
||||
|
||||
# The rule to compile a C++ source file.
|
||||
ifeq ($(CPP_RULE),)
|
||||
CPP_RULE = $(CC) $(HB_INC_DEPEND) $(CPPFLAGS) $(CFLAGS) $(HB_CDBG) $(HB_USER_CFLAGS) $(HB_CDYNLIB) $(HB_CUNICODE) $(CC_OUT)$(<F:.cpp=$(OBJ_EXT)) $(CC_IN) $<
|
||||
CPP_RULE = $(CC) $(HB_INC_DEPEND) $(CPPFLAGS) $(CFLAGS) $(HB_CDBG) $(HB_USER_CFLAGS) $(HB_CUNICODE) $(CC_OUT)$(<F:.cpp=$(OBJ_EXT)) $(CC_IN) $<
|
||||
endif
|
||||
|
||||
# The rule to link an executable.
|
||||
|
||||
@@ -12,7 +12,3 @@ HB_GT_LIBS += gtwvt gtgui
|
||||
|
||||
# Favor size for CE builds.
|
||||
HB_GCMODE := 0
|
||||
|
||||
ifeq ($(HB_DYNLIB),yes)
|
||||
HB_CDYNLIB := -DHB_DYNLIB
|
||||
endif
|
||||
|
||||
@@ -9,7 +9,3 @@ DYN_PRE :=
|
||||
DYN_EXT := .dll
|
||||
|
||||
HB_GT_LIBS += gtwvt gtgui gtwin
|
||||
|
||||
ifeq ($(HB_DYNLIB),yes)
|
||||
HB_CDYNLIB := -DHB_DYNLIB
|
||||
endif
|
||||
|
||||
@@ -64,7 +64,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)$(<F:.c=$(OBJ_EXT))
|
||||
CC_RULE = $(CC) $(CPPFLAGS) $(subst /,\,$(CFLAGS)) $(HB_CDBG) $(subst /,\,$(HB_USER_CFLAGS)) $(HB_CUNICODE) $(CC_IN)$(subst /,\,$<) $(CC_OUT)$(<F:.c=$(OBJ_EXT))
|
||||
endif
|
||||
endif
|
||||
|
||||
|
||||
@@ -1,94 +0,0 @@
|
||||
@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 - C compiler configured (see INSTALL doc)
|
||||
rem
|
||||
rem Please read INSTALL for further information.
|
||||
rem ---------------------------------------------------------------
|
||||
|
||||
if not "%OS%" == "Windows_NT" echo This Harbour build script requires Windows NT or upper.
|
||||
if not "%OS%" == "Windows_NT" goto END
|
||||
|
||||
setlocal
|
||||
|
||||
rem ; Dir setup
|
||||
set HB_INSTALL_BASE=%~dp0_pk
|
||||
set HB_INSTALL_PREFIX=%HB_INSTALL_BASE%\_w
|
||||
set HB_BIN_INSTALL=
|
||||
set HB_LIB_INSTALL=
|
||||
set HB_INC_INSTALL=
|
||||
set HB_DOC_INSTALL=
|
||||
|
||||
rem ; Pre-build cleanup
|
||||
if exist "%HB_INSTALL_PREFIX%" rmdir /q /s "%HB_INSTALL_PREFIX%"
|
||||
|
||||
rem ; Option setup
|
||||
set HB_BUILD_LOG=yes
|
||||
set HB_BUILD_DLL=yes
|
||||
set HB_BUILD_OPTIM=yes
|
||||
set HB_BUILD_DEBUG=no
|
||||
set HB_BUILD_IMPLIB=no
|
||||
|
||||
rem ; Build Harbour
|
||||
call "%~dp0make_gnu.bat" clean install
|
||||
|
||||
if errorlevel 1 echo Harbour build returned: %ERRORLEVEL%
|
||||
rem if errorlevel 1 goto MK_ERROR
|
||||
|
||||
rem ; Final name setup
|
||||
if "%HB_ARCHITECTURE%" == "dos" set HB_VERSION=2b2
|
||||
if "%HB_ARCHITECTURE%" == "dos" set HB_PKGNAME=hb%HB_VERSION%%HB_COMPILER:~0,2%
|
||||
if "%HB_ARCHITECTURE%" == "dos" set HB_DIRNAME=%HB_PKGNAME%
|
||||
if not "%HB_ARCHITECTURE%" == "dos" set HB_VERSION=2.0.0beta2
|
||||
if not "%HB_ARCHITECTURE%" == "dos" set HB_PKGNAME=harbour-%HB_VERSION%-%HB_ARCHITECTURE%-%HB_COMPILER%
|
||||
if not "%HB_ARCHITECTURE%" == "dos" set HB_DIRNAME=harbour-%HB_ARCHITECTURE%-%HB_COMPILER%
|
||||
|
||||
rem ; Rename temp dir to final name
|
||||
if exist "%HB_INSTALL_BASE%\%HB_DIRNAME%" rmdir /q /s "%HB_INSTALL_BASE%\%HB_DIRNAME%"
|
||||
move "%HB_INSTALL_PREFIX%" "%HB_INSTALL_BASE%\%HB_DIRNAME%" > 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
|
||||
@@ -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/"
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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<lev> can be: min, max, def" ) },;
|
||||
{ "-[no]run" , I_( "run/don't run output executable" ) },;
|
||||
{ "-vcshead=<file>" , 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=<file>" , 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=<file>" , 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=<file>" , I_( "set <file> as application icon. <file> should be a supported format on the target platform (experimental)" ) },;
|
||||
{ "-instpath=<path>" , I_( "copy target to <path>. if <path> is a directory, it should end with path separator. can be specified multiple times" ) },;
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user