![]() |
The Black Wyrm's Lair Terms of Use |
![]() ![]() ![]() ![]() |
![]() |
![]()
Post
#1
|
|
Forum Member Posts: 165 Joined: 29-January 05 From: Modena (Italy) ![]() |
I've modified the backup system in WeiDU 200, to allow backups of multiple files with the same base name (previously, if you held a backup of E.G. override/baldur.gam and Save/path/baldur.gam, only the former would be restored, resulting in potential problems). Unfortunately, I haven't seen a way to have the system be 100% compatible in case somebody wants to downgrade his WeiDU version (more on the technicalities later). Since I know that some modders on this board insist on using WeiDU 185 and suggesting people to downgrade their versions, I hope to collect ideas on how to fix the situation without stirring excessive trouble.
The only way to cause problems is if user installs a mod using WeiDU >=200 and then uninstalls it using WeiDU < 200. Mixing the versions is always safe during install, and uninstalling a <200 mod using a >=200 mod is safe. These are the ways to solve the situation I can see:
Now, the algorithms (PM if you want to read the code), in case you want to brainstorm a better backup algorithm: WeiDU <200: QUOTE {BACKUP}/UNINSTALL.X contains the list of modified files. When copying override/sw1h01.itm: add "override/sw1h01.itm" to UNINSTALL.X, copy old override/sw1h01.itm (if existing) to {BACKUP}/sw1h01.itm. When copying temp/sw1h01.itm: add "temp/sw1h01.itm" to UNINSTALL.X, don't keep a backup because {BACKUP}/sw1h01.itm already exists. When restoring: read override/sw1h01.itm in UNINSTALL.X, delete override/sw1h01.itm, move {BACKUP}/sw1h01.itm to override. read temp/sw1h01.itm in UNINSTALL.X, delete temp/sw1h01.itm and do not restore the copy (which wasn't saved). WeiDU >=200: QUOTE {BACKUP}/UNINSTALL_NEW.X contains the list of modified files. When copying override/sw1h01.itm: add "override/sw1h01.itm" to UNINSTALL_NEW.X, copy old override/sw1h01.itm (if existing) to {BACKUP}/override.sw1h01.itm. When copying temp/sw1h01.itm: add "temp/sw1h01.itm" to UNINSTALL_NEW.X, copy old temp/sw1h01.itm (if existing) to {BACKUP}/temp.sw1h01.itm. When restoring: read override/sw1h01.itm in UNINSTALL_NEW.X, delete override/sw1h01.itm, move {BACKUP}/override.sw1h01.itm to override. read temp/sw1h01.itm in UNINSTALL_NEW.X, delete temp/sw1h01.itm and move {BACKUP}/temp.sw1h01.itm to temp. If you can see a way to edit the WeiDU >=200 algorithm so that the WeiDU <200 restoring algorithm still works, this'd be really helpful. -------------------- Please do not contact me for assistance in using BGT, BP, any other of the 'large mods', or a mod I didn't write or contribute to. I'm not your paid support staff, so I'd suggest you to direct your help questions to the forum relative to the mod you're playing.
Thanks for your cooperation. |
|
|
![]() |
![]()
Post
#2
|
|
Forum Member Posts: 21 Joined: 18-November 06 ![]() |
WeiDU >=200: QUOTE {BACKUP}/UNINSTALL_NEW.X contains the list of modified files. When copying override/sw1h01.itm: add "override/sw1h01.itm" to UNINSTALL_NEW.X, copy old override/sw1h01.itm (if existing) to {BACKUP}/override.sw1h01.itm. When copying temp/sw1h01.itm: add "temp/sw1h01.itm" to UNINSTALL_NEW.X, copy old temp/sw1h01.itm (if existing) to {BACKUP}/temp.sw1h01.itm. When restoring: read override/sw1h01.itm in UNINSTALL_NEW.X, delete override/sw1h01.itm, move {BACKUP}/override.sw1h01.itm to override. read temp/sw1h01.itm in UNINSTALL_NEW.X, delete temp/sw1h01.itm and move {BACKUP}/temp.sw1h01.itm to temp. If you can see a way to edit the WeiDU >=200 algorithm so that the WeiDU <200 restoring algorithm still works, this'd be really helpful. I'm not a programmer, but maybe you can follow my idea and see if it is implementable. Somehow read the file and save it's relative location to the weidu exe file. So that when the mod in question is uninstalled it will repair modified files in their original relative location. Example modifying a save file: COPY ~save/000000-Game_Save/baldur.gam~ ~save/000000-Game_Save~ DOWHATEVERPATCHES BUT_ONLY_IF_IT_CHANGES Weidu will save {BACKUP}/{PATH}baldur.gam When mod is uninstalled weidu would replace {BACKUP}/{PATH}baldur.gam where in this example save/000000-Game_Save/ = {PATH} I know that the path information is already gathered by weidu as SOURCE_DIRECTORY so why can't that information be applied to weidu's backup and restoration methods By default the path variable would be empty. During uninstall Weidu 200 would look for the saved path info and if it's not found would uninstall with the 199 and less method because {backup}/{path}file.ext with an empty path variable is the same as {backup}/file.ext. I think I'm clear as mud, but once again I'm not really a programmer (at least not by trade or education). |
|
|
![]() ![]() |
![]() |
Lo-Fi Version | Time is now: 29th August 2025 - 07:26 AM |