From 29054e80721866ff28753dc36e792ff084ad483d Mon Sep 17 00:00:00 2001 From: Calvin Rose Date: Sat, 24 Aug 2019 23:43:51 -0400 Subject: [PATCH 1/4] Update changelog. --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b2836855..e3a94f75 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,7 @@ All notable changes to this project will be documented in this file. ## Unreleased - Add `buffer/format` and `string/format` format flags `Q` and `q` to print colored and - non-colored single-line values. + non-colored single-line values, similar ti `P` and `p`. - Change default repl to print long sequences on one line. - Add `backmatch` pattern for PEGs. - jpm detects if not in a Developer Command prompt on windows for a better error message. From 4aa6afbf4715946c22e0a8d9d380126fc81b73c9 Mon Sep 17 00:00:00 2001 From: Calvin Rose Date: Sun, 25 Aug 2019 16:54:54 -0400 Subject: [PATCH 2/4] Fix binscripts on windows. --- auxlib/cook.janet | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/auxlib/cook.janet b/auxlib/cook.janet index 94064df6..84ba47f4 100644 --- a/auxlib/cook.janet +++ b/auxlib/cook.janet @@ -691,10 +691,9 @@ int main(int argc, const char **argv) { (def name (last (string/split sep main))) (def bat (string "@echo off\r\njanet %~dp0\\" name "%*")) (def newname (string binpath sep name ".bat")) + (array/push (dyn :installed-files) newname) (add-body "install" - (spit newname bat)) - (add-body "uninstall" - (os/rm newname)))) + (spit newname bat)))) (defn declare-archive "Build a janet archive. This is a file that bundles together many janet From c45bad94376b81ac89356d59b0ff7234e2893c27 Mon Sep 17 00:00:00 2001 From: Calvin Rose Date: Sun, 25 Aug 2019 17:16:44 -0400 Subject: [PATCH 3/4] Better shim for scripts on windows. Arguments should be passed in properly. --- auxlib/cook.janet | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/auxlib/cook.janet b/auxlib/cook.janet index 84ba47f4..392fb27d 100644 --- a/auxlib/cook.janet +++ b/auxlib/cook.janet @@ -689,7 +689,8 @@ int main(int argc, const char **argv) { # Create a dud batch file when on windows. (when is-win (def name (last (string/split sep main))) - (def bat (string "@echo off\r\njanet %~dp0\\" name "%*")) + (def fullname (string binpath sep name)) + (def bat (string "@echo off\r\njanet " fullname " %*")) (def newname (string binpath sep name ".bat")) (array/push (dyn :installed-files) newname) (add-body "install" From 91cbe2e22c3a3ecee383bd2160f52a4585d16e6a Mon Sep 17 00:00:00 2001 From: Calvin Rose Date: Sun, 25 Aug 2019 17:18:01 -0400 Subject: [PATCH 4/4] Add quotes to shim if install-dir has spaces. --- auxlib/cook.janet | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/auxlib/cook.janet b/auxlib/cook.janet index 392fb27d..2b08224b 100644 --- a/auxlib/cook.janet +++ b/auxlib/cook.janet @@ -690,7 +690,7 @@ int main(int argc, const char **argv) { (when is-win (def name (last (string/split sep main))) (def fullname (string binpath sep name)) - (def bat (string "@echo off\r\njanet " fullname " %*")) + (def bat (string "@echo off\r\njanet \"" fullname "\" %*")) (def newname (string binpath sep name ".bat")) (array/push (dyn :installed-files) newname) (add-body "install"