Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100755 49 lines (40 sloc) 1.56 kb
2923266 @larsburgess removing windows newlines on upgrade script
larsburgess authored
1 #!/usr/bin/env ruby
2 require 'rubygems'
3 require 'fileutils'
4 include FileUtils
5 puts File.dirname(__FILE__)
6
3a3b059 Get app name from path
ldm314 authored
7 appname = pwd.gsub(/\\/, "/").split("/")[-1]
2923266 @larsburgess removing windows newlines on upgrade script
larsburgess authored
8 $app_config = YAML::load_file("build.yml")
9
10 unless $app_config["env"].nil? #if env is here then it is an old app
11 new_config = Hash.new
12 new_config["sdk"] = File.expand_path(File.dirname(__FILE__) + "/../")
3a3b059 Get app name from path
ldm314 authored
13 new_config["name"] = appname
2923266 @larsburgess removing windows newlines on upgrade script
larsburgess authored
14 new_config["version"] = $app_config["env"]["version"]
15 new_config["vendor"] = $app_config["env"]["vendor"]
16 new_config["bbver"] = $app_config["env"]["bbver"]
17 new_config["applog"] = $app_config["env"]["applog"]
26ba4b5 move iphone build properties to applications config. backwards compatibl...
ldm314 authored
18 new_config["iphone"] = Hash.new
19 new_config["iphone"]["configuration"] = "Debug"
20 new_config["iphone"]["sdk"] = "iphonesimulator3.0"
21 new_config["iphone"]["codesignidentity"] = ""
22 new_config["iphone"]["entitlements"] = ""
23
2923266 @larsburgess removing windows newlines on upgrade script
larsburgess authored
24
25 $app_config = new_config
26 File.open( 'build.yml', 'w' ) do |out|
27 YAML.dump( $app_config, out )
28 end
29 end
30
a203e53 copy icon if doesnt exist
root authored
31 unless File.exists? "icon/icon.png"
32 mkdir_p "icon" unless File.exists? "icon"
33 cp File.dirname(__FILE__) + '/../res/generators/templates/application/icon/icon.ico', 'icon/'
34 cp File.dirname(__FILE__) + '/../res/generators/templates/application/icon/icon.png', 'icon/'
35
36 end
37
2923266 @larsburgess removing windows newlines on upgrade script
larsburgess authored
38 cp File.dirname(__FILE__) + '/../res/generators/templates/application/Rakefile', 'Rakefile'
6a14a26 upgrade 1.2 apps as well.
Brian Moore authored
39
40 oldrhoconfig = IO.read("rhoconfig.txt")
41 newrhoconfig = File.open("rhoconfig.txt","w") do |f|
42 oldrhoconfig.each_line do |line|
43 unless line =~ /^require/
44 line.gsub!(/Rho::RhoConfig\./,"")
45 f.write line
46 end
47 end
48 end
Something went wrong with that request. Please try again.