Open Bo98 opened 11 years ago
Any updates on this? It really sucks badly that there isnt any Lua refresh under Linux...
Well on linux one could use iNotify for that, and on mac probably as well. There isn't really a technical reason why it wouldn't be possible...
Indeed. If no one is willing to fix this, it might be an idea to make a module for Gmod that uses iNotify to replace the missing Lua refresh. Itd be real nice to have it.
To get this on track a bit:
Mac uses FSEvents(https://developer.apple.com/library/mac/documentation/Darwin/Reference/FSEvents_Ref/) Linux uses iNotify(https://lwn.net/Articles/604686/)
For Reference, windows uses FindFirstChangeNotification, FindNextChangeNotification, ReadDirectoryChanges(https://msdn.microsoft.com/en-us/library/aa365261%28VS.85%29.aspx?f=255&MSPPError=-2147217396)
With this it shouldn't be too hard anymore to make this possible soon, no?
PS: UE4 utilises those API's as mentioned above for it's hotreload feature, thought it might help if you know at least one "project" using them for a similar use case.
This is requested since 2013? :o Could you please add this? Would be really great!
Is there any #Hope that this will get fixed ?
Garry's to busy with Rust. And no one cares or has the time to fix it.
Ya I see..
I wish it could be done. Since Linux is a lot cheaper then windows based servers, but honestly if it was possible it would have been done already.
I guess I can just use INotify and trigger a script to do a map change, My problem is i use git to push my code to my dev server but still have to manually change the map to see my changes which blows i want to push and see my changes and I don't want to use Windows :)
It a cruel world
Yea, only thing I could recommend is to test it on your computer first. (If it's windows ;) and then apply it to your server. Works Good, only problem I find is that most of the time workshop Addons conflict with each other on single player.
Ya, Seems like the only other way besides hacking up a inotify script to reload the map every push lol !
Actually there is one other way... But it would be very hard to implement. But has potential. A developer named, Acecool has been trying to find a workaround for awhile now but idk if he has thought If this.
gmod has this thing called lua_openscript and perhaps using inotify to trigger a gmod to run these commands on the server and then force the client to re-join is possible. This might seem counter intuitive, but it takes a lot less time to rejoin then to restart a map since it has to load all of the Addons and game mode files.
This is the only other way I would do it, and perhaps make it into a module.
Isn't "lua_openscript" a client side only call tho ? and don't server side scripts get loaded into memory once after the map change/server restart ?
This is an issue tracker, not a forum. Take your discussion elsewhere.
It's both, but it requires the command and the files to be hooked into some type of trigger and a "reload" on the client.
ops sorry mcd1992 got carried away !
It's the biggest issue ever, I would assume people would want some type of way to resolve it. Sorry though
For anyone watching the issue:
It's now available on the Linux dev branch.
I don't know when OS X is coming but the code is ready for merging whenever. I will close this issue when that happens.
OMG THANK YOU !!!!!
How does it work?
How does what work?
The feature itself? How is one able to use the dev branch?
There's like a million things you could mean...
The lua autorefrsh?
Garry's Mod uses Bootil, which has a library for detecting filesystem changes. So whenever a file/folder changes garrysmod re-sends the data to the clients. The issue that was preventing it from working on linux was the Bootil library was returning a full path to the changed files/folders instead of a relative path. Which is what Bootil does on windows.
https://github.com/garrynewman/bootil/pull/18
As for how to use it in gmod, you just edit the files while the server is running and it auto-sends the changes to connected clients.
Just tested and it works ! cant wait for the merge !
So is it enabled by default? And has it merged yet?
It is working on Linux now but I have no idea when it is going to be merged on OS X. It's been a few months now.
Any updates on this? I love coding on MacOS, this would be really useful.
Still cant get lua autorefresh to work on linux, has this been fixed or is it just me?
What was the reason on why not included before again? It would be very handy as it can be inconvenient having to constantly reload the map.