Closed UltimateByte closed 8 years ago
why not just a workshop ? this would mean (perhaps) the server gets content that works rather than bleading edge code that could crash the server ?
Workshop is already supported by LGSM for gmod. Github addons are updated more frequently because uploading and updating a workshop addon is very painful. Some devs chose not to use the workshop, others update the workshop addon only for major updates, just because it's long and boring to do.
I understand that however code that is new should be ignored until it is deemed to be good so adding content via the workshop should be better than git ... I suppose it could be said from your comment there is no need for steam .... perhaps the end user needs stable rather than beta ... If steam makes this pain full perhaps another method needs to be employed
Haha ! Nothing is ever stable with gmod ! I'm saying that because i started playing before it was even available on steam. I can guarantee you that it won't ever be stable. The game engine doesn't even support multi thread anymore (even if settings seems to allow it) because it breaks the lua engine synchronization and makes the game unstable ! I see your point, and it's very valid... Except not for gmod. Many admins are still using github addons, as some of them have more functionalities or correct some more bugs. Gmod server admins AND players usually prefer functionalities over stability. Everyone is used to a server crashing because of a coded by feet duplicator tool... Or because a guy welded the head of a ragdoll to a high enough skymap. I'm thinking about mainly 2 addons that are Adv Dupe 2, and ACF that are only found onto github. But it could also apply to ulx/ulib, utime, and uclip, which would be very cool, as they are serious developers that update their addons only when it's really required. And it could be a step forward to adding optional and very used and useful addons to gmod that would be managed by LGSM.
I am supprised I don't know you then ... back in they day the guys from wolverhampton used to come down to mine for the odd house party
That's just because i'm french. Otherwise i'd have come.
No seriously, you're just worried about admins having buggy addons in the end ?
Hi, I have a more generic idea. Addons do not always use GitHub but many of them (including the ones hosted at GitHub) support Subversion (SVN). And I guess that it must be easy to do because command-line SVN clients already exist.
@EstevanTH Clever. It's true that SVN has been used forever in gmod, and slowly disappeared. It shouldn't stop us from using it if possible. It would eliminate quite a few problems of managing old files. That would probably require a new packet for the server, that hopefully will be available for any distro, and some SVN knowledge to code it that i don't have already. Any good documentation to provide ?
My thinking here is that an external tool might be a better idea, especially given how much extra functionality this will need to work robustly. Otherwise, we need to consider a few big issues with this:
My suggestion here would be to clearly state what you want, so we can define a specification for the script. That way, we know what we want to do, and then can build the tool to the desired actions, not just go in blind. Something like this:
I want to be able to create a list of Git repos with the local paths they should be installed in. I want to be able to add repos to the file and have the tool clone them. I want to be able to update and pull all repos, or just individual ones. I want to be able to push changes back upstream as well, or branch my own versions.
Once we have a clear idea exactly what you're looking to do, we can look at creating a tool. I have a simple script for my Insurgency servers that clones out a bunch of repos, rsyncs some maps, and does some other cleanup afterwards, all driven by a config manifest. I'm sure that a lot of what you're looking to do could be done with this script, I'd be happy to take a crack at helping you add the features you need to it and sharing it.
@jaredballou Well, thanks for your attention.
I guess you have some misconceptions about my idea. 1) We don't affect addons in any way 2) It's for gmod only 3) User chose addons that they wanna use, we have no control over that, no need to support specific addons.
Is that clear enough ?
So I'm not clear on how the current manual process works. Any chance you can link me to a document that shows me how it's done? I bet if I saw what you're trying to do I'd be able to pick it up. And I am usually reluctant to put new stuff in if it's just for one game, but if it's common with other games we can certainly give it a shot.
I don't have a doc, but i can give you an example of how i'm doing it manually. It's actually the same process for a server than for the user. I made a video for the user, just mute the sound if you don't speak french :p https://www.youtube.com/watch?v=F6pDOAbm6-Q
Get your zip containing the addon. Ensure that you get a folder containing at least a "lua" folder. Copy that whole folder to your "addons" folder. Done.
So if for example i wanna add that https://github.com/nrlulz/ACF addon to my server, i'll get the zip link (right click on "Download ZIP" then copy url) https://github.com/nrlulz/ACF/archive/master.zip Then on the server : cd serverfiles/garrysmod/addons wget https://github.com/nrlulz/ACF/archive/master.zip tar -zxvf ACF-master.zip rm ACF-master.zip mv ACF-master acf-master //gmod for linux dosn't support uppercase Done ! Repeat that for all addons.
The idea would be that users could do that, by simply pasting github links into text document.
For example, at $serverdir, there would be a githubaddons.txt containing
Then user pastes links such as : https://github.com/nrlulz/ACF https://github.com/wiremod/advdupe2 https://github.com/wiremod/wire [...]
Sorry i'm not uzing tar -zxvf on .zip files, but ofc unzip command !
BTW i'll start working on a standalone script supporting .zip only first here : https://github.com/UltimateByte/zip-updater
My standalone function is pretty much working ! It's even working quite well, i'm already using it onto my ProBuild Gmod server, i'll make a crontab soon ! :) For now it's enough, any suggestion is very very welcome. I'm gonna wait until we can make modules for lgsm (which seems likely to happen) to think about implementing it as an optional function :)
I still think workshop covers this ... if it's not in workshop the code is not at release standard ... you guys may want 'bleeding edge' but the users of this script may have no clue on how to add this to their server .... are you trying to over complicate ?
Workshop is not a "standard" in any way. Especially for server based addons. Do you know about scriptfodder ? Sadly this script doesn't apply to it but still, it's light years away from the Workshop. You most likely know ULX, the most famous admin plugin for gmod. Is this and its dependency Ulib on gmod workshop ? No. Such as utime, Uclip, ACF and extentions, advdupe2 and other wiremod extentions... I use all of that on several servers, and it's a damn pain to keep updated. So i don't think i overcomplicate, it's event the opposite, i give a way to make boring tasks automatic with a bit of configuration instead of a lot of scripting. A guy i host a server for just told me "Finally ! It finally exists ! I won't be so bored doing this anymore", and that's exactly for that same thought that i made this script ! If it's useful to us, it most likely is for others.
Let me take a crack at this tonight, I have some free time and might be able to draft up at least some pseudocode to make sure I have it.
Damn, wish I'd seen you already built this. Mine is fancy in a different way, mine takes an array of GitHub user,repo,branch,method and allows native Git cloning, Tarball downloads, or Zip downloads. For archives, it keeps tabs on what update it's on by querying the GitHub downloader for headers and divining the filename. The archive is then unpacked into the directory named the same thing as the archive, and the short name of the mod is symlinked. This obviously isn't production ready as it has multiple copies of the same mod, but it was more about me getting the logic working. For native Git, it uses the GitHub API and finds the latest commit, then makes sure the repo exists locally and is configured/updated properly, Let me know what you think, feel free to steal it and do whatever you want with it, I really don't have time to maintain it. I just wanted to poke at it a bit. https://github.com/jaredballou/linuxgsm/blob/master/GarrysMod/addons.sh
That rocks mate ! I had no idea how to use GitHub API, so i did it with rough zipfiles. Both can be complementary BTW, that's something to develop ! ^^
Will be able to do it through this : https://github.com/GameServerManagers/LinuxGSM/issues/631
./gameserver install-mods
CU | Custom Mods List
First time launching :
"No custom mod list, generating config file"
"Config file created in /home/user/lgsm/custom_mods.cfg"
cat custom_mods.cfg
# Add mods using this syntax :
(Remains to define)
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Many server admins use addons coming from github such as ACF, Advanced Duplicator 2, Wiremod...). Those are quite boring to keep updated. LGSM could provide a way to help updating them, either by using github API (i don't know how to use it), or by pasting their zip link to a new file called for example github_addons. Then a command (or a cron job) like ./gmodserver update-git-addons would update them. Two problems to face : those addons usually have caps characters while they have to be lower case to work with Linux, and ultimately, it will have to deal with older addons. So name greps and convert to lowercase commands will be required.
Do you feel like such a function has its place into LGSM ?