[Installer] Check if EOL has expired before installing

This commit is contained in:
Mat Sutcliffe
2020-07-05 23:20:18 +01:00
parent 89434c355d
commit 93998720b2
2 changed files with 19 additions and 0 deletions

View File

@@ -24,6 +24,20 @@
</include>
</componentList>
<functionDefinitionList>
<actionDefinition>
<name>checkExpiryDate</name>
<actionList>
<createTimeStamp>
<variable>installDate</variable>
</createTimeStamp>
<throwError>
<ruleList>
<compareValues value1="${installDate}" logic="greater_or_equal" value2="${endOfLife}" />
</ruleList>
<customErrorMessage>This version has expired. Please download a more recent version.</customErrorMessage>
</throwError>
</actionList>
</actionDefinition>
<actionDefinition>
<name>checkForRunningSwift</name>
<actionList>
@@ -86,6 +100,7 @@ It must be closed before the installation can proceed</progressText>
</actionDefinition>
</functionDefinitionList>
<preInstallationActionList>
<checkExpiryDate />
<checkForRunningSwift />
<killDBusDaemon />
<!-- TODO Linux/MacOS: Save and load last install dir -->
@@ -326,6 +341,9 @@ It must be closed before the installation can proceed</progressText>
<default></default>
<allowEmptyValue>1</allowEmptyValue>
</stringParameter>
<stringParameter name="endOfLife" value="21000101" ask="0">
<default>21000101</default>
</stringParameter>
<stringParameter name="architecture" value="64" ask="0">
<description></description>
<explanation></explanation>