mac的環境讓開發者很享受,既可以像在linux環境下開發,又可以享受到幾乎window所有支持的工具軟件,比如ide,note,browser
我的安裝過程
1.首先你有了64位的window7操作系統,電腦本身是4*2=8核,我覺得4核就可以了,2核可能跑不動;我的內存16G,8G也夠了;
2.安裝VirtualBox 版本5.0.8 r103449, 安裝5.0x版本的應該度可以;
3.下載mac 的操作系統
下載地址:https://goo.gl/DZTaKi
你會下載到5個分開的壓縮包,因為太大了,所有分成5個便於下載,解壓后得到鏡像;
4.創建虛擬器,注意顯存設置為最大,內存和處理器設置到紅色臨界區即可
5.導入現有的鏡像,之后你發現啟動不了,哈哈沒關系,請看6
6.在window的 控制台( window+R 輸入cmd 回車)執行如下操作
將下面的 “Your VM Name” 替換成你虛擬機中創建的虛擬環境的名稱 比如叫mac_sy
Code for Virtualbox 5.x.x:
cd "C:\Program Files\Oracle\VirtualBox\"
VBoxManage.exe modifyvm "Your VM Name" --cpuidset 00000001 000106e5 00100800 0098e3fd bfebfbff
VBoxManage setextradata "Your VM Name" "VBoxInternal/Devices/efi/0/Config/DmiSystemProduct" "iMac11,3"
VBoxManage setextradata "Your VM Name" "VBoxInternal/Devices/efi/0/Config/DmiSystemVersion" "1.0"
VBoxManage setextradata "Your VM Name" "VBoxInternal/Devices/efi/0/Config/DmiBoardProduct" "Iloveapple"
VBoxManage setextradata "Your VM Name" "VBoxInternal/Devices/smc/0/Config/DeviceKey" "ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc"
VBoxManage setextradata "Your VM Name" "VBoxInternal/Devices/smc/0/Config/GetKeyFromRealSMC" 1
Code for Virtualbox 4.x.x:
cd "C:\Program Files\Oracle\VirtualBox\"
VBoxManage.exe modifyvm "Your VM Name" --cpuidset 00000001 000306a9 04100800 7fbae3ff bfebfbff
VBoxManage setextradata "Your VM Name" "VBoxInternal/Devices/efi/0/Config/DmiSystemProduct" "MacBookPro11,3"
VBoxManage setextradata "Your VM Name" "VBoxInternal/Devices/efi/0/Config/DmiSystemVersion" "1.0"
VBoxManage setextradata "Your VM Name" "VBoxInternal/Devices/efi/0/Config/DmiBoardProduct" "Iloveapple"
VBoxManage setextradata "Your VM Name" "VBoxInternal/Devices/smc/0/Config/DeviceKey" "ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc"
VBoxManage setextradata "Your VM Name" "VBoxInternal/Devices/smc/0/Config/GetKeyFromRealSMC" 1
7.好了,你可以用虛擬器了,如果發現網上上不去,設置下網絡為 網絡地址轉換NAT;
參考:https://techsviewer.com/install-macos-sierra-virtualbox-windows/