在VirtualBox中安装MacOS并设置分辨率
下载虚拟机和MacOS就不说了,网上很多教程。这里需要设置的2个方面
1.VirtualBox中设置MacOS属性
cd到VirtualBox的安装目录 将一下目录依次输入
VBoxManage modifyvm "Mac" --cpuidset 00000001 000106e5 00100800 0098e3fd bfebfbff VBoxManage setextradata "Mac" "VBoxInternal/Devices/efi/0/Config/DmiSystemProduct" "iMac11,3" VBoxManage setextradata "Mac" "VBoxInternal/Devices/efi/0/Config/DmiSystemVersion" "1.0" VBoxManage setextradata "Mac" "VBoxInternal/Devices/efi/0/Config/DmiBoardProduct" "Iloveapple" VBoxManage setextradata "Mac" "VBoxInternal/Devices/smc/0/Config/DeviceKey" "ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc" VBoxManage setextradata "Mac" "VBoxInternal/Devices/smc/0/Config/GetKeyFromRealSMC" 1
说明:其中的“Mac”是你自己自定创建的虚拟Mac名称,我的名称就叫Mac。
设置屏幕分辩率
当你把Mac安装好一会就回遇到屏幕适配不兼容的问题,要调整分辨率 同样cd到VirtualBox的安装目录依次输入一下命令
VBoxManage setextradata "Mac" CustomVideoMode1 1900x950x32 VBoxManage setextradata "Mac" VBoxInternal2/EfiGraphicsResolution 1900x950
说明:1900x950是我自己设置的屏幕分辩率,这个可以根据自己的需要指定,后面的x32为颜色格式。这样就可以愉快的使用Mac撸代码了。嘻嘻!
下一篇:
Vue3 如何开发原生(安卓,ios)