Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?xml version="1.0" encoding="UTF-8" standalone="no"?>
- <installer-gui-script minSpecVersion="1">
- <options type="firmware" customize="never" hostArchitectures="i386" rootVolumeOnly="true"/>
- <title>SU_TITLE</title>
- <script>
- </script>
- <volume-check script="VolumeCheck()"/>
- <installation-check script="InstallationCheck()"/>
- <script>
- function InstallationCheck(prefix) {
- var models = ['MacBookPro8,1','MacBookPro8,2','MacBookPro8,3',];
- var model = system.sysctl('hw.model');
- if (models.indexOf(model) == -1) {
- my.result.message = system.localizedString('ERROR_1');
- my.result.type = 'Fatal';
- return false;
- }
- var versions = ['MBP81.88Z.0047.B00.1101231136','MBP81.88Z.0047.B04.1102071707','MBP81.88Z.0047.B0E.1104221557','MBP81.88Z.0047.B1E.1109091244','MBP81.88Z.0047.B22.1109281426','MBP81.88Z.0047.B24.1110141131','MBP81.88Z.0047.B26.1110311252',];
- var rom = system.ioregistry.fromPath('IODeviceTree:/rom@0');
- if (!rom || !(rom.version) || versions.indexOf(rom.version) == -1) {
- my.result.message = system.localizedString('ERROR_1');
- my.result.type = 'Fatal';
- return false;
- }
- if (system.compareVersions(system.version.ProductVersion, '10.6.8') < 0) {
- my.result.message = system.localizedStringWithFormat('ERROR_0', '10.6.8');
- my.result.type = 'Fatal';
- return false;
- }
- my.result.message = system.localizedString('ERROR_1');
- if (!LogicalOr0("/")) {
- my.result.type = 'Fatal';
- return false;
- }
- return true;
- }
- function LogicalOr0(prefix) {
- if (LogicalAnd1(prefix) || PlistCheck4(prefix)) {
- return true;
- }
- return false;
- }
- function LogicalAnd1(prefix) {
- if (PlistCheck2(prefix) && PlistCheck3(prefix)) {
- return true;
- }
- return false;
- }
- function PlistCheck2(prefix) {
- var plist = system.files.plistAtPath(prefix + '/System/Library/CoreServices/SystemVersion.plist');
- if (!plist) {
- return false;
- }
- var plistKeyValue = plist['ProductVersion'];
- if (!plistKeyValue) {
- return false;
- }
- if (system.compareVersions(plistKeyValue, '10.7') >= 0) {
- return false;
- }
- return true;
- }
- function PlistCheck3(prefix) {
- var plist = system.files.plistAtPath(prefix + '/System/Library/CoreServices/SystemVersion.plist');
- if (!plist) {
- return false;
- }
- var plistKeyValue = plist['ProductVersion'];
- if (!plistKeyValue) {
- return false;
- }
- if (system.compareVersions(plistKeyValue, '10.6.8') < 0) {
- return false;
- }
- return true;
- }
- function PlistCheck4(prefix) {
- var plist = system.files.plistAtPath(prefix + '/System/Library/CoreServices/SystemVersion.plist');
- if (!plist) {
- return false;
- }
- var plistKeyValue = plist['ProductVersion'];
- if (!plistKeyValue) {
- return false;
- }
- if (system.compareVersions(plistKeyValue, '10.7.3') < 0) {
- return false;
- }
- return true;
- }
- function VolumeCheck(prefix) {
- if (system.env.OS_INSTALL == 1) return true;
- var hasOS = system.files.fileExistsAtPath(my.target.mountpoint + "/System/Library/CoreServices/SystemVersion.plist");
- if (!hasOS || system.compareVersions(my.target.systemVersion.ProductVersion, '10.6.8') < 0) {
- my.result.message = system.localizedStringWithFormat('ERROR_0', '10.6.8');
- my.result.type = 'Fatal';
- return false;
- }
- return true;
- }
- </script>
- <license file="License.rtf"/>
- <readme file="ReadMe.html"/>
- <choices-outline>
- <line choice="manual"/>
- </choices-outline>
- <choice id="manual" title="SU_TITLE">
- <pkg-ref id="MacBookProTwo" auth="Root" onConclusion="RequireRestart">#MacBookPro2011EFIUpdate.pkg</pkg-ref>
- </choice>
- <pkg-ref id='MacBookProTwo' installKBytes='5435' version='2.7.0.0.1.1330468277'/>
- <pkg-ref id='MacBookProTwo' installKBytes='5435' version='2.7.0.0.1.1330468277'/>
- </installer-gui-script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement