Skip to content

Create Android default emulator #1794

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 2, 2016
Merged

Create Android default emulator #1794

merged 1 commit into from
Jun 2, 2016

Conversation

enchev
Copy link
Contributor

@enchev enchev commented Jun 1, 2016

Related to #1731

@enchev enchev force-pushed the setup-scripts branch 4 times, most recently from 7f62073 to 62de8db Compare June 1, 2016 09:12
@@ -105,6 +105,13 @@ echo y | cmd /c "$androidExecutable" update sdk --filter "android-23" --all --no
echo y | cmd /c "$androidExecutable" update sdk --filter "build-tools-23.0.2" --all --no-ui
echo y | cmd /c "$androidExecutable" update sdk --filter "extra-android-m2repository" --all --no-ui

echo y | $ANDROID_HOME/tools/android update sdk --filter extra-intel-Hardware_Accelerated_Execution_Manager --all --no-ui

$haxmSilentInstaller = [io.path]::combine($env:ANDROID_HOME, "extras", "intel", "Hardware_Accelerated_Execution_Manager", "silent_install.sh")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isn't it silent_install.bat

@@ -105,6 +105,20 @@ echo y | cmd /c "$androidExecutable" update sdk --filter "android-23" --all --no
echo y | cmd /c "$androidExecutable" update sdk --filter "build-tools-23.0.2" --all --no-ui
echo y | cmd /c "$androidExecutable" update sdk --filter "extra-android-m2repository" --all --no-ui

if ((Read-Host "Do you want to install Android emulator?") -eq 'y') {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can use the Install function here instead of asking the user explicitly.
The purpose of the Install function is that the user may specify that that everything should be installed with no further questions.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We've decided that we want to ask explicitly if Android emulator should be installed and what kind of emulator will be used. We don't want to install both emulators.

execute("echo y | #{android_executable} update sdk --filter android-23 --all --no-ui", "There seem to be some problems with the Android configuration")
execute("echo y | #{android_executable} update sdk --filter build-tools-23.0.2 --all --no-ui", "There seem to be some problems with the Android configuration")
execute("echo y | #{android_executable} update sdk --filter extra-android-m2repository --all --no-ui", "There seem to be some problems with the Android configuration")
execute("echo y | #{android_executable} update sdk --filter platform-tools --all --no-ui", "#{error_msg}")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can safely use the variable itself without expanding it inside a string

execute("echo y | #{android_executable} update sdk --filter platform-tools --all --no-ui", error_msg)

@dtopuzov
Copy link
Contributor

dtopuzov commented Jun 1, 2016

👍

1 similar comment
@rosen-vladimirov
Copy link
Contributor

👍

execute("echo y | $ANDROID_HOME/tools/android update sdk --filter extra-intel-Hardware_Accelerated_Execution_Manager --all --no-ui", error_msg)

haxm_silent_installer = File.join(ENV["ANDROID_HOME"], "extras", "intel", "Hardware_Accelerated_Execution_Manager", "silent_install.sh")
execute("#{haxm_silent_installer}", "There seem to be some problems with the Android configuration")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be re-written as:

execute(haxm_silent_installer, error_msg)

@enchev enchev merged commit 9375ac7 into master Jun 2, 2016
@enchev enchev deleted the setup-scripts branch June 2, 2016 07:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants