How to build Harbour for iOS (and simulator)

How to build Harbour for iOS (and simulator)

Postby Antonio Linares » Thu Apr 07, 2016 3:49 pm

For iOS (iPhone/iPad). Next post is for simulator:

https://bitbucket.org/fivetech/harbour-xharbour-builds/downloads/harbour_ios_20160401.zip

To build it:
git clone https://github.com/harbour/core.git harbour_ios

ios.sh (remember to do chmod +x ios.sh. To execute it ./ios.sh)

#!/bin/bash

export IPHONEOS_DEPLOYMENT_TARGET="8.0"
export QTPATH=/Users/$USER/Qt/5.6/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_ios/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/darwin/clang

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_ios/openssl-1.0.1k/include

make
regards, saludos

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

Re: How to build Harbour for iOS (and simulator)

Postby Antonio Linares » Thu Apr 07, 2016 3:54 pm

For iOS simulator:

https://bitbucket.org/fivetech/harbour-xharbour-builds/downloads/harbour_ios_simulator_20160401.zip

To build it:
git clone https://github.com/harbour/core.git harbour_iossim

iossim.sh (remember to do chmod +x iossim.sh. To execute it ./iossim.sh)

#!/bin/bash

export IPHONEOS_DEPLOYMENT_TARGET="8.0"
export QTPATH=/Users/$USER/Qt/5.6/ios

export IOS_PLAT=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform
export IOS_DEFAULT=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain
export PATH="/Users/$USER/harbour_iossim/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/iPhoneSimulator.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/darwin/clang

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\ i386\ -arch\ x86_64\ -fobjc-abi-version=2\ -mios-simulator-version-min=6.0\ -fobjc-legacy-dispatch\ -DHB_MAIN_WIN\ -DHB_BUILD_IOS\ -I$SDK_INCLUDE
export HB_USER_DFLAGS=-arch\ i386\ -arch\ x86_64\ -fobjc-abi-version=2\ -mios-simulator-version-min=6.0\ -fobjc-legacy-dispatch\ -L$SDK_LIB\ -L$SDK_LIB_SYSTEM
export HB_USER_LDFLAGS=-arch\ i386\ -arch\ x86_64\ -fobjc-abi-version=2\ -mios-simulator-version-min=6.0\ -fobjc-legacy-dispatch\ -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:$SDK_INCLUDE

#export HB_BUILD_3RDEXT=no

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

make
regards, saludos

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


Return to Utilities / Utilidades

Who is online

Users browsing this forum: No registered users and 5 guests