diff options
| author | Andreas Politz <politza@hochschule-trier.de> | 2017-09-13 20:59:33 +0200 |
|---|---|---|
| committer | Andreas Politz <politza@hochschule-trier.de> | 2017-09-13 20:59:33 +0200 |
| commit | 571c4a44ef28652cbe16e36669c0e36f92d2e18a (patch) | |
| tree | 849225eafba2037cb4b14c6be2bda52026d1ab3d /lisp | |
| parent | 6471ed7ca1c02949b4c9420443f14bb3f3bda41e (diff) | |
Install into /mingw*/bin on msys2 systems
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/pdf-tools.el | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/lisp/pdf-tools.el b/lisp/pdf-tools.el index b265189..55e9180 100644 --- a/lisp/pdf-tools.el +++ b/lisp/pdf-tools.el @@ -249,6 +249,14 @@ Returns always nil, unless `system-type' equals windows-nt." (read-directory-name "Please enter Msys2 installation directory: " nil nil t)))))))) +(defun pdf-tools-msys2-mingw-bin () + "Return the location of /mingw*/bin." + (when (pdf-tools-msys2-directory) + (let ((arch (intern (car (split-string system-configuration "-" t))))) + (expand-file-name + (format "./mingw%s/bin" (if (eq arch 'x86_64) "64" "32")) + (pdf-tools-msys2-directory))))) + (defun pdf-tools-find-bourne-shell () "Locate a usable sh." (or (executable-find "sh") @@ -344,7 +352,8 @@ See `pdf-view-mode' and `pdf-tools-enabled-modes'." (ignore-errors (pdf-info-check-epdfinfo) :success)) (pdf-tools-install-noverify) (let ((install-directory - (or (and (stringp pdf-info-epdfinfo-program) + (or (pdf-tools-msys2-mingw-bin) + (and (stringp pdf-info-epdfinfo-program) (file-name-directory pdf-info-epdfinfo-program)) pdf-tools-directory))) |
