lib/veewee/provider/vmfusion/provider.rb in veewee-0.3.0.alpha9 vs lib/veewee/provider/vmfusion/provider.rb in veewee-0.3.0.beta1
- old
+ new
@@ -6,11 +6,24 @@
class Provider < Veewee::Provider::Core::Provider
#include ::Veewee::Provider::Vmfusion::ProviderCommand
def check_requirements
- unless File.exists?("/Library/Application Support/VMware Fusion/vmrun")
- raise Veewee::Error,"The file /Library/Application Support/VMware Fusion/vmrun does not exists. Probably you don't have Vmware fusion installed"
+ fusion_version = :unknown
+
+ require 'fission'
+ if File.exists?("/Library/Application Support/VMware Fusion/vmrun")
+ fusion_version = "3.x"
+ ::Fission.config.attributes["vmrun_bin"] = "/Library/Application Support/VMware Fusion/vmrun"
+ end
+
+ if File.exists?("/Applications/VMware Fusion.app/Contents/Library/vmrun")
+ fusion_version = "4.x"
+ ::Fission.config.attributes["vmrun_bin"] = "/Applications/VMware Fusion.app/Contents/Library/vmrun"
+ end
+
+ if fusion_version == :unknown
+ raise Veewee::Error,"Could not find vmrun at standard locations. Probably you don't have Vmware fusion installed"
end
end
end #End Class