> -----Original Message----- > From: Andrew Starks [mailto:andrew.sta...@trms.com] > Sent: vrijdag 9 januari 2015 18:24 > To: LuaRocks developers list > Subject: [Luarocks-developers] *.bat wrappers > > In windows, i think it is necessary to create a bat version of a lua > file, if you wish to execute it from the command line. This is used > for things like busted and luacheck and perhaps others. > > It appears that there is a facility to wrap a lua file in this way. I > believe that it happens in `win32.wrap_script` in `/fs/win32.lua`. > > I am curious about how this is accomplished. In looking at the file, > it appears that you set the luafile variable to the file name at the > top, but I can't grok how you are making this work with the path. > > When I've done this, I make sure that the 'myutil.lua' file and the > 'myutil.bat' file are sitting next to each other and I writhe the > following: > (assuming that lua.exe is in the path) > ``` > @echo off > lua.exe %~dp0\myutil.lua %0 > ``` > `%~dp0` expands to the path of the `myutil.bat` file, which would be > the wrapper. > > I don't see where you've done that. Did you do it differently and if so, > why? > > -Andrew >
Not sure I understand your question... your question is about the inner workings of the generated batch file? Thijs ------------------------------------------------------------------------------ New Year. New Location. New Benefits. New Data Center in Ashburn, VA. GigeNET is offering a free month of service with a new server in Ashburn. Choose from 2 high performing configs, both with 100TB of bandwidth. Higher redundancy.Lower latency.Increased capacity.Completely compliant. www.gigenet.com _______________________________________________ Luarocks-developers mailing list Luarocks-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/luarocks-developers