10 if ($ENV{PATH} =~ m!\\Symbian\\(.+?)\\(.+?)\\Epoc32\\gcc\\bin!i) {
11 $SYMBIAN_VERSION = $1;
13 $WIN = ($SDK_NAME =~ m!_CW!i || $SDK_NAME eq '8.1a') ?
16 if ($SDK_NAME =~ m!Series60_v20!) {
19 } elsif ($SDK_NAME =~ m!Series60_v21!) {
21 $SDK_VERSION = $ENV{S60SDK} = '2.1';
22 } elsif ($SDK_NAME =~ m!S60_2nd_FP2!) {
24 $SDK_VERSION = $ENV{S60SDK} = '2.6';
25 } elsif ($SDK_NAME =~ m!S60_2nd_FP3!) {
27 $SDK_VERSION = $ENV{S60SDK} = '2.8';
28 } elsif ($SDK_NAME =~ m!S80_DP2_0_SDK!) {
30 $SDK_VERSION = $ENV{S80SDK} = '2.0';
32 } elsif ($ENV{PATH} =~ m!\\Symbian\\UIQ_(\d)(\d)\\Epoc32\\gcc\\bin!i) {
35 $SDK_VERSION = $ENV{UIQSDK} = "$1.$2";
36 if ($SDK_VERSION =~ /^2\./) {
37 $SYMBIAN_VERSION = '7.0s';
39 die "$0: Unknown UIQ version '$SDK_VERSION'\n";
41 $WIN = 'winscw'; # This is CodeWarrior, how about Borland?
45 if (open(GCC, "gcc -v 2>&1 |")) {
47 if (/Reading specs from ((?:C:)?\\Symbian.+?)\\Epoc32\\/i) {
49 # The S60SDK tells the Series 60 SDK version.
51 if ($SYMBIAN_ROOT eq 'C:\Symbian\6.1\Shared') { # Visual C.
52 $SYMBIAN_ROOT = 'C:\Symbian\6.1\Series60';
53 $SDK_VERSION = $ENV{S60SDK} = '1.2';
54 } elsif ($SYMBIAN_ROOT eq 'C:\Symbian\Series60_1_2_CW') { # CodeWarrior.
55 $SDK_VERSION = $ENV{S60SDK} = '1.2';
63 die "$0: failed to run gcc: $!\n";
66 die "$0: failed to locate the Symbian SDK\n" unless defined $SYMBIAN_ROOT;
68 my $UARM = $ENV{UARM} ? $ENV{UARM} : "urel";
69 my $UREL = "$SYMBIAN_ROOT\\epoc32\\release\\-ARM-\\$UARM";
70 if ($SYMBIAN_ROOT eq 'C:\Symbian\6.1\Series60' && $ENV{WIN} eq 'winscw') {
71 $UREL = "C:\\Symbian\\Series60_1_2_CW\\epoc32\\release\\-ARM-\\urel";
76 [ $SYMBIAN_ROOT, $SYMBIAN_VERSION, $SDK_NAME, $SDK_VARIANT, $SDK_VERSION ];
78 # The following is a cheat sheet for the right S60/S80 SDK settings.
81 # set EPOC_BIN=%EPOCROOT%Epoc32\gcc\bin;%EPOCROOT%Epoc32\Tools
82 # set MWCW=C:\Program Files\Metrowerks\CodeWarrior for Symbian OEM v2.8
83 # set MSVC=C:\Program Files\Microsoft Visual Studio
84 # set MSVC_BIN=%MSVC%\VC98\Bin;%MSVC%\Common\MSDev98\Bin
85 # set MSVC_INC=%MSVC%\VC98\atl\include;%MSVC%\mfc\include;%MSVC%\include
86 # set MSVC_LIB=%MSVC%\mfc\lib;%MSVC%\lib
90 # set EPOCROOT=\Symbian\Series60_1_2_CW\
92 # set PATH=%EPOC_BIN%;%MSVC_BIN%;%MWCW%\Bin;%MWCW%\Symbian_Tools\Command_Line_Tools;%PATH%
93 # set USERDEFS=%USERDEFS% -D__SERIES60_12__ -D__SERIES60_MAJOR__=1 -D__SERIES60_MINOR__=2 -D__SERIES60_1X__
97 # set EPOCROOT=\Symbian\6.1\Series60\
99 # set PATH=\Symbian\6.1\Shared\Epoc32\gcc\bin;\Symbian\6.1\Shared\Epoc32\Tools;%MSVC_BIN%;%PATH%
100 # set INCLUDE=%MSVC_INC%
102 # set USERDEFS=%USERDEFS% -D__SERIES60_12__ -D__SERIES60_MAJOR__=1 -D__SERIES60_MINOR__=2 -D__SERIES60_1X__
106 # set EPOCROOT=\Symbian\7.0s\Series60_v20_CW\
107 # set EPOCDEVICE=Series60_2_0_CW:com.Nokia.Series60_2_0_CW
109 # set PATH=%EPOC_BIN%;%MWCW%\Bin;%MWCW%\Symbian_Tools\Command_Line_Tools;%PATH%
110 # set USERDEFS=%USERDEFS% -D__SERIES60_20__ -D__SERIES60_MAJOR__=2 -D__SERIES60_MINOR__=0 -D__SERIES60_2X__
114 # set EPOCROOT=\Symbian\7.0s\Series60_v20\
115 # set EPOCDEVICE=Series60_v20:com.nokia.series60
117 # set PATH=%EPOC_BIN%;%MSVC_BIN%;%PATH%
118 # set INCLUDE=%MSVC_INC%
120 # set USERDEFS=%USERDEFS% -D__SERIES60_20__ -D__SERIES60_MAJOR__=2 -D__SERIES60_MINOR__=0 -D__SERIES60_2X__
124 # set EPOCROOT=\Symbian\7.0s\Series60_v21_CW\
125 # set EPOCDEVICE=Series60_v21_CW:com.Nokia.series60
127 # set PATH=%EPOC_BIN%;%MWCW%\Bin;%MWCW%\Symbian_Tools\Command_Line_Tools;%PATH%
128 # set USERDEFS=%USERDEFS% -D__SERIES60_21__ -D__SERIES60_MAJOR__=2 -D__SERIES60_MINOR__=1 -D__SERIES60_2X__
132 # set EPOCROOT=\Symbian\8.0a\S60_2nd_FP2_CW\
133 # set EPOCDEVICE=S60_2nd_FP2_CW:com.nokia.series60
135 # set PATH=%EPOC_BIN%;%MWCW%\Bin;%MWCW%\Symbian_Tools\Command_Line_Tools;%PATH%
136 # set USERDEFS=%USERDEFS% -D__SERIES60_26__ -D__SERIES60_MAJOR__=2 -D__SERIES60_MINOR__=6 -D__SERIES60_2X__ -D__BLUETOOTH_API_V2__
140 # set EPOCROOT=\Symbian\8.0a\S60_2nd_FP2\
141 # set EPOCDEVICE=S60_2nd_FP2:com.nokia.Series60
143 # set PATH=%EPOC_BIN%;%MSVC_BIN%;%PATH%
144 # set INCLUDE=%MSVC_INC%
146 # set USERDEFS=%USERDEFS% -D__SERIES60_26__ -D__SERIES60_MAJOR__=2 -D__SERIES60_MINOR__=6 -D__SERIES60_2X__ -D__BLUETOOTH_API_V2__
150 # set EPOCROOT=\Symbian\8.1a\S60_2nd_FP3\
151 # set EPOCDEVICE=S60_2nd_FP3:com.nokia.series60
153 # set PATH=%EPOC_BIN%;%MWCW%\Bin;%MWCW%\Symbian_Tools\Command_Line_Tools;%PATH%
154 # set USERDEFS=%USERDEFS% -D__SERIES60_28__ -D__SERIES60_MAJOR__=2 -D__SERIES60_MINOR__=8 -D__SERIES60_2X__ -D__BLUETOOTH_API_V2__
158 # set EPOCROOT=\Symbian\7.0s\S80_DP2_0_SDK_CW\
159 # set EPOCDEVICE=Series80_DP2_0_SDK_CW:com.nokia.Series80
161 # set PATH=%EPOC_BIN%;%MWCW%\Bin;%MWCW%\Symbian_Tools\Command_Line_Tools;%PATH%
162 # set USERDEFS=%USERDEFS% -D__SERIES80_20__ -D__SERIES80_MAJOR__=2 -D__SERIES80_MINOR__=0 -D__SERIES80_2X__
166 # set EPOCROOT=\Symbian\7.0s\S80_DP2_0_SDK\
167 # set EPOCDEVICE=Series80_DP2_0_SDK:com.nokia.Series80
169 # set PATH=%EPOC_BIN%;%MWCW%\Bin;%MWCW%\Symbian_Tools\Command_Line_Tools;%PATH%
170 # set USERDEFS=%USERDEFS% -D__SERIES80_20__ -D__SERIES80_MAJOR__=2 -D__SERIES80_MINOR__=0 -D__SERIES80_2X__