slitaz-dev-tools rev 127

add dvd
author Pascal Bellard <pascal.bellard@slitaz.org>
date Tue Aug 30 18:25:38 2011 +0200 (2011-08-30)
parents 04fffb0f5ee3
children 767b3878de00
files mirror-tools/slitaz/mirror/dvd/cdrom.png mirror-tools/slitaz/mirror/dvd/download.php mirror-tools/slitaz/mirror/dvd/index.html
line diff
     1.1 Binary file mirror-tools/slitaz/mirror/dvd/cdrom.png has changed
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/mirror-tools/slitaz/mirror/dvd/download.php	Tue Aug 30 18:25:38 2011 +0200
     2.3 @@ -0,0 +1,48 @@
     2.4 +<?php
     2.5 +
     2.6 +$options = array(
     2.7 +		"boot"		=>	"--boot",
     2.8 +		"webboot"	=>	"--webboot",
     2.9 +		"website"	=>	"--website",
    2.10 +		"wok"		=>	"--wok", // TOFIX --wok-stable
    2.11 +		"filter"	=>	"--filter",
    2.12 +		"sources"	=>	"--sources",
    2.13 +		"loram_detect"	=>	"--loram-detect",
    2.14 +		"auto_install"	=>	"--auto-install",
    2.15 +		
    2.16 +		"packages"	=>	"--packages",
    2.17 +		"rsync"		=>	"--rsync",
    2.18 +		"doc"		=>	"--doc",
    2.19 +		"tiny"		=>	"--tiny",
    2.20 +		"pxe"		=>	"--pxe",
    2.21 +		"tools"		=>	"--tools",
    2.22 +		"hg"		=>	"--hg",
    2.23 +		"nonfree"	=>	"--nonfree",
    2.24 +		"huge"		=>	"--huge"
    2.25 +	);
    2.26 +$size = $_POST['size'];
    2.27 +$cmdline = "set -- ".$_POST['version'];
    2.28 +foreach ($options as $var => $arg)
    2.29 +	if (isset($_POST[$var]) && $_POST[$var] == 'on')
    2.30 +		$cmdline .= " ".$arg;
    2.31 +$name = "genDVDimage.sh";
    2.32 +$script =<<<EOT
    2.33 +#!/bin/sh
    2.34 +
    2.35 +if [ "\$(basename \$0)" == "$name" -a "\$1" == "" ]; then
    2.36 +
    2.37 +	# Default arguments by the web tool http://mirror.slitaz.org/dvd/
    2.38 +	# Expected size: $size KB
    2.39 +	$cmdline
    2.40 +fi
    2.41 +
    2.42 +
    2.43 +EOT;
    2.44 +$script .= file_get_contents("/usr/bin/mkpkgiso");
    2.45 +
    2.46 +header("Content-Type: application/octet-stream");
    2.47 +header("Content-Length: ".strlen($script));
    2.48 +header("Content-Disposition: attachment; filename=".$name);
    2.49 +echo $script;
    2.50 +
    2.51 +?>
     3.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.2 +++ b/mirror-tools/slitaz/mirror/dvd/index.html	Tue Aug 30 18:25:38 2011 +0200
     3.3 @@ -0,0 +1,350 @@
     3.4 +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     3.5 +    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
     3.6 +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
     3.7 +<head>
     3.8 +	<title>SliTaz DVD/USB Key builder</title>
     3.9 +	<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" />
    3.10 +	<meta name="description" content="slitaz DVD and USB key generator" />
    3.11 +	<meta name="robots" content="index, nofollow" />
    3.12 +	<meta name="author" content="SliTaz Contributors" />
    3.13 +	<link rel="shortcut icon" href="/css/favicon.ico" />
    3.14 +	<link rel="stylesheet" type="text/css" href="/css/slitaz.css" />
    3.15 +	<style type="text/css">
    3.16 +#copy {
    3.17 +	text-align: center;
    3.18 +}
    3.19 +
    3.20 +#bottom {
    3.21 +	text-align: center;
    3.22 +}
    3.23 +	</style>
    3.24 +</head>
    3.25 +<body>
    3.26 +
    3.27 +<!-- Header -->
    3.28 +<div id="header">
    3.29 +	<div id="logo"></div>
    3.30 +	<div id="network">
    3.31 +		<a href="http://www.slitaz.org/">
    3.32 +		<img src="/css/pics/network.png" alt="network.png" /></a>
    3.33 +		<a href="http://scn.slitaz.org/">Community</a>
    3.34 +		<a href="http://doc.slitaz.org/" title="SliTaz Community Documentation">Doc</a>
    3.35 +		<a href="http://forum.slitaz.org/" title="Slitaz Forum">Forum</a>
    3.36 +		<a href="http://bugs.slitaz.org/" title="Bug Tracking System">Bugs</a>
    3.37 +		<a href="http://hg.slitaz.org/" title="SliTaz repositories">Hg</a>
    3.38 +	</div>
    3.39 +	<h1><a href="http://www.slitaz.org/">SliTaz DVD & USB key builder</a></h1>
    3.40 +</div>
    3.41 +
    3.42 +<!-- Block -->
    3.43 +<div id="block">
    3.44 +	<!-- Navigation -->
    3.45 +	<div id="block_nav">
    3.46 +		<h4><img src="/css/pics/development.png" alt="development.png" />Developers Corner</h4>
    3.47 +		<a href="http://www.slitaz.org/en/devel/">Website devel</a> -
    3.48 +		<a href="http://cook.slitaz.org/">Build Bot</a> -
    3.49 +		<a href="http://pkgs.slitaz.org/">packages database</a>
    3.50 +		<p>
    3.51 +			<strong>Online tools:</strong>
    3.52 +			<a href="http://pizza.slitaz.org/">Live Builder</a> -
    3.53 +			<a href="http://boot.slitaz.org/">Web Boot</a> -
    3.54 +			<a href="http://mirror.slitaz.org/packages/convert/">Package Converter</a> -
    3.55 +			<a href="http://mirror.slitaz.org/floppies/builder/">Floppies Builder</a>
    3.56 +		</p>
    3.57 +	</div>
    3.58 +	<!-- Information/image -->
    3.59 +	<div id="block_info">
    3.60 +	<h4>DVD and USB key generator</h4>
    3.61 +		<p>
    3.62 +			This tool will create a shell script. You should run this script
    3.63 +			on your own SliTaz to build the DVD iso image. You can put this image on
    3.64 +			a DVD with <u>wodim</u> or on an USB key with <u>tazusb geniso2usb</u>.
    3.65 +		</p>
    3.66 +		<p>
    3.67 +			GUI tools are also available: <u>burnbox</u> and <u>tazusbbox</u>.
    3.68 +		</p>
    3.69 +	</div>
    3.70 +</div>
    3.71 +
    3.72 +<!-- Content, from http://en.wikipedia.org/wiki/Miscellaneous_Symbols_Unicode_block -->
    3.73 +<div id="content">
    3.74 +
    3.75 +<form method="post" enctype="multipart/form-data" action="http://mirror.slitaz.org/dvd/download.php">
    3.76 +<input type="hidden" name="rsync" value="on" />
    3.77 +<input type="hidden" name="filter" value="on" />
    3.78 +<input type="hidden" id="size" name="size" value="0" />
    3.79 +
    3.80 +<table width="100%" >
    3.81 +<tr>
    3.82 +<td><h2><img title="Features" src="cdrom.png" alt="" width="25" height="25" />
    3.83 +    Features</h2></td>
    3.84 +<!-- td align="right"><h2><input type="radio" name="version" value="4.0">stable 4.0</h2></td -->
    3.85 +<td align="right"><h2><input type="radio" name="version" value="cooking">cooking</h2></td>
    3.86 +<td align="right"><h2><input type="radio" name="version" value="3.0" checked="checked">3.0</h2></td>
    3.87 +<td align="right"><h2><input type="radio" name="version" value="2.0">2.0</h2></td>
    3.88 +<td align="right"><h2><input type="radio" name="version" value="1.0">1.0</h2></td>
    3.89 +<!-- td align="right"><h2><input type="radio" name="version" value="all">all</h2></td -->
    3.90 +</tr>
    3.91 +<tr><td colspan="5"><hr /></td></tr>
    3.92 +
    3.93 +<tr style="background:#f0f0f0">
    3.94 +<td><input type="checkbox" checked="checked" disabled="disabled" name="boot" />Bootable on SliTaz</td>
    3.95 +<!-- td align="right" id="boot_stable">29 MB</td -->
    3.96 +<td align="right" id="boot_cooking">29 MB</td>
    3.97 +<td align="right" id="boot_3.0">29 MB</td>
    3.98 +<td align="right" id="boot_2.0">28 MB</td>
    3.99 +<td align="right" id="boot_1.0">24 MB</td>
   3.100 +<!-- td align="right" id="boot_all">139 MB</td -->
   3.101 +</tr>
   3.102 +<tr>
   3.103 +<td><input type="checkbox" checked="checked" name="webboot" />Bootable on Internet &#9786</td>
   3.104 +<!-- td align="right" id="webboot_stable">196 KB</td -->
   3.105 +<td align="right" id="webboot_cooking">196 KB</td>
   3.106 +<td align="right" id="webboot_3.0">196 KB</td>
   3.107 +<td align="right" id="webboot_2.0">196 KB</td>
   3.108 +<td align="right" id="webboot_1.0">196 KB</td>
   3.109 +<!-- td align="right" id="webboot_all">196 KB</td -->
   3.110 +</tr>
   3.111 +<tr style="background:#f0f0f0">
   3.112 +<td><input type="checkbox" checked="checked" name="website" />with the SliTaz website</td>
   3.113 +<!-- td align="right" id="website_stable">23 MB</td -->
   3.114 +<td align="right" id="website_cooking">23 MB</td>
   3.115 +<td align="right" id="website_3.0">23 MB</td>
   3.116 +<td align="right" id="website_2.0">23 MB</td>
   3.117 +<td align="right" id="website_1.0">23 MB</td>
   3.118 +<!-- td align="right" id="website_all">23 MB</td -->
   3.119 +</tr>
   3.120 +<tr>
   3.121 +<td><input type="checkbox" name="doc" />with the SliTaz doc website</td>
   3.122 +<!-- td align="right" id="doc_stable">85 MB</td -->
   3.123 +<td align="right" id="doc_cooking">85 MB</td>
   3.124 +<td align="right" id="doc_3.0">85 MB</td>
   3.125 +<td align="right" id="doc_2.0">85 MB</td>
   3.126 +<td align="right" id="doc_1.0">85 MB</td>
   3.127 +<!-- td align="right" id="doc_all">85 MB</td -->
   3.128 +</tr>
   3.129 +<tr style="background:#f0f0f0">
   3.130 +<td><input type="checkbox" name="tiny" />with the Tiny SliTaz website</td>
   3.131 +<!-- td align="right" id="tiny_stable">15 MB</td -->
   3.132 +<td align="right" id="tiny_cooking">15 MB</td>
   3.133 +<td align="right" id="tiny_3.0">15 MB</td>
   3.134 +<td align="right" id="tiny_2.0">15 MB</td>
   3.135 +<td align="right" id="tiny_1.0">15 MB</td>
   3.136 +<!-- td id="tiny_all">15 MB</td -->
   3.137 +</tr>
   3.138 +<tr>
   3.139 +<td><input type="checkbox" name="pxe" />with the SliTaz PXE website</td>
   3.140 +<!-- td align="right" id="pxe_stable">112 MB</td -->
   3.141 +<td align="right" id="pxe_cooking">112 MB</td>
   3.142 +<td align="right" id="pxe_3.0">112 MB</td>
   3.143 +<td align="right" id="pxe_2.0">82 MB</td>
   3.144 +<td align="right" id="pxe_1.0">25 MB</td>
   3.145 +<!-- td align="right" id="pxe_all">444 MB</td -->
   3.146 +</tr>
   3.147 +<tr style="background:#f0f0f0">
   3.148 +<td><input type="checkbox" name="tools" />with online tools (pkgs, pizza, convert, floppy, dvd)</td>
   3.149 +<!-- td align="right" id="tools_stable">1.0 MB</td -->
   3.150 +<td align="right" id="tools_cooking">1.0 MB</td>
   3.151 +<td align="right" id="tools_3.0">1.0 MB</td>
   3.152 +<td align="right" id="tools_2.0">1.0 MB</td>
   3.153 +<td align="right" id="tools_1.0">1.0 MB</td>
   3.154 +<!-- td align="right" id="tools_all">1.0 MB</td -->
   3.155 +</tr>
   3.156 +<tr>
   3.157 +<td><input type="checkbox" checked="checked" name="wok" />with the SliTaz wok (rules to build any package)</td>
   3.158 +<!-- td align="right" id="wok_stable">87 MB</td -->
   3.159 +<td align="right" id="wok_cooking">87 MB</td>
   3.160 +<td align="right" id="wok_3.0">87 MB</td>
   3.161 +<td align="right" id="wok_2.0">87 MB</td>
   3.162 +<td align="right" id="wok_1.0">87 MB</td>
   3.163 +<!-- td align="right" id="wok_all">87 MB</td -->
   3.164 +</tr>
   3.165 +<tr style="background:#f0f0f0">
   3.166 +<td><input type="checkbox" name="hg" />with all Mercurial repositories</td>
   3.167 +<!-- td align="right" id="hg_stable">250 MB</td -->
   3.168 +<td align="right" id="hg_cooking">250 MB</td>
   3.169 +<td align="right" id="hg_3.0">250 MB</td>
   3.170 +<td align="right" id="hg_2.0">250 MB</td>
   3.171 +<td align="right" id="hg_1.0">250 MB</td>
   3.172 +<!-- td align="right" id="hg_all">250 MB</td -->
   3.173 +</tr>
   3.174 +<tr>
   3.175 +<td><input type="checkbox" checked="checked" name="packages" />with all packages & flavors files</td>
   3.176 +<!-- td align="right" id="packages_stable">2.6 GB</td -->
   3.177 +<td align="right" id="packages_cooking">2.6 GB</td>
   3.178 +<td align="right" id="packages_3.0">1.4 GB</td>
   3.179 +<td align="right" id="packages_2.0">910 MB</td>
   3.180 +<td align="right" id="packages_1.0">230 MB</td>
   3.181 +<!-- td align="right" id="packages_all">5.1 GB</td -->
   3.182 +</tr>
   3.183 +<tr style="background:#f0f0f0">
   3.184 +<td><input type="checkbox" name="nonfree" />with non-free &#9888; packages (from get-* scripts) <sup>1</sup></td>
   3.185 +<!-- td align="right" id="nonfree_stable">500 MB</td -->
   3.186 +<td align="right" id="xnonfree_cooking">not yet</td>
   3.187 +<td align="right" id="xnonfree_3.0">not yet</td>
   3.188 +<td align="right" id="nonfree_2.0">200 MB</td>
   3.189 +<td align="right" id="nonfree_1.0">50 MB</td>
   3.190 +<!-- td align="right" id="nonfree_all">500 MB</td -->
   3.191 +</tr>
   3.192 +<tr>
   3.193 +<td><input type="checkbox" name="huge" />with free but huge packages (from get-* scripts) <sup>2</sup></td>
   3.194 +<!-- td align="right" id="huge_stable">500 MB</td -->
   3.195 +<td align="right" id="xhuge_cooking">not yet</td>
   3.196 +<td align="right" id="xhuge_3.0">not yet</td>
   3.197 +<td align="right" id="huge_2.0">500 MB</td>
   3.198 +<td align="right" id="xhuge_1.0">none</td>
   3.199 +<!-- td align="right" id="huge_all">900 MB</td -->
   3.200 +</tr>
   3.201 +<tr style="background:#f0f0f0">
   3.202 +<td><input type="checkbox" name="sources" />with all sources files <sup>3</sup></td>
   3.203 +<!-- td align="right" id="sources_stable">5.0 GB</td -->
   3.204 +<td align="right" id="sources_cooking">5.0 GB</td>
   3.205 +<td align="right" id="sources_3.0">2.4 GB</td>
   3.206 +<td align="right" id="sources_2.0">1.5 GB</td>
   3.207 +<td align="right" id="sources_1.0">650 MB</td>
   3.208 +<!-- td align="right" id="sources_all">9.6 GB</td -->
   3.209 +</tr>
   3.210 +<tr>
   3.211 +<td><input type="checkbox" checked="checked" name="loram_detect" />with loram &#9842; autodetection</td>
   3.212 +<!-- td align="right" id="loram_detect_stable">129 MB</td -->
   3.213 +<td align="right" id="loram_detect_cooking">129 MB</td>
   3.214 +<td align="right" id="loram_detect_3.0">132 MB</td>
   3.215 +<td align="right" id="loram_detect_2.0">99 MB</td>
   3.216 +<td align="right" id="loram_detect_1.0">82 MB</td>
   3.217 +<!-- td align="right" id="loram_detect_all">570 MB</td -->
   3.218 +</tr>
   3.219 +<tr style="background:#f0f0f0">
   3.220 +<td><input type="checkbox" checked="checked" name="auto_install" />with auto activation on boot (standalone mode)</td>
   3.221 +<!-- td align="right" id="auto_install_stable">2 KB</td -->
   3.222 +<td align="right" id="auto_install_cooking">2 KB</td>
   3.223 +<td align="right" id="auto_install_3.0">2 KB</td>
   3.224 +<td align="right" id="auto_install_2.0">2 KB</td>
   3.225 +<td align="right" id="auto_install_1.0">2 KB</td>
   3.226 +<!-- td align="right" id="auto_install_all">2 KB</td -->
   3.227 +</tr>
   3.228 +</table>
   3.229 +<hr />
   3.230 +<input name="download" value="Download" type="submit" />
   3.231 +the script to build the ISO image.
   3.232 +<span id="result">
   3.233 +</span>
   3.234 +</form>
   3.235 +
   3.236 +<script type="text/javascript">
   3.237 +<!--
   3.238 +function toKb(size)
   3.239 +{
   3.240 +	var divisor = 1, result = 0;
   3.241 +	for (var i = 0; i < size.length; i++) {
   3.242 +		switch (size.charAt(i)) {
   3.243 +		case '.' : divisor = 10; continue;
   3.244 +		case 'K' : return result/divisor;
   3.245 +		case 'M' : return (1024*result)/divisor;
   3.246 +		case 'G' : return (1024*1024*result)/divisor;
   3.247 +		case 'T' : return (1024*1024*1024*result)/divisor;
   3.248 +		}
   3.249 +		if (size.charAt(i) >= '0' && size.charAt(i) <= '9') {
   3.250 +			result *= 10
   3.251 +			result += parseInt(size.charAt(i) - '0')
   3.252 +		}
   3.253 +	}
   3.254 +	return result/divisor
   3.255 +}
   3.256 +
   3.257 +function toHuman(size)
   3.258 +{
   3.259 +	var i;
   3.260 +	for (size *= 10, i = 0; size > 10000; size /= 1024, i++);
   3.261 +	if (size >= 100) size = parseInt(size / 10)
   3.262 +	else size = parseInt(size / 10) + "." + parseInt(size % 10)
   3.263 +	return size + " " + "KMGT".charAt(i) + "B"
   3.264 +}
   3.265 +
   3.266 +function update_size()
   3.267 +{
   3.268 +	var total = 1024; // padding
   3.269 +	for (var i = 0; i < document.getElementsByTagName("td").length; i++) {
   3.270 +		var obj = document.getElementsByTagName("td")[i]
   3.271 +		var reg = new RegExp("^[0-9\.]* [KMGT]B$")
   3.272 +		if (!reg.test(obj.innerHTML)) continue
   3.273 +		obj.style.fontWeight="normal"
   3.274 +		obj.style.textDecoration="none"
   3.275 +		obj.style.backgroundColor="inherit"
   3.276 +	}
   3.277 +	for (var i = 0; i < document.forms[0].elements.length; i++) {
   3.278 +		var obj = document.forms[0].elements[i]
   3.279 +		if (obj.checked == false) continue
   3.280 +		var version = document.forms[0].version
   3.281 +		for (j = 0; j < version.length; j++) {
   3.282 +			if (version[j].checked) {
   3.283 +				version = version[j].value
   3.284 +				break
   3.285 +			}
   3.286 +		}
   3.287 +		var size = document.getElementById(obj.name + "_" + version)
   3.288 +		if (size == null) continue
   3.289 +		size.style.fontWeight="bold"
   3.290 +		//size.style.textDecoration="underline"
   3.291 +		size.style.backgroundColor="#d66018"
   3.292 +		total += parseInt(toKb(size.innerHTML))
   3.293 +	}
   3.294 +	var size = document.getElementById("size")
   3.295 +	size.value = total
   3.296 +	var result=document.getElementById("result")
   3.297 +	result.innerHTML="Expected size: <u><b>"+toHuman(total)+"</b></u>"+
   3.298 +		" (needs "+toHuman(2*total)+" free space)."
   3.299 +}
   3.300 +update_size()
   3.301 +window.onchange = update_size
   3.302 +//-->
   3.303 +</script>
   3.304 +
   3.305 +<p>
   3.306 +<sup>1</sup> SliTaz can't and don't want to provide non free software. 
   3.307 +Many people want to use software such as <b>Opera</b>, <b>Skype &#9742;</b> or <b>flash-plugin</b>.
   3.308 +SliTaz provides some <u>get-*</u> scripts to let you install it.
   3.309 +The DVD creation tool will lauch this script, repackage the software and 
   3.310 +store it in the package directory.
   3.311 +</p>
   3.312 +
   3.313 +<p>
   3.314 +<sup>2</sup> Some software such as <b>OpenOffice</b> or <b>LibreOffice</b> are
   3.315 +so huge that they don't compile on SliTaz buid bot.
   3.316 +The DVD creation tool will use <u>get-*</u> scripts (see above) to store these
   3.317 +packages in the package directory. The scripts download pre-built binaries for
   3.318 +another Linux distribution.
   3.319 +</p>
   3.320 +
   3.321 +<p>
   3.322 +<sup>3</sup> Original source files. Install <u>SliTaz wok</u> to get the SliTaz
   3.323 +patchs.
   3.324 +</p>
   3.325 +<!-- End of content -->
   3.326 +</div>
   3.327 +
   3.328 +<div id="content_bottom">
   3.329 +<div class="bottom_left"></div>
   3.330 +<div class="bottom_right"></div>
   3.331 +</div>
   3.332 +
   3.333 +<!-- Start of footer and copy notice -->
   3.334 +<div id="copy">
   3.335 +<p>
   3.336 +Copyright &copy; <span class="year"></span> <a href="http://www.slitaz.org/">SliTaz</a> -
   3.337 +<a href="http://www.gnu.org/licenses/gpl.html">GNU General Public License</a>
   3.338 +</p>
   3.339 +<!-- End of copy -->
   3.340 +</div>
   3.341 +
   3.342 +<!-- Bottom and logo's -->
   3.343 +<div id="bottom">
   3.344 +<p>
   3.345 +<a href="http://validator.w3.org/check?uri=referer"><img
   3.346 +   src="/css/pics/website/xhtml10.png" alt="Valid XHTML 1.0"
   3.347 +   title="Code validé XHTML 1.0"
   3.348 +   style="width: 80px; height: 15px;" /></a>
   3.349 +</p>
   3.350 +</div>
   3.351 +
   3.352 +</body>
   3.353 +</html>