···55 Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
66 \/ \/ \/ \/ \/
7788- This directory contains useful scripts when creating and building
99- releases. The plan is to hopefully create a single top-level script that will
1010- run everything needed to make a complete and full release and put all
1111- generated data into a separate output directory.
88+ This directory the scripts used to create release artifacts. All
99+ generated data is stored in an output directory (called "output").
1010+1111+ All of these scripts take two arguments; the git tag and the version string.
12121313 NOTE that these scripts assume that you have the necessary compilers already
1414 present in your PATH.
15151616 The scripts:
17171818- bins.pl Builds all the binary rockbox zip files.
1919-2020- manuals.pl Builds all manuals
1818+ bins.pl Builds all the binary rockbox zip files
1919+ manuals.pl Builds all manuals (pdf and html-zip)
2020+ sources.sh Builds the source tarball
2121+ voices.pl Builds all "complete enough" voice files
21222222- voices.pl Builds all english voice files
2323+ Only "stable" targets, their manuals, and a selection of voice files are built;
2424+ these are designated in tools/builds.pm
23252424- tarball.sh Builds the source tarball
2626+ Example:
25272828+ tools/release/sources.sh v3.15-final 3.15
26292727- STATUS
3030+ Other notes:
28312929- All these scripts have a "version" variable at the top that needs editing and
3030- each of this script needs to be run at the source tree root to function. Most
3131- of them put their generated files in a subdir called 'output' which the
3232- scripts create.
3232+ * Update www/tools/dailybuild-voices.pl file to add the release target
3333+ voice list!
3434+ * Update release target in tools/builds.pm
+26-51
tools/release/bins.pl
···11#!/usr/bin/perl
22-$version="3.15";
33-44-require "tools/builds.pm";
22+require "./tools/builds.pm";
5364my $verbose;
75if($ARGV[0] eq "-v") {
···97 shift @ARGV;
108}
1191212-my $update;
1313-if($ARGV[0] eq "-u") {
1414- $update =1;
1515- shift @ARGV;
1616-}
1010+my $tag = $ARGV[0];
1111+my $version = $ARGV[1];
17121818-my $doonly;
1919-if($ARGV[0]) {
2020- $doonly = $ARGV[0];
2121- print "only build $doonly\n" if($verbose);
2222-}
1313+my $outdir = "output/bins";
23142424-if($update) {
2525- # svn update!
2626- system("svn -q up");
2727-}
2828-2929-$rev = `svnversion`;
3030-chomp $rev;
3131-print "rev $rev\n" if($verbose);
1515+my $cpus = `nproc`;
32163317# made once for all targets
3418sub runone {
3519 my ($dir, $confnum, $extra)=@_;
3620 my $a;
37213838- if($doonly && ($doonly ne $dir)) {
3939- return;
4040- }
4141-4242- mkdir "build-$dir";
4343- chdir "build-$dir";
4444- print "Build in build-$dir\n" if($verbose);
2222+ mkdir "buildb-$dir";
2323+ chdir "buildb-$dir";
2424+ print "Build in buildb-$dir\n" if($verbose);
45254626 # build the manual(s)
4727 $a = buildit($dir, $confnum, $extra);
48284929 chdir "..";
50305151- my $o="build-$dir/rockbox.zip";
5252- my $map="build-$dir/rockbox-maps.zip";
5353- my $elf="build-$dir/rockbox-elfs.zip";
3131+ my $o="buildb-$dir/rockbox.zip";
3232+ my $map="buildb-$dir/rockbox-maps.zip";
3333+ my $elf="buildb-$dir/rockbox-elfs.zip";
5434 if (-f $o) {
5555- my $newo="output/rockbox-$dir-$version.zip";
5656- my $newmap="output/rockbox-$dir-$version-maps.zip";
5757- my $newelf="output/rockbox-$dir-$version-elfs.zip";
5858- system("mkdir -p output");
3535+ my $newo="$outdir/rockbox-$dir-$version.zip";
3636+ my $newmap="$outdir/rockbox-$dir-$version-maps.zip";
3737+ my $newelf="$outdir/rockbox-$dir-$version-elfs.zip";
3838+ system("mkdir -p $outdir");
5939 system("mv $o $newo");
6040 print "moved $o to $newo\n" if($verbose);
6141 system("mv $map $newmap");
···7454 my ($dir, $confnum, $newl)=@_;
7555 my $a;
76567777- if($doonly && ($doonly ne $dir)) {
7878- return;
7979- }
8080-8181- mkdir "build-$dir";
8282- chdir "build-$dir";
8383- print "Build fonts in build-$dir\n" if($verbose);
5757+ mkdir "buildf-$dir";
5858+ chdir "buildf-$dir";
5959+ print "Build fonts in buildf-$dir\n" if($verbose);
84608561 # build the fonts
8662 $a = buildfonts($dir, $confnum, $newl);
87638864 chdir "..";
89659090- my $o="build-$dir/rockbox-fonts.zip";
6666+ my $o="buildf-$dir/rockbox-fonts.zip";
9167 if (-f $o) {
9292- my $newo="output/rockbox-fonts-$version.zip";
6868+ my $newo="$outdir/rockbox-fonts-$version.zip";
9369 system("mv $o $newo");
9470 print "moved $o to $newo\n" if($verbose);
9571 }
96729797- print "remove all contents in build-$dir\n" if($verbose);
9898- system("rm -rf build-$dir");
7373+ print "remove all contents in buildb-$dir\n" if($verbose);
7474+ system("rm -rf buildf-$dir");
997510076 return $a;
10177};
10278103103-104104-10579sub buildit {
10680 my ($target, $confnum, $extra)=@_;
10781···11488 `$c`;
1158911690 print "Run 'make'\n" if($verbose);
117117- `make VERSION=$version`;
9191+ `make -j$cpus VERSION=$version`;
1189211993 print "Run 'make zip'\n" if($verbose);
12094 `make zip VERSION=$version`;
···141115 `make fontzip`;
142116}
143117118118+`git checkout $tag`;
119119+144120# run make in tools first to make sure they're up-to-date
145121print "cd tools && make\n" if($verbose);
146122`(cd tools && make ) >/dev/null`;
147123148148-for my $b (&stablebuilds) {
124124+for my $b (&usablebuilds) {
149125 my $configname = $builds{$b}{configname} ? $builds{$b}{configname} : $b;
150126 runone($b, $configname, $builds{$b}{ram});
151127}
152128153129fonts("fonts", "iaudiox5");
154154-
+17-19
tools/release/manuals.pl
···11-#!/usr/bin/perl
11+#!/usr/bin/perl -w
22+require "./tools/builds.pm";
2333-$version="3.15";
44-55-require "tools/builds.pm";
44+require "./tools/builds.pm";
6576my $verbose;
87if($ARGV[0] eq "-v") {
···109 shift @ARGV;
1110}
12111313-my $doonly;
1414-if($ARGV[0]) {
1515- $doonly = $ARGV[0];
1616- print "only build $doonly\n" if($verbose);
1717-}
1212+my $tag = $ARGV[0];
1313+my $version = $ARGV[1];
1414+1515+my $outdir = "output/manuals";
18161917# made once for all targets
2018sub runone {
2119 my ($dir)=@_;
2220 my $a;
23212424- if($doonly && ($doonly ne $dir)) {
2525- return;
2626- }
2727-2822 mkdir "buildm-$dir";
2923 chdir "buildm-$dir";
3024 print "Build in buildm-$dir\n" if($verbose);
···34283529 chdir "..";
36303737- my $o="buildm-$dir/manual/rockbox-build.pdf";
3131+ my $o="buildm-$dir/rockbox-$dir-$version.pdf";
3832 if (-f $o) {
3939- my $newo="output/rockbox-$dir-$version.pdf";
3333+ my $newo="$outdir/rockbox-$dir-$version.pdf";
4034 system("mv $o $newo");
4135 print "moved $o to $newo\n" if($verbose);
3636+ } else {
3737+ print "buildm-$dir/rockbox-$dir-$version.pdf not found\n";
4238 }
43394440 $o="buildm-$dir/rockbox-manual.zip";
4541 if (-f $o) {
4646- my $newo="output/rockbox-$dir-$version-html.zip";
4242+ my $newo="$outdir/rockbox-$dir-$version-html.zip";
4743 system("mv $o $newo");
4844 print "moved $o to $newo\n" if($verbose);
4945 }
···6460 print "C: $c\n" if($verbose);
6561 `$c`;
66626767- print "Run 'make'\n" if($verbose);
6363+ print "Run 'make manual'\n" if($verbose);
6864 `make manual VERSION=$version 2>/dev/null`;
69657066 print "Run 'make manual-zip'\n" if($verbose);
7167 `make manual-zip VERSION=$version 2>/dev/null`;
7268}
6969+7070+`git checkout $tag`;
73717472# run make in tools first to make sure they're up-to-date
7573`(cd tools && make ) >/dev/null 2>&1`;
76747777-for my $b (&stablebuilds) {
7878- next if (length($builds{$b}{configname}) > 0); # no variants
7575+`mkdir -p $outdir`;
79767777+for my $b (&usablebuilds) {
8078 runone($b);
8179}