From 5a76765bd639955c1a74b8655803abfd3098e67f Mon Sep 17 00:00:00 2001 From: Sam Townsend Date: Sun, 23 Jun 2019 23:30:52 -0500 Subject: [PATCH] Set macOS builds to use cocoa Reverted VERSION.txt and changed compilers.sh to build correct version of Lazarus Use x86_64 compiler when building Lazarus Rebased cocoa branch onto latest upstream master Bumped FPC to 3.0.4a and Lazarus to 2.0.2a Reverted FPC to 3.0.4 --- Makefile | 2 +- Makefile.fpc | 2 +- setup/macosx/compilers.sh | 5 +++-- setup/macosx/create_app_new.sh | 4 ++-- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index cd1a418b..339a9360 100644 --- a/Makefile +++ b/Makefile @@ -311,7 +311,7 @@ ifneq ($(findstring $(OS_TARGET),win32,win64),) LCL_WIDGETSET=win32 endif ifneq ($(findstring $(OS_TARGET),darwin),) -LCL_WIDGETSET=carbon +LCL_WIDGETSET=cocoa endif ifeq ($(DEBUG),) COMP_OPT=-O3 -g- -CX -XX -Xs -Scgi -l -vewnhibq diff --git a/Makefile.fpc b/Makefile.fpc index b332e6b2..4622c4d4 100644 --- a/Makefile.fpc +++ b/Makefile.fpc @@ -37,7 +37,7 @@ ifneq ($(findstring $(OS_TARGET),win32,win64),) LCL_WIDGETSET=win32 endif ifneq ($(findstring $(OS_TARGET),darwin),) -LCL_WIDGETSET=carbon +LCL_WIDGETSET=cocoa endif ifeq ($(DEBUG),) diff --git a/setup/macosx/compilers.sh b/setup/macosx/compilers.sh index b434d19c..453e9e72 100755 --- a/setup/macosx/compilers.sh +++ b/setup/macosx/compilers.sh @@ -3,7 +3,7 @@ set -x fpc="fpc-3.0.4.intel-macosx" -lazarus="lazarus-1.8.2-i686-macosx" +lazarus="lazarus-2.0.2a-i686-macosx" if [ -n "${sourceforge_mirror-}" ]; then mirror_string="&use_mirror=${sourceforge_mirror}" @@ -19,10 +19,11 @@ if [ ! -x "$(command -v fpc 2>&1)" ]; then fi if [ ! -x "$(command -v lazbuild 2>&1)" ]; then - wget "https://downloads.sourceforge.net/project/lazarus/Lazarus%20Mac%20OS%20X%20i386/Lazarus%201.8.2/$lazarus.dmg?r=&ts=$(date +%s)${mirror_string-}" -O "$lazarus.dmg" + wget "https://downloads.sourceforge.net/project/lazarus/Lazarus%20Mac%20OS%20X%20i386/Lazarus%202.0.2/$lazarus.dmg?r=&ts=$(date +%s)${mirror_string-}" -O "$lazarus.dmg" hdiutil attach -quiet "$lazarus.dmg" pkgpath="$(hdiutil attach "$lazarus.dmg" | command awk "/Apple_HFS/ { print \$3 }")" sudo installer -pkg "$pkgpath/lazarus.pkg" -target / hdiutil unmount "$pkgpath" rm "$lazarus.dmg" + lazbuild --build-ide= --compiler=ppcx64 --cpu=x86_64 --widgetset=cocoa fi diff --git a/setup/macosx/create_app_new.sh b/setup/macosx/create_app_new.sh index 459a2c3e..b77cea87 100755 --- a/setup/macosx/create_app_new.sh +++ b/setup/macosx/create_app_new.sh @@ -25,8 +25,8 @@ sed -i.bak "s/'Version %s'/'Version %s Build $build'#13#10'Compiled by: $fpc_ver lazbuild -B ../../transgui.lpi --lazarusdir=/Developer/lazarus/ # Building Intel version -make -j"$(sysctl -n hw.ncpu)" -C ../.. clean CPU_TARGET=i386 "$lazdir" -make -j"$(sysctl -n hw.ncpu)" -C ../.. CPU_TARGET=i386 "$lazdir" +make -j"$(sysctl -n hw.ncpu)" -C ../.. clean CPU_TARGET=x86_64 "$lazdir" +make -j"$(sysctl -n hw.ncpu)" -C ../.. CPU_TARGET=x86_64 "$lazdir" if ! [ -e $exename ]; then echo "$exename does not exist"