15 Commits

Author SHA1 Message Date
Jack
32dc71708c version bump 2022-04-18 18:09:45 +03:00
Jack
54a7e6811c Merge pull request #600 from wc7086/patch-1
Add tesseract 5
2022-04-18 18:08:36 +03:00
wc7086
dc02b6919f Add tesseract 5 2022-04-17 22:42:37 +08:00
Jack Smith
461953bc59 might as well bump the version number 2022-02-22 10:28:38 +02:00
Jack Smith
48f33a76d8 error message phrasing 2022-02-22 10:17:43 +02:00
Jack
861f02bb98 Update README.md 2022-01-16 10:44:47 +02:00
Jack
9d3ae02c5c Update README.md 2022-01-16 10:43:52 +02:00
Jack
d8aaca529d Update README.md 2022-01-16 10:43:05 +02:00
Jack Smith
ce3ee4c410 wait ten more seconds between ocr retries after successful ocr 2021-11-12 16:57:25 +02:00
Jack
0d5f89aa2d Merge pull request #555 from someuser12/_configure_nvram.txt-overwritten
append lines to "${vm_name}_configure_nvram.txt"
2021-11-12 16:54:41 +02:00
macosx12345
5a9c88f0e1 Don't overwrite "${vm_name}_configure_nvram.txt"
"${vm_name}_configure_nvram.txt" was overwritten (hence removing the comment in its first line which was created by line 991 of macos-guest-virtualbox.sh).
2021-11-12 15:03:56 +01:00
Jack
1ce5c9319f Monterey 2021-11-06 08:31:57 +02:00
Jack
90d177dbae Monterey 2021-11-06 00:11:45 +02:00
Jack
c95e56618e minor warning about upgrading to Monterey 2021-11-03 19:11:22 +02:00
Jack
f50240419d Update README.md 2021-10-31 05:31:57 +02:00
2 changed files with 13 additions and 7 deletions
Regular → Executable
+6 -2
View File
@@ -9,7 +9,7 @@ A default install only requires the user to sit patiently and, less than ten tim
Tested on `bash` and `zsh` on [Cygwin](https://cygwin.com/install.html). Works on macOS, CentOS 7, and Windows. Should work on most modern Linux distros. Tested on `bash` and `zsh` on [Cygwin](https://cygwin.com/install.html). Works on macOS, CentOS 7, and Windows. Should work on most modern Linux distros.
macOS Catalina (10.15), Mojave (10.14), and High Sierra (10.13) currently supported. The virtual machine may be upgraded to the latest Big Sur (11) version through Software Update. macOS Catalina (10.15), Mojave (10.14), and High Sierra (10.13) currently supported.
## Documentation ## Documentation
@@ -37,6 +37,10 @@ Developing and maintaining VirtualBox or macOS features is beyond the scope of t
macOS guests on VirtualBox are incompatible with some CPU models. If the guest macOS boot process hangs on “LoadKernelFromStream”, “EndRandomSeed”, or "EXITBS", see the [documentation command](#documentation) regarding VirtualBox CPU profiles and [CPUID settings](https://www.virtualbox.org/manual/ch08.html#vboxmanage-modifyvm-teleport). Some CPU models released in 2020 and later may fail to start or complete the installer, and may require manually adjusting the CPUID settings. macOS guests on VirtualBox are incompatible with some CPU models. If the guest macOS boot process hangs on “LoadKernelFromStream”, “EndRandomSeed”, or "EXITBS", see the [documentation command](#documentation) regarding VirtualBox CPU profiles and [CPUID settings](https://www.virtualbox.org/manual/ch08.html#vboxmanage-modifyvm-teleport). Some CPU models released in 2020 and later may fail to start or complete the installer, and may require manually adjusting the CPUID settings.
### Upgrading to Big Sur and Monterey
The virtual machine may be upgraded to the latest macOS Big Sur (11) and macOS Monterey (12) versions through Software Update. Big Sur may be installed in-place. Monterey may require attaching another volume to the virtual machine and selecting the volume as the installation target, otherwise the upgrade is prone to failing and entering a boot loop.
### Performance and deployment ### Performance and deployment
After successfully creating a working macOS virtual machine, consider importing it into more performant virtualization software, or packaging it for configuration management platforms for automated deployment. These virtualization and deployment applications require additional configuration that is beyond the scope of the script. After successfully creating a working macOS virtual machine, consider importing it into more performant virtualization software, or packaging it for configuration management platforms for automated deployment. These virtualization and deployment applications require additional configuration that is beyond the scope of the script.
@@ -47,7 +51,7 @@ QEMU with KVM is capable of providing virtual machine hardware passthrough for n
The VirtualBox Native Execution Manager (NEM) is an experimental VirtualBox feature. [VirtualBox uses NEM when access to VT-x and AMD-V is blocked by virtualization software or execution protection features such as Hyper-V, WSL2, WSLg, Windows Sandbox, memory integrity protection, Application Guard, Credential Guard, Device Guard, and other features and software.](https://docs.microsoft.com/en-us/troubleshoot/windows-client/application-management/virtualization-apps-not-work-with-hyper-v) macOS and the macOS installer have memory corruption issues under NEM virtualization. The script checks for NEM and exits with an error message if it is detected. The VirtualBox Native Execution Manager (NEM) is an experimental VirtualBox feature. [VirtualBox uses NEM when access to VT-x and AMD-V is blocked by virtualization software or execution protection features such as Hyper-V, WSL2, WSLg, Windows Sandbox, memory integrity protection, Application Guard, Credential Guard, Device Guard, and other features and software.](https://docs.microsoft.com/en-us/troubleshoot/windows-client/application-management/virtualization-apps-not-work-with-hyper-v) macOS and the macOS installer have memory corruption issues under NEM virtualization. The script checks for NEM and exits with an error message if it is detected.
[VirtualBox can run on WSL2 and WSLg with some kernel module compilation](https://github.com/myspaghetti/macos-virtualbox/issues/525), though performance is extremely low. At the point that kernel module compilation is required, it's preferable to use QEMU/KVM. QEMU/KVM on WSL2 and WSLg is orders of magnitude faster than VirtualBox. WSL2, WSLg, QEMU, and KVM require additional configuration that is beyond the scope of the script. [VirtualBox can run on WSL2 and WSLg with some kernel module compilation](https://github.com/myspaghetti/macos-virtualbox/issues/525), though performance is extremely low. At the point that kernel module compilation is required, it may be preferable to use QEMU/KVM on WSL2 and WSLg, which is orders of magnitude faster than VirtualBox on WSL2 and WSLg. WSL2, WSLg, QEMU, and KVM require additional configuration that is beyond the scope of the script.
### Bootloaders ### Bootloaders
+7 -5
View File
@@ -2,7 +2,7 @@
# Push-button installer of macOS on VirtualBox # Push-button installer of macOS on VirtualBox
# (c) myspaghetti, licensed under GPL2.0 or higher # (c) myspaghetti, licensed under GPL2.0 or higher
# url: https://github.com/myspaghetti/macos-virtualbox # url: https://github.com/myspaghetti/macos-virtualbox
# version 0.99.1.5 # version 0.99.1.7
# Dependencies: bash coreutils gzip unzip wget xxd dmg2img # Dependencies: bash coreutils gzip unzip wget xxd dmg2img
# Optional features: tesseract-ocr tesseract-ocr-eng # Optional features: tesseract-ocr tesseract-ocr-eng
@@ -169,7 +169,7 @@ if [[ ! $- =~ i ]]; then # terminal is not interactive
echo "" echo ""
tesseract_ocr="$(tesseract --version 2>/dev/null)" tesseract_ocr="$(tesseract --version 2>/dev/null)"
tesseract_lang="$(tesseract --list-langs 2>/dev/null)" tesseract_lang="$(tesseract --list-langs 2>/dev/null)"
regex_ver='[Tt]esseract 4' # for zsh quoted regex compatibility regex_ver='[Tt]esseract [4-5]' # for zsh quoted regex compatibility
if [[ ! ( "${tesseract_ocr}" =~ ${regex_ver} ) || -z "${tesseract_lang}" ]]; then if [[ ! ( "${tesseract_ocr}" =~ ${regex_ver} ) || -z "${tesseract_lang}" ]]; then
echo "Running the script on a non-interactive shell requires the following packages:" echo "Running the script on a non-interactive shell requires the following packages:"
echo -e " tesseract-ocr >= 4 tesseract-ocr-eng\n" echo -e " tesseract-ocr >= 4 tesseract-ocr-eng\n"
@@ -716,8 +716,8 @@ if [[ -n "$(
--audiocodec stac9221 --audio=none 2>&1 >/dev/null --audiocodec stac9221 --audio=none 2>&1 >/dev/null
)" ]]; then )" ]]; then
echo -e "\nError: Could not configure virtual machine \"${vm_name}\"." echo -e "\nError: Could not configure virtual machine \"${vm_name}\"."
echo -e "Please execute the stage ${low_contrast_color}configure_vm${default_color} again before resuming the script" echo -e "If the VM is powered on, power off the virtual machine and resume the script or"
echo -e "as described in the documentation.\n" echo -e "execute the stage ${low_contrast_color}configure_vm${default_color}\n"
echo "Exiting." echo "Exiting."
exit exit
fi fi
@@ -997,7 +997,7 @@ mkdir -p "/Volumes/'"${vm_name}"'/tmp/mount_efi" && \
mount_msdos /dev/${disks[0]}s1 "/Volumes/'"${vm_name}"'/tmp/mount_efi" && \ mount_msdos /dev/${disks[0]}s1 "/Volumes/'"${vm_name}"'/tmp/mount_efi" && \
cp -r "/Volumes/'"${macOS_release_name:0:5}-files"'/ESP/"* "/Volumes/'"${vm_name}"'/tmp/mount_efi/" && \ cp -r "/Volumes/'"${macOS_release_name:0:5}-files"'/ESP/"* "/Volumes/'"${vm_name}"'/tmp/mount_efi/" && \
installer_pid=$(ps | grep startosinstall | grep -v grep | cut -d '"'"' '"'"' -f 3) && \ installer_pid=$(ps | grep startosinstall | grep -v grep | cut -d '"'"' '"'"' -f 3) && \
kill -SIGUSR1 ${installer_pid}' > "${vm_name}_configure_nvram.txt" kill -SIGUSR1 ${installer_pid}' >> "${vm_name}_configure_nvram.txt"
# Find background process PID, then # Find background process PID, then
# start the installer, send SIGUSR1 to concurrent bash script, # start the installer, send SIGUSR1 to concurrent bash script,
# the other script copies files to EFI system partition, # the other script copies files to EFI system partition,
@@ -1610,10 +1610,12 @@ function prompt_lang_utils_terminal() {
if [[ "${ocr}" =~ ${regex_lang} ]]; then if [[ "${ocr}" =~ ${regex_lang} ]]; then
animated_please_wait 20 animated_please_wait 20
send_enter send_enter
animated_please_wait 20
elif [[ "${ocr}" =~ Utilities ]]; then elif [[ "${ocr}" =~ Utilities ]]; then
animated_please_wait 20 animated_please_wait 20
kbspecial='CTRLprs F2 CTRLrls u ENTER t ENTER' # start Terminal kbspecial='CTRLprs F2 CTRLrls u ENTER t ENTER' # start Terminal
send_special send_special
animated_please_wait 20
elif [[ "${ocr}" =~ ${regex_term} ]]; then elif [[ "${ocr}" =~ ${regex_term} ]]; then
sleep 2 sleep 2
return return