diff options
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/msi/janet.wxs | 3 | ||||
| -rw-r--r-- | tools/patch-header.janet | 12 |
2 files changed, 12 insertions, 3 deletions
diff --git a/tools/msi/janet.wxs b/tools/msi/janet.wxs index c747b0d4..80a0b7e4 100644 --- a/tools/msi/janet.wxs +++ b/tools/msi/janet.wxs @@ -127,9 +127,6 @@ <RemoveFolder Id="RemoveCDir" On="uninstall" /> </Component> <Component Directory="CDir"> - <File Source="dist\janetconf.h"/> - </Component> - <Component Directory="CDir"> <File Source="dist\janet.lib"/> </Component> <Component Directory="CDir"> diff --git a/tools/patch-header.janet b/tools/patch-header.janet new file mode 100644 index 00000000..bbc86653 --- /dev/null +++ b/tools/patch-header.janet @@ -0,0 +1,12 @@ +# Patch janet.h + +(def [_ janeth janetconf output] (dyn :args)) + +(def- replace-peg + (peg/compile + ~(% (* '(to `#include "janetconf.h"`) + (constant ,(slurp janetconf)) + (thru `#include "janetconf.h"`) + '(any 1))))) + +(spit output (first (peg/match replace-peg (slurp janeth)))) |
