This commit is contained in:
Dax T. Games 2023-03-21 09:20:06 -04:00
parent 600552f061
commit 80888644cc
2 changed files with 53 additions and 40 deletions

64
Vagrantfile vendored
View File

@ -1,58 +1,58 @@
Vagrant.configure("2") do |config| required_plugins = %w( vagrant-vbguest )
required_plugins = %w( vagrant-vbguest ) required_plugins.each do |plugin|
required_plugins.each do |plugin| unless Vagrant.has_plugin? plugin
system "vagrant plugin install #{plugin}" unless Vagrant.has_plugin? plugin system "vagrant plugin install #{plugin}"
p "Run 'vagrant up' again to continue."
exit 0
end end
end
Vagrant.configure("2") do |config|
# config.vbguest.iso_path = "../../../../usr/share/virtualbox/VBoxGuestAdditions.iso" # config.vbguest.iso_path = "../../../../usr/share/virtualbox/VBoxGuestAdditions.iso"
config.vbguest.allow_downgrade = true config.vbguest.allow_downgrade = true
config.vm.define "cmderdev-10" do |win10| config.vm.define "cmderdev-10" do |b|
win10.vm.hostname = "cmderdev-10" b.vm.hostname = "cmderdev-10"
win10.vm.box = "dgames/cmderdev-10" b.vm.box = "dgames/cmderdev-10"
config.vm.box_version = "1.0.0" b.vm.box_version = "1.0.0"
# win10.vm.network :private_network, ip: "192.168.56.101" b.vm.provider :virtualbox do |v|
win10.vm.provider :virtualbox do |v|
# v.customize ["modifyvm", :id, "--natdnshostresolver1", "on"] # v.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
v.customize ["modifyvm", :id, "--name", "cmderdev-10"] v.customize ["modifyvm", :id, "--name", "cmderdev-10"]
v.customize ["modifyvm", :id, "--ostype", "Windows10_64"] v.customize ["modifyvm", :id, "--ostype", "Windows10_64"]
v.customize ["modifyvm", :id, "--graphicscontroller", "vboxsvga"] v.customize ["modifyvm", :id, "--graphicscontroller", "vboxsvga"]
v.customize ["modifyvm", :id, "--memory", 8192] v.customize ["modifyvm", :id, "--memory", 8192]
v.customize ["modifyvm", :id, "--clipboard", "bidirectional"] v.customize ["modifyvm", :id, "--clipboard", "bidirectional"]
#v.customize ["setextradata", :id, "GUI/ScaleFactor", "1.75"]
end end
end end
config.vm.define "cmderdev-11" do |win11| config.vm.define "cmderdev-10s" do |b|
win11.vm.hostname = "cmderdev-11" b.vm.hostname = 'cmderdev-10'
win11.vm.box = "cmderdev-11" b.vm.box = "dgames/cmderdev-10"
b.vm.box_version = "1.0.0"
# win11.vm.network :private_network, ip: "192.168.56.111" b.vm.provider :virtualbox do |v|
# v.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
v.customize ["modifyvm", :id, "--name", "cmderdev-10s"]
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"]
v.customize ["setextradata", :id, "GUI/ScaleFactor", "1.75"]
end
end
win11.vm.provider :virtualbox do |v| config.vm.define "cmderdev-11" do |b|
b.vm.box = "dgames/cmderdev-11"
b.vm.box_version = "1.0.0"
b.vm.provider :virtualbox do |v|
# v.customize ["modifyvm", :id, "--natdnshostresolver1", "on"] # v.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
v.customize ["modifyvm", :id, "--name", "cmderdev-11"] v.customize ["modifyvm", :id, "--name", "cmderdev-11"]
v.customize ["modifyvm", :id, "--ostype", "Windows11_64"] v.customize ["modifyvm", :id, "--ostype", "Windows11_64"]
v.customize ["modifyvm", :id, "--graphicscontroller", "vboxvga"] v.customize ["modifyvm", :id, "--graphicscontroller", "vboxvga"]
v.customize ["modifyvm", :id, "--memory", 8192] v.customize ["modifyvm", :id, "--memory", 8192]
v.customize ["modifyvm", :id, "--clipboard", "bidirectional"] v.customize ["modifyvm", :id, "--clipboard", "bidirectional"]
#v.customize ["setextradata", :id, "GUI/ScaleFactor", "1.75"]
end
end
config.vm.define "cmderdev-10-pro-scaled" do |cmderdev|
cmderdev.vm.hostname = 'cmderdev-10-pro'
cmderdev.vm.box = "cmderdev-10"
cmderdev.vm.provider :virtualbox do |v|
# v.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
v.customize ["modifyvm", :id, "--name", "cmderdev-pro"]
v.customize ["modifyvm", :id, "--graphicscontroller", "vboxsvga"]
v.customize ["modifyvm", :id, "--memory", 8192]
v.customize ["modifyvm", :id, "--clipboard", "bidirectional"]
v.customize ["setextradata", :id, "GUI/ScaleFactor", "1.75"]
end end
end end

View File

@ -1,7 +1,7 @@
choco install -y --force 7zip 7zip.install choco install -y --force 7zip 7zip.install
choco install -y --force cmder choco install -y --force cmder
$env:path = "$env:path;c:/tools/cmder/vendor/git-for-windows/cmd" $env:path = "$env:path;c:/tools/cmder/vendor/git-for-windows/cmd;;c:/tools/cmder/vendor/git-for-windows/usr/bin;c:/tools/cmder/vendor/git-for-windows/mingw64/bin"
c: c:
cd $env:userprofile cd $env:userprofile
git clone https://github.com/cmderdev/cmder cmderdev git clone https://github.com/cmderdev/cmder cmderdev
@ -11,20 +11,33 @@ if ("$env:USERNAME" -eq "vagrant" -and -not (test-path "$env:userprofile/cmderde
invoke-expression -command "TAKEOWN /F `"$env:userprofile/cmderdev`" /R /D y /s localhost /u vagrant /p vagrant" invoke-expression -command "TAKEOWN /F `"$env:userprofile/cmderdev`" /R /D y /s localhost /u vagrant /p vagrant"
} }
cd cmderdev cd $env:userprofile/cmderdev
git checkout vagrant git checkout vagrant
git pull origin vagrant git pull origin vagrant
git remote add upstream https://github.com/cmderdev/cmder git remote add upstream https://github.com/cmderdev/cmder
git pull upstream master git pull upstream master
# cmd.exe "/K" '"C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Auxiliary/Build/vcvars64.bat" && powershell -command "& ''$env:userprofile/cmderdev/scripts/build.ps1'' -verbose -compile" && exit' write-host "==> Setting MSBuild Env..."
# copy $env:userprofile/cmderdev/launcher/x64/release/cmder.exe $env:userprofile/cmderdev cmd.exe /c "call `"C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvars64.bat`" && set > %temp%\vcvars.txt"
# cmd.exe "/K" '"C:/Program Files (x86)/Microsoft Visual Studio/2022/Community/VC/Auxiliary/Build/vcvars64.bat" && powershell -noexit -command "& ''build.ps1 -verbose -compile''"' Get-Content "$env:temp\vcvars.txt" | Foreach-Object {
if ($_ -match "^(.*?)=(.*)$") {
Set-Content "env:\$($matches[1])" $matches[2]
}
}
cd scripts write-host "==> Changing to '$env:userprofile/cmderdev/scripts'..."
./build.ps1 -verbose cd $env:userprofile/cmderdev/scripts
pwd
dir
write-host "==> Copying 'Cmder.exe' to '$env:userprofile/cmderdev'..."
copy "C:/Tools/Cmder/Cmder.exe" "$env:userprofile/cmderdev"
start-process -nonewwindow -filepath "./build.ps1" -argumentlist "-verbose -compile"
write-host "==> Copying built 'Cmder.exe' to '$env:userprofile/cmderdev'..."
copy $env:userprofile/cmderdev/launcher/x64/release/cmder.exe $env:userprofile/cmderdev
copy C:/Tools/Cmder/Cmder.exe $env:userprofile/cmderdev
# tabby # tabby
setx cmder_root "${env:userprofile}\cmderdev" setx cmder_root "${env:userprofile}\cmderdev"