Skip to content
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

Close taiga process before starting installation #1136

Open
soredake opened this issue Jun 8, 2023 · 1 comment
Open

Close taiga process before starting installation #1136

soredake opened this issue Jun 8, 2023 · 1 comment

Comments

@soredake
Copy link

soredake commented Jun 8, 2023

Otherwise you will see this:
image

@erengy
Copy link
Owner

erengy commented Jun 11, 2023

Installer does try to close Taiga by sending its main window a WM_DESTROY message and displays that message only if Taiga is still running after 3 seconds:

taiga/setup/Taiga.nsi

Lines 199 to 228 in b6f440e

Function CheckInstance
Var /GLOBAL messageSent
StrCpy $messageSent "false"
Var /GLOBAL secondsWaited
IntOp $secondsWaited 0 + 0
checkInstanceLoop:
System::Call "kernel32::OpenMutex(i 0x100000, b 0, t '${PRODUCT_MUTEX}') i .R0"
IntCmp $R0 0 skipInstanceCheck
System::Call "kernel32::CloseHandle(i $R0)"
IfSilent skipSendMessage ; Assuming the application is going to close itself
StrCmp $messageSent "true" skipSendMessage
FindWindow $R0 "TaigaMainW"
SendMessage $R0 ${WM_DESTROY} 0 0
StrCpy $messageSent "true"
Goto skipMessageBox
skipSendMessage:
IntOp $secondsWaited $secondsWaited + 1
IntCmp $secondsWaited 3 0 skipMessageBox 0 ; Display the message box after 3 seconds
MessageBox MB_OKCANCEL|MB_ICONEXCLAMATION "${PRODUCT_NAME} is still running. Close it first, then click OK to continue setup." IDOK skipMessageBox
Quit
skipMessageBox:
Sleep 1000
Goto checkInstanceLoop
skipInstanceCheck:
FunctionEnd

I assume you're running the installer in silent mode, in which it skips sending the message due to #1123 (comment).

erengy added a commit that referenced this issue Mar 9, 2024
Note that we cannot rely on this option yet, since v1.4.0 will execute v1.4.1 installer without it.

Complements 96f26bf.

See #1136.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants