Closed cartaplassa closed 2 years ago
Haven't tested on Windows tho
which steamcmd
might be useful in win32 too, but makes it more difficult to find the downloaded mods (when not using default destination). Perhaps prefer steampath, and change defaultpath if which steamcmd
and not yet installed in steampath? (non-essential for merge, more note to myself)creationflags=subprocess.CREATE_NO_WINDOW
throw an error, or is it just unneccessary?other than that, it looks good
>>> test = tk.messagebox.askokcancel() Traceback (most recent call last): File "<stdin>", line 1, in <module> AttributeError: module 'tkinter' has no attribute 'messagebox'
from tkinter.messagebox import askokcancel
also works fine, I just thought it would be better for readability.
<class 'AttributeError'>module 'subprocess' has no attribute 'CREATE_NO_WINDOW'
. I googled it and it seems like on Windows Popen opens terminal by default, but on Linux it doesn't and, well, that's about it.(~/.local/share/Steam)
. And that's where tilda needs to be translated to /home/<user>
expression or Python will create a folder "~" in the SWD directory. Same thing with defaultpath. And that's kinda the whole purpose for os.path.expanduser()
here. Windows is a different story: tilda symbol isn't usually used that way. Steam's default path should be in C:/Program Files and if defaultpath needs to be specified, isn't it easier to just copy and paste it from explorer? So calling os.path.expanduser()
will just return the same path it was given. But if it's not the case, tell me how to improve it and I'll do it.which steamcmd
, always prefering which steamcmd
and adaptive changing of defaultpath (for moving mods afterwards) all have their own disadvantages. I'll look over this later.~
being unusual for windows, but it's still nice if all parsings of steampath behave consistently.which steamcmd
. If it downloads to ~/.local/share/Steam by default on linux, and steampath is set to that, it might cause security issues with someone placing an executable in that location (if which steampath
is only used as a fallback). Is that path sufficiently standard to hard-code? Otherwise it might be useful to disable automatic mod movement on linux completely, since it's very easily accomplished by a simple shell script anyway, in a much more comfortable way than possible with windows scripting solutions (batch or powershell). Having seperate paths for the executable and the download location would appear to necessitate an additional optional dlpath
option, in case which steamcmd
doesn't find an installation distinct from the download directory.Yeah, it makes a lot of sense. So, separate default steampath
is gone and, if I understand correctly, steamcmd will figure out the destination folder by itself and SWD will print it in the output field. So, the only thing user has to do is copy it and paste in .ini before specifying the desired moving path if need arises, which shouldn't be that big of a problem. Therefore, I guess it's done.
Line 112 was for testing purposes, just forgot to remove it in previous commits
Tested w/ custom defaultpath and custom game path at the same time, everything's working