]> gitweb.factorcode.org Git - factor.git/commitdiff
EditPadPro automatically configures path
authorDoug Coleman <doug.coleman@gmail.com>
Sun, 9 Dec 2007 16:48:47 +0000 (10:48 -0600)
committerDoug Coleman <doug.coleman@gmail.com>
Sun, 9 Dec 2007 16:48:47 +0000 (10:48 -0600)
extra/editors/editpadpro/editpadpro.factor

index b79ac6a5940c14b683a7a56ac8b6df1711687720..6882a00e456267c8821cb5af037ee4d29f510829 100644 (file)
@@ -1,8 +1,15 @@
 USING: definitions kernel parser words sequences math.parser
-namespaces editors io.launcher ;
+namespaces editors io.launcher windows.shell32 io.files
+strings ;
 IN: editors.editpadpro
 
+: editpadpro-path
+    \ editpadpro-path get-global [
+        program-files "JGsoft" path+ walk-dir
+        [ >lower "editpadpro.exe" tail? ] find nip
+    ] unless* ;
+
 : editpadpro ( file line -- )
-    [ "editpadpro.exe /l" % # " \"" % % "\"" % ] "" make run-process ;
+    [ editpadpro-path % " /l" % # " \"" % % "\"" % ] "" make run-detached ;
 
 [ editpadpro ] edit-hook set-global