Skip to content

Commit

Permalink
Merge pull request #718 from ruboto/HAXM_10.9_daneb
Browse files Browse the repository at this point in the history
Haxm 10.9 daneb
  • Loading branch information
donv committed Apr 13, 2015
2 parents 920a209 + 198c04c commit 02c4f7e
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions lib/ruboto/util/setup.rb
Expand Up @@ -194,10 +194,15 @@ def check_for_haxm
else
@haxm_kext_loc = nil
end
# FIXME(uwe): Use the system version to choose the right .dmg

os_x_version = ENV['_system_version']
@haxm_installer_loc = Dir[File.join(android_package_directory, 'extras', 'intel', 'Hardware_Accelerated_Execution_Manager', 'IntelHAXM*.dmg')].first
@haxm_installer_version = @haxm_installer_loc.slice(/IntelHAXM_1.1.1_/)[10..-2]
if Gem::Version.new(os_x_version) > Gem::Version.new('10.9')
@haxm_installer_loc = Dir[File.join(android_package_directory, 'extras', 'intel', 'Hardware_Accelerated_Execution_Manager', 'IntelHAXM*_above*.dmg')][0]
else
@haxm_installer_loc = Dir[File.join(android_package_directory, 'extras', 'intel', 'Hardware_Accelerated_Execution_Manager', 'IntelHAXM*_below*.dmg')][0]
end

@haxm_installer_version = @haxm_installer_loc.scan(/\d+/).join('.')[0..4] if not @haxm_installer_loc.empty?
if @haxm_kext_version == @haxm_installer_version
puts "#{'%-25s' % 'Intel HAXM'}: #{(found ? "Found" : 'Not found')}"
else
Expand Down

0 comments on commit 02c4f7e

Please sign in to comment.