Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove kindlegen binary and point people to KindlePreviewer #208

Closed
cpeel opened this issue Aug 27, 2020 · 5 comments · Fixed by #681
Closed

Remove kindlegen binary and point people to KindlePreviewer #208

cpeel opened this issue Aug 27, 2020 · 5 comments · Fixed by #681
Milestone

Comments

@cpeel
Copy link
Member

cpeel commented Aug 27, 2020

Frustratingly, Amazon pulled the stand-alone kindlegen download and instead are pointing people to KindlePreviewer. This breaks packaging for Windows and Macs. The Previewer includes kindlegen somewhere in it, but the Previewer is an installation executable and we can't extract the binary for packaging.

We should stop trying to package kindlegen in GG and instead point people to download and install KindlePreviewer. We can make this slightly less painful by adding the (presumptive) kindlegen path to the GG batch file.

@cpeel cpeel added this to the Release 1.2 milestone Aug 27, 2020
@windymilla
Copy link
Collaborator

Ebookmaker uses Calibre for conversion in languages not supported by kindlegen. So it may be more appropriate to point people to Calibre - many will already have it installed anyway.

Should be able to provide a config file to ebookmaker with the --config=filename option.
Maybe just needs to contain the line
mobigen: ebook-convert

The Calibre install contains the program ebook-convert which is on the Windows path.

@windymilla
Copy link
Collaborator

It is important that the GG conversion process matches the online one when users upload to https://ebookmaker.pglaf.org/
At present, this may mean continuing to supply the kindlegen executable rather than what is contained in KindlePreviewer.
If providing a way to utilise the Calibre method built into ebookmaker, it would need to be optional and default to "off" until/unless the online ebookmaker process uses Calibre by default.

@windymilla windymilla removed this from the Release 1.2 milestone Dec 28, 2020
@tangledhelix
Copy link
Contributor

I wanted to mention another reason to stop distributing the kindlegen Mac binary: it's 32-bit, so it won't run on Catalina or Big Sur, which both require 64-bit only.

% ./kindlegen
zsh: bad CPU type in executable: ./kindlegen

@windymilla
Copy link
Collaborator

  1. Add kindlegen location to the Prefs->Set File Paths dialog
  2. Default location should ideally be where Kindle Previewer installs kindlegen by default - this may not be possible/easy since default kindlegen location is C:\Users\myusername\AppData\Local\Amazon\Kindle Previewer 3\lib\fc\bin
  3. Make creation of the mobi file dependent on availability of kindlegen, i.e. if kindlegen not found at location set in Prefs, don't tell ebookmaker to create it. If not found, issue information message when running ebookmaker explaining why mobi is not being created and direct user to install Kindle Previewer and use Prefs to locate kindlegen in the lib\fc\bin subfolder of the Kindle Previewer installation folder.
  4. If creating mobi version, add location defined in Prefs to path when spawning ebookmaker process, so ebookmaker can find kindlegen.

windymilla added a commit to windymilla/guiguts that referenced this issue Mar 31, 2021
Amazon no longer provide a standalone kindlegen, but include it in Kindle Previewer.
This commit allows the user to set the file path to the kindlegen executable they have
installed (by whatever means). If there is no kindlegen executable linked to, then
when ebookmaker is run, it will not be asked to create a kindle mobi file, and the user
will be informed via a log message that to obtain mobi files they need to install and
link to kindlegen.

This fixes DistributedProofreaders#208
@charliehoward4dp
Copy link

Letting people select the location of kindlegen.exe on the Prefs->Set File Paths dialog is a long-term, easy solution to this issue. Since all previous versions of Guiguts included kindlegen.exe, people who don't want to install Kindle Previewer 3 can point to a kindlegen.exe that's in an earlier version of Guiguts. If they think they might someday delete older versions of Guiguts, they can put a copy of one of those kindlegen.exe's in some other, permanent folder, and point to it. All the kindlegen.exe's, including the one bundled with KP3, generate what appear to be identical .mobi's.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants