forked from BOINC/boinc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuildWxMac.sh
125 lines (92 loc) · 4.04 KB
/
buildWxMac.sh
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
#!/bin/sh
# Berkeley Open Infrastructure for Network Computing
# http://boinc.berkeley.edu
# Copyright (C) 2005 University of California
#
# This is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation;
# either version 2.1 of the License, or (at your option) any later version.
#
# This software is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the GNU Lesser General Public License for more details.
#
# To view the GNU Lesser General Public License visit
# http://www.gnu.org/copyleft/lesser.html
# or write to the Free Software Foundation, Inc.,
# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
#
# Script to build the wxMac-2.6.3 library for BOINC as a Universal Binary
#
# by Charlie Fenton 7/21/06
#
## Before running this script, you must first copy the special XCode
## project
## boinc/mac_build/wxMac-BOINC.xcodeproj
## to
## wxMac-2.6.3/src/
#
#
## In Terminal, CD to the wxMac-2.6.3 directory.
## cd [path]/wxMac-2.6.3/
## then run this script:
## source [ path_to_this_script ] [ -clean ]
##
## the -clean argument will force a full rebuild.
#
if [ "$1" = "-clean" ]; then
doclean="clean "
else
doclean=""
fi
mv -n include/wx/mac/setup.h include/wx/mac/setup_obs.h
cp -np include/wx/mac/setup0.h include/wx/mac/setup.h
# Create wx include directory if necessary
if [ ! -d src/build/include/wx ]; then
mkdir -p src/build/include/wx
fi
cp -n include/wx/mac/setup0.h src/build/include/wx/setup.h
if [ "$1" != "-clean" ] && [ -f src/build/Deployment/libwx_mac_ppc.a ]; then
echo "libwx_mac_ppc.a already built"
else
rm -f src/build/Deployment/libwx_mac.a
xcodebuild -project src/wxMac-BOINC.xcodeproj -target wxStaticRelease -configuration Deployment $doclean build GCC_VERSION_ppc=3.3 MACOSX_DEPLOYMENT_TARGET_ppc=10.3 SDKROOT_ppc=/Developer/SDKs/MacOSX10.3.9.sdk ARCHS="ppc" EXECUTABLE_NAME="libwx_mac_ppc.a"
if [ $? -ne 0 ]; then return 1; fi
fi
if [ "$1" != "-clean" ] && [ -f src/build/Deployment/libwx_mac_i386.a ]; then
echo "libwx_mac_i386.a already built"
else
rm -f src/build/Deployment/libwx_mac.a
xcodebuild -project src/wxMac-BOINC.xcodeproj -target wxStaticRelease -configuration Deployment $doclean build GCC_VERSION_i386=4.0 MACOSX_DEPLOYMENT_TARGET_i386=10.4 SDKROOT_i386=/Developer/SDKs/MacOSX10.4u.sdk ARCHS="i386" EXECUTABLE_NAME="libwx_mac_i386.a"
if [ $? -ne 0 ]; then return 1; fi
fi
if [ "$1" != "-clean" ] && [ -f src/build/Deployment/libwx_mac.a ]; then
echo "libwx_mac.a already built"
else
lipo -create src/build/Deployment/libwx_mac_ppc.a src/build/Deployment/libwx_mac_i386.a -output src/build/Deployment/libwx_mac.a
if [ $? -ne 0 ]; then return 1; fi
fi
if [ "$1" != "-clean" ] && [ -f src/build/Deployment/libwx_macd_ppc.a ]; then
echo "libwx_macd_ppc.a already built"
else
rm -f src/build/Deployment/libwx_macd.a
xcodebuild -project src/wxMac-BOINC.xcodeproj -target wxStaticDebug -configuration Deployment $doclean build GCC_VERSION_ppc=3.3 MACOSX_DEPLOYMENT_TARGET_ppc=10.3 SDKROOT_ppc=/Developer/SDKs/MacOSX10.3.9.sdk ARCHS="ppc" EXECUTABLE_NAME="libwx_macd_ppc.a"
if [ $? -ne 0 ]; then return 1; fi
fi
if [ "$1" != "-clean" ] && [ -f src/build/Deployment/libwx_macd_i386.a ]; then
echo "libwx_macd_i386.a already built"
else
rm -f src/build/Deployment/libwx_macd.a
xcodebuild -project src/wxMac-BOINC.xcodeproj -target wxStaticDebug -configuration Deployment $doclean build GCC_VERSION_i386=4.0 MACOSX_DEPLOYMENT_TARGET_i386=10.4 SDKROOT_i386=/Developer/SDKs/MacOSX10.4u.sdk ARCHS="i386" EXECUTABLE_NAME="libwx_macd_i386.a"
if [ $? -ne 0 ]; then return 1; fi
fi
if [ "$1" != "-clean" ] && [ -f src/build/Deployment/libwx_macd.a ]; then
echo "libwx_macd.a already built"
else
lipo -create src/build/Deployment/libwx_macd_ppc.a src/build/Deployment/libwx_macd_i386.a -output src/build/Deployment/libwx_macd.a
if [ $? -ne 0 ]; then return 1; fi
fi
return 0