-
Notifications
You must be signed in to change notification settings - Fork 4
NONE - Add cross platform asset symlink script #51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
Need to add all of the new paths the current script doesn't do. |
Co-authored-by: Callum <35779365+callumok2004@users.noreply.github.com>
|
Consider using https://luvit.io/ and its modules instead of relying on system executable utilities. The |
It does come at the cost of convenience, going from needing any version of lua on your machine to needing a specialized version which isn't provided by any package manager atm. I mean, all the work on the cross platform stuff is already done and won't need any changing to maintain it |
|
It's a single-liner installation process, though: curl -L https://github.com/luvit/lit/raw/master/get-lit.sh | shCan also be installed locally, without getting into path or whatever. If that is not convenient, then im not sure what is. Now, the reasoning behind this is simple: relying on stuff like Another take on this is that, well, its easy to get lua on linux, yeah. But what about windows? Even the official website doesnt provide binaries. Do you expect people to find it themselves, or have it in the PATH already, or have a package manager like choco or similar already there? Why all that if you can just use already proven things that can be installed with a single line of sh/powershell? |
I don't see the issue with popen but it can be avoided if a real reason arises. Lua and LuaJIT are available on winget. I don't see an issue with %q at all. It serves its purpose barring newlines and regardless this isn't going to be taking user input. Of course, if we want maximum convenience we can just make the script itself in C#. Worse dx to write it since the vdf parser is so ridiculously simple in lua but you need C# for the project anyway. One downside of luvit beyond needing to download a whole specialized lua runtime for a script you'll run once is that you won't get typings outside of any ide beyond vscode so it becomes more of a pain to work on. |
But you do? Just use the LuaCATS language server with the luvit meta. |
Note the "beyond vscode". LuaLS has a vscode addon manager ui but I don't think there's any decent way to manage dependency typings for any other editors |
Why assume that? |
That link kind of supports what I said? I don't think most people would define
as a "decent way to manage dependency typings" |
|
I'd assume people who run editors other than vscode are used to things like that lol |
|
@artemking4 @vurvdev My personal thoughts on this are that I agree with Vurv's take on wanting something thats easier for anyone to set up. It should be as easy as possible. However Artem's concerns about popen I could see potentially being valid (or at least I trust his concerns on it). I think I like what Vurv brought up about using C# for this, especially given you can run .cs files with .NET 10. The user has to have the .NET 10 SDK anyway to build the project, let alone use it right now, so I don't see a reason not to do it like this and get rid of the Powershell/Lua stuff altogether. This would be really easy to set up, I already have the logic for getting Steam directories on all three major platforms (Windows, OSX, Linux) for a separate project, so I could take all that stuff and turn it into a single script for this. |
Yeah a C# script would probably be ideal but idk how simple you could make it for the vdf parsing stuff. Cutting out the lua boilerplate for fs operations would be nice |
I agree there, indeed. This way you dont have to rely on something like that and can also use things from source.net directly |
This adds a cross platform lua script to do the symlinking, it's only 200 lines of commented and typed lua code.
Should be cleaner to maintain than the powershell script.
Currently the windows implementation of a few things is left unimplemented (
mklink,getSteamDir), so this doesn't remove the powershell script. It can be removed if someone accomplishes it in this PR.