Skip to content

Commit 0dd56f8

Browse files
somepersonSam Townsend
authored and
Sam Townsend
committed
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 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+
1 parent 51b9d51 commit 0dd56f8

File tree

7 files changed

+17
-11
lines changed

7 files changed

+17
-11
lines changed

.travis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ matrix:
146146
deploy: *deploy
147147

148148
- os: osx
149-
osx_image: xcode9.4
149+
osx_image: xcode10.3
150150
stage: build
151151
env:
152152
- arch=osx

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ ifneq ($(findstring $(OS_TARGET),win32,win64),)
311311
LCL_WIDGETSET=win32
312312
endif
313313
ifneq ($(findstring $(OS_TARGET),darwin),)
314-
LCL_WIDGETSET=carbon
314+
LCL_WIDGETSET=cocoa
315315
endif
316316
ifeq ($(DEBUG),)
317317
COMP_OPT=-O3 -g- -CX -XX -Xs -Scgi -l -vewnhibq

Makefile.fpc

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ ifneq ($(findstring $(OS_TARGET),win32,win64),)
3737
LCL_WIDGETSET=win32
3838
endif
3939
ifneq ($(findstring $(OS_TARGET),darwin),)
40-
LCL_WIDGETSET=carbon
40+
LCL_WIDGETSET=cocoa
4141
endif
4242

4343
ifeq ($(DEBUG),)

connoptions.pas

+5
Original file line numberDiff line numberDiff line change
@@ -219,12 +219,17 @@ procedure TConnOptionsForm.cbShowAdvancedClick(Sender: TObject);
219219
edCertFile.Visible:=cbShowAdvanced.Checked;
220220
txCertPass.Visible:=cbShowAdvanced.Checked;
221221
edCertPass.Visible:=cbShowAdvanced.Checked;
222+
{$ifndef LCLCocoa}
222223
{$ifndef LCLgtk2}
223224
tabConnection.TabVisible:=cbShowAdvanced.Checked;
224225
{$endif LCLgtk2}
225226
tabProxy.TabVisible:=cbShowAdvanced.Checked;
226227
tabPaths.TabVisible:=cbShowAdvanced.Checked;
227228
tabMisc.TabVisible:=cbShowAdvanced.Checked;
229+
{$endif LCLCocoa}
230+
{$ifdef LCLCocoa}
231+
Page.ShowTabs:=cbShowAdvanced.Checked;
232+
{$endif LCLCocoa}
228233
cbShowAdvanced.Visible:=not cbShowAdvanced.Checked;
229234
Page.ActivePage:=tabConnection;
230235
end;

setup/macosx/create_app_new.sh

+4-4
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@ fi
2424
mkdir -p ../../Release/
2525
sed -i.bak "s/'Version %s'/'Version %s Build $build'#13#10'Compiled by: $fpc_ver, Lazarus v$lazarus_ver'/" ../../about.lfm
2626

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

2929
# Building Intel version
30-
make -j"$(sysctl -n hw.ncpu)" -C ../.. clean CPU_TARGET=i386 "$lazdir"
31-
make -j"$(sysctl -n hw.ncpu)" -C ../.. CPU_TARGET=i386 "$lazdir"
30+
make -j"$(sysctl -n hw.ncpu)" -C ../.. clean CPU_TARGET=x86_64 "$lazdir"
31+
make -j"$(sysctl -n hw.ncpu)" -C ../.. CPU_TARGET=x86_64 "$lazdir"
3232

3333
if ! [ -e $exename ]; then
3434
echo "$exename does not exist"
@@ -54,7 +54,7 @@ sed -e "s/@prog_ver@/$prog_ver/" Info.plist > "$appfolder/Contents/Info.plist"
5454

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

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

5959
mount_device="$(hdiutil attach -readwrite -noautoopen "tmp.dmg" | awk 'NR==1{print$1}')"
6060
mount_volume="$(mount | grep "$mount_device" | sed 's/^[^ ]* on //;s/ ([^)]*)$//')"

setup/macosx/install_deps.sh

+4-3
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
set -x
44
set -e
55

6-
lazarus_ver="1.8.4"
7-
fpc="fpc-3.0.4.intel-macosx"
8-
lazarus="lazarus-1.8.4-i686-macosx"
6+
lazarus_ver="2.0.4"
7+
fpc="fpc-3.0.4a.intel-macosx"
8+
lazarus="lazarus-2.0.4-i686-macosx"
99

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

transgui.lpi

+1-1
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@
211211
<Verbosity>
212212
<ShowHints Value="False"/>
213213
</Verbosity>
214-
<CustomOptions Value="-Sa"/>
214+
<CustomOptions Value="-Sa -CX -XX"/>
215215
<ExecuteBefore>
216216
<ShowAllMessages Value="True"/>
217217
</ExecuteBefore>

0 commit comments

Comments
 (0)