Skip to content

Commit

Permalink
Set macOS builds to use cocoa
Browse files Browse the repository at this point in the history
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
  • Loading branch information
someperson committed Jul 13, 2019
1 parent 4771812 commit 5a76765
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Makefile.fpc
Original file line number Diff line number Diff line change
Expand Up @@ -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),)
Expand Down
5 changes: 3 additions & 2 deletions setup/macosx/compilers.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand All @@ -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
4 changes: 2 additions & 2 deletions setup/macosx/create_app_new.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 5a76765

Please sign in to comment.