[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/pdf-tools 8eed479f52: Mention pre-built Windows binaries i
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/pdf-tools 8eed479f52: Mention pre-built Windows binaries in README |
Date: |
Sun, 13 Feb 2022 12:59:02 -0500 (EST) |
branch: elpa/pdf-tools
commit 8eed479f52d0f61a5eb09cc69f244077cfeecf5c
Author: AndrĂ¡s Svraka <svraka.andras@gmail.com>
Commit: Vedang Manerikar <ved.manerikar@gmail.com>
Mention pre-built Windows binaries in README
This commit explains how to use the available pre-built binaries for
`pdf-tools-server` for MSYS2-MINGW to ease installation on Windows.
Currently the MINGW package is outdated but an update is in the works.
Progress can be tracked at: msys2/MINGW-packages#10640
Closes: politza/pdf-tools#599
Closes: #77
---
README.org | 79 ++++++++++++++++++++++++++++++++++++++------------------------
1 file changed, 48 insertions(+), 31 deletions(-)
diff --git a/README.org b/README.org
index c04a7e2166..d021aa9cbb 100644
--- a/README.org
+++ b/README.org
@@ -137,7 +137,11 @@ If you choose not to install from MELPA, you must
substitute ~gmake~ for ~make~
:CREATED: [2021-12-29 Wed 18:34]
:ID: 005243cb-1557-4f94-a73d-e647e0d4b53d
:END:
-~pdf-tools~ can be built and used on Windows using the MSYS2 compiler. This
will work with native (not cygwin) Windows builds of Emacs. This includes the
standard binaries provided by the GNU project, those available as MSYS2
packages and numerous third-party binaries. It has been tested with Emacs 25.1.
Instructions are provided under
[[id:d14e01ff-9bd5-47ee-86fc-859b4499d5d7][Compilation and installation on
Window]] below. ~pdf-tools~ will successfully compile using Cygwin, but it will
[...]
+~pdf-tools~ can be built and used on Windows using the MSYS2 compiler, or
pre-built binaries can be installed in MSYS2.
+
+The Pre-built binaries will work with native (not cygwin) Windows builds of
Emacs. They include the standard binaries provided by the GNU project, those
available as MSYS2 packages and numerous third-party binaries. Instructions are
provided under [[id:d14e01ff-9bd5-47ee-86fc-859b4499d5d7][Compilation and
installation on Window]] below.
+
+~pdf-tools~ will successfully compile using Cygwin, but it will not be able to
open PDFs properly due to the way binaries compiled with Cygwin handle file
paths.
** Compiling and Installing the ~epdfinfo~ server
:PROPERTIES:
@@ -149,52 +153,65 @@ If you choose not to install from MELPA, you must
substitute ~gmake~ for ~make~
$ make -s
#+end_src
-This should compile the source code and create a Emacs Lisp Package in the
root directory of the project. The configure script also tells you at the very
end, which features, depending on the libpoppler version, will be available.
These commands should give no error, otherwise you are in trouble.
-*** On Windows
+This should compile the source code and create a Emacs Lisp Package in the
root directory of the project. The configure script also tells you at the very
end, which features, depending on the ~libpoppler~ version, will be available.
These commands should give no error, otherwise you are in trouble.
+*** Installing the ~epdinfo~ server On Windows
:PROPERTIES:
:CREATED: [2021-12-29 Wed 18:34]
:ID: d14e01ff-9bd5-47ee-86fc-859b4499d5d7
:END:
+**** Using the pre-built MINGW packages from MSYS2
+:PROPERTIES:
+:CREATED: [2022-02-13 Sun 22:55]
+:ID: 1fc6e25b-ae09-45d7-8288-c57c7065326c
+:END:
+Users installing Emacs from the MSYS2 distribution can install pre-build
binaries of the ~epdfinfo~ server.
+
+1. [[https://www.msys2.org/][Install MSYS2]] and update the package database
and core packages using the instructions provided.
+2. Install packages: ~pacman -Ss
mingw-w64-x86_64-{emacs,emacs-pdf-tools-server,imagemagick}~ (ImageMagick is
optional, see above.)
+3. Make sure Emacs can find ~epdfinfo.exe~. Either add the MINGW install
location (e.g. ~C:/msys2/mingw64/bin~) to the system path with ~setx PATH
"C:\msys2\mingw64\bin;%PATH%"~ or set Emacs's path with ~(setenv "PATH" (concat
"C:\\msys64\\mingw64\\bin;" (getenv "PATH")))~. Note that libraries from other
GNU utilities, such as Git for Windows, may interfere with those needed by
~pdf-tools~. ~pdf-info-check-epdinfo~ will succeed, but errors occur when
trying to view a PDF file. This can b [...]
+4. Add ~(pdf-tools-install)~ to your Emacs config.
+
+**** Compiling the ~epdfinfo~ server On Windows
+:PROPERTIES:
+:CREATED: [2022-02-13 Sun 22:58]
+:ID: d0aa0c5f-fc64-49a4-8593-ab09522289ff
+:END:
If using the GNU binaries for Windows, support for PNG and ~zlib~ must first
be installed by copying the appropriate dlls into emacs' ~bin/~ directory. Most
third-party binaries come with this already done.
-First, install [[http://www.msys2.org/][install MSYS2]] and update the package
database and core packages using the instructions provided. Then, to compile
~pdf-tools~ itself:
+First, [[https://www.msys2.org/][install MSYS2]] and update the package
database and core packages using the instructions provided. Then, to compile
~pdf-tools~ itself:
1. Open msys2 shell
2. Update and install dependencies, skipping any you already have
-#+BEGIN_SRC sh
-$ pacman -Syu
-$ pacman -S base-devel
-$ pacman -S mingw-w64-x86_64-toolchain
-$ pacman -S mingw-w64-x86_64-zlib
-$ pacman -S mingw-w64-x86_64-libpng
-$ pacman -S mingw-w64-x86_64-poppler
-$ pacman -S mingw-w64-x86_64-imagemagick
-#+END_SRC
+ #+BEGIN_SRC sh
+ $ pacman -Syu
+ $ pacman -S base-devel
+ $ pacman -S mingw-w64-x86_64-toolchain
+ $ pacman -S mingw-w64-x86_64-zlib
+ $ pacman -S mingw-w64-x86_64-libpng
+ $ pacman -S mingw-w64-x86_64-poppler
+ $ pacman -S mingw-w64-x86_64-imagemagick
+ #+END_SRC
3. Install ~pdf-tools~ in Emacs, but do not try to compile the server.
Instead, get a separate copy of the source somewhere else.
-#+BEGIN_SRC sh
-$ git clone https://github.com/vedang/pdf-tools
-#+END_SRC
+ #+BEGIN_SRC sh
+ $ git clone https://github.com/vedang/pdf-tools
+ #+END_SRC
4. Open ~mingw64~ shell (*Note:* You must use ~mingw64.exe~ and not
~msys2.exe~)
5. Compile pdf-tools
-#+BEGIN_SRC sh
-$ cd /path/to/pdf-tools
-$ make -s
-#+END_SRC
+ #+BEGIN_SRC sh
+ $ cd /path/to/pdf-tools
+ $ make -s
+ #+END_SRC
6. This should produce a file ~server/epdfinfo.exe~. Copy this file into the
~pdf-tools/~ installation directory in your Emacs.
7. Start Emacs and activate the package.
-#+BEGIN_SRC
-M-x pdf-tools-install RET
-#+END_SRC
+ #+BEGIN_SRC
+ M-x pdf-tools-install RET
+ #+END_SRC
8. Test.
-#+BEGIN_SRC
-M-x pdf-info-check-epdfinfo RET
-#+END_SRC
-
-If this is successful, ~(pdf-tools-install)~ can be added to Emacs' config.
Note that libraries from other GNU utilities, such as Git for Windows, may
interfere with those needed by ~pdf-tools~. ~pdf-info-check-epdinfo~ will
succeed, but errors occur when trying to view a PDF file. This can be fixed by
ensuring that the MSYS libraries are always preferred in Emacs:
+ #+BEGIN_SRC
+ M-x pdf-info-check-epdfinfo RET
+ #+END_SRC
-#+BEGIN_SRC emacs-lisp
- (setenv "PATH" (concat "C:\\msys64\\mingw64\\bin;" (getenv "PATH")))
-#+END_SRC
+If this is successful, ~(pdf-tools-install)~ can be added to Emacs' config.
See the note on how to set up PATH in the previous section.
** Installing ~pdf-tools~ elisp prerequisites
:PROPERTIES:
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [nongnu] elpa/pdf-tools 8eed479f52: Mention pre-built Windows binaries in README,
ELPA Syncer <=