Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
savoirfairelinux
jami-client-windows
Commits
a00e9d6c
Commit
a00e9d6c
authored
Apr 03, 2020
by
Ming Rui Zhang
Browse files
processes: close Jami and QWebEngineProcess using WiX Quiet Execution Custom Action
Change-Id: I64cb7e86e2ff418c03ea374e05e14d43c8597acc
parent
c4a086ae
Changes
2
Hide whitespace changes
Inline
Side-by-side
JamiInstaller/Product.wxs
View file @
a00e9d6c
...
...
@@ -40,6 +40,12 @@
<CustomAction
Id=
"removeOldJamiFiles"
Directory=
"APPLICATIONFOLDER"
ExeCommand=
"cmd /c "del vc_redist.x64.exe; del uninstall.exe; del WinSparkle.dll;""
Execute=
"deferred"
Return=
"ignore"
HideTarget=
"no"
Impersonate=
"no"
/>
<Property
Id=
"QtExecCmdLine"
Value=
'"[WindowsFolder]\System32\taskkill.exe" /F /IM QtWebEngineProcess.exe /IM Jami.exe'
/>
<CustomAction
Id=
"JamiProcesses.TaskKill"
BinaryKey=
"WixCA"
DllEntry=
"CAQuietExec"
Execute=
"immediate"
Return=
"ignore"
/>
</Product>
<Fragment
Id=
"DirectoryStructure"
>
...
...
@@ -51,6 +57,7 @@
<Directory
Id=
"ProgramMenuFolder"
>
<Directory
Id=
"ApplicationProgramsFolder"
/>
</Directory>
<Directory
Id=
"WindowsFolder"
Name=
"WINDOWS"
/>
</Directory>
</Fragment>
...
...
@@ -104,6 +111,7 @@
</InstallUISequence>
</UI>
<InstallExecuteSequence>
<Custom
Action=
'JamiProcesses.TaskKill'
Before=
'InstallValidate'
/>
<Custom
Action=
"removeOldJamiFiles"
After=
"RemoveFiles"
/>
<Custom
Action=
"LaunchApplication_nonUI"
After=
"InstallFinalize"
>
WIXNONUILAUNCH
</Custom>
<Custom
Action=
"Overwrite_WixSetDefaultPerMachineFolder"
After=
"WixSetDefaultPerMachineFolder"
/>
...
...
src/utils.cpp
View file @
a00e9d6c
...
...
@@ -35,6 +35,7 @@
#include
"networkmanager.h"
#include
"updateconfirmdialog.h"
#include
"version.h"
#include
"mainwindow.h"
#include
<globalinstances.h>
#include
<qrencode.h>
...
...
@@ -439,12 +440,13 @@ Utils::applyUpdates(bool updateToBeta, QWidget* parent)
}
auto
args
=
QString
(
" /passive /norestart WIXNONUILAUNCH=1"
);
auto
dir
=
Utils
::
WinGetEnv
(
"TEMP"
);
auto
cmd
=
"powershell "
+
QString
(
dir
)
+
"
\\
"
+
downloadPath
.
fileName
()
+
" /L*V "
+
QString
(
dir
)
+
"
\\
jami_x64_install.log"
+
args
;
auto
retq
=
QProcess
::
startDetached
(
cmd
);
if
(
retq
)
{
QCoreApplication
::
exit
();
}
auto
cmdStartInstaller
=
"powershell "
+
QString
(
dir
)
+
"
\\
"
+
downloadPath
.
fileName
()
+
" /L*V "
+
QString
(
dir
)
+
"
\\
jami_x64_install.log"
+
args
;
MainWindow
::
instance
().
close
();
LRCInstance
::
instance
().
reset
();
QProcess
::
startDetached
(
cmdStartInstaller
);
});
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment