-
Notifications
You must be signed in to change notification settings - Fork 19
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
Improved Deployment Process #87
Comments
After a quick read: You are right this is how lamp currently deals with deploying mods regardless of state. Your concept for deployment seems almost flawless the only changes id make is with disabling mods/cleanup i think that it would be done during deployment time. On the 3rd concern of Clean-up, Lamp currently takes a hash (and a copy) of any file that it replaces during deployment time so that the reset it can move files back into place if we employ the same strategy most issues regarding it should be avoided if not it id assume user error removing a mod needed for another. As much as id like to remove a mod the moment its disabled (like MO2 or Vortex) i personally think its a waste of time if you will be doing a cpu heavy task (Deployment) later anyway. Lamp track is used at the moment to restore the game back to its default state and with this id probably start anew as lamptrack data wont be too useful here. On different deployment methods, in my own testing proton games do not seem to like being run with symlinked files and something along the lines of vfs is heavily system specific although i am looking at potentially implementing it using a cross-platform library or including a new dependency. |
Your confidence in the concept is nice to hear. It sounds like you have a good way to resolve the deactivation issues I had. I would just make a note here that, if we do cleanup during deploy, we would probably want to detect when someone enables/disables a mod and display a notice reminding them to deploy their changes (possibly a banner at the top/bottom?). Obviously you would then clear out that banner at the end of the deployment and reset things to go back to detecting if deployment is needed again.
I get that. I was throwing those out there as a possible consideration for the future (in that we might want to support multiple deployment methods and enable the users to choose). For the time being, I was thinking that there may still be a use-case for the "fully deploy everything anyway" deploy, even if we have this method set up and working. The main point being that, in the process of potentially implementing this improvement, it may be worth exploring modifying things internally to make supporting alternate deployment methods easier in the future. If this mod manager gets to be more general-purpose (which I hope it does), the alternate methods could be valuable options for users to apply as needed/desired. If other deployment methods are added, it may be good to have a spot somewhere in the application that maybe notes the possible issues with each deployment method, though that is a separate issue for the future. |
This issue is largely meant to start a discussion and get ideas on the matter. Hopefully it can also encourage someone to implement something like this solution, or one that can achieve a similar improvement.
Issue
I may be wrong, but, as far as I can tell, the deploying of mods results in going through and re-extracting ALL (or nearly all) enabled mods regardless of what mods have been changed/added. Ideally, I think we should try to minimize the work to reach the mod-state that the user wants.
For example, if you add a single mod to the end of the mod order, it takes quite a bit of time to go through the entire deploy process. In this case, we could ideally detect that just the one mod was added, and only extract and deploy the one mod to reach the desired state.
Potential Solution (overview)
Without having fully examined the current process, I thought about how this problem could be solved, and I feel like I came to a workable solution. I don't know if any of this matches what already exists, or if this would mean a complete rewrite of the mod handling for deployment.
Here are my thoughts on how this could be solved:
This should allow us to minimize work by deploying only the mods (or even individual mod files) that we actually need to deploy to reach the final, desired mod state.
Deployment
Here is a bit more depth on how I see this working:
With something along these lines, we should be able to effectively minimize the work we do on subsequent deployments (at the cost of a bit of overhead for the initial deployment compared to what is done now).
Disabling Mods/File Cleanup
The main thing that I think may need some more consideration here is how to handle removing mod files, for example when a mod is disabled. My initial thought is to handle removing relevant files as mods are disabled:
There are concerns with doing this:
Additional Thoughts/Notes
With this setup, I think we would need (and maybe even want) to remove files immediately when an enabled/deployed mod is disabled. This would help prevent files from being left over if a mod is then deleted before deploy. The alternative is that we need to handle this cleanup in the deploy phase (which means we would only delete a mod's "deploy info" during deployment (presumptively during pre-deploy).
It looks like right now, some amount of this info may be getting generated and dumped into the
lampTrack.mdf
file (specifically file hashes?), so perhaps we could make use of that. To help contain things, I think it may be a good idea to have the info split out and managed separately for each game (instead of having everything for all games inlampTrack.mdf
), but it likely would not matter functionally.These are just my thoughts at this time. I don't know that this is a good solution, I just think it might be a workable solution. In the long run, it would probably be good to find a way to have separate deployment types that you let the user choose from (ie, you could have a "direct deploy" that copies files like Lampray current does, "soft-link deploy" using something like symlinks to files, "virtual deploy" for I believe vfs or uvfs or ofs or something like that, etc). If the deployment is separated in this way, I think it could still be valuable to keep the original deployment around as an option (something like "full direct deploy"?).
I am not a c++ developer and have not familiarized myself with how the deployment currently functions, so actually implementing this is quite a ways outside of my current skillset. Hopefully my description and ideas above makes some sense, and can help improve the deployment process.
The text was updated successfully, but these errors were encountered: