Well I wouldn’t do ‘move’ to risk losing them if the script interrupts midway which happens frequently at this early stage of debugging. The performance is a none issue, it copies the files within seconds, so a moot point. It is more about diskspace, but as long as I just copy the files it asks for (about 4gb) rather than the whole data directory which I was doing first (about 30gb) then doesn’t matter, but in either case they will be deleted again after, so looks like I might as well just carry on doing it how I have been and focus on ironing out the kinks doing it this way.
The mod patcher does not need to support linux.
You can run the patcher as a windows app inside the Wine environment that you setup Skyrim in. If it is Steam then there are ways to run Windows programs in side the steam/wine env. I use this to do things like edit the windows registry to make games work on linux.
That is exactly what I am doing. How else do you think I have been running the windows file so far on linux? I have already written in this thread that is what I am doing so I guess you haven’t read it.
If I ask a question though they are hesitant to give support because they now know I am using linux/wine and so will jump to blame that.
Anyway I have got it mostly working this way, just copying files so I will continue on like this.
Does anyone know how to block the .bat file from overwriting config files? it keeps overwriting the files I have edited with the python script whether I run it before or after the processes (ie at start or end of script). Just opening the file will overwrite the config file I changed that is works from. Is there a way to make a file immutable in python without calling os commands? I suppose in either case that requires sudo/admin privileges or is there some trick to do it without? I just want to block it from overwriting that file which it sources from (and overwrites currently) for the duration of the python script after it is edited then switch it back to edited once the patcher has run.
I am trying to think of a workaround to not need a locker? but I haven’t thought of a way around it yet since the .bat file overwrites the changes at any stage I run it. The issue is the .bat file isn’t being run directly, but through a mod manager, due to other path issues, so if I run the mod manager before, the patcher is still run after the python script has run, thus overwriting the python changes.
What is confusing me is that under linux and wine it’s very hard to use the patcher.
Is it also this hard under Windows?
Keep in mind that a .bat file is simply a script of its own. You could edit a copy of the .bat file stripping out the parts you don’t want to run (or write a whole new batch file), then swap out the .bat file as part of your script, returning them to normal at the end. Cooperation from upstream would be a lot better though.
Don’t antagonize upstream. Linux support is obviously outside their area of expertise and a large project can take a lot of effort to get working in even the most ideal circumstances. If you’re serious then Linux support could be something you offer them rather than demand from them.
Don’t assume intentions. Be clear about what you want, and what you’re willing to do for it.
I’m not. It is a free mod so I am not going to get mad at them.
I did hint I would release the script if I got it running smoothly, but I edited that out for now as I don’t want to give false promises if I can’t get it working well. If I do get it to a satisfactory level for myself then have been thinking I will suggest it again and offer support for none windows users.
I have already looked in the .bat file and it is nothing, it just makes a called to run the .exe in another folder. I have already run the .exe as well directly. In either case the pathing problem is the same and don’t think I want to get in the weeds trying to figure out how the .exe works unless it was straight forward? It would be handy to see what it was doing. How are .exes examined? I think it is made in something called mutagen.
Anyway it is getting pretty ok now doing it the way I originally made it, just copying the files over, best not make a big readjustment now I think.
One thing I haven’t figured out though is how to stop the mod manager for overwriting the config files which the patcher reads from.
So any answers on how to lock those files for the duration of the session via python? and in keeping with the idea of being OS agnostic if I want to share the script down the line?
At the moment I still have to make some manual intervention. I have python open the mod manager then I run the patcher, the files are overwritten, so then I have to manually copy them back. I then rerun the patcher and they seem not to be overwritten but I haven’t figured out how to do this programmatically yet.
I tried running the mod manager with Popen, none blocking, adding a bit of a wait then copying the files over again but it overwrites them again when running the patcher. I tried running the patcher again directly but big issues with paths. It is because the mod manager uses a virtual file system overlay so it doesn’t write to the game files and the patcher somehow sees and uses that vfs but I don’t know how. So I feel it is better to work within those confines for the one way I have gotten it to work and so just trying to figure out how to block the config files from being overwritten.
Hmm just reading the blurb about mutagen:
The Mutagen programming language is a simple, readable purely functional language. Its syntax is very much influenced by Python, and will eventually, if all goes according to plan, be extremely fast.
Sounds like I might be in luck if it is Python inspired!