summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Baltisot.vcproj2
-rw-r--r--lua2c.cmd4
-rw-r--r--lua2c.rules17
3 files changed, 22 insertions, 1 deletions
diff --git a/Baltisot.vcproj b/Baltisot.vcproj
index e6c3d83..5d0fe70 100644
--- a/Baltisot.vcproj
+++ b/Baltisot.vcproj
@@ -14,7 +14,7 @@
</Platforms>
<ToolFiles>
<ToolFile
- RelativePath="..\lua2c.rules"
+ RelativePath="lua2c.rules"
/>
</ToolFiles>
<Configurations>
diff --git a/lua2c.cmd b/lua2c.cmd
new file mode 100644
index 0000000..df71c76
--- /dev/null
+++ b/lua2c.cmd
@@ -0,0 +1,4 @@
+@echo off
+c:\work\luac %1 -o %~n1.clua
+c:\work\bin2c %~n1.clua %~n1.c %~n1
+del %~n1.clua
diff --git a/lua2c.rules b/lua2c.rules
new file mode 100644
index 0000000..596e1e6
--- /dev/null
+++ b/lua2c.rules
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<VisualStudioToolFile
+ Name="Lua to C"
+ Version="8.00"
+ >
+ <Rules>
+ <CustomBuildRule
+ Name="Lua to C"
+ CommandLine=".\lua2c.cmd [inputs]"
+ Outputs="$(InputName).c"
+ FileExtensions="*.lua"
+ >
+ <Properties>
+ </Properties>
+ </CustomBuildRule>
+ </Rules>
+</VisualStudioToolFile>