diff options
| author | 2025-11-19 18:58:38 -0600 | |
|---|---|---|
| committer | 2025-11-19 18:59:00 -0600 | |
| commit | ca8fe893846d88ad60f0fdc6e0bd317975e92b19 (patch) | |
| tree | 7dfa41dd4ea79a889db53622a734348381ec8349 | |
| parent | Missing directory (diff) | |
Get windows full-env working correctlypm-full-env
Checked manually on windows 11.
| -rw-r--r-- | spork/pm.janet | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/spork/pm.janet b/spork/pm.janet index ce13f00..be49058 100644 --- a/spork/pm.janet +++ b/spork/pm.janet @@ -774,6 +774,12 @@ (sh/copy src dest) true) +(defn- try-copy-file + [src dest] + (unless (sh/exists? src) (break false)) + (sh/copy-file src dest) + true) + (defn vendor-binaries-pm-shell ``` Copy the Janet interpreter, shared libraries, and other installation files directly into the new shell environment. This allows @@ -786,7 +792,9 @@ (assert (sh/exists? executable) "unable to resolve location of the janet binary. Is it on your path?") (def exe-ext (if is-win ".exe" "")) (def dest (string (path/join path "bin" "janet") exe-ext)) - (sh/copy executable dest) + (if is-win + (sh/copy-file executable dest) + (sh/copy executable dest)) # Copy shared objects, DLLs, static archives, and janet.h into path (def [has-prefix prefix] (protect (cc/get-unix-prefix))) @@ -830,7 +838,7 @@ (when has-winprefix (os/mkdir (path/join path "C")) (each name ["janet.lib" "janet.h" "janet.exp" "janet.c" "libjanet.lib"] - (try-copy (path/win32/join win-prefix "C" name) (path/win32/join path "C" name)))) + (try-copy-file (path/win32/join win-prefix "C" name) (path/win32/join path "C" name)))) (print "Copied janet binaries and shared libraries into " path) nil) |
