mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-05-04 17:30:12 +08:00
[installer] refactor into custom actions to avoid duplication
This commit is contained in:
@@ -23,7 +23,10 @@
|
|||||||
<file>vcredist-x64.xml</file>
|
<file>vcredist-x64.xml</file>
|
||||||
</include>
|
</include>
|
||||||
</componentList>
|
</componentList>
|
||||||
<preInstallationActionList>
|
<functionDefinitionList>
|
||||||
|
<actionDefinition>
|
||||||
|
<name>checkForRunningSwift</name>
|
||||||
|
<actionList>
|
||||||
<validatedActionGroup>
|
<validatedActionGroup>
|
||||||
<explanation>Check that no swift applications running</explanation>
|
<explanation>Check that no swift applications running</explanation>
|
||||||
<text>It seems that some swift application is still in use,
|
<text>It seems that some swift application is still in use,
|
||||||
@@ -61,6 +64,29 @@ please close it and click Retry.</text>
|
|||||||
</throwError>
|
</throwError>
|
||||||
</actionList>
|
</actionList>
|
||||||
</validatedActionGroup>
|
</validatedActionGroup>
|
||||||
|
</actionList>
|
||||||
|
</actionDefinition>
|
||||||
|
<actionDefinition>
|
||||||
|
<name>killDBusDaemon</name>
|
||||||
|
<actionList>
|
||||||
|
<kill>
|
||||||
|
<name>dbus-daemon.exe</name>
|
||||||
|
<ruleList>
|
||||||
|
<processTest>
|
||||||
|
<logic>is_running</logic>
|
||||||
|
<name>dbus-daemon.exe</name>
|
||||||
|
</processTest>
|
||||||
|
<platformTest>
|
||||||
|
<type>windows</type>
|
||||||
|
</platformTest>
|
||||||
|
</ruleList>
|
||||||
|
</kill>
|
||||||
|
</actionList>
|
||||||
|
</actionDefinition>
|
||||||
|
</functionDefinitionList>
|
||||||
|
<preInstallationActionList>
|
||||||
|
<checkForRunningSwift />
|
||||||
|
<killDBusDaemon />
|
||||||
<!-- TODO Linux/MacOS: Save and load last install dir -->
|
<!-- TODO Linux/MacOS: Save and load last install dir -->
|
||||||
<setInstallerVariable>
|
<setInstallerVariable>
|
||||||
<name>installBaseDir</name>
|
<name>installBaseDir</name>
|
||||||
@@ -98,18 +124,6 @@ please close it and click Retry.</text>
|
|||||||
</platformTest>
|
</platformTest>
|
||||||
</ruleList>
|
</ruleList>
|
||||||
</setInstallerVariable>
|
</setInstallerVariable>
|
||||||
<kill>
|
|
||||||
<name>dbus-daemon.exe</name>
|
|
||||||
<ruleList>
|
|
||||||
<processTest>
|
|
||||||
<logic>is_running</logic>
|
|
||||||
<name>dbus-daemon.exe</name>
|
|
||||||
</processTest>
|
|
||||||
<platformTest>
|
|
||||||
<type>windows</type>
|
|
||||||
</platformTest>
|
|
||||||
</ruleList>
|
|
||||||
</kill>
|
|
||||||
</preInstallationActionList>
|
</preInstallationActionList>
|
||||||
<postInstallationActionList>
|
<postInstallationActionList>
|
||||||
<runProgram>
|
<runProgram>
|
||||||
@@ -214,43 +228,8 @@ please close it and click Retry.</text>
|
|||||||
</runProgram>
|
</runProgram>
|
||||||
</postInstallationActionList>
|
</postInstallationActionList>
|
||||||
<preUninstallationActionList>
|
<preUninstallationActionList>
|
||||||
<validatedActionGroup>
|
<checkForRunningSwift />
|
||||||
<explanation>Check that no swift applications running</explanation>
|
<killDBusDaemon />
|
||||||
<text>It seems that some swift application is still in use,
|
|
||||||
please close it and click Retry.</text>
|
|
||||||
<severity>warning</severity>
|
|
||||||
<actionList>
|
|
||||||
<throwError>
|
|
||||||
<text>Swift is still running. User aborted installation.</text>
|
|
||||||
<ruleList>
|
|
||||||
<ruleGroup>
|
|
||||||
<ruleEvaluationLogic>or</ruleEvaluationLogic>
|
|
||||||
<ruleList>
|
|
||||||
<processTest>
|
|
||||||
<logic>is_running</logic>
|
|
||||||
<name>swiftcore.exe</name>
|
|
||||||
</processTest>
|
|
||||||
<processTest>
|
|
||||||
<logic>is_running</logic>
|
|
||||||
<name>swiftguistd.exe</name>
|
|
||||||
</processTest>
|
|
||||||
<processTest>
|
|
||||||
<logic>is_running</logic>
|
|
||||||
<name>swiftlauncher.exe</name>
|
|
||||||
</processTest>
|
|
||||||
<processTest>
|
|
||||||
<logic>is_running</logic>
|
|
||||||
<name>swiftdata.exe</name>
|
|
||||||
</processTest>
|
|
||||||
</ruleList>
|
|
||||||
</ruleGroup>
|
|
||||||
<platformTest>
|
|
||||||
<type>windows</type>
|
|
||||||
</platformTest>
|
|
||||||
</ruleList>
|
|
||||||
</throwError>
|
|
||||||
</actionList>
|
|
||||||
</validatedActionGroup>
|
|
||||||
<runProgram>
|
<runProgram>
|
||||||
<program>launchctl</program>
|
<program>launchctl</program>
|
||||||
<programArguments>remove org.freedesktop.dbus-session.plist</programArguments>
|
<programArguments>remove org.freedesktop.dbus-session.plist</programArguments>
|
||||||
@@ -277,18 +256,6 @@ please close it and click Retry.</text>
|
|||||||
</platformTest>
|
</platformTest>
|
||||||
</ruleList>
|
</ruleList>
|
||||||
</deleteFile>
|
</deleteFile>
|
||||||
<kill>
|
|
||||||
<name>dbus-daemon.exe</name>
|
|
||||||
<ruleList>
|
|
||||||
<processTest>
|
|
||||||
<logic>is_running</logic>
|
|
||||||
<name>dbus-daemon.exe</name>
|
|
||||||
</processTest>
|
|
||||||
<platformTest>
|
|
||||||
<type>windows</type>
|
|
||||||
</platformTest>
|
|
||||||
</ruleList>
|
|
||||||
</kill>
|
|
||||||
</preUninstallationActionList>
|
</preUninstallationActionList>
|
||||||
<allowComponentSelection>1</allowComponentSelection>
|
<allowComponentSelection>1</allowComponentSelection>
|
||||||
<compressionAlgorithm>lzma</compressionAlgorithm>
|
<compressionAlgorithm>lzma</compressionAlgorithm>
|
||||||
|
|||||||
Reference in New Issue
Block a user