2023-03-21 21:20:06 +08:00
|
|
|
required_plugins = %w( vagrant-vbguest )
|
|
|
|
required_plugins.each do |plugin|
|
|
|
|
unless Vagrant.has_plugin? plugin
|
|
|
|
system "vagrant plugin install #{plugin}"
|
|
|
|
p "Run 'vagrant up' again to continue."
|
|
|
|
exit 0
|
2023-03-15 19:39:02 +08:00
|
|
|
end
|
2023-03-21 21:20:06 +08:00
|
|
|
end
|
2023-03-15 19:39:02 +08:00
|
|
|
|
2023-03-21 21:20:06 +08:00
|
|
|
Vagrant.configure("2") do |config|
|
2023-03-15 19:39:02 +08:00
|
|
|
# config.vbguest.iso_path = "../../../../usr/share/virtualbox/VBoxGuestAdditions.iso"
|
|
|
|
config.vbguest.allow_downgrade = true
|
|
|
|
|
2023-03-21 21:20:06 +08:00
|
|
|
config.vm.define "cmderdev-10" do |b|
|
|
|
|
b.vm.hostname = "cmderdev-10"
|
|
|
|
b.vm.box = "dgames/cmderdev-10"
|
|
|
|
b.vm.box_version = "1.0.0"
|
2023-03-15 19:39:02 +08:00
|
|
|
|
2023-03-21 21:20:06 +08:00
|
|
|
b.vm.provider :virtualbox do |v|
|
2023-03-15 19:39:02 +08:00
|
|
|
# v.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
|
|
|
|
v.customize ["modifyvm", :id, "--name", "cmderdev-10"]
|
|
|
|
v.customize ["modifyvm", :id, "--ostype", "Windows10_64"]
|
|
|
|
v.customize ["modifyvm", :id, "--graphicscontroller", "vboxsvga"]
|
|
|
|
v.customize ["modifyvm", :id, "--memory", 8192]
|
|
|
|
v.customize ["modifyvm", :id, "--clipboard", "bidirectional"]
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2023-03-21 21:20:06 +08:00
|
|
|
config.vm.define "cmderdev-10s" do |b|
|
|
|
|
b.vm.hostname = 'cmderdev-10'
|
|
|
|
b.vm.box = "dgames/cmderdev-10"
|
|
|
|
b.vm.box_version = "1.0.0"
|
2023-03-15 19:39:02 +08:00
|
|
|
|
2023-03-21 21:20:06 +08:00
|
|
|
b.vm.provider :virtualbox do |v|
|
2023-03-15 19:39:02 +08:00
|
|
|
# v.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
|
2023-03-21 21:20:06 +08:00
|
|
|
v.customize ["modifyvm", :id, "--name", "cmderdev-10s"]
|
|
|
|
v.customize ["modifyvm", :id, "--ostype", "Windows10_64"]
|
|
|
|
v.customize ["modifyvm", :id, "--graphicscontroller", "vboxsvga"]
|
2023-03-15 19:39:02 +08:00
|
|
|
v.customize ["modifyvm", :id, "--memory", 8192]
|
|
|
|
v.customize ["modifyvm", :id, "--clipboard", "bidirectional"]
|
2023-03-21 21:20:06 +08:00
|
|
|
v.customize ["setextradata", :id, "GUI/ScaleFactor", "1.75"]
|
2023-03-15 19:39:02 +08:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2023-03-21 21:20:06 +08:00
|
|
|
config.vm.define "cmderdev-11" do |b|
|
|
|
|
b.vm.box = "dgames/cmderdev-11"
|
|
|
|
b.vm.box_version = "1.0.0"
|
2023-03-15 19:39:02 +08:00
|
|
|
|
2023-03-21 21:20:06 +08:00
|
|
|
b.vm.provider :virtualbox do |v|
|
2023-03-15 19:39:02 +08:00
|
|
|
# v.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
|
2023-03-21 21:20:06 +08:00
|
|
|
v.customize ["modifyvm", :id, "--name", "cmderdev-11"]
|
|
|
|
v.customize ["modifyvm", :id, "--ostype", "Windows11_64"]
|
|
|
|
v.customize ["modifyvm", :id, "--graphicscontroller", "vboxvga"]
|
2023-03-15 19:39:02 +08:00
|
|
|
v.customize ["modifyvm", :id, "--memory", 8192]
|
|
|
|
v.customize ["modifyvm", :id, "--clipboard", "bidirectional"]
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2023-03-15 20:49:58 +08:00
|
|
|
config.vm.provision "file", source: "./scripts/vagrant/windows_terminal_settings.json.default", destination: "windows_terminal_settings.json.default"
|
|
|
|
config.vm.provision "file", source: "./scripts/vagrant/windows_terminal_state.json.default", destination: "windows_terminal_state.json.default"
|
2023-03-24 10:49:02 +08:00
|
|
|
config.vm.provision "file", source: "./vendor/bin/set-shortcut.ps1", destination: "c:\\windows\\set-shortcut.ps1"
|
2023-03-15 20:49:58 +08:00
|
|
|
config.vm.provision "shell", path: './scripts/vagrant/add-cmder.ps1'
|
2023-03-15 20:17:18 +08:00
|
|
|
config.vm.provision "shell", path: './vendor/bin/add-vscodeprofile.ps1'
|
|
|
|
config.vm.provision "shell", path: './vendor/bin/add-windowsterminalprofiles.ps1'
|
2023-03-17 05:32:46 +08:00
|
|
|
config.vm.provision "shell", path: './vendor/bin/add-cmdertodesktop.ps1'
|
2023-03-15 19:39:02 +08:00
|
|
|
end
|