Subversion Repositories Projects

Rev

Go to most recent revision | Blame | Last modification | View Log | RSS feed

#!/usr/bin/env ruby
# little ruby script to build DUBwise
#
# Author: Marcus -LiGi- Bueschleb
#
# see README for further Infos


resdir="res/"


puts `mv build.props build.props.bak`
puts `ant clean`


 ARGV<<"" if ARGV==[]

case ARGV[0]
 when "test"
  screensizes=["240x320"]
  voice_modes=["en_speedy"]
 else
  screensizes=["128x128","176x220","240x320"]
  voice_modes=["no_voice","de_tts","de_64kbit_tts","en_speedy","wav"]
 
end



propertys={}

screensizes.each { |screensize|

 




  voice_modes.each { |voice_mode|

    p "cleaning ressources"
    p `rm -rf tmp/res`
    p `mkdir tmp/res`

    p `cp -v res/images_by_screensize/#{screensize}/* tmp/res/`

    propertys["screensize"]=screensize

    p "voice_mode" + voice_mode
    p "Screensize " + screensize

    propertys["voice_mode"]=voice_mode

    propertys["basename"]="DUBwise-#{screensize}-#{voice_mode}"
    p `cp -v res/voice_samples_by_name/#{voice_mode}/* tmp/res/`  
   

    prefs_file= File.new("build.props","w")
    propertys.each_pair {|name,value|
      prefs_file <<     name+"="+value+"\n"
    }
    prefs_file.close

    `ant build`.each_line {     |l| puts l }
  }


}
puts `mv -v  build.props.bak build.props`