wok-current rev 19562
magicpoint: add magicpoint.desktop
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sat Dec 17 18:42:47 2016 +0100 (2016-12-17) |
parents | a8df27023cb2 |
children | d934532a1be1 |
files | linld/stuff/src/HIMEM.CPP magicpoint/receipt |
line diff
1.1 --- a/linld/stuff/src/HIMEM.CPP Fri Dec 16 10:45:18 2016 +0100 1.2 +++ b/linld/stuff/src/HIMEM.CPP Sat Dec 17 18:42:47 2016 +0100 1.3 @@ -10,16 +10,18 @@ 1.4 void load_image(struct image_himem *m) { 1.5 no_exit++; // die() won't return to DOS 1.6 m->remaining = m->size; 1.7 - u32 buf= m->buf = m->fallback; 1.8 + m->buf = m->fallback; 1.9 + u32 buf; 1.10 u32* bufv= &buf; 1.11 - if(m->fallback >= _1m) { 1.12 + if(((u16 *)&m->fallback)[1] >= 0x10) { // >= _1m ? 1.13 if(vcpi) { 1.14 - bufv = malloc_bufv_or_die(m); 1.15 + bufv = malloc_bufv_or_die(m); // update m->bufv 1.16 } 1.17 else if (!skip_xmmalloc) { 1.18 - xmm_alloc(m); 1.19 + xmm_alloc(m); // update m->buf 1.20 } 1.21 } 1.22 + buf = m->buf; 1.23 do { 1.24 u8 xfer_buf[PAGE_SIZE]; 1.25 u16 size = read_image(m, xfer_buf, PAGE_SIZE);
2.1 --- a/magicpoint/receipt Fri Dec 16 10:45:18 2016 +0100 2.2 +++ b/magicpoint/receipt Sat Dec 17 18:42:47 2016 +0100 2.3 @@ -36,10 +36,34 @@ 2.4 # Rules to gen a SliTaz package suitable for Tazpkg. 2.5 genpkg_rules() 2.6 { 2.7 - mkdir -p $fs/usr/lib/X11/mgp $install/usr/share/doc $install/usr/share/man 2.8 + mkdir -p $fs/usr/lib/X11/mgp $fs/usr/share/applications 2.9 + mkdir -p $install/usr/share/doc $install/usr/share/man 2.10 cp -f $install/usr/lib/X11/mgp/default.mgp $fs/usr/lib/X11/mgp 2.11 cp -a $install/usr/bin $fs/usr 2.12 cp $src/*.man $install/usr/share/man/ 2.13 cp $src/COPYRIGHT $src/FAQ $src/RE* $src/SYNTAX $install/usr/share/doc 2.14 cp $src/USAGE $install/usr/share/doc 2.15 + cat > $fs/usr/share/applications/magicpoint.desktop <<EOT 2.16 +[Desktop Entry] 2.17 +Type=Application 2.18 +Name=MagicPoint Presentation 2.19 +Name[fr]=Présentation Magicpoint 2.20 +Icon=x-office-presentation 2.21 +Exec=mgp %f 2.22 +MimeType=application/x-magicpoint 2.23 +Categories=GTK;Office;Viewer; 2.24 +EOT 2.25 +} 2.26 + 2.27 +post_install() 2.28 +{ 2.29 + for i in magicpoint mgp ; do 2.30 + grep -q application/x-$i $1/usr/share/applications/defaults.list || 2.31 + echo "application/x-$i=magicpoint.desktop" >> $1/usr/share/applications/defaults.list 2.32 + done 2.33 +} 2.34 + 2.35 +post_remove() 2.36 +{ 2.37 + sed -i '/=magicpoint.desktop/' $1/usr/share/applications/defaults.list 2.38 } 2.39 \ No newline at end of file