Skip to content

Commit

Permalink
added shortcut to start reader without Amazon framework
Browse files Browse the repository at this point in the history
This was inspired by conversation on forum about memory usage on DXG
http://www.mobileread.com/forums/showthread.php?p=2044347#post2044347
  • Loading branch information
dpavlin committed Apr 16, 2012
1 parent e387c87 commit e106ad7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
2 changes: 2 additions & 0 deletions launchpad/kpdf.ini
Expand Up @@ -3,5 +3,7 @@
P D = !/mnt/us/launchpad/kpdf.sh /mnt/us/documents
# start kindlepdfviewer with last document
P P = !/mnt/us/launchpad/kpdf.sh
# start kindlepdfviewer without framework
P K = !/mnt/us/launchpad/kpdf.sh /mnt/us/documents framework_stop
# restart amazon framework - when it got irritated
P R = !/etc/init.d/framework restart
10 changes: 8 additions & 2 deletions launchpad/kpdf.sh
Expand Up @@ -8,9 +8,15 @@ cd /mnt/us/kindlepdfviewer/

grep /mnt/us/kindlepdfviewer/fonts/host /proc/mounts || mount -o bind /usr/java/lib/fonts /mnt/us/kindlepdfviewer/fonts/host

test "$2" == "framework_stop" && /etc/init.d/framework stop

./reader.lua "$1" 2> /mnt/us/kindlepdfviewer/crash.log || cat /mnt/us/kindlepdfviewer/crash.log

grep /mnt/us/kindlepdfviewer/fonts/host /proc/mounts && umount /mnt/us/kindlepdfviewer/fonts/host

killall -cont cvm
echo 1 > /proc/eink_fb/update_display
# always try to continue cvm
killall -cont cvm || /etc/init.d/framework start

# cleanup hanging process
killall lipc-wait-event

0 comments on commit e106ad7

Please sign in to comment.