#!/bin/bash
[
"$PLAYONLINUX"
=
""
] &&
exit
1
source
"$PLAYONLINUX/lib/sources"
TITLE=
"Amazon Kindle + DeDRM"
PREFIX=
"amazonkindlededrm"
WORKING_WINE_VERSION=
"3.5"
POL_SetupWindow_Init
POL_Debug_Init
POL_SetupWindow_free_presentation
"$TITLE"
\
"This will
install
Amazon Kindle version 1.16 and the DeDRM utility to extract
the encryption keys
for
use with the DeDRM calibre plugin. (Newer versions of
Amazon Kindle
do
not work with wine)
Once you logged into your Amazon account
in
the Kindle application you can run
the “Extract Keys” utility created by this script. The extracted keys should be
in
“~/.PlayOnLinux
/wineprefix/amazonkindlededrm/drive_c/kindlekey1
.k4i”
It is probably a good idea to disable automatic updates after installation
under Tools > Options > General"
POL_Wine_SelectPrefix
"$PREFIX"
POL_Wine_PrefixCreate
"$WORKING_WINE_VERSION"
POL_System_TmpCreate
"$PREFIX"
cd
"$POL_System_TmpDir"
POL_Wine_WaitBefore
"Python 2.7"
POL_Wine
msiexec
/i
"python-2.7.16.msi"
POL_Wine_WaitExit
"Python 2.7"
POL_Wine_WaitBefore
"PyCrypto 2.6 for Python 2.7"
POL_Wine
"pycrypto-2.6.win32-py2.7.exe"
POL_Wine_WaitExit
"PyCrypto 2.6 for Python 2.7"
unzip -u DeDRM_tools_6.6.3.zip
mv
"Other_Tools/DRM_Key_Scripts/Kindle_for_Mac_and_PC/kindlekey.pyw"
"$WINEPREFIX/drive_c/"
POL_Shortcut
'Python27/python.exe'
'DeDRM Extract Amazon Kindle Keys'
''
'C:\\kindlekey.pyw'
POL_Wine_WaitBefore
"Amazon Kindle"
POL_Wine
"KindleForPC-installer-1.16.44025.exe"
rm
"$WINEPREFIX/drive_c/windows/winsxs/manifests/x86_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.4148_none_deadbeef.manifest"
POL_Wine_WaitExit
"Amazon Kindle"
POL_Shortcut
"Kindle.exe"
"Amazon Kindle"
POL_System_TmpDelete
POL_SetupWindow_Close
exit