# HG changeset patch # User Pascal Bellard # Date 1452011976 -3600 # Node ID 69b7df0ddb678923d0203602ec8ede9160f11cb5 # Parent ac214416e736c6e2448c69ee59f65d99529ce1f9 Add suggested support diff -r ac214416e736 -r 69b7df0ddb67 favicon.ico Binary file favicon.ico has changed diff -r ac214416e736 -r 69b7df0ddb67 helper --- a/helper Sun Nov 01 16:56:16 2015 +0100 +++ b/helper Tue Jan 05 17:39:36 2016 +0100 @@ -198,6 +198,19 @@ +get_suggested() +{ + local pkg + pkg=pkgs/$1/receipt + [ -s $pkg ] || pkg=$2/pkgs/$1/receipt + [ -s $pkg ] || pkg=$(get_receipt $@) + . $pkg + echo -n $SUGGESTED +} + + + + get_package() { local pkg @@ -371,6 +384,7 @@ --pkgs-extract) pkgs_extract $2 $3 ;; --remove) rm -rf $2; exit ;; --get-pkg) get_package $2 $3 ;; + --get-suggested) get_suggested $2 $3 ;; --init) init ;; esac @@ -399,6 +413,8 @@ cat $tmp/post_install.log | gzip -9 > $tmp/iso/data/log.gz cp $tmp/config_files $tmp/iso/data/files.cnf cp $tmp/fs/etc/packages.conf $tmp/iso/data/packages.cnf + [ -s wok/busybox/receipt ] && tar czf $tmp/iso/data/wok.tgz wok/* + [ -s www/index.php ] && tar czf $tmp/iso/data/www.tgz www/* cp $tmp/fs/boot/bzImage $tmp/iso/boot/bzImage cp $tmp/rootfs.gz $tmp/iso/boot/rootfs cp /boot/isolinux/isolinux.bin $tmp/iso/boot/isolinux @@ -424,13 +440,13 @@ tmp=$2 cd $tmp cp fs/boot/bzImage slitaz.exe - sh fs/boot/bundle slitaz.exe rootfs.gz exe + sh fs/boot/bundle slitaz.exe rootfs.gz fi if [ "x$1" == "x--mkimg" ]; then tmp=$2 cd $tmp cp fs/boot/bzImage slitaz.img - sh fs/boot/bundle slitaz.img rootfs.gz floppy + sh fs/boot/bundle slitaz.img rootfs.gz dd of=slitaz.img bs=18k seek=80 count=0 conv=notrunc 2> /dev/null fi if [ "x$1" == "x--mkcfg" ]; then diff -r ac214416e736 -r 69b7df0ddb67 index.php --- a/index.php Sun Nov 01 16:56:16 2015 +0100 +++ b/index.php Tue Jan 05 17:39:36 2016 +0100 @@ -16,8 +16,8 @@ - - + + @@ -103,7 +103,7 @@ } catch (any) { var element = document.createElement("script"); - element.src = "/static/qrcode.min.js"; + element.src = "qrcode.min.js"; element.type = "text/javascript"; element.onload = function() { obj.src = QRCode.generatePNG(str, {ecclevel: 'H'}); @@ -134,7 +134,7 @@ Wikipedia ยท Flattr - # diff -r ac214416e736 -r 69b7df0ddb67 qr.png Binary file qr.png has changed diff -r ac214416e736 -r 69b7df0ddb67 qrcode.min.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/qrcode.min.js Tue Jan 05 17:39:36 2016 +0100 @@ -0,0 +1,1 @@ +var QRCode=(function(){var V=[null,[[10,7,17,13],[1,1,1,1],[]],[[16,10,28,22],[1,1,1,1],[4,16]],[[26,15,22,18],[1,1,2,2],[4,20]],[[18,20,16,26],[2,1,4,2],[4,24]],[[24,26,22,18],[2,1,4,4],[4,28]],[[16,18,28,24],[4,2,4,4],[4,32]],[[18,20,26,18],[4,2,5,6],[4,20,36]],[[22,24,26,22],[4,2,6,6],[4,22,40]],[[22,30,24,20],[5,2,8,8],[4,24,44]],[[26,18,28,24],[5,4,8,8],[4,26,48]],[[30,20,24,28],[5,4,11,8],[4,28,52]],[[22,24,28,26],[8,4,11,10],[4,30,56]],[[22,26,22,24],[9,4,16,12],[4,32,60]],[[24,30,24,20],[9,4,16,16],[4,24,44,64]],[[24,22,24,30],[10,6,18,12],[4,24,46,68]],[[28,24,30,24],[10,6,16,17],[4,24,48,72]],[[28,28,28,28],[11,6,19,16],[4,28,52,76]],[[26,30,28,28],[13,6,21,18],[4,28,54,80]],[[26,28,26,26],[14,7,25,21],[4,28,56,84]],[[26,28,28,30],[16,8,25,20],[4,32,60,88]],[[26,28,30,28],[17,8,25,23],[4,26,48,70,92]],[[28,28,24,30],[17,9,34,23],[4,24,48,72,96]],[[28,30,30,30],[18,9,30,25],[4,28,52,76,100]],[[28,30,30,30],[20,10,32,27],[4,26,52,78,104]],[[28,26,30,30],[21,12,35,29],[4,30,56,82,108]],[[28,28,30,28],[23,12,37,34],[4,28,56,84,112]],[[28,30,30,30],[25,12,40,34],[4,32,60,88,116]],[[28,30,30,30],[26,13,42,35],[4,24,48,72,96,120]],[[28,30,30,30],[28,14,45,38],[4,28,52,76,100,124]],[[28,30,30,30],[29,15,48,40],[4,24,50,76,102,128]],[[28,30,30,30],[31,16,51,43],[4,28,54,80,106,132]],[[28,30,30,30],[33,17,54,45],[4,32,58,84,110,136]],[[28,30,30,30],[35,18,57,48],[4,28,56,84,112,140]],[[28,30,30,30],[37,19,60,51],[4,32,60,88,116,144]],[[28,30,30,30],[38,19,63,53],[4,28,52,76,100,124,148]],[[28,30,30,30],[40,20,66,56],[4,22,48,74,100,126,152]],[[28,30,30,30],[43,21,70,59],[4,26,52,78,104,130,156]],[[28,30,30,30],[45,22,74,62],[4,30,56,82,108,134,160]],[[28,30,30,30],[47,24,77,65],[4,24,52,80,108,136,164]],[[28,30,30,30],[49,25,81,68],[4,28,56,84,112,140,168]]];var l=0;var o=1,U=2,R=4,y=8;var G=/^\d*$/;var E=/^[A-Za-z0-9 $%*+\-./:]*$/;var t=/^[A-Z0-9 $%*+\-./:]*$/;var h=1,g=0,c=3,n=2;var B=[],Q=[-1];for(var P=0,H=1;P<255;++P){B.push(H);Q[H]=P;H=(H*2)^(H>=128?285:0)}var m=[[]];for(var P=0;P<30;++P){var D=m[P],F=[];for(var O=0;O<=P;++O){var T=(O6};var x=function(a){return 4*a+17};var u=function(a){var b=V[a];var i=16*a*a+128*a+64;if(f(a)){i-=36}if(b[2].length){i-=25*b[2].length*b[2].length-10*b[2].length-55}return i};var p=function(a,b){var j=u(a)&~7;var i=V[a];j-=8*i[0][b]*i[1][b];return j};var A=function(a,b){switch(b){case o:return(a<10?10:a<27?12:14);case U:return(a<10?9:a<27?11:13);case R:return(a<10?8:16);case y:return(a<10?8:a<27?10:12)}};var z=function(a,j,b){var i=p(a,b)-4-A(a,j);switch(j){case o:return((i/10)|0)*3+(i%10<4?0:i%10<7?1:2);case U:return((i/11)|0)*2+(i%11<6?0:1);case R:return(i/8)|0;case y:return(i/13)|0}};var s=function(W,j){switch(W){case o:if(!j.match(G)){return null}return j;case U:if(!j.match(E)){return null}return j.toUpperCase();case R:if(typeof j==="string"){var v=[];for(var a=0;a>6),128|(b&63))}else{if(b<65536){v.push(224|(b>>12),128|((b>>6)&63),128|(b&63))}else{v.push(240|(b>>18),128|((b>>12)&63),128|((b>>6)&63),128|(b&63))}}}}return v}else{return j}}};var k=function(aa,Y,X,Z){var b=[];var ac=0,v=8;var a=X.length;var ab=function(i,ad){if(ad>=v){b.push(ac|(i>>(ad-=v)));while(ad>=8){b.push((i>>(ad-=8))&255)}ac=0;v=8}if(ad>0){ac|=(i&((1<=0){for(var v=0;v=0;--j){if((b>>(v+j))&1){b^=a<>aj)&1;W[an+ak][v+aj]=1}}};ab(0,0,9,9,[127,65,93,93,93,65,383,0,64]);ab(X-8,0,8,9,[256,127,65,93,93,93,65,127]);ab(0,X-8,9,8,[254,130,186,186,186,130,254,0,0]);for(var ad=9;ad>aa++)&1;W[ad][(X-11)+ac]=W[(X-11)+ac][ad]=1}}}return{matrix:ag,reserved:W}};var L=function(ab,b,a){var v=ab.length;var X=0,W=-1;for(var Z=v-1;Z>=0;Z-=2){if(Z==6){--Z}var aa=(W<0?v-1:0);for(var Y=0;YZ-2;--ac){if(!b[aa][ac]){ab[aa][ac]=(a[X>>3]>>(~X&7))&1;++X}}aa+=W}W=-W}return ab};var K=function(v,a,b){var X=J[b];var Z=v.length;for(var Y=0;Y>X)&1}return Z};var w=function(ad){var Z=3;var ai=3;var af=40;var ag=10;var a=function(j){var al=0;for(var aj=0;aj=5){al+=Z+(j[aj]-5)}}for(var aj=5;aj=4*ak||j[aj+1]>=4*ak)){al+=af}}return al};var W=ad.length;var Y=0,X=0;for(var ac=0;ac>3);i=N(i,ac[1][a],m[ac[0][a]]);var ae=I(aa);var ab=ae.matrix,b=ae.reserved;L(ab,b,i);if(ad<0){K(ab,b,0);e(ab,b,a,0);var W=0,Y=w(ab);K(ab,b,0);for(ad=1;ad<8;++ad){K(ab,b,ad);e(ab,b,a,ad);var j=w(ab);if(Y>j){Y=j;W=ad}K(ab,b,ad)}ad=W}K(ab,b,ad);e(ab,b,a,ad);return ab};var r={generate:function(X,v){var W={numeric:o,alphanumeric:U,octet:R};var j={L:h,M:g,Q:c,H:n};v=v||{};var a=v.version||-1;var i=j[(v.ecclevel||"L").toUpperCase()];var Y=v.mode?W[v.mode.toLowerCase()]:-1;var b="mask" in v?v.mask:-1;if(Y<0){if(typeof X==="string"){if(X.match(G)){Y=o}else{if(X.match(t)){Y=U}else{Y=R}}}else{Y=R}}else{if(!(Y==o||Y==U||Y==R)){throw"invalid or unsupported mode"}}X=s(Y,X);if(X===null){throw"invalid data format"}if(i<0||i>3){throw"invalid ECC level"}if(a<0){for(a=1;a<=40;++a){if(X.length<=z(a,Y,i)){break}}if(a>40){throw"too large data"}}else{if(a<1||a>40){throw"invalid version"}}if(b!=-1&&(b<0||b>8)){throw"invalid mask"}return d(X,a,Y,i,b)},generatePNG:function(Z,ad){ad=ad||{};var ab=r.generate(Z,ad);var aa=Math.max(ad.modulesize||5,0.5);var W=Math.max(ad.margin||4,0);var v=ab.length;var ac=aa*(v+2*W);var b=document.createElement("canvas"),a;b.width=b.height=ac;a=b.getContext("2d");if(!a){throw"canvas support is needed for PNG output"}a.fillStyle="#fff";a.fillRect(0,0,ac,ac);a.fillStyle="#000";for(var Y=0;Yheader{display:block;background:#444;text-align:justify;line-height:0;box-shadow:0 -8px 8px #333 inset}h1{display:inline-block;margin:auto 0;height:40px;white-space:nowrap;vertical-align:middle}h1::before{display:inline-block;content:url(logo.png);vertical-align:middle}h1 a{color:#FFF;font-size:20px;font-style:italic}body>header::before,body>header::after,.block>div::before,.block>div::after{display:inline-block;width:100%;height:0;visibility:hidden;overflow:hidden;content:''}.network{display:inline-block;text-align:left;vertical-align:middle;font-size:12px;line-height:normal;color:#999}.network a{display:inline-block;padding:0 6px;vertical-align:middle;color:#FFF}.home::before{content:url(home.png)}.block{padding:6px;background:#CCC;border-bottom:1px solid #AAA}.block>div{max-width:700px;margin:0 auto;text-align:justify;line-height:0}.block_info{padding:6px 12px 0 0;line-height:normal;width:60%}.block_info input{width:100%}.block header{font-weight:400;font-size:18px;line-height:18px}.block_info p{margin:7px 0;padding:0;text-align:justify}nav{background:#666;color:#FFF;padding:6px;line-height:normal}nav a{white-space:nowrap;color:#FFF}nav header img{margin:0 4px 0 0;padding:0}nav,.block_info{display:inline-block;vertical-align:top}.lang{margin:0;text-align:right;padding:6px;font-size:0.9rem}.lang a{padding:0 2px}[dir="rtl"] .lang{text-align:left}main{display:block;max-width:700px;min-height:70vh;margin:6px auto;padding:0 6px;text-align:justify;line-height:1.5rem}p,ul,ol,h2,h3,pre,table{max-width:700px}p,ul,ol,pre,table{margin:6px auto}p,ul,ol{display:block}ul,ol,dd{padding:0 2ex 0 4ex}ul ul,ol ol,ul ol,ol ul{margin:0}.br::before{content:url(BR.png)}.ch::before{content:url(CH.png)}.cn::before{content:url(CN.png)}.de::before{content:url(DE.png)}.es::before{content:url(ES.png)}.fr::before{content:url(FR.png)}.ir::before{content:url(IR.png)}.it::before{content:url(IT.png)}.pl::before{content:url(PL.png)}.ru::before{content:url(RU.png)}.se::before{content:url(SE.png)}.tw::before{content:url(TW.png)}.ua::before{content:url(UA.png)}.us::before{content:url(US.png)}.mirrors{padding:6px;text-align:center;background:#f1f1f1;border-bottom:1px solid #DDD}.mirrors a,.mirrors a::before{display:inline-block;padding:0 3px}.mirrors a::before{vertical-align:-4px}table{background-color:#f8f8f8;border:1px solid #BBB;width:100%;margin-bottom:20px;padding:0;border-spacing:0;line-height:1}caption{caption-side:bottom;text-align:left;padding:6px 0}thead tr{background-color:#DDD}thead th{border-bottom:1px solid #BBB}td{text-align:left}td,th{padding:4px}tbody tr:nth-child(odd){background-color:#FFF}tbody tr:nth-child(even){background-color:#EEE}.list td:nth-child(1){vertical-align:middle}.list td:nth-child(1)::before{display:inline-block;vertical-align:middle;padding-right:3px}.list th:nth-child(3),.list td:nth-child(3){text-align:right}.first{width:1%;white-space:nowrap}.news li{list-style-type:square;border-bottom:1px dotted #bebebe;margin-left:-25px;padding:4px 0}.twitter{margin:20px 0}.gallery{text-align:center}.sponsor{font-size:90%;background-color:#fbfbfb;border:2px solid #DDD;width:200px;height:160px;float:right;text-align:center;margin:10px 0 20px 20px}.right_box{width:48%;float:right}.left_box{width:48%;float:left}.box{margin:6px 0;padding:6px;background:#F4F4F4;border:1px solid #DDD}.searchbox{margin:20px 80px;padding:12px;background:#f8f8f8;text-align:center;border:1px solid #DDD}.activity{margin:0 0 20px;background:#efefef;padding:5px 2px 0;border:1px solid #DDD}.activity div{padding:5px 10px;background:#FFF;margin-top:5px}.activity p{margin:0;padding:5px 10px;font-weight:700}.activity ul{list-style-type:none;margin:4px 0;padding:0 4px;line-height:150%}.activity_more{text-align:right}.activity_more a{font-weight:400;color:#000;padding:0 4px}.activity span,.news span{color:#666;font-size:11px;font-weight:400}nav,pre,textarea,fieldset,table,.box,.searchbox,.activity,.activity div,.twitter,.sponsor{-moz-border-radius:4px;-webkit-border-radius:4px;border-radius:4px}fieldset{border:1px solid #999;display:block;width:100%;max-width:100%}body>footer{background:#f1f1f1;text-align:center;border-top:1px solid #CCC;padding:6px;color:#666;clear:both;box-shadow:0 4px 8px #CCC inset}body>footer div{margin:12px}.year:after{content:"2015"}.x-bzip::before{content:url(application-x-bzip.png)}.x-gzip::before{content:url(application-x-gzip.png)}.plain::before{content:url(text-plain.png)}.x-bittorrent::before{content:url(application-x-bittorrent.png)}.octet-stream::before{content:url(application-octet-stream.png)}.jpeg::before{content:url(image-jpeg.png)}.png::before{content:url(image-png.png)}.javascript::before{content:url(text-x-javascript.png)}.css::before{content:url(text-css.png)}.dir::before{content:url(folder.png)}.up::before{content:url(go-up.png)}.zip::before{content:url(application-zip.png)}.iso::before{content:url(application-x-cd-image.png)}.krn::before{content:url(application-x-executable.png)}.exe::before{content:url(application-x-ms-dos-executable.png)}.rme::before{content:url(text-x-readme.png)}.log::before{content:url(text-x-changelog.png)}.x-flavor::before{content:url(slitaz-icon.png)}.pkg::before{content:url(package-x-generic.png)}.server::before{content:url(network-server.png)}.locale::before{content:url(preferences-desktop-locale.png);display:inline-block;vertical-align:middle}.locale2::before{content:url(preferences-desktop-locale2.png);display:inline-block;vertical-align:middle}.touch td,.touch th{padding:6px}.touch .network a,.touch nav a,.touch .mirrors a,.touch footer a,.touch .info a{display:inline-block;padding:6px}@media(max-width:510px){.block_info,nav{display:block;width:inherit;max-width:100%}.block_info{padding:6px}} diff -r ac214416e736 -r 69b7df0ddb67 step4.php --- a/step4.php Sun Nov 01 16:56:16 2015 +0100 +++ b/step4.php Tue Jan 05 17:39:36 2016 +0100 @@ -16,6 +16,13 @@ shell_exec("sudo ./helper --post-install $pkg ".$_POST['tmp_dir']); } +if (isset($_POST['suggested'])) { + foreach ($_POST['suggested'] as $pkg) { + $_POST['toconfigure'] .= " ".$pkg; + } + unset($_POST['suggested']); +} + $output = ''; if (!empty($_POST['toconfigure'])) { $pkgs = explode(" ",$_POST['toconfigure']); @@ -42,6 +49,22 @@ +
+

+You may want to install the following package(s) too: +

+
    + +
  1. + +
  2. +"; + } ?> diff -r ac214416e736 -r 69b7df0ddb67 tinyslitaz-boot.png Binary file tinyslitaz-boot.png has changed diff -r ac214416e736 -r 69b7df0ddb67 tinyslitaz-httpinfo.png Binary file tinyslitaz-httpinfo.png has changed diff -r ac214416e736 -r 69b7df0ddb67 tinyslitaz.png Binary file tinyslitaz.png has changed