summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorJonas Häggqvist <rasher@rasher.dk>2009-03-07 02:36:13 +0000
committerJonas Häggqvist <rasher@rasher.dk>2009-03-07 02:36:13 +0000
commita88d5f045f054347a33320a417177f71bb2c3a91 (patch)
treeab7da935d3d8b161ed685a26764802e8ae9711d8 /tools
parent9a6d91940c6e3c58bdeb015855e3177bcb382c72 (diff)
downloadrockbox-a88d5f045f054347a33320a417177f71bb2c3a91.tar.gz
rockbox-a88d5f045f054347a33320a417177f71bb2c3a91.tar.bz2
rockbox-a88d5f045f054347a33320a417177f71bb2c3a91.zip
Remove some more debug output. Add an option to strip binaries. Fix quoting at the zip stage.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20225 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'tools')
-rwxr-xr-xtools/release/sims.pl32
1 files changed, 24 insertions, 8 deletions
diff --git a/tools/release/sims.pl b/tools/release/sims.pl
index fbf868f541..c84041c056 100755
--- a/tools/release/sims.pl
+++ b/tools/release/sims.pl
@@ -4,7 +4,7 @@ use File::Basename;
use File::Path;
use Cwd;
-my $verbose, $update, $doonly, $version;
+my $verbose, $strip, $update, $doonly, $version;
my @doonly;
my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time());
@@ -23,6 +23,7 @@ Usage: w32sims [-v] [-u] [-r VERSION] [-f filename] [buildonly]
-u Run svn up before building
-r Use the specified version string for filenames (defaults to SVN
revision)
+ -s Strip binaries before zipping them up.
-f Filename format string (without extension). This can include a
filepath (relative or absolute) May include the following special
strings:
@@ -45,6 +46,9 @@ MOO
elsif ($ARGV[0] eq "-u") {
$update =1;
}
+ elsif ($ARGV[0] eq "-s") {
+ $strip =1;
+ }
elsif ($ARGV[0] eq "-r") {
$version =$ARGV[1];
shift @ARGV;
@@ -55,8 +59,6 @@ MOO
}
else {
push(@doonly,$ARGV[0]);
- # This will only be printed if the -v flag comes earler
- print "only build ${ARGV[0]}\n" if($verbose);
}
shift @ARGV;
}
@@ -76,6 +78,10 @@ $rev = `tools/version.sh .`;
chomp $rev;
print "rev $rev\n" if($verbose);
+if (@doonly) {
+ printf("Build only %s\n", join(', ', @doonly)) if($verbose);
+}
+
if (!defined($version)) {
$version = $rev;
}
@@ -96,6 +102,19 @@ sub runone {
# build the target
$a = buildit($dir, $confnum, $extra);
+ if ($strip) {
+ print "Stripping binaries\n" if ($verbose);
+ # find \( -name "*.exe" -o -name "*.rock" -o -name "*.codec" \) -exec ls -l "{}" ";"
+ open(MAKE, "Makefile");
+ my $AS=(grep(/^export AS=/, <MAKE>))[0];
+ chomp($AS);
+ (my $striptool = $AS) =~ s/^export AS=(.*)as$/$1strip/;
+
+ $cmd = "find \\( -name 'rockboxui*' -o -iname '*dll' -o -name '*.rock' -o -name '*.codec' \\) -exec $striptool '{}' ';'";
+ print("$cmd\n") if ($verbose);
+ `$cmd`;
+ }
+
chdir "..";
my $newo=$filename;
@@ -110,8 +129,6 @@ sub runone {
print "Zip up the sim and associated files\n" if ($verbose);
- print("Output: $newo\n");
- print("Dir: " . dirname($newo) . "\n");
mkpath(dirname($newo));
system("mv build-$dir $newo");
if (-f "$newo/rockboxui.exe") {
@@ -120,9 +137,8 @@ sub runone {
}
my $toplevel = getcwd();
chdir(dirname($newo));
- print(getcwd()."\n");
- $cmd = "zip -9 -r -q ".basename($newo)." ".basename($newo)."/{rockboxui*,UI256.bmp,SDL.dll,simdisk}";
- print("$cmd\n");
+ $cmd = "zip -9 -r -q \"".basename($newo)."\" \"".basename($newo)."\"/{rockboxui*,UI256.bmp,SDL.dll,simdisk}";
+ print("$cmd\n") if($verbose);
`$cmd`;
chdir($toplevel);