From b14036ae570f9b23ad5524a0bef908f7ef8ab2ce Mon Sep 17 00:00:00 2001 From: chrox Date: Sat, 11 Oct 2014 16:32:20 +0800 Subject: [PATCH] firmware compatibility of uninstall package --- ChangeLog.txt | 180 +++++++++++++++++---------------- build-updates.sh | 5 +- install.ffs | 7 +- mimes.sql => mimes.install.sql | 2 +- mimes.uninstall.sql | 13 +++ uninstall.ffs | 5 +- 6 files changed, 114 insertions(+), 98 deletions(-) rename mimes.sql => mimes.install.sql (99%) create mode 100644 mimes.uninstall.sql diff --git a/ChangeLog.txt b/ChangeLog.txt index 83bc660..6433c23 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -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 + diff --git a/build-updates.sh b/build-updates.sh index 1c25680..c1afe73 100755 --- a/build-updates.sh +++ b/build-updates.sh @@ -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 @@ -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 diff --git a/install.ffs b/install.ffs index 7d64820..b45a372 100755 --- a/install.ffs +++ b/install.ffs @@ -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" diff --git a/mimes.sql b/mimes.install.sql similarity index 99% rename from mimes.sql rename to mimes.install.sql index bf67887..0493bcc 100644 --- a/mimes.sql +++ b/mimes.install.sql @@ -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'); diff --git a/mimes.uninstall.sql b/mimes.uninstall.sql new file mode 100644 index 0000000..3b20ec1 --- /dev/null +++ b/mimes.uninstall.sql @@ -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'; diff --git a/uninstall.ffs b/uninstall.ffs index e64cfea..6c4c8f5 100755 --- a/uninstall.ffs +++ b/uninstall.ffs @@ -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" @@ -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"