Subversion Repositories Projects

Rev

Rev 36 | Go to most recent revision | Details | Compare with Previous | 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
 
59 ligi 16
 
36 ligi 17
screensizes=["240x320","176x220","128x128"]
18
voice_modes=["no_voice","de_tts"]
19
 
20
 
59 ligi 21
 
22
if !ARGV[0].nil?
23
  screensizes&=[ARGV[0]]
24
  if screensizes.length==0
25
    p "fatal: selected screensize invalid"
26
    exit
27
  else
28
    p "selected screensize:"  + ARGV[0]
29
  end
30
end
36 ligi 31
propertys={}
59 ligi 32
p "?"
36 ligi 33
screensizes.each { |screensize|
34
  p "cleaning ressources"
35
  p `rm -rf tmp/res`
36
  p `mkdir tmp/res`
37
  p "processing Screensize " + screensize
38
  p `cp -v res/images_by_screensize/#{screensize}/* tmp/res/`
39
 
40
 
41
  propertys["screensize"]=screensize
42
 
43
 
44
  voice_modes.each { |voice_mode|
45
    p "processing voice_mode" + voice_mode
46
    propertys["voice_mode"]=voice_mode
47
 
48
    propertys["basename"]="DUBwise-#{screensize}-#{voice_mode}"
49
    p `cp -v res/voice_samples_by_name/#{voice_mode}/* tmp/res/`  
50
 
51
 
52
    prefs_file= File.new("build.props","w")
53
    propertys.each_pair {|name,value|
54
      prefs_file <<     name+"="+value+"\n"
55
    }
56
    prefs_file.close
57
 
58
    `ant build`.each_line {     |l| puts l }
59
  }
60
 
61
 
4 ligi 62
}
63
puts `mv -v  build.props.bak build.props`
64