How to build Harbour 32 & 64 bits

User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: How to build Harbour 32 & 64 bits

Post by Antonio Linares »

How to build Harbour for WinCE using MinGW on Windows:

http://sourceforge.net/projects/cegcc/files/

goce.bat

Code: Select all

set path=c:\mingw32ce\arm-mingw32ce\bin\
set HB_ARCHITECTURE=wce
set HB_COMPILER=mingwarm
win-make
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: How to build Harbour 32 & 64 bits

Post by Antonio Linares »

Harbour for WinCE using Visual Studio 2012:

We have to install "Windows Mobile 5.0 SDK for Pocket PC" from here:
http://www.microsoft.com/en-us/download ... aspx?id=42

It refuses to install as it requires some extra tools, but we can force it to install:

Code: Select all

msiexec /a "Windows Mobile 5.0 Pocket PC SDK.msi"
goce2012.bat

Code: Select all

call "%ProgramFiles(x86)%\Microsoft Visual Studio 11.0\VC\vcvarsall.bat" x86_arm
set HB_COMPILER=msvcarm
set HB_USER_CFLAGS=/D_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE
set LIB=%LIB%;"c:\Windows Mobile 5.0 Pocket PC SDK\Lib\ARMV4I"
win-make > build.log
notepad build.log
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: How to build Harbour 32 & 64 bits

Post by Antonio Linares »

In order to build the most recent Harbour 3.2 this line has to be commented from:

c:\harbour\src\3rd\png\Makefile

#HB_CFLAGS += -DPNG_NO_STDIO

Notice the "#"
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: How to build Harbour 32 & 64 bits

Post by Antonio Linares »

To build Harbour 64 bits using Visual Studio 2013:

HB_BUILD_MODE can be set as "c" or as "cpp". We use "c"

go64.bat

Code: Select all

call "%ProgramFiles(x86)%\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" x86_amd64
set HB_BUILD_MODE=c
win-make.exe
To clean a previously built Harbour 64 bits just add "clean" after win-make.exe

Code: Select all

call "%ProgramFiles(x86)%\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" x86_amd64
set HB_BUILD_MODE=c
win-make.exe clean
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: How to build Harbour 32 & 64 bits

Post by Antonio Linares »

Harbour for Android (thanks to Pritpal for his help)
@echo off

set QT_PATH=C:\Qt540\5.4\android_armv7
set HB_WITH_QT=%QT_PATH%\include
set HB_QTPATH=%QT_PATH%\bin

set MINGWROOT=C:\Qt540\Tools\mingw491_32

set NDK=C:\qt-android\ndk
set NDKSTL=%NDK%\sources\cxx-stl\gnu-libstdc++\4.8

set LVL=9

set CPU=arm
set CCOMP=4.8

set PLATFORM=android-%LVL%
set HOST_CPU=windows


set SYSROOT=%NDK%\platforms\%PLATFORM%\arch-%CPU%

if "%CPU%" == "arm" set TCHAIN=arm-linux-androideabi
if "%CPU%" == "mips" set TCHAIN=mipsel-linux-android
if "%CPU%" == "x86" set TCHAIN=x86

set HB_PLATFORM=android
set HB_COMPILER=gccarm
set HB_CCPREFIX=%NDK%\toolchains\%TCHAIN%-%CCOMP%\prebuilt\%HOST_CPU%\bin\%TCHAIN%-

echo %HB_CCPREFIX%

set HB_USER_CFLAGS=--sysroot=%SYSROOT% -I%NDKSTL%\include -I%NDKSTL%\libs\armeabi-v7a\include -I%NDK%\platforms\android-9\arch-arm\usr\include
set HB_USER_DFLAGS=--sysroot=%SYSROOT%
set HB_USER_LDFLAGS=--sysroot=%SYSROOT% -lm



:set path=%MINGWROOT%\bin;C:\harbour\bin\win\mingw;%path%
set PATH=C:\harbour\bin\win\mingw;%PATH%

:set HB_INSTALL_PREFIX=C:\harbour
set HB_BUILD_3RDEXT=no
set HB_BUILD_DYN=no
set HB_BUILD_CONTRIB_DYN=no

SET HB_WITH_OPENSSL=C:\OpenSSL\include
SET HB_STATIC_OPENSSL=1


if not "%1" == "clean" goto skip_clean
win-make %1
shift
:skip_clean
:win-make install %1 %2 %3 %4 %5 %6 %7 %8 %9 > log-%PLATFORM% 2> log-%PLATFORM%.err

set HBMK2A=%HB_INSTALL_PREFIX%\bin\hbmk2a.bat

echo @echo off> %HBMK2A%
echo.>> %HBMK2A%
echo set SYSROOT=%NDK%\platforms\%PLATFORM%\arch-%CPU%>> %HBMK2A%
echo.>> %HBMK2A%
echo.>> %HBMK2A%
echo set HB_PLATFORM=%HB_PLATFORM%>> %HBMK2A%
echo set HB_COMPILER=%HB_COMPILER%>> %HBMK2A%
echo set HB_CCPREFIX=%HB_CCPREFIX%>> %HBMK2A%
echo set HB_INSTALL_PREFIX=%HB_INSTALL_PREFIX%>> %HBMK2A%
echo.>> %HBMK2A%
echo set HB_USER_CFLAGS=%HB_USER_CFLAGS%>> %HBMK2A%
echo set HB_USER_DFLAGS=%HB_USER_DFLAGS%>> %HBMK2A%
echo set HB_USER_LDFLAGS=%HB_USER_LDFLAGS%>> %HBMK2A%
echo.>> %HBMK2A%
echo hbmk2 -plat=android %%1 %%2 %%3 %%4 %%5 %%6 %%7 %%8 %%9>> %HBMK2A%
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
JmGarcia
Posts: 654
Joined: Mon May 29, 2006 3:14 pm
Location: Madrid - ESPAÑA

Re: How to build Harbour 32 & 64 bits

Post by JmGarcia »

Antonio Linares wrote:Harbour for Android

No entiendo... :cry:
Mi abuelo decía: Los aviones vuelan porque Dios quiere, y los helicópteros ni Dios sabe porque vuelan.
FWH 16.02, xHarbour 1.2.3, Harbour 3.2.0, WorkShop 4.5, AJ Make 0.30, Borlan BCC 7.00, VisualStudio 2013
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: How to build Harbour 32 & 64 bits

Post by Antonio Linares »

JM,

Lo he copiado ahí a modo de recordatorio. Me lo han dado así.

Cuando lo pruebe y lo depure, lo volveré a publicar :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: How to build Harbour 32 & 64 bits

Post by Antonio Linares »

Harbour for iOS (thanks to Pritpal for his help)

iphone.sh

Code: Select all

#!/bin/bash

export QTPATH=/Users/$USER/Qt/5.4/ios

export IOS_PLAT=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform
export IOS_DEFAULT=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain
export PATH="/Users/$USER/harbour/bin/production:$IOS_PLAT/Developer/usr/bin:$IOS_PLAT/Developer/usr/local/bin:$IOS_PLAT/usr/bin:$IOS_PLAT/usr/local/bin:/Applications/Xcode.app/Contents/Developer/Tools:$IOS_DEFAULT/usr/bin:$IOS_DEFAULT/usr/libexec:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin"

export SDK_INCLUDE=$IOS_PLAT/Developer/SDKs/iPhoneOS.sdk/usr/include
export SDK_LIB=$IOS_PLAT/Developer/SDKs/iPhoneOS.sdk/usr/lib
export SDK_LIB_SYSTEM=$IOS_PLAT/Developer/SDKs/iPhoneOS.sdk/usr/lib/system

export HB_BUILD_NAME=-iphone
export __ios__=yes

export HB_HOST_BIN=/Users/$USER/harbour/bin/production

export HB_WITH_PCRE=local
export HB_WITH_ZLIB=local
export HB_WITH_BZIP2=local
export HB_WITH_JPEG=local
export HB_WITH_PNG=local
export HB_WITH_TIFF=local
export HB_WITH_LIBHARU=local
export HB_WITH_SQLITE3=local

export HB_BUILD_DYN=no
export HB_BUILD_PARTS=lib

export HB_USER_CFLAGS=-arch\ armv7\ -arch\ arm64\ -DHB_MAIN_WIN\ -DHB_BUILD_IOS\ -I$SDK_INCLUDE
export HB_USER_DFLAGS=-arch\ armv7\ -arch\ arm64\ -L$SDK_LIB\ -L$SDK_LIB_SYSTEM
export HB_USER_LDFLAGS=-arch\ armv7\ -arch\ arm64\ -L$SDK_LIB\ -L$SDK_LIB_SYSTEM

export HB_STATIC_QT=yes
export HB_QT_MAJOR_VERSION=5
export HB_QTPATH=$QTPATH/bin
export HB_WITH_QT=$QTPATH/include

#export HB_BUILD_3RDEXT=no

export HB_STATIC_OPENSSL=1
export HB_WITH_OPENSSL=/Users/$USER/harbour/openssl-1.0.1k/include

make
 
osx.sh

Code: Select all

#!/bin/bash

#  Standard OS X builds
#
#export HB_QTPATH=/usr/local/opt/qt5/bin
#export HB_WITH_QT=/usr/local/opt/qt5/include
#export PATH="/Users/$USER/harbour/bin/darwin/clang:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin"


#export QTPATH=/Users/$USER/Qt/5.4/clang_64
export QTPATH=/usr/local/opt/qt5

export IOS_PLAT=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform
export IOS_DEFAULT=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain
export PATH="/Users/$USER/harbour/bin/production:$IOS_PLAT/Developer/usr/bin:$IOS_PLAT/Developer/usr/local/bin:$IOS_PLAT/usr/bin:$IOS_PLAT/usr/local/bin:/Applications/Xcode.app/Contents/Developer/Tools:$IOS_DEFAULT/usr/bin:$IOS_DEFAULT/usr/libexec:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin"

export SDK_INCLUDE=$IOS_PLAT/Developer/SDKs/MacOSX10.9.sdk/usr/include
export SDK_LIB=$IOS_PLAT/Developer/SDKs/MacOSX10.9.sdk/usr/lib
export SDK_LIB_SYSTEM=$IOS_PLAT/Developer/SDKs/MacOSX10.9.sdk/usr/lib/system

export HB_WITH_PCRE=local
export HB_WITH_ZLIB=local
export HB_WITH_BZIP2=local
export HB_WITH_JPEG=local
export HB_WITH_PNG=local
export HB_WITH_TIFF=local
export HB_WITH_LIBHARU=local
export HB_WITH_SQLITE3=local

export HB_USER_CFLAGS=-I$SDK_INCLUDE
export HB_USER_DFLAGS=-L$SDK_LIB\ -L$SDK_LIB_SYSTEM
export HB_USER_LDFLAGS=-L$SDK_LIB\ -L$SDK_LIB_SYSTEM

export HB_QT_MAJOR_VERSION=5
export HB_QTPATH=$QTPATH/bin
export HB_WITH_QT=$QTPATH/include

export HB_STATIC_OPENSSL=1
export HB_WITH_OPENSSL=/Users/curacao/harbour/openssl-1.0.1k/include

make
 
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: How to build Harbour 32 & 64 bits

Post by Antonio Linares »

regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: How to build Harbour 32 & 64 bits

Post by Antonio Linares »

Building Harbour with msvc64

go64.bat

Code: Select all

call "%ProgramFiles(x86)%\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsall.bat" x86_amd64
set HB_BUILD_MODE=c
set HB_USER_PRGFLAGS=-l-
set HB_BUILD_CONTRIBS
set HB_WITH_OPENSSL=c:\OpenSSL-Win64\include
set HB_WITH_CURL=c:\curl\include
set HB_OPENSSL_STATIC=yes      
set HB_STATIC_OPENSSL=yes  
set HB_STATIC_CURL=yes
set HB_BUILD_DYN=no
set HB_BUILD_CONTRIB_DYN=no
del .\src\common\obj\win\msvc64\hbver.obj
del .\src\common\obj\win\msvc64\hbver_dyn.obj
del .\src\common\obj\win\msvc\hbverdsp.obj
win-make.exe
copy c:\harbour\lib\win\msvc64\libcurl-x64.lib c:\harbour\lib\win\msvc64\libcurl.lib
copy c:\harbour\lib\win\msvc64\libssl-1_1-x64.lib c:\harbour\lib\win\msvc64\ssleay32.lib
copy c:\harbour\lib\win\msvc64\libcrypto-1_1-x64.lib c:\harbour\lib\win\msvc64\libcrypto.lib
regards, saludos

Antonio Linares
www.fivetechsoft.com
Post Reply