Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Setting up the Electric Book workflow on Windows

Setting up the EBW tools on Windows

These steps have worked for me on several machines. Every machine is a bit different, so your mileage may vary.

On OSX? I've written up guidance for installing the EBW tools on OSX here.

  1. The first steps are to get Ruby and Jekyll installed. I have a whole separate piece on that here. Go and read that, follow it closely, and come back here when you're done.

  2. Download and install PrinceXML. See princexml.com/doc/installing for instructions. Note that this is proprietary software (the only proprietary tool we use). You can try the trial version for free; it adds a watermark to your first page.

  3. Install PhantomJS. This is necessary for building search indexes for websites. (And, in older repos to Electric Book template version 0.12, for creating PDFs that contain maths.)

    Download the Windows zip file from phantomjs.org and extract it.

    PhantomJS doesn't have an installer. So making it work on your computer involves two steps: saving the exe file somewhere permanent, and listing its location in your PATH. To do this, I recommend:

    1. Create a folder on your C: drive called PhantomJS, and copy the extracted contents of the zip file into it. This should include a bin folder that contains phantomjs.exe.
    2. Add the location ‘C:\PhantomJS\bin’ to your PATH. Your PATH is the list of places where your computer will look for .exe files when you ask it to run a program. So by adding the folder that contains phantomjs.exe to your PATH, you're making it possible for the computer to find it when you send commands to phantomjs. Editing your PATH seems scary at first, but if you're careful it's really easy. Here's a good walk-through.
  4. Install Pandoc. This is mostly for exporting to Word, and can be useful to help with converting Word documents to markdown. I recommend downloading and running the official Windows installer at pandoc.org.

  5. Install Git for version control. Git isn't easy to understand at first, but it's worth the effort. I recommend installing it using one of these two options:

  6. Install a good text editor. I like VS Code and Sublime Text 3. Brackets is also good. (Atom is lovely, but may still have a markdown bug that could also affect Brackets and VS Code.)

  7. Install Gulp and Graphicsmagick. We use these together to create multi-format images. To do this:

    1. Install Node.js using the offical Windows installer.

    2. Now that Node is installed, to install gulp you enter this from the Command Prompt:

      npm install --global gulp-cli

      (If you need more detail, see the official docs.)

    3. To install GraphicsMagick, you can download the installer from the official FTP site, which is listed on the official downloads page. You can also download it from SourceForge.

      Technical note: the Windows installer should automatically include a tool called 'Little CMS'. Little CMS is required for managing colour profiles during image conversions. It is not installed by default on Mac when installed with Homebrew.

Dependencies for creating apps

Creating apps is more complex than other output formats, so this is for advanced users.

If you want to create app versions of your books, you will need to install:

  1. Apache Cordova
  2. Android Studio for Android apps
  3. Visual Studio for Windows apps

The Electric Book scripts will use these in the background, and for some build steps you'll have to use these directly.

You cannot create Apple apps on a Windows (or Linux) machine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.