2 # This is basically a copy of tools/release/bins.pl, with small changes
3 # You need to set up $PATH to include the bin dir of a crosscompiled SDL
4 # installation, and have mingw32 compilers installed. Everything else should
7 my $verbose, $update, $doonly, $version;
8 while (scalar @ARGV > 0) {
9 if ($ARGV[0] eq "-h") {
12 Usage: w32sims [-v] [-u] [-r VERSION] [buildonly]
14 -u Run svn up before building
15 -r Use the specified version string for filenames (defaults to SVN
21 elsif ($ARGV[0] eq "-v") {
24 elsif ($ARGV[0] eq "-u") {
27 elsif ($ARGV[0] eq "-r") {
33 # This will only be printed if the -v flag comes earler
34 print "only build $doonly\n" if($verbose);
46 print "rev $rev\n" if($verbose);
48 if (!defined($version)) {
49 $version = sprintf("r%d", $rev);
52 # made once for all targets
54 my ($dir, $confnum, $extra)=@_;
57 if($doonly && ($doonly ne $dir)) {
63 print "Build in build-$dir\n" if($verbose);
66 $a = buildit
($dir, $confnum, $extra);
70 print "Zip up the sim and associated files\n" if ($verbose);
71 system("mv build-$dir rockbox-$dir-w32-sim");
72 `zip -9 -r -q rockbox-$dir-w32-sim/rockbox.zip rockbox-$dir-w32-sim/{rockboxui.exe,UI256.bmp,SDL.dll,archos}`;
74 my $o="rockbox-$dir-w32-sim/rockbox.zip";
76 my $newo="output/rockbox-$dir-$version-w32-sim.zip";
77 system("mkdir -p output");
78 system("mv $o $newo");
79 print "moved $o to $newo\n" if($verbose);
82 print "remove all contents in rockbox-$dir-w32-sim\n" if($verbose);
83 system("rm -rf rockbox-$dir-w32-sim");
89 my ($target, $confnum, $extra)=@_;
91 `rm -rf * >/dev/null 2>&1`;
93 my $c = sprintf('printf "%s\n%ss\n" | ../tools/configure',
96 print "C: $c\n" if($verbose);
99 print "Run 'make'\n" if($verbose);
100 `make -j 2>/dev/null`;
102 print "Run 'make install'\n" if($verbose);
103 `make install 2>/dev/null`;
105 print "Find and copy SDL.dll\n" if ($verbose);
106 `cp \`dirname
\\\
`which sdl-config\\\`\
`/SDL.dll ./`;
110 # run make in tools first to make sure they're up-to-date
111 print "cd tools && make\n" if($verbose);
112 `(cd tools && make ) >/dev/null 2>&1`;
114 runone
("player", "player", '\n');
115 runone
("recorder", "recorder", '\n');
116 runone
("recorder8mb", "recorder", '8\n');
117 runone
("fmrecorder", "fmrecorder", '\n');
118 runone
("fmrecorder8mb", "fmrecorder", '8\n');
119 runone
("recorderv2", "recorderv2", '\n');
120 runone
("ondiosp", "ondiosp", '\n');
121 runone
("ondiofm", "ondiofm", '\n');
122 runone
("h100", "h100");
123 runone
("h120", "h120");
124 runone
("h300", "h300");
125 runone
("ipodcolor", "ipodcolor");
126 runone
("ipodnano", "ipodnano");
127 runone
("ipod4gray", "ipod4g");
128 runone
("ipodvideo", "ipodvideo", '32\n');
129 runone
("ipodvideo64mb", "ipodvideo", '64\n');
130 runone
("ipod3g", "ipod3g");
131 runone
("ipod1g2g", "ipod1g2g");
132 runone
("iaudiox5", "x5");
133 runone
("iaudiom5", "m5");
134 runone
("iaudiom3", "m3");
135 runone
("ipodmini1g", "ipodmini");
136 runone
("ipodmini2g", "ipodmini2g");
137 runone
("h10", "h10");
138 runone
("h10_5gb", "h10_5gb");
139 runone
("gigabeatf", "gigabeatf");
140 runone
("sansae200", "e200");
141 runone
("sansac200", "c200");
142 #runone("mrobe500", "mrobe500");
143 runone
("mrobe100", "mrobe100");
144 runone
("cowond2", "cowond2");