mirror of
https://github.com/CloverHackyColor/CloverBootloader.git
synced 2024-12-23 16:17:40 +01:00
1148542685
Signed-off-by: Sergey Isakov <isakov-sl@bk.ru>
96 lines
2.5 KiB
XML
96 lines
2.5 KiB
XML
<?xml version="1.0"?>
|
|
|
|
<installer-gui-script minSpecVersion='1'>
|
|
|
|
<options hostArchitectures='i386' allow-external-scripts='yes'/>
|
|
<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'/>
|
|
<background-darkAqua file='background.tiff' alignment='topleft' scaling='proportional'/>
|
|
|
|
<title>Clover r%CLOVERREVISION% EFI bootloader</title>
|
|
|
|
<script>
|
|
|
|
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;
|
|
}
|
|
|
|
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;
|
|
}
|
|
|
|
</script> |