All pastes #774684 Raw Edit

Miscellany

public text v1 · immutable
·published 2007-11-15 11:20 UTC
rendered paste body
<?xml version="1.0"?>

<installer-gui-script minSpecVersion='1'>

	<options
		hostArchitectures='ppc,i386'
		customize='never'
	/>
	
	<title>MacOSX_Server_Title</title>
	<license file="License.rtf" sla="EA0395"/>
	<welcome file='Welcome.rtfd'/>

	<script>
	
	function volCheckScript(){
		if(!my.target.systemVersion){
			my.result.message = system.localizedString('VC_NoSystem_message');
			my.result.type = 'Fatal';

			return false;
		}
		//Fail if Server
		if(isServer()){
			my.result.message = system.localizedString('VC_Upgrade_message');
			my.result.type = 'Fatal';

			return false;
		}
		//Fail if volume is less than 10.5
		if(-1 == system.compareVersions(my.target.systemVersion.ProductVersion,'10.5')){
			my.result.message = system.localizedString('VC_Version_message');
			my.result.type = 'Fatal';

			return false;
		}
		//Fail if volume is greater than or equal to 10.6
		if(-1 != system.compareVersions(my.target.systemVersion.ProductVersion,'10.6')){
			my.result.message = system.localizedString('VC_Version_message');
			my.result.type = 'Fatal';

			return false;
		}
		return true;
	}
	

	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 isServer(){
		if(!my.target['systemVersion'].isServer){  
			return false;
		}
		return true;
	}

	function systemHasDVD(){
		var obj = system.ioregistry.matchingClass("IODVDBlockStorageDriver");
		if (obj) {
			return true;
		}
		return false;
	}

	function isIntel()
	{
		if ( system.sysctl('hw.machine') != 'x86' &amp;&amp; system.sysctl('hw.byteorder') != '1234')
		{
			return false;
		}
		return true;
	}

	</script>

	<volume-check script="volCheckScript()"/>

<choices-outline>
	<line choice="Server_Essentials"/>
	<line choice="ServerAdminGroup"/>
	<line choice="Quicktime_Streaming_Server"/>
	<line choice="MacOSXServerInstall"/>
	<line choice="Server_Application_Software"/>
</choices-outline>

<choice 
	id="Server_Essentials"
	start_enabled="false"
	start_selected="upgrade_allowed()"
>
	<pkg-ref id="com.apple.pkg.ServerEssentials"/>	
</choice>

<choice 
	id="ServerAdminGroup"
	start_visible="false"
	start_selected="upgrade_allowed()"
>
	<pkg-ref id="com.apple.pkg.ServerAdminTools"/>
	<pkg-ref id="com.apple.pkg.ServerSetup"/>
</choice>

<choice 
	id="Quicktime_Streaming_Server"
	start_visible="false"
	start_enabled="false"
	start_selected="upgrade_allowed()"
>
	<pkg-ref id="com.apple.pkg.QuickTimeStreamingServer"/>	
</choice>

<choice 
	id="MacOSXServerInstall"
	start_visible="false"
	start_enabled="false"
	start_selected="true"
>
	<pkg-ref id="com.apple.pkg.MacOSXServerInstall"/>	
</choice>

<choice 
	id="Server_Application_Software"
	start_enabled="false"
	start_selected="upgrade_allowed()"
>
	<pkg-ref id="com.apple.pkg.ApplicationsServer"/>	
</choice>

	<pkg-ref id="com.apple.pkg.ApplicationsServer" auth='root'>file:./ApplicationsServer.pkg</pkg-ref>
	<pkg-ref id="com.apple.pkg.QuickTimeStreamingServer" auth='root'>file:./QuickTimeStreamingServer.pkg</pkg-ref>
	<pkg-ref id="com.apple.pkg.MacOSXServerInstall" auth='root'>file:./MacOSXServerInstall.pkg</pkg-ref>
	<pkg-ref id="com.apple.pkg.ServerAdminTools" auth='root'>file:./ServerAdminTools.pkg</pkg-ref>
	<pkg-ref id="com.apple.pkg.ServerEssentials" auth='root'>file:./ServerEssentials.pkg</pkg-ref>
	<pkg-ref id="com.apple.pkg.PodcastCapture" auth='root'>file:./PodcastCapture.pkg#PodcastCapture.pkg</pkg-ref>
	<pkg-ref id="com.apple.pkg.Directory" auth='root'>file:./Directory.pkg#Directory.pkg</pkg-ref>
	<pkg-ref id="com.apple.pkg.ServerSetup" auth='root'>file:./ServerSetup.pkg</pkg-ref>
        <pkg-ref id="com.apple.MacOSXServerInstall" auth='root'>file:./MacOSXServerInstall.mpkg</pkg-ref>



	<pkg-ref id='com.apple.pkg.ApplicationsServer' installKBytes='228042' version='10.5.0.1.1.1192168948'/>
	<pkg-ref id='com.apple.pkg.Directory' installKBytes='0'/>
	<pkg-ref id='com.apple.pkg.MacOSXServerInstall' installKBytes='0' version='10.5.0.1'/>
	<pkg-ref id='com.apple.pkg.PodcastCapture' installKBytes='0'/>
	<pkg-ref id='com.apple.pkg.QuickTimeStreamingServer' installKBytes='31838' version='10.5.0.1.1.1192168948'/>
	<pkg-ref id='com.apple.pkg.ServerAdminTools' installKBytes='189878' version='10.5.0.1.1.1192168948'/>
	<pkg-ref id='com.apple.pkg.ServerEssentials' installKBytes='579914' version='10.5.0.1.1.1192168948'/>
	<pkg-ref id='com.apple.pkg.ServerSetup' installKBytes='1746' version='10.5.0.1.1.1192168948'/>
</installer-gui-script>