-
Notifications
You must be signed in to change notification settings - Fork 23
/
_osx.command
executable file
·64 lines (43 loc) · 2.36 KB
/
_osx.command
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#!/bin/sh
#to make Lazarus for cocoa
# make LCL_PLATFORM=cocoa CPU_TARGET=x86_64 clean bigide
# lazbuild -B --ws=cocoa ./simplelaz.lpr
# ./lazbuild --ws=carbon --compiler="/usr/local/lib/fpc/3.0.4/ppc386" --cpu=i386 --add-package lazopenglcontext --add-package pascalscript --build-ide=
# ./lazbuild --ws=cocoa --add-package lazopenglcontext --add-package pascalscript --build-ide=
# ./lazbuild --ws=cocoa --compiler="/usr/local/lib/fpc/3.0.4/ppcx64" --cpu=x86_64 --add-package lazopenglcontext --add-package pascalscript --build-ide=
find /Users/rorden/Documents/osx -name ‘*.DS_Store’ -type f -delete
cd ~/Documents/pas/surfice/
rm -rf lib
#1.) build OpenGL core version of surfice
#the copy of glext that comes with freepascal 3.0 does not support geometry shaders
# cp ./coregl/glext.pp ./glext.pp
#compile Surfice as 64-bit Cocoa (OpenGL 4.1 Core)
cp ./optsCore.inc ./opts.inc
# /Developer/lazarus/lazbuild ./surfice.lpr --cpu=x86_64 --ws=cocoa --compiler="/usr/local/bin/ppcx64"
#Current FPC 3.0.0 can not compile on OSX 10.11 El Capitan, so use 3.1.1
#/Developer/lazarus/lazbuild ./surfice.lpr --cpu=x86_64 --ws=cocoa --compiler="/usr/local/lib/fpc/3.1.1/ppcx64"
#/Users/rorden/lazarus/lazbuild ./surfice.lpr --cpu=x86_64 --ws=cocoa --compiler="/usr/local/bin/ppcx64"
#/Users/rorden/lazarus/lazbuild ./surfice.lpr --cpu=x86_64 --ws=cocoa --compiler="/usr/local/lib/fpc/3.1.1/ppcx64"
~/Lazarus/lazbuild ./surfice.lpr --cpu=x86_64 --ws=cocoa
#/Developer/lazarus/lazbuild ./surfice.lpr --ws=cocoa
strip ./surfice
cp surfice /Users/rorden/Desktop/Surf_Ice/Surfice/surfice.app/Contents/MacOS/surfice
#2.) build OpenGL legacy version with geomtery shaders
#compile Surfice as 32-bit Carbon: OSX 10.6 OpenGL support (OpenGL2.1)
cp ./optsCompat.inc ./opts.inc
~/Lazarus//lazbuild -B ./surfice.lpr --ws=cocoa
strip ./surfice
cp surfice /Users/rorden/Desktop/Surf_Ice/Surfice/surficeOld.app/Contents/MacOS/surfice
#return to default version
cp ./optsCompat.inc ./opts.inc
rm ./glext.pp
rm *.bak
rm surfice
rm -rf lib
rm -rf backup
find . -name ‘*.DS_Store’ -type f -delete
#remove Cocoa as widgetset
awk '{gsub(/Active="MacOS"/,"");}1' surfice.lpi > surfice.tmp && mv surfice.tmp surfice.lpi
awk '{gsub(/Active="MacOS"/,"Active=\"Default\"");}1' surfice.lps > surfice.tmp && mv surfice.tmp surfice.lps
cd /Users/rorden/Documents/pas/
zip -FSr /Users/rorden/Documents/pas/surf.zip surfice