39
39
puts "You need to accept the Xcode license agreement to be able to use the Xcode command-line tools."
40
40
system ( 'xcodebuild -license' )
41
41
end
42
+
43
+ $tasks = [ "Homebrew" , "Google Chrome" , "Open JDK 8" , "Android SDK" , "Android emulator system image" , "HAXM (Hardware accelerated Android emulator)" , "Android emulator" , "CocoaPods" , "CocoaPods setup" , "pip" , "six" , "xcodeproj" ]
44
+ $count = 1
45
+ puts "This setup script will request to install the following on your machine:"
46
+ $tasks. each_with_index do |st , index |
47
+ puts "#{ index + 1 } . #{ st } "
48
+ end
49
+
42
50
# Help with installing other dependencies
43
51
44
52
@@ -62,6 +70,9 @@ def execute(script, warning_message, run_as_root = false)
62
70
end
63
71
64
72
def install ( program_name , message , script , run_as_root = false , show_all_option = true )
73
+ puts "Step #{ $count} of #{ $tasks. length } :"
74
+ $count += 1
75
+
65
76
if $answer != "a"
66
77
puts "Allow the script to install " + program_name + "?"
67
78
if show_all_option
@@ -151,8 +162,12 @@ def install_android_package(name)
151
162
install_android_package ( "extras;android;m2repository" )
152
163
install_android_package ( "extras;google;m2repository" )
153
164
165
+ puts "Step #{ $count} of #{ $tasks. length } :"
166
+ $count += 1
154
167
puts "Do you want to install Android emulator system image? (y/n)"
155
168
if $silentMode || gets . chomp . downcase == "y"
169
+ puts "Step #{ $count} of #{ $tasks. length } :"
170
+ $count += 1
156
171
puts "Do you want to install HAXM (Hardware accelerated Android emulator)? (y/n)"
157
172
if $silentMode || gets . chomp . downcase == "y"
158
173
execute ( "echo y | #{ sdk_manager } \" extras;intel;Hardware_Accelerated_Execution_Manager\" | grep -v = || true" , "Failed to download Intel HAXM." )
@@ -162,6 +177,8 @@ def install_android_package(name)
162
177
end
163
178
end
164
179
180
+ puts "Step #{ $count} of #{ $tasks. length } :"
181
+ $count += 1
165
182
puts "Do you want to create Android emulator? (y/n)"
166
183
if $silentMode || gets . chomp . downcase == "y"
167
184
error_msg = "Failed to create Android emulator."
0 commit comments