Hb
Harbour fork (from https://github.com/harbour/core) + updates & fixes = 3.4
Install / Use
/learn @vszakats/HbREADME
Welcome to Harbour
Harbour is the open/free software implementation of a cross-platform, multi-threading, object-oriented, scriptable programming language, backwards compatible with xBase languages. Harbour consists of a compiler and runtime libraries with multiple UI, database and I/O backends, its own build system and a collection of libraries and bindings for popular APIs.
Table of Contents
- How to Get
- How to Build
- How to Do a Partial Build
- How to Create Packages for Distribution
- How to Enable Optional Components
- Build Options
- Build Examples
- Build Your Own Harbour App
- Debugging Options
- Supported Platforms and C Compilers
- Platform Matrix
- External Links
- Harbour Links
- Guarantees and Liability
How to Get
Stable versions (non-fork/mainline)
Harbour stable binary download
https://github.com/vszakats/hb/releases/tag/v3.0.0
NOTE: It is identical to the mainline stable release, but not supported or recommended by this fork.
Harbour stable source download
https://github.com/vszakats/hb/archive/v3.0.0.zip
Unstable versions
TIP: For users contributing to development, it's recommended to follow commits and reading ChangeLog.txt.
Harbour live source repository
You will need Git version control software installed on your system
and use this command (remove the --depth option to clone the whole
history — useful for development):
git clone --depth=10 https://github.com/vszakats/hb.git
You can get subsequent updates using this command:
git pull
Harbour unstable sources
Download source archive from any of these URLs and unpack:
Harbour unstable binaries (updated after each commit)
Windows (MinGW, 64-bit hosted, 32/64-bit targets, compressed archive)
Mac (using Homebrew)
brew install https://raw.githubusercontent.com/vszakats/hb/main/package/hb@3.4.rb --HEAD
Follow commits using:
- Web browser
- RSS feed
- Any compatible mobile/desktop client app
How to Build
For all platforms you will need:
- Supported ANSI C89 compiler
- GNU Make (3.81 or upper)
- Harbour sources
on Windows hosts
Platform specific prerequisites:
- Windows 7 or upper system is recommended to build Harbour. (64-bit edition is recommended.)
- Consider using the binary release. On Windows, it is recommended for most people. You can still rebuild specific contribs this way.
- Make sure to have your C compiler of choice installed in
PATH. Refer to your C compiler installation and setup instructions for details. Make sure no tools in yourPATHbelonging to other C compilers are interfering with your setup. Also avoid to keep multiple copies of the same compiler, or different versions of the same compiler inPATHat the same time. For the list of supported compilers, look up Supported Platforms and C Compilers. - A native build of GNU Make is required. It is usually named
mingw32-make.exe. It's distributed in MSYS2, mingw-w64 packages. You can find download links here. Unpack it to yourPATHor Harbour source root directory, and run it asmingw32-make.
To build:
$ mingw32-make
To test it, type:
$ cd tests
$ ..\bin\<plat>\<comp>\hbmk2 hello.prg
$ hello
You should see Hello, world! on screen.
on Windows hosts with POSIX shells (MSYS2)
To build:
$ sh -c make
To test it, type:
$ cd tests
$ ..\bin\<plat>\<comp>\hbmk2 hello.prg
$ hello
You should see Hello, world! on screen.
on Linux hosts (possible cross-build targets: Windows, Windows CE, MS-DOS, OS/2)
To build:
$ make [HB_PLATFORM=<...>]
To test it, type:
$ cd tests
$ ../bin/<plat>/<comp>/hbmk2 hello.prg
$ ./hello
You should see Hello, world! on screen.
on Darwin (Mac) hosts (possible cross-build targets: Windows)
Platform specific prerequisite: Xcode or Command Line Tools for Xcode installed
To build:
$ make [HB_PLATFORM=<...>]
To test it, type:
$ cd tests
$ ../bin/<plat>/<comp>/hbmk2 hello.prg
$ ./hello
You should see Hello, world! on screen.
You can override default (host) architecture by adding values below to
HB_USER_CFLAGS,HB_USER_LDFLAGSenvvars, you can use multiple values:<br> <br> ARM64:-arch arm64<br> Intel 64-bit:-arch x86_64<br>
on FreeBSD hosts
Platform specific prerequisites:
-
You will need to have the developer tools installed.
-
Then you will need to install gmake and optionally bison:
$ pkg install gmake bison
To build:
$ gmake
To test it, type:
$ cd tests
$ ../bin/<plat>/<comp>/hbmk2 hello.prg
$ ./hello
You should see Hello, world! on screen.
on Minix hosts
Install GNU make from the Minix pkgsrc repository; for details see here.
You may also install GCC, if you wish to use that instead of Clang, the Minix system compiler.
on other *nix hosts
To build:
$ gmake [HB_PLATFORM=<...>]
Or
$ make [HB_PLATFORM=<...>]
To test it, type:
$ cd tests
$ ../bin/<plat>/<comp>/hbmk2 hello.prg
$ ./hello
You should see Hello, world! on screen.
For sunpro on Solaris:<br> If you have any GNU binutils stuff installed, do make sure
/usr/ccs/bin(the location of the native Sun C compilation system tools) come before the GNU binutils components in your$PATH.
How to Do a Partial Build
If you want to build only a specific part of Harbour, like one core library or all core libraries, or all contrib packages, you have to do everything the same way as for a full build, the only difference is that you first have to go into the specific source directory you'd like to build. When starting GNU Make, all components under that directory will be built:
cd src/rtl
<make> [clean]
If you want to rebuild one specific contrib package, use this:
On *nix systems
$ cd contrib/<name>
$ make.hb [clean] [custom hbmk2 options]
On Windows
$ cd contrib/<name>
$ hbmk2 make.hb [clean] [custom hbmk2 options]
Where
make.hbandhbmk2must be inPATH.
How to Create Packages for Distribution
Source .tgz on *nix
$ package/mpkg_src.sh
Binary .tgz on *nix
$ export HB_BUILD_PKG=yes
$ make clean install
Binary .deb on Linux
$ fakeroot debian/rules binary
Binary .rpm on Linux
$ package/mpkg_rpm.sh
You can fine-tune the build with these options:
--with static - link all binaries with static libs
--with localzlib - build local copy of zlib library
--with localpcre2 - build local copy of pcre2 library
--with localpcre1 - build local copy of pcre1 library
--without x11 - do not build components dependent on x11 (gtxwc)
--without curses - do not build components dependent on curses (gtcrs)
--without slang - do not build components dependent on slang (gtsln)
--without gpllib - do not build components dependent on GPL 3rd party code
--without gpm - build components without gpm support (gttrm, gtsln, gtcrs)
Binary .rpm on Linux (cross-builds)
for Windows
$ package/mpkg_rpm_win.sh
for Windows CE
$ package/mpkg_rpm_wce.sh
Binary .7z archive on Windows for all targets (except Linux)
$ set HB_DIR_7Z=C:\7-zip\
$ set HB_BUILD_PKG=yes
Then run build as usual with clean install options.
See: How to Build
How to Enable Optional Components
Certain Harbour parts — typically contrib packages — depend on 3rd party components. To make these Harbour parts built, you need to tell Harbour where to find the headers for these 3rd party components.
On *nix systems most of these 3rd party components will automatically be used if installed on well-known standard system locations.
You only need to use manual setup if the dependency isn't available on your platform on a system location, or you wish to use a non-standard location. Typically, you need to do this on non-*nix (e.g. Windows) systems for all packages and for a few packages on *nix that are not available via official package managers (e.g. ADS Client).
Note that Harbour will use 3rd party binary packages in their default, unmodified — "vanilla" — install layout created by their official/mainstream install kits. If you manually move, rename, remove, add files under the 3rd party packages' root directory, or use a source package,
