Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
4 | ligi | 1 | # little ruby script to build versions for all resolution types |
2 | # |
||
3 | # Author: Marcus -LiGi- Bueschleb |
||
4 | # |
||
5 | # see README for further Infos |
||
6 | |||
36 | ligi | 7 | |
4 | ligi | 8 | resdir="res/" |
9 | |||
36 | ligi | 10 | |
4 | ligi | 11 | puts `mv build.props build.props.bak` |
12 | puts `ant clean` |
||
13 | |||
14 | |||
15 | |||
36 | ligi | 16 | screensizes=["240x320","176x220","128x128"] |
17 | voice_modes=["no_voice","de_tts"] |
||
18 | |||
19 | |||
20 | propertys={} |
||
21 | |||
22 | screensizes.each { |screensize| |
||
23 | p "cleaning ressources" |
||
24 | p `rm -rf tmp/res` |
||
25 | p `mkdir tmp/res` |
||
26 | p "processing Screensize " + screensize |
||
27 | p `cp -v res/images_by_screensize/#{screensize}/* tmp/res/` |
||
28 | |||
29 | |||
30 | propertys["screensize"]=screensize |
||
31 | |||
32 | |||
33 | voice_modes.each { |voice_mode| |
||
34 | p "processing voice_mode" + voice_mode |
||
35 | propertys["voice_mode"]=voice_mode |
||
36 | |||
37 | propertys["basename"]="DUBwise-#{screensize}-#{voice_mode}" |
||
38 | p `cp -v res/voice_samples_by_name/#{voice_mode}/* tmp/res/` |
||
39 | |||
40 | |||
41 | prefs_file= File.new("build.props","w") |
||
42 | propertys.each_pair {|name,value| |
||
43 | prefs_file << name+"="+value+"\n" |
||
44 | } |
||
45 | prefs_file.close |
||
46 | |||
47 | `ant build`.each_line { |l| puts l } |
||
48 | } |
||
49 | |||
50 | |||
4 | ligi | 51 | } |
52 | puts `mv -v build.props.bak build.props` |
||
53 |