[
  {
    "path": "LICENSE",
    "content": "MIT License\n\nCopyright (c) 2018 hkdb\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE."
  },
  {
    "path": "README.md",
    "content": "# VBoxMacSetup v1.2\n**maintained by:** hkdb \\<hkdb@3df.io\\><br />\n\n### Bash script to quickly prepare your MacOS High Sierra Virtual HD with full screen resolution.\n\n## WHAT DOES IT DO?\n\nThis script automates the following commands:\n\n```\nVBoxManage modifyvm \"MacOS\" --cpuidset 00000001 000106e5 00100800 0098e3fd bfebfbff\n\nVBoxManage setextradata \"MacOS\" \"VBoxInternal/Devices/efi/0/Config/DmiSystemProduct\" \"iMac11,3\"\n\nVBoxManage setextradata \"MacOS\" \"VBoxInternal/Devices/efi/0/Config/DmiSystemVersion\" \"1.0\"\n\nVBoxManage setextradata \"MacOS\" \"VBoxInternal/Devices/efi/0/Config/DmiBoardProduct\" \"Iloveapple\"\n\nVBoxManage setextradata \"MacOS\" \"VBoxInternal/Devices/smc/0/Config/DeviceKey\" \"ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc\"\n\nVBoxManage setextradata \"MacOS\" \"VBoxInternal/Devices/smc/0/Config/GetKeyFromRealSMC\" 1\n\nVBoxManage setextradata \"MacOS\" \"VBoxInternal2/EfiGraphicsResolution\" \"1920x1080\"\n\n```\n\nIt also executes the following if the host is not on an Intel CPU:\n```\nVBoxManage modifyvm \"${VM}\" --cpu-profile \"Intel Core i7-6700K\"\n```\n\n\n## RELEASE\n\nv1.2 - Added support for non-Intel hosts based on @jld3103\n\nv1.1 - Merged PR Fix, Added Version Tracking, and Fixed README\n\nv1.0 - Initial Release\n\n\n## DEVELOPMENT AND PULL REQUESTS\n\nAs of v1.1, I created a develop branch for development or pull requests if it's still needed. Though, I think this is a simple enough script that probably won't require any further development?\n\n## DEPENDENCIES\n\n- Bash\n- Virtualbox 5.x and 6.x\n- MacOS High Sierra Final\n\n## TESTED ON\n\n- Ubuntu Linux 18.04, 18.10, 19.04\n\n## INSTALLATION\n\nNothing needs to be installed. It's just a script that runs commands for you.\n\n## USAGE\n\nsetup.sh takes 2 arguments which is what you named your VM led by a -v flag and the desired resolution for your VM led by -r. For example, I named mine \"MacOS\" and my full screen resolution is 1920x1080. Therefore, this is how I run the script:\n\n```\n./setup.sh -v \"MacOS\" -r 1920x1080\n```\n\n## OVERALL PROCEDURE\n\n1. Download the image file from this Techsviewer post: https://techsviewer.com/install-macos-high-sierra-virtualbox-windows/\n2. Install VirtualBox (ie. sudo apt install virtualbox, etc)\n3. Launch Virtualbox\n4. Create Virtual Machine w/ existing vmdk (ie. with what you downloaded in step 1)\n5. Name your VM without spaces. I read somewhere that spaces could potentially cause issues. mine is named \"MacOS\"\n6. Configure at least 2 cores, 4GB of RAM, and 128MB of graphics with 3D acceleration on.\n7. Close VirtualBox\n8. In terminal, run setup.sh -v \\<whatever you named your vm> -r \\<desired resolution>\n9. Launch VirtualBox again\n10. Play MacOS VM\n11. Voila!"
  },
  {
    "path": "setup.sh",
    "content": "#!/bin/bash\n\n#####################################\n#                                   #\n#           VBoxMacSetup            #\n#                                   #\n# Maintianed by; hkdb <hkdb@3df.io> #\n#                                   #\n#####################################\n\nVERSION=\"v1.2\"\n\nPOSITIONAL=()\n\nif [ \"$#\" -le 3 ] && [ \"$1\" != \"-h\" ]; then\n    echo -e '\\nSomething is missing... Type \"./setup -h\" without the quotes to find out more...\\n'\n    exit 0\nfi\n\nwhile [[ $# -gt 0 ]]\ndo\nkey=\"$1\"\n\ncase $key in\n    -v|--vm)\n    VM=\"$2\"\n    shift # past argument\n    shift # past value\n    ;;\n    -r|--resolution)\n    RES=\"$2\"\n    shift # past argument\n    shift # past value\n    ;;\n    -h|--help)\n    echo -e \"\\nVBoxMacSetup $VERSION\\n\\nOPTIONS:\\n\\n-v, --vm: Virtual Machine Name\\n-r, --resolution: VM Resolution\\n-h, --help: Help\\n\\nEXAMPLE:\\n\\n./setup.sh -v MacOS -r 1920x1080\\n\"\n    exit 0\n    ;;\nesac\ndone\nset -- \"${POSITIONAL[@]}\" # restore positional parameters\n\nVBoxManage modifyvm \"${VM}\" --cpuidset 00000001 000106e5 00100800 0098e3fd bfebfbff\n\n# Check CPU Type\nINTEL=$(lscpu |grep GenuineIntel)\n\n# Execute this line if it's a non-intel CPU\nif [ -z \"$INTEL\" ]; then\n    VBoxManage modifyvm \"${VM}\" --cpu-profile \"Intel Core i7-6700K\"\nfi\nVBoxManage setextradata \"${VM}\" \"VBoxInternal/Devices/efi/0/Config/DmiSystemProduct\" \"iMac11,3\"\nVBoxManage setextradata \"${VM}\" \"VBoxInternal/Devices/efi/0/Config/DmiSystemVersion\" \"1.0\"\nVBoxManage setextradata \"${VM}\" \"VBoxInternal/Devices/efi/0/Config/DmiBoardProduct\" \"Iloveapple\"\nVBoxManage setextradata \"${VM}\" \"VBoxInternal/Devices/smc/0/Config/DeviceKey\" \"ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc\"\nVBoxManage setextradata \"${VM}\" \"VBoxInternal/Devices/smc/0/Config/GetKeyFromRealSMC\" 1\nVBoxManage setextradata \"${VM}\" \"VBoxInternal2/EfiGraphicsResolution\" \"$RES\"\n"
  }
]