Pocket Plane Group
Friends and Neighbors => Weimer Republic (WeiDU.org) => WeiDU => Topic started by: AL|EN on February 15, 2020, 02:15:24 AM
-
Hi,
WeiDU is executing every executable called setup-* even if it's not weidu. I'm assuming that it's because of autoupdate design. Can you alter this so the non-weidu executable won't be executed?
-
I can't know if an executable matching the setup pattern is or is not a WeiDU without running it to see if it takes the expected input and produces the expected output. Yes, it is autoupdate which runs all the setup executables in the game directory.
-
Sure you can, just check ProductName property of the executable. If it's there, it's weidu so compare ProductVersion with the current one.
EDIT: well, apparently on macOS and Linux, there is no way to check executable without launching?
-
Sure you can, just check ProductName property of the executable. If it's there, it's weidu so compare ProductVersion with the current one.
I can't use features that only exist in the most recent versions of WeiDU. Autoupdate needs to be able to handle any old WeiDU ever released.
-
Well, it's even worse:
[E:\Gry\Beamdog\00766\Setup-weidu.exe] WeiDU version 24700
{Setup-Not-WeiDU.exe} Queried (pid = 252) version = -1
Newest WeiDU is version 24700, updating!
WeiDU files in version order:
[Setup-weidu.exe] version 24700
[Setup-Not-WeiDU.exe] version -1
Copying [Setup-weidu.exe] -> [Setup-Not-WeiDU.exe]: true
WeiDU is destroying every executable which is called 'Setup-xxx' even if the returned version is -1.
Can you please fix this? Is there a workaround in order to prevent this happen?
-
This is intended behaviour. In the next phase, WeiDU will additionally start to replace important OS files with itself.
I should probably fix this, yes. Beyond --noautoupdate I don't think there's a way to not have your setup-*.exes "updated" if you are running a WeiDU instance that would otherwise perform autoupdates.
-
But why can't simpy skip overwriting the 'Setup-Not-WeiDU.exe' when the reported version is -1?
-
I meant as a workaround until a fix can be delivered. Not overwriting not-WeiDUs is the fix.
-
Och sorry, I misunderstood.
I'm looking at the source code and I see this: https://github.com/WeiDUorg/weidu/blob/796845951679926f5ca57b65ef6b7622cb88add3/src/arch_mingw.ml#L85 (https://github.com/WeiDUorg/weidu/blob/796845951679926f5ca57b65ef6b7622cb88add3/src/arch_mingw.ml#L85)
let pid = create_process_env
f [| "WeiDU-Backup" ; "--game bar" |] [| |] newstdin newstdout' newstderr'
in
So does the WeiDU is launching itself with "WeiDU-Backup" and "--game bar" command line args? If yes, I could detect such a case and act accordingly?