# -*- mode: ruby -*-
# vi: set ft=ruby :

# This is a set of different vagrant setups that are primarily useful for package
# building and testing. The techniques here were borrowed from the Git Fusion
# team.
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
#A Vagrant Windows10 box
config.vm.define 'windows10' do |windows|
  windows.vm.box = "gusztavvargadr/windows-10"
windows.vm.guest = :windows
        windows.vm.synced_folder ".", "c:\\users\\vagrant\\hws", create: true, owner: "vagrant", group: "vagrant"
  config.ssh.password = "vagrant"
  config.ssh.username = "vagrant"
        windows.vm.communicator = "winrm"
windows.vm.network :public_network
  config.winrm.username = "vagrant"
  config.winrm.password = "vagrant"
    config.windows.halt_timeout = 15
config.winrm.timeout =   1800 # 30 minutes
config.vm.boot_timeout = 1800 # 30 minutes
  config.vm.provider "virtualbox" do |vb|
vb.gui = true 
   vb.linked_clone = true
    vb.memory = 4096
    vb.cpus = 2
    vb.customize ["modifyvm", :id, "--vram", 256]
    vb.customize ["modifyvm", :id, "--accelerate3d", "on"]
    vb.customize ["modifyvm", :id, "--accelerate2dvideo", "on"]
    vb.customize ["modifyvm", :id, "--clipboard", "bidirectional"]
    vb.customize ["modifyvm", :id, "--draganddrop", "bidirectional"]
    vb.customize [
      "storageattach", :id,
      "--storagectl", "IDE Controller",
      "--device", 0,
      "--port", 1,
      "--type", "dvddrive",
      "--medium", "emptydrive"]
    audio_driver = case RUBY_PLATFORM
      when /linux/
        "alsa"
      when /darwin/
        "coreaudio"
      when /mswin|mingw|cygwin/
        "dsound"
      else
        raise "Unknown RUBY_PLATFORM=#{RUBY_PLATFORM}"
      end
    vb.customize ["modifyvm", :id, "--audio", audio_driver, "--audiocontroller", "hda"]
  end
windows.vm.provision :shell, :path => "choco.cmd", privileged: true
windows.vm.provision :shell, :path => "package.cmd", privileged: true
    end
end