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

Fixed "New connection" dialog on macOS

Fixed "Show advanced options" checkbox on macOS

Bumped Lazarus to 2.0.4 and FPC to 3.0.4a

Bumped build environment to xcode10.3

Added flags to lazbuild command in order to build the application fully using x86_64 cocoa

Enabled smart linking in order to allow compilation fully without Carbon
to succeed

Set resulting DMG filesystem to HFS+
  • Loading branch information
someperson committed Sep 8, 2019
1 parent 2aa9adc commit 056a18c
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ matrix:
deploy: *deploy

- os: osx
osx_image: xcode9.4
osx_image: xcode10.3
stage: build
env:
- arch=osx
Expand Down
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: 5 additions & 0 deletions connoptions.pas
Original file line number Diff line number Diff line change
Expand Up @@ -219,12 +219,17 @@ procedure TConnOptionsForm.cbShowAdvancedClick(Sender: TObject);
edCertFile.Visible:=cbShowAdvanced.Checked;
txCertPass.Visible:=cbShowAdvanced.Checked;
edCertPass.Visible:=cbShowAdvanced.Checked;
{$ifndef LCLCocoa}
{$ifndef LCLgtk2}
tabConnection.TabVisible:=cbShowAdvanced.Checked;
{$endif LCLgtk2}
tabProxy.TabVisible:=cbShowAdvanced.Checked;
tabPaths.TabVisible:=cbShowAdvanced.Checked;
tabMisc.TabVisible:=cbShowAdvanced.Checked;
{$endif LCLCocoa}
{$ifdef LCLCocoa}
Page.ShowTabs:=cbShowAdvanced.Checked;
{$endif LCLCocoa}
cbShowAdvanced.Visible:=not cbShowAdvanced.Checked;
Page.ActivePage:=tabConnection;
end;
Expand Down
8 changes: 4 additions & 4 deletions setup/macosx/create_app_new.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ fi
mkdir -p ../../Release/
sed -i.bak "s/'Version %s'/'Version %s Build $build'#13#10'Compiled by: $fpc_ver, Lazarus v$lazarus_ver'/" ../../about.lfm

lazbuild -B ../../transgui.lpi --lazarusdir=/Developer/lazarus/
lazbuild -B ../../transgui.lpi --lazarusdir=/Developer/lazarus/ --compiler=/usr/local/bin/fpc --cpu=x86_64 --widgetset=cocoa

# 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 All @@ -54,7 +54,7 @@ sed -e "s/@prog_ver@/$prog_ver/" Info.plist > "$appfolder/Contents/Info.plist"

ln -s /Applications "$dmgfolder/Drag \"Transmission Remote GUI\" here!"

hdiutil create -ov -anyowners -volname "transgui-v$prog_ver" -format UDRW -srcfolder ./Release "tmp.dmg"
hdiutil create -ov -anyowners -volname "transgui-v$prog_ver" -format UDRW -srcfolder ./Release -fs HFS+ "tmp.dmg"

mount_device="$(hdiutil attach -readwrite -noautoopen "tmp.dmg" | awk 'NR==1{print$1}')"
mount_volume="$(mount | grep "$mount_device" | sed 's/^[^ ]* on //;s/ ([^)]*)$//')"
Expand Down
7 changes: 4 additions & 3 deletions setup/macosx/install_deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
set -x
set -e

lazarus_ver="1.8.4"
fpc="fpc-3.0.4.intel-macosx"
lazarus="lazarus-1.8.4-i686-macosx"
lazarus_ver="2.0.4"
fpc="fpc-3.0.4a.intel-macosx"
lazarus="lazarus-2.0.4-i686-macosx"

if [ -n "${sourceforge_mirror-}" ]; then
mirror_string="&use_mirror=${sourceforge_mirror}"
Expand All @@ -27,4 +27,5 @@ if [ ! -x "$(command -v lazbuild 2>&1)" ]; then
sudo installer -pkg "$pkgpath/lazarus.pkg" -target /
hdiutil unmount "$pkgpath"
rm "$lazarus.dmg"
lazbuild --build-ide= --compiler=fpc --cpu=x86_64 --widgetset=cocoa
fi

0 comments on commit 056a18c

Please sign in to comment.