Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?xml version="1.0" standalone="yes"?>
- <installer-gui-script minSpecVersion="1">
- <options eraseOptionAvailable="true" hostArchitectures="i386" allow-external-scripts="yes" osVersion="10.9" osBuildVersion="13A476u"/>
- <title>MacOSX_Title</title>
- <license file="License.rtf"/>
- <conclusion file="Conclusion.rtfd"/>
- <script>
- var minRam = 2048;
- function checkSupportedMachine(machineType) {
- return true;
- }
- function checkSupportedBootRom(machineType) {
- return true;
- }
- function hasAtLeastRam(RAM) {
- var requiredRAM = (RAM * 1024 * 1024);
- var actualRAM = system.sysctl('hw.memsize');
- return (actualRAM > (requiredRAM - 1));
- }
- function is64bit() {
- var is64bit =system.sysctl('hw.cpu64bit_capable');
- return is64bit;
- }
- function isVirtualMachine(){
- var cpuFeatures = system.sysctl( 'machdep.cpu.features' );
- cpuFeatures=cpuFeatures.split(" ");
- for( var i = 0; i < cpuFeatures.length; i++ ){
- if( cpuFeatures[i] == "VMM" ){
- return true;
- }
- }
- return false;
- }
- function isSupportedPlatform(){
- if( isVirtualMachine() ){
- return true;
- }
- var platformSupportValues=["Mac-031B6874CF7F642A","Mac-F42D88C8","Mac-50619A408DB004DA","Mac-F2218EA9","Mac-F42D86A9","Mac-F22C8AC8","Mac-F22586C8","Mac-AFD8A9D944EA4843","Mac-F227BEC8","Mac-F226BEC8","Mac-7DF2A3B5E5D671ED","Mac-35C1E88140C3E6CF","Mac-942B59F58194171B","Mac-2E6FAB96566FE58C","Mac-7BA5B2794B2CDB12","Mac-031AEE4D24BFF0B1","Mac-00BE6ED71E35EB86","Mac-4B7AC7E43945597E","Mac-F22C89C8","Mac-942459F5819B171B","Mac-F42388C8","Mac-F223BEC8","Mac-F4238CC8","Mac-F222BEC8","Mac-4BC72D62AD45599E","Mac-F2268DC8","Mac-F2208EC8","Mac-66F35F19FE2A0D05","Mac-F4238BC8","Mac-F221BEC8","Mac-C08A6BB70A942AC2","Mac-8ED6AF5B48C039E1","Mac-F2238AC8","Mac-FC02E91DDD3FA6A4","Mac-6F01561E16C75D06","Mac-F22589C8","Mac-F22587A1","Mac-F22788AA","Mac-F42C86C8","Mac-942C5DF58193131B","Mac-F2238BAE","Mac-F22C86C8","Mac-F2268CC8","Mac-F2218FC8","Mac-742912EFDBEE19B3","Mac-27ADBB7B4CEE8E61","Mac-F65AE981FFA204ED","Mac-F42D89C8","Mac-F22587C8","Mac-F42D89A9","Mac-F2268AC8","Mac-F42C89C8","Mac-942452F5819B1C1B","Mac-F2218FA9","Mac-F221DCC8","Mac-94245B3640C91C81","Mac-F42D86C8","Mac-F2268EC8","Mac-F2268DAE","Mac-7DF21CB3ED6977E5","Mac-F42C88C8","Mac-94245A3940C91C80","Mac-F42386C8","Mac-C3EC7CD22292981F","Mac-942B5BF58194151B","Mac-F2218EC8"];
- var boardID = system.ioregistry.fromPath('IOService:/')['board-id'];
- if( !boardID || platformSupportValues.length == 0 ) {
- return false
- }
- for( var i = 0; i < platformSupportValues.length; i++ ){
- if( boardID == platformSupportValues[i] ){
- return true;
- }
- }
- return false;
- }
- function installCheckScript(){
- try{
- var machineType = system.ioregistry.fromPath('IODeviceTree:/')['compatible'];
- if (typeof(isFNI) == "undefined" && typeof(hwbeInstallCheck) != "undefined") {
- if (!hwbeInstallCheck()) {
- return false;
- }
- }
- if(!is64bit()){
- my.result.message = system.localizedStringWithFormat('IC_Unsupported_Processor');
- my.result.type = 'Fatal';
- return false;
- }
- if(!isSupportedPlatform()){
- my.result.message = system.localizedStringWithFormat('IC_Unsupported_Platform');
- my.result.type = 'Fatal';
- return false;
- }
- if(!hasAtLeastRam(minRam)){
- my.result.message = system.localizedStringWithFormat('IC_RAM_message');
- my.result.type = 'Fatal';
- return false;
- }
- if (system.compareVersions(system.version.ProductVersion, '10.9') < 0 && system.env.COMMAND_LINE_INSTALL) {
- my.result.message = system.localizedStringWithFormat('IC_Command_Line_message', '10.9');
- my.result.type = 'Fatal';
- return false;
- }
- if (typeof(findBJPrinters) != "undefined") findBJPrinters();
- } catch (e) {
- system.log('installCheckScript threw exception ' + e);
- }
- return true;
- }
- function volCheckScript(){
- var target = my.target;
- var destSystemVersion = target['systemVersion'];
- if(system.files.fileExistsAtPath(my.target.mountpoint + "/Backups.backupdb")) {
- my.result.message = system.localizedString('VC_Backup_message');
- my.result.type = 'Fatal';
- return false;
- }
- if(my.target.systemVersion){
- if( system.compareVersions(my.target.systemVersion.ProductVersion, '10.10') >= 0){
- my.result.message = system.localizedString('VC_Newer_message');
- my.result.type = 'Fatal';
- return false;
- }
- }
- if (destSystemVersion) {
- // Don't allow upgrades on volumes less than 10.6.6
- if (-1 == system.numericalCompare(destSystemVersion['ProductVersion'], '10.6.6')) {
- my.result.message = system.localizedString('VC_Upgrade_message');
- my.result.type = 'Fatal';
- return false;
- }
- }
- //FDE CHECKS
- var plist = system.files.plistAtPath('/System/Library/Extensions/CoreStorage.kext/Contents/Info.plist');
- if(plist){
- var plistKeyValue = plist['CoreStorageDiskFormatVersion'];
- if((system.ioregistry.matchingClass('CoreStorageGroup').length != 0) && (system.compareVersions(plistKeyValue, '1') != 0) ){
- my.result.message = system.localizedString('CS_message');
- my.result.type = 'Fatal';
- return false;
- }
- }
- return true;
- }
- function language_running(langKey){
- var appleLanguages = system.defaults['AppleLanguages'];
- if(!appleLanguages || (appleLanguages.length == 0))
- return ((langKey == 'English') || (langKey == 'en'))
- return (langKey == appleLanguages[0]);
- }
- gLanguageRequired = {
- };
- //Function returns true if the langKey is required, it uses a cache so that the logic doesn't
- //have to be run hundreds of times
- function language_required(langKey){
- if(! (gLanguageRequired[langKey])){
- var required = false;
- if(language_running(langKey)){
- required = true;
- }
- gLanguageRequired[langKey] = required;
- }
- return gLanguageRequired[langKey];
- }
- function language_enabled(langKey){
- var enabled = !(language_required(langKey));
- if(false == enabled){
- my.choice.tooltip = system.localizedString('TT_Language_Required_message');
- }
- return enabled;
- }
- function language_selected(langKey){
- var selected = my.choice.selected || language_required(langKey);
- return selected;
- }
- function verCompare(checkVer){
- var sysVer = my.target['systemVersion'];
- if (sysVer) {
- return system.numericalCompare(sysVer['ProductVersion'],checkVer);
- }
- return -1;
- }
- function upgrade_allowed(){
- var argv = upgrade_allowed.arguments;
- var upgradable = true;
- var upgradeAction = my.choice.packageUpgradeAction;
- if(argv.length > 0) {
- upgradeAction = eval('choices.' + argv[0] + '.packageUpgradeAction');
- }
- if((upgradeAction == 'downgrade') || (upgradeAction == 'mixed')){
- my.choice.tooltip = system.localizedString('TT_Newer_Package_Installed_message');
- upgradable = false;
- }
- return upgradable;
- }
- function systemHasDVD(){
- var obj = system.ioregistry.matchingClass("IODVDBlockStorageDriver");
- if (obj) {
- return true;
- }
- var obj2 = system.ioregistry.matchingName("ApplePlatformEnabler","IOService");
- if (obj2 ) {
- if ( obj2[0]['DVDSupported'] ) {
- return true;
- }
- }
- return false;
- }
- function hasNetInfo() {
- var path = my.target.mountpoint + "/private/var/db/netinfo/local.nidb";
- if (system.files.fileExistsAtPath(path)) {
- return true;
- }
- return false;
- }
- function needsX11redirect() {
- var sysVer = my.target['systemVersion'];
- if (!sysVer) {
- return true;
- }
- var path = my.target.mountpoint + "/private/var/db/receipts/com.apple.pkg.X11redirect.plist";
- if (system.files.fileExistsAtPath(path) || system.compareVersions(my.target.systemVersion.ProductVersion, '10.9') < 0) {
- return true;
- }
- return false;
- }
- </script>
- <installation-check script="installCheckScript()"/>
- <volume-check script="volCheckScript()"/>
- <choices-outline>
- <line choice="EssentialSystemSoftware">
- <line choice="EssentialSystemSoftwareGroup"/>
- <line choice="AdditionalEssentials"/>
- <line choice="AdditionalSpeechVoices"/>
- <line choice="AsianLanguagesSupport"/>
- <line choice="MediaFiles"/>
- <line choice="JavaEssentials"/>
- <line choice="OxfordDictionaries"/>
- <line choice="X11"/>
- </line>
- <line choice="OSInstallScripts"/>
- </choices-outline>
- <choice id="EssentialSystemSoftware" title="EssentialSystemSoftware_title" description="EssentialSystemSoftware_description" start_enabled="false" start_visible="false"/>
- <choice id="EssentialSystemSoftwareGroup" start_visible="false" start_selected="true">
- <pkg-ref id="com.apple.pkg.BaseSystemBinaries"/>
- <pkg-ref id="com.apple.pkg.BaseSystemResources"/>
- <system-image id="com.apple.dmg.MacOSX"/>
- <pkg-ref id="com.apple.mpkg.OSInstall"/>
- <pkg-ref id="com.apple.pkg.Essentials"/>
- <pkg-ref id="com.apple.pkg.BSD"/>
- <pkg-ref id="com.apple.pkg.JavaTools"/>
- </choice>
- <choice id="AdditionalEssentials" start_visible="false" start_selected="true">
- <pkg-ref id="com.apple.pkg.AdditionalEssentials"/>
- <pkg-ref id="com.apple.pkg.OSUpgrade" active="!my.target.ignoreContents && hasNetInfo() && verCompare(10.3) >= 0"/>
- </choice>
- <choice id="AsianLanguagesSupport" start_visible="false" start_selected="true">
- <pkg-ref id="com.apple.pkg.AsianLanguagesSupport"/>
- </choice>
- <choice id="JavaEssentials" start_visible="false" start_selected="true">
- <pkg-ref id="com.apple.pkg.JavaEssentials"/>
- </choice>
- <choice id="MediaFiles" start_visible="false" start_selected="true">
- <pkg-ref id="com.apple.pkg.MediaFiles"/>
- </choice>
- <choice id="OxfordDictionaries" start_visible="false" start_selected="true">
- <pkg-ref id="com.apple.pkg.OxfordDictionaries"/>
- </choice>
- <choice id="OSInstallScripts" start_visible="false" start_selected="true">
- <pkg-ref id="com.apple.pkg.OSInstall"/>
- </choice>
- <choice id="AdditionalSpeechVoices" start_visible="false" start_selected="true">
- <pkg-ref id="com.apple.pkg.AdditionalSpeechVoices"/>
- </choice>
- <choice id="X11" start_selected="true" start_visible="false">
- <pkg-ref id="com.apple.pkg.X11redirect" active="needsX11redirect()"/>
- </choice>
- <pkg-ref id="com.apple.pkg.AdditionalSpeechVoices" auth="root">AdditionalSpeechVoices.pkg</pkg-ref>
- <pkg-ref id="com.apple.pkg.AsianLanguagesSupport" auth="root">AsianLanguagesSupport.pkg</pkg-ref>
- <pkg-ref id="com.apple.pkg.BaseSystemBinaries" auth="root">BaseSystemBinaries.pkg</pkg-ref>
- <pkg-ref id="com.apple.pkg.BaseSystemResources" auth="root">BaseSystemResources.pkg</pkg-ref>
- <pkg-ref id="com.apple.pkg.BSD" auth="root">BSD.pkg</pkg-ref>
- <pkg-ref id="com.apple.pkg.Essentials" auth="root">Essentials.pkg</pkg-ref>
- <pkg-ref id="com.apple.pkg.AdditionalEssentials" auth="root">AdditionalEssentials.pkg</pkg-ref>
- <pkg-ref id="com.apple.pkg.OSUpgrade" auth="root">OSUpgrade.pkg</pkg-ref>
- <pkg-ref id="com.apple.pkg.JavaEssentials" auth="root">JavaEssentials.pkg</pkg-ref>
- <pkg-ref id="com.apple.pkg.MediaFiles" auth="root">MediaFiles.pkg</pkg-ref>
- <pkg-ref id="com.apple.pkg.OSInstall" auth="root">OSInstall.pkg</pkg-ref>
- <pkg-ref id="com.apple.pkg.OxfordDictionaries" auth="root">OxfordDictionaries.pkg</pkg-ref>
- <pkg-ref id="com.apple.pkg.X11redirect" auth="root">X11redirect.pkg</pkg-ref>
- <pkg-ref id="com.apple.pkg.JavaTools" auth="root">JavaTools.pkg</pkg-ref>
- <pkg-ref id="com.apple.mpkg.OSInstall" auth="root" version="10.9.0">OSInstall.mpkg</pkg-ref>
- <system-image id="com.apple.dmg.MacOSX">InstallESD.dmg<pkg-ref id="com.apple.pkg.AdditionalEssentials" installKBytes="148274" version="10.9.0.1.1.1306847324"/><pkg-ref id="com.apple.pkg.AdditionalSpeechVoices" installKBytes="286659" version="10.9.0.1.1.1306847324"/><pkg-ref id="com.apple.pkg.AsianLanguagesSupport" installKBytes="3914" version="10.9.0.1.1.1306847324"/><pkg-ref id="com.apple.pkg.BaseSystemBinaries" installKBytes="533973" version="10.9.0.1.1.1306847324"/><pkg-ref id="com.apple.pkg.BaseSystemResources" installKBytes="346048" version="10.9.0.1.1.1306847324"/><pkg-ref id="com.apple.pkg.BSD" installKBytes="669815" version="10.9.0.1.1.1306847324"/><pkg-ref id="com.apple.pkg.Essentials" installKBytes="4509274" version="10.9.0.1.1.1306847324"/><pkg-ref id="com.apple.pkg.JavaEssentials" installKBytes="6490" version="10.9.0.1.1.1306847324"/><pkg-ref id="com.apple.pkg.JavaTools" installKBytes="92" version="10.9.0.1.1.1306847324"/><pkg-ref id="com.apple.pkg.MediaFiles" installKBytes="67926" version="10.9.0.1.1.1306847324"/><pkg-ref id="com.apple.pkg.OSInstall" installKBytes="0" version="10.9.0.1"/><pkg-ref id="com.apple.pkg.OSUpgrade" installKBytes="0" version="10.9.0.1"/><pkg-ref id="com.apple.pkg.OxfordDictionaries" installKBytes="99984" version="10.9.0.1.1.1306847324"/><pkg-ref id="com.apple.pkg.X11redirect" installKBytes="3391" version="10.9.0.1.1.1306847324"/><pkg-ref id="com.apple.mpkg.OSInstall" auth="root" version="10.9.0"/></system-image>
- <system-image id="com.apple.dmg.MacOSX" version="10.9.0.1.1.1306847324" sha1="a8c7bfe475f047bbb09a41e1818f66d9b1efcaaa"/>
- </installer-gui-script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement