Skip to content
This repository has been archived by the owner on Nov 12, 2022. It is now read-only.

Commit

Permalink
firmware compatibility of uninstall package
Browse files Browse the repository at this point in the history
  • Loading branch information
chrox committed Oct 11, 2014
1 parent ba5aa86 commit b14036a
Show file tree
Hide file tree
Showing 6 changed files with 114 additions and 98 deletions.
180 changes: 92 additions & 88 deletions ChangeLog.txt
Original file line number Diff line number Diff line change
@@ -1,88 +1,92 @@
2014-03-09 01:41 chrox

* add support for Kindle PaperWhite 5.4.4

2013-12-01 17:56 chrox

* add more models support for PaperWhite 2

2013-11-21 16:44 chrox

* add support for PaperWhite 2

2013-08-11 23:41 chrox

* disable dictionary backend

2013-07-12 21:14 chrox

* keep current location of native doc browser when launching koreader

2013-06-13 16:29 chrox

* add booklet counter to avoid blank screen

2013-04-25 17:16 chrox

* add dictionary backend for 5.3.5

2013-04-21 16:41 chrox

* enable pillow after starting koreader

2013-04-21 15:47 chrox

* add dictionary backend for 5.3.4

2013-04-16 15:13 chrox

* bugfix parsing float string from certain locales

2013-03-20 18:27 chrox

* add support for KOReader

2013-01-27 18:27 chrox

* add support for Japanese and Canadian 3G PaperWhite

2013-01-21 17:53 chrox

* add a lipc interface on dictionary backend

2013-01-21 00:11 chrox

* open txt and html documents with native reader

2013-01-20 23:12 chrox

* add dictionary backend

2013-01-17 17:35 chrox

* add detail view for additional document formats

2013-01-11 21:43 chrox

* add a backdoor to native PDF reader

2013-01-09 19:25 chrox

* use enumeration approach to find request method

2013-01-08 10:27 chrox

* bugfix booklet handler for Kindle Touch

2013-01-07 23:13 chrox

* add extractors for Kindle Touch

2013-01-07 17:16 chrox

* build update for Kindle Touch 5.1.2

2013-01-07 00:02 chrox

* build update for Kindle Paperwhite 5.3.1

2014-10-11 14:29 chrox

* add support for more models of PaperWhite 2

2014-03-09 01:41 chrox

* add support for Kindle PaperWhite 5.4.4

2013-12-01 17:56 chrox

* add more models support for PaperWhite 2

2013-11-21 16:44 chrox

* add support for PaperWhite 2

2013-08-11 23:41 chrox

* disable dictionary backend

2013-07-12 21:14 chrox

* keep current location of native doc browser when launching koreader

2013-06-13 16:29 chrox

* add booklet counter to avoid blank screen

2013-04-25 17:16 chrox

* add dictionary backend for 5.3.5

2013-04-21 16:41 chrox

* enable pillow after starting koreader

2013-04-21 15:47 chrox

* add dictionary backend for 5.3.4

2013-04-16 15:13 chrox

* bugfix parsing float string from certain locales

2013-03-20 18:27 chrox

* add support for KOReader

2013-01-27 18:27 chrox

* add support for Japanese and Canadian 3G PaperWhite

2013-01-21 17:53 chrox

* add a lipc interface on dictionary backend

2013-01-21 00:11 chrox

* open txt and html documents with native reader

2013-01-20 23:12 chrox

* add dictionary backend

2013-01-17 17:35 chrox

* add detail view for additional document formats

2013-01-11 21:43 chrox

* add a backdoor to native PDF reader

2013-01-09 19:25 chrox

* use enumeration approach to find request method

2013-01-08 10:27 chrox

* bugfix booklet handler for Kindle Touch

2013-01-07 23:13 chrox

* add extractors for Kindle Touch

2013-01-07 17:16 chrox

* build update for Kindle Touch 5.1.2

2013-01-07 00:02 chrox

* build update for Kindle Paperwhite 5.3.1

5 changes: 3 additions & 2 deletions build-updates.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

HACKNAME="kpvbooklet"
PKGNAME="${HACKNAME}"
PKGVER="0.5.4"
PKGVER="0.5.5"

# We need kindletool (https://github.com/NiLuJe/KindleTool) in $PATH
if (( $(kindletool version | wc -l) == 1 )) ; then
Expand All @@ -27,9 +27,10 @@ fi

cp -f install.ffs build/install/install.ffs
cp -f build/jar/KPVBooklet.jar build/install/KPVBooklet.jar
cp -f mimes.sql build/install/mimes.sql
cp -f mimes.install.sql build/install/mimes.install.sql

cp -f uninstall.ffs build/uninstall/uninstall.ffs
cp -f mimes.uninstall.sql build/uninstall/mimes.uninstall.sql

## K5
# Install
Expand Down
7 changes: 2 additions & 5 deletions install.ffs
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,8 @@ if [ "$VERSION" == "5.1.2" ]; then
done
fi

progress 40 "Backuping appreg.db"
[ ! -f /var/local/appreg.db.bak ] && cp /var/local/appreg.db /var/local/appreg.db.bak

progress 60 "Updating appreg.db"
sqlite3 /var/local/appreg.db < mimes.sql
progress 40 "Updating appreg.db"
sqlite3 /var/local/appreg.db < mimes.install.sql

if [ "$VERSION" \> "5.4" ]; then
progress 70 "Creating the userstore exec flag file"
Expand Down
2 changes: 1 addition & 1 deletion mimes.sql → mimes.install.sql
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
INSERT INTO "handlerIds" VALUES('com.github.koreader.kpvbooklet');
INSERT INTO "properties" VALUES('com.github.koreader.kpvbooklet','lipcId','com.github.koreader.kpvbooklet');
INSERT INTO "properties" VALUES('com.github.koreader.kpvbooklet','jar','/opt/amazon/ebook/booklet/KPVBooklet.jar');
INSERT INTO "properties" VALUES('com.github.koreader.kpvbooklet','jar','/var/local/KPVBooklet.jar');
INSERT INTO "properties" VALUES('com.github.koreader.kpvbooklet','detailFactoryPath','/opt/amazon/ebook/lib/detail_view.jar');
INSERT INTO "properties" VALUES('com.github.koreader.kpvbooklet','detailFactoryClass','com.amazon.ebook.booklet.reader.impl.detail.ReaderDetailViewFactory');

Expand Down
13 changes: 13 additions & 0 deletions mimes.uninstall.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
DELETE FROM "handlerIds" WHERE handlerId='com.github.koreader.kpvbooklet' or handlerId='com.lab126.booklet.kpvbooklet';
DELETE FROM "properties" WHERE handlerId='com.github.koreader.kpvbooklet' or handlerId='com.lab126.booklet.kpvbooklet';
DELETE FROM "associations" WHERE handlerId='com.github.koreader.kpvbooklet' or handlerId='com.lab126.booklet.kpvbooklet';

DELETE FROM "mimetypes" WHERE ext='djvu' OR ext='epub' OR ext='cbz' OR ext='chm' OR ext='doc';
DELETE FROM "mimetypes" WHERE ext='fb2' OR ext='pdb' OR ext='rtf' OR ext='tcr' OR ext='xps' OR ext='zip';
DELETE FROM "extenstions" WHERE ext='djvu' OR ext='epub' OR ext='cbz' OR ext='chm' OR ext='doc';
DELETE FROM "extenstions" WHERE ext='fb2' OR ext='pdb' OR ext='rtf' OR ext='tcr' OR ext='xps' OR ext='zip';
DELETE FROM "properties" WHERE value='DjVu' OR value='EPUB' OR value='CBZ' OR value='CHM' OR value='DOC';
DELETE FROM "properties" WHERE value='FB2' OR value='PDB' OR value='RTF' OR value='TCR' OR value='XPS' OR value='ZIP';
DELETE FROM "associations" WHERE contentId='GL:*.djvu' OR contentId='GL:*.epub' OR contentId='GL:*.cbz' OR contentId='GL:*.chm';
DELETE FROM "associations" WHERE contentId='GL:*.doc' OR contentId='GL:*.fb2' OR contentId='GL:*.pdb' OR contentId='GL:*.rtf';
DELETE FROM "associations" WHERE contentId='GL:*.tcr' OR contentId='GL:*.xps' OR contentId='GL:*.zip';
5 changes: 3 additions & 2 deletions uninstall.ffs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ progress 10 "Mounting r/w"
mntroot rw || fail "Unable to mount r/w"

progress 20 "Removing KPVBooklet.jar"
[ -f /opt/amazon/ebook/booklet/KPVBooklet.jar ] && rm /opt/amazon/ebook/booklet/KPVBooklet.jar || fail "Unable to delete KPVBooklet.jar"
[ -f /opt/amazon/ebook/booklet/KPVBooklet.jar ] && rm /opt/amazon/ebook/booklet/KPVBooklet.jar

if [ "$VERSION" == "5.1.2" ]; then
progress 30 "Removing extractors"
Expand All @@ -39,7 +39,8 @@ if [ "$VERSION" == "5.1.2" ]; then
fi

progress 50 "Restoring appreg.db"
[ -f /var/local/appreg.db.bak ] && mv -f /var/local/appreg.db.bak /var/local/appreg.db || fail "Unable to restore appreg.db"
[ -f /var/local/appreg.db.bak ] && rm -f /var/local/appreg.db.bak
sqlite3 /var/local/appreg.db < mimes.uninstall.sql

progress 80 "Mounting ro"
mntroot ro || fail "Unable to mount ro"
Expand Down

0 comments on commit b14036a

Please sign in to comment.