emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/sweeprolog 4d4bdc8600: FIXED: write_sweep_module_location/


From: ELPA Syncer
Subject: [nongnu] elpa/sweeprolog 4d4bdc8600: FIXED: write_sweep_module_location/0 for Windows.
Date: Thu, 3 Nov 2022 15:59:34 -0400 (EDT)

branch: elpa/sweeprolog
commit 4d4bdc86004b76413074e915d92380891a6e2587
Author: Jan Wielemaker <J.Wielemaker@vu.nl>
Commit: Jan Wielemaker <J.Wielemaker@vu.nl>

    FIXED: write_sweep_module_location/0 for Windows.
---
 sweep_link.pl | 23 +++++++++++++++++------
 1 file changed, 17 insertions(+), 6 deletions(-)

diff --git a/sweep_link.pl b/sweep_link.pl
index 3c3d6791d5..31663248a9 100644
--- a/sweep_link.pl
+++ b/sweep_link.pl
@@ -31,8 +31,8 @@
 */
 
 :- module(sweep_link,
-          [ write_sweep_module_location/0
-          ]).
+         [ write_sweep_module_location/0
+         ]).
 
 /** <module> Information for dynamically linking to GNU Emacs
 */
@@ -40,14 +40,25 @@
 sweep_link_version(1).
 
 write_sweep_module_location :-
+    sweep_module(Path),
     sweep_link_version(V),
     format('V ~w~n', [V]),
-    absolute_file_name(foreign('sweep-module'),
-                       Path,
-                       [file_type(executable), access(read)]),
     (   current_prolog_flag(executable_format, elf)
     ->  current_prolog_flag(libswipl, Libpath),
-        format('L ~w~n', [Libpath])
+       format('L ~w~n', [Libpath])
     ;   true
     ),
     format('M ~w~n', [Path]).
+
+sweep_module(Path) :-
+    current_prolog_flag(windows, true),
+    current_prolog_flag(executable, Exe),
+    prolog_to_os_filename(PlExe, Exe),
+    file_directory_name(PlExe, BinDir),
+    atomic_concat(BinDir, '/sweep-module.dll', Path),
+    exists_file(Path),
+    !.
+sweep_module(Path) :-
+    absolute_file_name(foreign('sweep-module'),
+                      Path,
+                      [file_type(executable), access(read)]).



reply via email to

[Prev in Thread] Current Thread [Next in Thread]