Merge pull request #38 from bronson/wsl
Support Windows Subsystem on Linux
This commit is contained in:
@@ -4,7 +4,7 @@ The "one key" is enter, which has to be pressed whenever the virtual machine is
|
|||||||
|
|
||||||
The goal of the script is to allow for a very easy installation without any closed-source additions or extra bootloaders.
|
The goal of the script is to allow for a very easy installation without any closed-source additions or extra bootloaders.
|
||||||
|
|
||||||
Tested on Cygwin, should work on Linux distros.
|
Tested on Cygwin, usually works on Linux distros and WSL.
|
||||||
|
|
||||||
## iCloud and iMessage connectivity
|
## iCloud and iMessage connectivity
|
||||||
|
|
||||||
@@ -21,6 +21,6 @@ Developing and maintaining VirtualBox features is beyond the scope of this scrip
|
|||||||
## Dependencies
|
## Dependencies
|
||||||
|
|
||||||
* [VirtualBox](https://www.virtualbox.org/wiki/Downloads)≥5.2 with Extension Pack
|
* [VirtualBox](https://www.virtualbox.org/wiki/Downloads)≥5.2 with Extension Pack
|
||||||
* `Bash`≥4 (run on Windows through [Cygwin](https://cygwin.com/install.html))
|
* `Bash`≥4 (run on Windows through [Cygwin](https://cygwin.com/install.html) or WSL)
|
||||||
* `unzip`, `wget` (install through package manager)
|
* `unzip`, `wget` (install through package manager)
|
||||||
* `dmg2img` (install through package manager on Linux; let the script download it automatically on Windows)
|
* `dmg2img` (install through package manager on Linux and WSL; let the script download it automatically on Cygwin)
|
||||||
|
|||||||
@@ -90,14 +90,21 @@ fi
|
|||||||
# VirtualBox in ${PATH}
|
# VirtualBox in ${PATH}
|
||||||
|
|
||||||
if [ -z "$(VBoxManage -v 2>/dev/null)" ]; then
|
if [ -z "$(VBoxManage -v 2>/dev/null)" ]; then
|
||||||
|
if [ -n "$('/mnt/c/Program Files/Oracle/VirtualBox/VBoxManage.exe' -v 2>/dev/null)" ]; then
|
||||||
|
# If VBoxManage.exe is in the standard install location, use it.
|
||||||
|
function VBoxManage() {
|
||||||
|
'/mnt/c/Program Files/Oracle/VirtualBox/VBoxManage.exe' "$@"
|
||||||
|
}
|
||||||
|
elif [ -n "$('/cygdrive/c/Program Files/Oracle/VirtualBox/VBoxManage.exe' -v 2>/dev/null)" ]; then
|
||||||
|
function VBoxManage() {
|
||||||
|
'/cygdrive/c/Program Files/Oracle/VirtualBox/VBoxManage.exe' "$@"
|
||||||
|
}
|
||||||
|
else
|
||||||
echo "Please make sure VirtualBox is installed, and that the path to"
|
echo "Please make sure VirtualBox is installed, and that the path to"
|
||||||
echo "the VBoxManage executable is in the PATH variable."
|
echo "the VBoxManage executable is in the PATH variable."
|
||||||
if [ -n "${windows}" ]; then echo -n "VBoxManage is usually installed in"
|
|
||||||
echo "/cygdrive/c/Program Files/Oracle/VirtualBox"
|
|
||||||
echo "and can be added with PATH=\"\${PATH}:/cygdrive/c/<...>\""
|
|
||||||
fi
|
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
# dmg2img
|
# dmg2img
|
||||||
if [ -z "$(dmg2img -d 2>/dev/null)" ]; then
|
if [ -z "$(dmg2img -d 2>/dev/null)" ]; then
|
||||||
|
|||||||
Reference in New Issue
Block a user