Pocket Plane Group

Friends and Neighbors => Weimer Republic (WeiDU.org) => WeiDU => Topic started by: AL|EN on February 18, 2019, 12:58:35 PM

Title: Please explain --safe-exit
Post by: AL|EN on February 18, 2019, 12:58:35 PM
Quote
Save weidu.log every time a component installation is begun. This makes it impossible to uninstall components (don’t ask), but allows the user to kill the weidu process (E.G. closing the DOS console via the X button) without leaving the game in an unrecoverably inconsistent state (you can Re or Uninstall the component and the game will be consistent again). This might break with mods using overly complicated AT_* actions (basically don’t use this with Big Mods).

What does it mean "impossible to uninstall components" ? Impossible like forever?
How it alters '--force-install-list'? My observation shows that only new components are installed and already installed aren't reinstalled (unlike when not using --safe-exit)
If the mod doesn't use AT_* actions, shouldn't this be default way to install mod if there is a chance that weidu process will be killed via power outage?
Title: Re: Please explain --safe-exit
Post by: Wisp on February 19, 2019, 12:08:30 PM
What does it mean "impossible to uninstall components" ? Impossible like forever?
It means something like weidu --uninstall --safe-exit will immediately fail. You can re-run WeiDU in a session without --safe-exit to uninstall. Normally, WeiDU keeps the log in memory; installed components are added, uninstalled ones are removed and the whole thing is written out before WeiDU exits. --safe-exit changes this so that each installed component is immediately written out to storage. Since the log is essentially treated as write-only and only atomic operations are performed, you have some limitations on what you can and cannot do. Some additional limitations are imposed by the existing structure of the code (hence the "don't ask"). Should WeiDU survive to a normal exit, the log will be written out as normal, all the same.

Quote
How it alters '--force-install-list'? My observation shows that only new components are installed and already installed aren't reinstalled (unlike when not using --safe-exit)
As far as I can tell, it is much as you have found. Additionally, no stack operations are performed.

Quote
If the mod doesn't use AT_* actions, shouldn't this be default way to install mod if there is a chance that weidu process will be killed via power outage?
The install code is sufficiently complicated and there is a sufficient number of edge cases that I choose not to give a recommendation in this matter. At best WeiDU could tell if a mod makes use of AT_*, but not what is being done with it.