Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use 64-bit Cocoa instead of 32-bit Carbon for macOS builds #1224

Merged
merged 1 commit into from
Sep 13, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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