##// END OF EJS Templates
Adding mac support for Bamboo build script
Jani Honkonen -
r1140:03d5855c29bc
parent child
Show More
@@ -15,25 +15,59 my %job = Jobs::get($inifile, $jobname);
15
15
16 # examine the platform
16 # examine the platform
17 given ($job{'Platform'}) {
17 given ($job{'Platform'}) {
18
18 when ("Win7") {
19 when ("Win7") {
20
19 # construct a build command
21 # construct a build command
20 my @cmd;
21 if ($job{'ToolChain'} eq "mingw") {
22 if ($job{'ToolChain'} eq "mingw") {
22 @cmd = ($scriptdir . "\\build_win_mingw.bat", $job{'QtDir'}, $job{'Config'}, $job{'MinGWDir'});
23 run($scriptdir . "\\build_win_mingw.bat", $job{'QtDir'}, $job{'Config'}, $job{'MinGWDir'});
23 }
24 }
24 if ($job{'ToolChain'} eq "vs2005") {
25 elsif ($job{'ToolChain'} eq "vs2005") {
25 @cmd = ($scriptdir . "\\build_win_vs2005.bat", $job{'QtDir'}, $job{'Config'});
26 run($scriptdir . "\\build_win_vs2005.bat", $job{'QtDir'}, $job{'Config'});
26 }
27 }
27 if ($job{'ToolChain'} eq "vs2008") {
28 elsif ($job{'ToolChain'} eq "vs2008") {
28 @cmd = ($scriptdir . "\\build_win_vs2008.bat", $job{'QtDir'}, $job{'Config'});
29 run($scriptdir . "\\build_win_vs2008.bat", $job{'QtDir'}, $job{'Config'});
29 }
30 }
30 if ($job{'ToolChain'} eq "vs2010") {
31 elsif ($job{'ToolChain'} eq "vs2010") {
31 @cmd = ($scriptdir . "\\build_win_vs2010.bat", $job{'QtDir'}, $job{'Config'});
32 run($scriptdir . "\\build_win_vs2010.bat", $job{'QtDir'}, $job{'Config'});
33 }
34 else {
35 die "Unknown toolchain!";
32 }
36 }
33 # run the build command
34 system (@cmd) == 0 or die "system @cmd failed: $?";
35 }
37 }
38
39 when ("Mac") {
40
41 # setup build environment
42 $ENV{'QTDIR'} = $job{'QtDir'};
43 $ENV{'PATH'} = $job{'QtDir'} . "/bin:" . $ENV{'PATH'};
44
45 # run qmake
46 my $cmd;
47 if ($job{'ToolChain'} eq "clang") {
48 run("qmake -r -spec unsupported/macx-clang CONFIG+=" . $job{'Config'});
49 }
50 elsif ($job{'ToolChain'} eq "gcc") {
51 run("qmake -r CONFIG+=" . $job{'Config'});
52 }
53 else {
54 die "Unknown toolchain!";
55 }
56
57 # run make
58 run("make");
59 }
60
36 default {
61 default {
37 die "Unknown platform " . $job{'Platform'};
62 die "Unknown platform " . $job{'Platform'};
38 }
63 }
64 }
65
66 sub run {
67 my $cmd;
68 foreach (@_) {
69 $cmd .= "$_ ";
70 }
71 print "running : $cmd\n";
72 system(@_) == 0 or die "system \"$cmd\" failed: $?";
39 } No newline at end of file
73 }
@@ -1,4 +1,13
1
1
2 ; How to use
3 ; ----------
4 ; - Section name must match to "Job Name" in Bamboo.
5 ; * See ${bamboo.buildPlanName} in bamboo.
6 ; * Case sensitive.
7 ; - The parameters given can be anything you need for that particular build.
8 ; * Implement your special parameter handling in the perl scripts.
9
10
2 [Win7 MinGW debug QtC v4.8.0 (Jani's machine)]
11 [Win7 MinGW debug QtC v4.8.0 (Jani's machine)]
3 Platform=Win7
12 Platform=Win7
4 QtDir=D:\Qt\4.8.0-MinGW-Commercial
13 QtDir=D:\Qt\4.8.0-MinGW-Commercial
@@ -47,4 +56,28 Config=debug
47 Platform=Win7
56 Platform=Win7
48 QtDir=D:\Qt\qt-win-commercial-4.8.0-vs2010
57 QtDir=D:\Qt\qt-win-commercial-4.8.0-vs2010
49 ToolChain=vs2010
58 ToolChain=vs2010
59 Config=release
60
61 [Mac 10.7 Cocoa clang debug QtC v4.8.0(Tero's iMac)]
62 Platform=Mac
63 QtDir=/Users/teahola/QtCommercialSdk/Desktop/480/cocoa_gcc/
64 ToolChain=clang
65 Config=debug
66
67 [Mac 10.7 Cocoa clang release QtC v4.8.0(Tero's iMac)]
68 Platform=Mac
69 QtDir=/Users/teahola/QtCommercialSdk/Desktop/480/cocoa_gcc/
70 ToolChain=clang
71 Config=release
72
73 [Mac 10.7 Cocoa gcc debug QtC v4.8.0(Tero's iMac)]
74 Platform=Mac
75 QtDir=/Users/teahola/QtCommercialSdk/Desktop/480/cocoa_gcc/
76 ToolChain=clang
77 Config=debug
78
79 [Mac 10.7 Cocoa gcc release QtC v4.8.0(Tero's iMac)]
80 Platform=Mac
81 QtDir=/Users/teahola/QtCommercialSdk/Desktop/480/cocoa_gcc/
82 ToolChain=clang
50 Config=release No newline at end of file
83 Config=release
General Comments 0
You need to be logged in to leave comments. Login now