timsutton / brigadier

Fetch and install Boot Camp ESDs with ease.
MIT License
2.08k stars 198 forks source link

Should be instructive command output when an M1 model is requested #60

Open timsutton opened 2 years ago

timsutton commented 2 years ago

For example in https://github.com/timsutton/brigadier/issues/59, there'll never be a BootCamp package available. We should handle this with some explanatory text.

We can of course check for Apple Silicon architecture if that's the model we're running on, but I wonder if we can consult some other external database or feed to check if a hardware model ID is an Apple Silicon machine, to handle the case from something like #59.

timsutton commented 2 years ago

One simple place to check would be the DFU or Recovery keys in MobileDeviceProductTypes in https://mesu.apple.com/assets/macos/com_apple_macOSIPSW/com_apple_macOSIPSW.xml:

    <key>MobileDeviceProductTypes</key>
    <dict>
        <key>DFU</key>
        <dict>
            <key>570458371</key>
            <string>Macmini9,1</string>
            <key>604012803</key>
            <string>MacBookPro17,1</string>
            <key>637567235</key>
            <string>MacBookAir10,1</string>
            <key>671121667</key>
            <string>iMac21,1</string>
            <key>704676099</key>
            <string>iMac21,2</string>
            <key>167796736</key>
            <string>MacBookPro18,1</string>
            <key>167796737</key>
            <string>MacBookPro18,2</string>
            <key>134242304</key>
            <string>MacBookPro18,3</string>
            <key>134242305</key>
            <string>MacBookPro18,4</string>
        </dict>
        <key>Recovery</key>
        <dict>
            <key>570458371</key>
            <string>Macmini9,1</string>
            <key>604012803</key>
            <string>MacBookPro17,1</string>
            <key>637567235</key>
            <string>MacBookAir10,1</string>
            <key>671121667</key>
            <string>iMac21,1</string>
            <key>704676099</key>
            <string>iMac21,2</string>
            <key>167796736</key>
            <string>MacBookPro18,1</string>
            <key>167796737</key>
            <string>MacBookPro18,2</string>
            <key>134242304</key>
            <string>MacBookPro18,3</string>
            <key>134242305</key>
            <string>MacBookPro18,4</string>
        </dict>
    </dict>