2019-09-03 11:58:42 +02:00
|
|
|
<?xml version="1.0"?>
|
|
|
|
|
|
|
|
<installer-gui-script minSpecVersion='1'>
|
|
|
|
|
2020-11-08 06:37:29 +01:00
|
|
|
<options hostArchitectures='i386' allow-external-scripts='yes'/>
|
2019-09-03 11:58:42 +02:00
|
|
|
<domains enable_anywhere="true"/>
|
|
|
|
|
|
|
|
<welcome file='Welcome.html'/>
|
|
|
|
<!-- license file="License.rtf" sla="EA0401" -->
|
|
|
|
<readme file='Description.html'/>
|
|
|
|
<conclusion file="Conclusion.html"/>
|
|
|
|
<background file='background.tiff' alignment='topleft' scaling='proportional'/>
|
2020-11-08 06:37:29 +01:00
|
|
|
<background-darkAqua file='background.tiff' alignment='topleft' scaling='proportional'/>
|
|
|
|
|
2020-03-05 22:40:28 +01:00
|
|
|
<title>Clover r%CLOVERREVISION% EFI bootloader</title>
|
2019-09-03 11:58:42 +02:00
|
|
|
|
|
|
|
<script>
|
2020-11-08 06:37:29 +01:00
|
|
|
|
2019-09-03 11:58:42 +02:00
|
|
|
function installCheckScript()
|
|
|
|
{
|
|
|
|
var obj = system.ioregistry.matchingClass("AppleSMC");
|
|
|
|
if (obj) {
|
|
|
|
system.log('installCheckScript: Found AppleSMC');
|
|
|
|
my.result.message = system.localizedStringWithFormat('Intel_Mac_message');
|
|
|
|
my.result.type = 'Fatal';
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
system.log('installCheckScript: Passed.');
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
function volCheckScript()
|
|
|
|
{
|
|
|
|
system.log('volCheckScript: Passed.');
|
|
|
|
return true;
|
|
|
|
}
|
2020-11-08 06:37:29 +01:00
|
|
|
|
2019-09-03 11:58:42 +02:00
|
|
|
function upgrade_allowed(){
|
|
|
|
var upgradable = true;
|
|
|
|
var upgradeAction = my.choice.packageUpgradeAction;
|
|
|
|
|
|
|
|
if((upgradeAction == "downgrade") || (upgradeAction == "mixed")){
|
|
|
|
my.choice.tooltip = system.localizedString('Newer_Package_Installed_message');
|
|
|
|
upgradable = false;
|
|
|
|
}
|
|
|
|
|
|
|
|
return upgradable;
|
|
|
|
}
|
|
|
|
|
|
|
|
function systemHasGPT(){
|
|
|
|
var obj = system.ioregistry.matchingName("EFI System Partition");
|
|
|
|
if (obj)
|
|
|
|
return true;
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
function checkFileExists(file){
|
|
|
|
if (my.target) {
|
|
|
|
return system.files.fileExistsAtPath(my.target.mountpoint + file)
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
function cloverPackageFirstRun(){
|
|
|
|
var installer_plist = '/Library/Preferences/com.projectosx.clover.installer.plist';
|
|
|
|
if (checkFileExists(my.target.mountpoint + installer_plist)) {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
function choicePreviouslySelected(option) {
|
|
|
|
var installer_plist = '/Library/Preferences/com.projectosx.clover.installer.plist';
|
|
|
|
if (checkFileExists(installer_plist)) {
|
|
|
|
dict = system.files.plistAtPath(my.target.mountpoint + installer_plist);
|
|
|
|
return dict[option] == undefined ? false : dict[option];
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
function checkBootFromUEFI() {
|
|
|
|
var classObjects = system.ioregistry.matchingName('efi','IODeviceTree');
|
|
|
|
if (classObjects) {
|
|
|
|
for(var i = 0; i < classObjects.length; i++) {
|
|
|
|
var obj = classObjects[i];
|
|
|
|
if ( obj.hasOwnProperty("firmware-vendor") != true)
|
|
|
|
continue;
|
|
|
|
if (obj["firmware-vendor"].toString() == 'C,L,O,V,E,R') {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
2020-11-08 06:37:29 +01:00
|
|
|
</script>
|