2015-12-06 09:49:12 -08:00
|
|
|
Set FSO = CreateObject("Scripting.FileSystemObject")
|
|
|
|
|
|
|
|
Name = WScript.Arguments(0)
|
2015-12-07 04:54:47 -08:00
|
|
|
Kind = WScript.Arguments(1)
|
2015-12-06 09:49:12 -08:00
|
|
|
|
2015-12-07 04:54:47 -08:00
|
|
|
IPath = "../template/"&Kind&".cpp"
|
|
|
|
OPath = "../crap/"&Kind&"/"&Name&".cpp"
|
2015-12-06 09:49:12 -08:00
|
|
|
Inc = "crap/"&Name&".hpp"
|
|
|
|
|
|
|
|
Set File = FSO.OpenTextFile(IPath)
|
|
|
|
Text = File.ReadAll
|
|
|
|
File.Close
|
|
|
|
|
|
|
|
Text = Replace(Text, "//#INCLUDE", "#include """&Inc&"""")
|
|
|
|
Text = Replace(Text, "//#REDEFINE", "#define CrapPlug Crap_"&Name)
|
|
|
|
|
|
|
|
Set File = FSO.CreateTextFile(OPath, True)
|
|
|
|
File.Write Text
|
|
|
|
File.Close
|