diff options
Diffstat (limited to 'tools')
-rw-r--r-- | tools/release/README | 32 | ||||
-rwxr-xr-x | tools/release/bins.pl | 169 | ||||
-rwxr-xr-x | tools/release/manuals.pl | 99 | ||||
-rwxr-xr-x | tools/release/tarball.sh | 34 | ||||
-rwxr-xr-x | tools/release/voices.pl | 101 |
5 files changed, 435 insertions, 0 deletions
diff --git a/tools/release/README b/tools/release/README new file mode 100644 index 0000000000..294c7ba136 --- /dev/null +++ b/tools/release/README | |||
@@ -0,0 +1,32 @@ | |||
1 | __________ __ ___. | ||
2 | Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
3 | Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
4 | Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
5 | Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
6 | \/ \/ \/ \/ \/ | ||
7 | |||
8 | This directory contains useful scripts when creating and building | ||
9 | releases. The plan is to hopefully create a single top-level script that will | ||
10 | run everything needed to make a complete and full release and put all | ||
11 | generated data into a separate output directory. | ||
12 | |||
13 | NOTE that these scripts assume that you have the necessary compilers already | ||
14 | present in your PATH. | ||
15 | |||
16 | The scripts: | ||
17 | |||
18 | bins.pl Builds all the binary rockbox zip files. | ||
19 | |||
20 | manuals.pl Builds all manuals | ||
21 | |||
22 | voices.pl Builds all english voice files | ||
23 | |||
24 | tarball.sh Builds the source tarball | ||
25 | |||
26 | |||
27 | STATUS | ||
28 | |||
29 | All these scripts have a "version" variable at the top that needs editing and | ||
30 | each of this script needs to be run at the source tree root to function. Most | ||
31 | of them put their generated files in a subdir called 'output' which the | ||
32 | scripts create. | ||
diff --git a/tools/release/bins.pl b/tools/release/bins.pl new file mode 100755 index 0000000000..49fe8c1d73 --- /dev/null +++ b/tools/release/bins.pl | |||
@@ -0,0 +1,169 @@ | |||
1 | #!/usr/bin/perl | ||
2 | |||
3 | $version="3.0"; | ||
4 | |||
5 | my $verbose; | ||
6 | if($ARGV[0] eq "-v") { | ||
7 | $verbose =1; | ||
8 | shift @ARGV; | ||
9 | } | ||
10 | |||
11 | my $update; | ||
12 | if($ARGV[0] eq "-u") { | ||
13 | $update =1; | ||
14 | shift @ARGV; | ||
15 | } | ||
16 | |||
17 | my $doonly; | ||
18 | if($ARGV[0]) { | ||
19 | $doonly = $ARGV[0]; | ||
20 | print "only build $doonly\n" if($verbose); | ||
21 | } | ||
22 | |||
23 | if($update) { | ||
24 | # svn update! | ||
25 | system("svn -q up"); | ||
26 | } | ||
27 | |||
28 | $rev = `svnversion`; | ||
29 | chomp $rev; | ||
30 | print "rev $rev\n" if($verbose); | ||
31 | |||
32 | # made once for all targets | ||
33 | sub runone { | ||
34 | my ($dir, $confnum, $extra)=@_; | ||
35 | my $a; | ||
36 | |||
37 | if($doonly && ($doonly ne $dir)) { | ||
38 | return; | ||
39 | } | ||
40 | |||
41 | mkdir "build-$dir"; | ||
42 | chdir "build-$dir"; | ||
43 | print "Build in build-$dir\n" if($verbose); | ||
44 | |||
45 | # build the manual(s) | ||
46 | $a = buildit($dir, $confnum, $extra); | ||
47 | |||
48 | chdir ".."; | ||
49 | |||
50 | my $o="build-$dir/rockbox.zip"; | ||
51 | if (-f $o) { | ||
52 | my $newo="output/rockbox-$dir-$version.zip"; | ||
53 | system("mkdir -p output"); | ||
54 | system("mv $o $newo"); | ||
55 | print "moved $o to $newo\n" if($verbose); | ||
56 | } | ||
57 | |||
58 | print "remove all contents in build-$dir\n" if($verbose); | ||
59 | system("rm -rf build-$dir"); | ||
60 | |||
61 | return $a; | ||
62 | }; | ||
63 | |||
64 | sub fonts { | ||
65 | my ($dir, $confnum, $newl)=@_; | ||
66 | my $a; | ||
67 | |||
68 | if($doonly && ($doonly ne $dir)) { | ||
69 | return; | ||
70 | } | ||
71 | |||
72 | mkdir "build-$dir"; | ||
73 | chdir "build-$dir"; | ||
74 | print "Build fonts in build-$dir\n" if($verbose); | ||
75 | |||
76 | # build the manual(s) | ||
77 | $a = buildfonts($dir, $confnum, $newl); | ||
78 | |||
79 | chdir ".."; | ||
80 | |||
81 | my $o="build-$dir/rockbox-fonts.zip"; | ||
82 | if (-f $o) { | ||
83 | my $newo="output/rockbox-fonts-$version.zip"; | ||
84 | system("mv $o $newo"); | ||
85 | print "moved $o to $newo\n" if($verbose); | ||
86 | } | ||
87 | |||
88 | print "remove all contents in build-$dir\n" if($verbose); | ||
89 | system("rm -rf build-$dir"); | ||
90 | |||
91 | return $a; | ||
92 | }; | ||
93 | |||
94 | |||
95 | |||
96 | sub buildit { | ||
97 | my ($target, $confnum, $extra)=@_; | ||
98 | |||
99 | `rm -rf * >/dev/null 2>&1`; | ||
100 | |||
101 | my $c = sprintf('echo -e "%s\n%sn\n" | ../tools/configure', | ||
102 | $confnum, $extra); | ||
103 | |||
104 | print "C: $c\n" if($verbose); | ||
105 | `$c`; | ||
106 | |||
107 | print "Run 'make'\n" if($verbose); | ||
108 | `make -j 2>/dev/null`; | ||
109 | |||
110 | print "Run 'make zip'\n" if($verbose); | ||
111 | `make zip 2>/dev/null`; | ||
112 | |||
113 | print "Run 'make mapzip'\n" if($verbose); | ||
114 | `make mapzip 2>/dev/null`; | ||
115 | } | ||
116 | |||
117 | sub buildfonts { | ||
118 | my ($target, $confnum, $newl)=@_; | ||
119 | |||
120 | `rm -rf * >/dev/null 2>&1`; | ||
121 | |||
122 | my $c = sprintf('echo -e "%s\n%sn\n" | ../tools/configure', | ||
123 | $confnum, $newl?'\n':''); | ||
124 | |||
125 | print "C: $c\n" if($verbose); | ||
126 | `$c`; | ||
127 | |||
128 | print "Run 'make fontzip'\n" if($verbose); | ||
129 | `make fontzip 2>/dev/null`; | ||
130 | } | ||
131 | |||
132 | # run make in tools first to make sure they're up-to-date | ||
133 | print "cd tools && make\n" if($verbose); | ||
134 | `(cd tools && make ) >/dev/null 2>&1`; | ||
135 | |||
136 | runone("player", "player", '\n'); | ||
137 | runone("recorder", "recorder", '\n'); | ||
138 | runone("recorder8mb", "recorder", '8\n'); | ||
139 | runone("fmrecorder", "fmrecorder", '\n'); | ||
140 | runone("fmrecorder8mb", "fmrecorder", '8\n'); | ||
141 | runone("recorderv2", "recorderv2", '\n'); | ||
142 | runone("ondiosp", "ondiosp", '\n'); | ||
143 | runone("ondiofm", "ondiofm", '\n'); | ||
144 | runone("h100", "h100"); | ||
145 | runone("h120", "h120"); | ||
146 | runone("h300", "h300"); | ||
147 | runone("ipodcolor", "ipodcolor"); | ||
148 | runone("ipodnano", "ipodnano"); | ||
149 | runone("ipod4gray", "ipod4g"); | ||
150 | runone("ipodvideo", "ipodvideo", '32\n'); | ||
151 | runone("ipodvideo64mb", "ipodvideo", '64\n'); | ||
152 | runone("ipod3g", "ipod3g"); | ||
153 | runone("ipod1g2g", "ipod1g2g"); | ||
154 | runone("iaudiox5", "x5"); | ||
155 | runone("iaudiom5", "m5"); | ||
156 | runone("iaudiom3", "m3"); | ||
157 | runone("ipodmini1g", "ipodmini"); | ||
158 | runone("ipodmini2g", "ipodmini2g"); | ||
159 | runone("h10", "h10"); | ||
160 | runone("h10_5gb", "h10_5gb"); | ||
161 | runone("gigabeatf", "gigabeatf"); | ||
162 | runone("sansae200", "e200"); | ||
163 | runone("sansac200", "c200"); | ||
164 | #runone("mrobe500", "mrobe500"); | ||
165 | runone("mrobe100", "mrobe100"); | ||
166 | runone("cowond2", "cowond2"); | ||
167 | fonts("fonts", "x5"); | ||
168 | |||
169 | |||
diff --git a/tools/release/manuals.pl b/tools/release/manuals.pl new file mode 100755 index 0000000000..4867a17920 --- /dev/null +++ b/tools/release/manuals.pl | |||
@@ -0,0 +1,99 @@ | |||
1 | #!/usr/bin/perl | ||
2 | |||
3 | $version="3.0"; | ||
4 | |||
5 | my $verbose; | ||
6 | if($ARGV[0] eq "-v") { | ||
7 | $verbose =1; | ||
8 | shift @ARGV; | ||
9 | } | ||
10 | |||
11 | my $doonly; | ||
12 | if($ARGV[0]) { | ||
13 | $doonly = $ARGV[0]; | ||
14 | print "only build $doonly\n" if($verbose); | ||
15 | } | ||
16 | |||
17 | # made once for all targets | ||
18 | sub runone { | ||
19 | my ($dir, $conf, $nl)=@_; | ||
20 | my $a; | ||
21 | |||
22 | if($doonly && ($doonly ne $dir)) { | ||
23 | return; | ||
24 | } | ||
25 | |||
26 | mkdir "buildm-$dir"; | ||
27 | chdir "buildm-$dir"; | ||
28 | print "Build in buildm-$dir\n" if($verbose); | ||
29 | |||
30 | # build the manual(s) | ||
31 | $a = buildit($dir, $conf, $nl); | ||
32 | |||
33 | chdir ".."; | ||
34 | |||
35 | my $o="buildm-$dir/manual/rockbox-build.pdf"; | ||
36 | if (-f $o) { | ||
37 | my $newo="output/rockbox-$dir-$version.pdf"; | ||
38 | system("mv $o $newo"); | ||
39 | print "moved $o to $newo\n" if($verbose); | ||
40 | } | ||
41 | |||
42 | $o="buildm-$dir/rockbox-manual.zip"; | ||
43 | if (-f $o) { | ||
44 | my $newo="output/rockbox-$dir-$version-html.zip"; | ||
45 | system("mv $o $newo"); | ||
46 | print "moved $o to $newo\n" if($verbose); | ||
47 | } | ||
48 | |||
49 | print "remove all contents in buildm-$dir\n" if($verbose); | ||
50 | system("rm -rf buildm-$dir"); | ||
51 | |||
52 | return $a; | ||
53 | }; | ||
54 | |||
55 | sub buildit { | ||
56 | my ($target, $confnum, $newl)=@_; | ||
57 | |||
58 | `rm -rf * >/dev/null 2>&1`; | ||
59 | |||
60 | my $c = sprintf('echo -e "%s\n%sm\n" | ../tools/configure', | ||
61 | $confnum, $newl?'\n':''); | ||
62 | |||
63 | print "C: $c\n" if($verbose); | ||
64 | `$c`; | ||
65 | |||
66 | print "Run 'make'\n" if($verbose); | ||
67 | `make manual 2>/dev/null`; | ||
68 | |||
69 | print "Run 'make manual-zip'\n" if($verbose); | ||
70 | `make manual-zip 2>/dev/null`; | ||
71 | } | ||
72 | |||
73 | # run make in tools first to make sure they're up-to-date | ||
74 | `(cd tools && make ) >/dev/null 2>&1`; | ||
75 | |||
76 | runone("player", "player", 1); | ||
77 | runone("recorder", "recorder", 1); | ||
78 | runone("fmrecorder", "fmrecorder", 1); | ||
79 | runone("recorderv2", "recorderv2", 1); | ||
80 | runone("ondiosp", "ondiosp", 1); | ||
81 | runone("ondiofm", "ondiofm", 1); | ||
82 | runone("h100", "h100"); | ||
83 | #runone("h120", 9); | ||
84 | runone("h300", "h300"); | ||
85 | runone("ipodcolor", "ipodcolor"); | ||
86 | runone("ipodnano", "ipodnano"); | ||
87 | runone("ipod4gray", "ipod4g"); | ||
88 | runone("ipodvideo", "ipodvideo", 1); | ||
89 | runone("ipod3g", "ipod3g"); | ||
90 | runone("ipod1g2g", "ipod1g2g"); | ||
91 | runone("iaudiox5", "x5"); | ||
92 | runone("iaudiom5", "m5"); | ||
93 | runone("ipodmini2g", "ipodmini2g"); | ||
94 | runone("h10", "h10"); | ||
95 | runone("h10_5gb", "h10_5gb"); | ||
96 | runone("gigabeatf", "gigabeatf"); | ||
97 | runone("sansae200", "e200"); | ||
98 | runone("sansac200", "c200"); | ||
99 | runone("mrobe100", "mrobe100"); | ||
diff --git a/tools/release/tarball.sh b/tools/release/tarball.sh new file mode 100755 index 0000000000..21335dd954 --- /dev/null +++ b/tools/release/tarball.sh | |||
@@ -0,0 +1,34 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | version="3.0" | ||
4 | |||
5 | srcdir=. | ||
6 | tempdir=rockbox-temp | ||
7 | outfile=rockbox-$version.7z | ||
8 | |||
9 | # remove previous leftovers | ||
10 | rm -rf $tempdir | ||
11 | |||
12 | cd $srcdir | ||
13 | |||
14 | # create the dir name based on revision number | ||
15 | rbdir=$tempdir/rockbox-$version | ||
16 | |||
17 | # create new temp dir | ||
18 | mkdir -p $rbdir | ||
19 | |||
20 | # copy everything to the temp dir | ||
21 | svn ls -R | xargs -Imoo cp --parents moo $rbdir 2>/dev/null | ||
22 | |||
23 | cd $tempdir | ||
24 | |||
25 | rm -f $outfile | ||
26 | |||
27 | # 7zip the entire directory | ||
28 | 7zr a $outfile rockbox* | ||
29 | |||
30 | # world readable please | ||
31 | chmod a+r $outfile | ||
32 | |||
33 | # remove temporary files | ||
34 | rm -rf $tempdir | ||
diff --git a/tools/release/voices.pl b/tools/release/voices.pl new file mode 100755 index 0000000000..a05f706111 --- /dev/null +++ b/tools/release/voices.pl | |||
@@ -0,0 +1,101 @@ | |||
1 | #!/usr/bin/perl | ||
2 | |||
3 | $version="3.0"; | ||
4 | |||
5 | my $verbose; | ||
6 | if($ARGV[0] eq "-v") { | ||
7 | $verbose =1; | ||
8 | shift @ARGV; | ||
9 | } | ||
10 | |||
11 | my $doonly; | ||
12 | if($ARGV[0]) { | ||
13 | $doonly = $ARGV[0]; | ||
14 | print "only build $doonly\n" if($verbose); | ||
15 | } | ||
16 | |||
17 | # made once for all targets | ||
18 | sub runone { | ||
19 | my ($dir, $select, $newl)=@_; | ||
20 | my $a; | ||
21 | |||
22 | if($doonly && ($doonly ne $dir)) { | ||
23 | return; | ||
24 | } | ||
25 | |||
26 | mkdir "build-$dir"; | ||
27 | chdir "build-$dir"; | ||
28 | print "Build in build-$dir\n" if($verbose); | ||
29 | |||
30 | # build the manual(s) | ||
31 | $a = buildit($dir, $select, $newl); | ||
32 | |||
33 | chdir ".."; | ||
34 | |||
35 | my $o="build-$dir/english.voice"; | ||
36 | if (-f $o) { | ||
37 | my $newo="output/$dir-$version-english.zip"; | ||
38 | system("cp $o output/$dir-$version-english.voice"); | ||
39 | system("mkdir -p .rockbox/langs"); | ||
40 | system("cp $o .rockbox/langs"); | ||
41 | system("zip -r $newo .rockbox"); | ||
42 | system("rm -rf .rockbox"); | ||
43 | print "moved $o to $newo\n" if($verbose); | ||
44 | } | ||
45 | |||
46 | print "remove all contents in build-$dir\n" if($verbose); | ||
47 | system("rm -rf build-$dir"); | ||
48 | |||
49 | return $a; | ||
50 | }; | ||
51 | |||
52 | sub buildit { | ||
53 | my ($dir, $select, $newl)=@_; | ||
54 | |||
55 | `rm -rf * >/dev/null 2>&1`; | ||
56 | |||
57 | # V (voice), F (festival), L (lame), [blank] (English) | ||
58 | my $c = sprintf('echo -e "%s\n%sa\nv\n\n\nf\n\n" | ../tools/configure', | ||
59 | $select, $newl?'\n':""); | ||
60 | |||
61 | print "C: $c\n" if($verbose); | ||
62 | `$c`; | ||
63 | |||
64 | print "Run 'make voice'\n" if($verbose); | ||
65 | print `make voice 2>/dev/null`; | ||
66 | } | ||
67 | |||
68 | # run make in tools first to make sure they're up-to-date | ||
69 | `(cd tools && make ) >/dev/null 2>&1`; | ||
70 | |||
71 | `rm -f /home/dast/tmp/rockbox-voices-$version/voice-pool/*`; | ||
72 | $ENV{'POOL'}="/home/dast/tmp/rockbox-voices-$version/voice-pool"; | ||
73 | |||
74 | runone("player", "player", 1); | ||
75 | runone("recorder", "recorder", 1); | ||
76 | runone("fmrecorder", "fmrecorder", 1); | ||
77 | runone("recorderv2", "recorderv2", 1); | ||
78 | runone("ondiosp", "ondiosp", 1); | ||
79 | runone("ondiofm", "ondiofm", 1); | ||
80 | runone("h100", "h100"); | ||
81 | runone("h120", "h120"); | ||
82 | runone("h300", "h300"); | ||
83 | runone("ipodcolor", "ipodcolor"); | ||
84 | runone("ipodnano", "ipodnano"); | ||
85 | runone("ipod4gray", "ipod4g"); | ||
86 | runone("ipodvideo", "ipodvideo", 1); | ||
87 | runone("ipod3g", "ipod3g"); | ||
88 | runone("ipod1g2g", "ipod1g2g"); | ||
89 | runone("iaudiox5", "x5"); | ||
90 | runone("iaudiom5", "m5"); | ||
91 | runone("iaudiom3", "m3"); | ||
92 | runone("ipodmini2g", "ipodmini2g"); | ||
93 | runone("ipodmini1g", "ipodmini"); | ||
94 | runone("h10", "h10"); | ||
95 | runone("h10_5gb", "h10_5gb"); | ||
96 | runone("gigabeatf", "gigabeatf"); | ||
97 | runone("sansae200", "e200"); | ||
98 | runone("sansac200", "c200"); | ||
99 | runone("mrobe100", "mrobe100"); | ||
100 | #runone("cowond2", "cowond2"); | ||
101 | |||