Skip to content

Commit c4cfdc1

Browse files
committed
Remove EOL feature
1 parent fb6b408 commit c4cfdc1

File tree

10 files changed

+12
-87
lines changed

10 files changed

+12
-87
lines changed

.github/workflows/build.yml

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ concurrency:
1515
env:
1616
do_vatsim_key: ${{ github.event_name == 'push' }}
1717
do_symbols: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/heads/develop/') }}
18-
eol_months: 12
1918
qt_version: 5.15.2
2019
bitrock_version: qt-professional-23.1.0
2120
bitrock_url: https://releases.bitrock.com/installbuilder
@@ -127,11 +126,11 @@ jobs:
127126
- name: Build swift (without symbols)
128127
if: ${{ env.do_symbols != 'true' }}
129128
run: |
130-
python3 -u scripts/build.py -w 64 -t gcc -d -j2 -e $eol_months -q "SWIFT_CONFIG_JSON+=$vatsim_key_file" 2> >(tee error.log >&2)
129+
python3 -u scripts/build.py -w 64 -t gcc -d -j2 -q "SWIFT_CONFIG_JSON+=$vatsim_key_file" 2> >(tee error.log >&2)
131130
- name: Build swift (with symbols)
132131
if: ${{ env.do_symbols == 'true' }}
133132
run: |
134-
python3 -u scripts/build.py -w 64 -t gcc -d -j2 -e $eol_months -q "SWIFT_CONFIG_JSON+=$vatsim_key_file" --upload 2> >(tee error.log >&2)
133+
python3 -u scripts/build.py -w 64 -t gcc -d -j2 -q "SWIFT_CONFIG_JSON+=$vatsim_key_file" --upload 2> >(tee error.log >&2)
135134
- name: Check warnings
136135
id: warnings
137136
run: |
@@ -213,12 +212,12 @@ jobs:
213212
if: ${{ env.do_symbols != 'true' }}
214213
shell: bash
215214
run: |
216-
python -u scripts/build.py -w 64 -t msvc -d -e $eol_months -q "SWIFT_CONFIG_JSON+=$vatsim_key_file" 2>&1 | tee error.log
215+
python -u scripts/build.py -w 64 -t msvc -d -q "SWIFT_CONFIG_JSON+=$vatsim_key_file" 2>&1 | tee error.log
217216
- name: Build swift (with symbols)
218217
if: ${{ env.do_symbols == 'true' }}
219218
shell: bash
220219
run: |
221-
python -u scripts/build.py -w 64 -t msvc -d -e $eol_months -q "SWIFT_CONFIG_JSON+=$vatsim_key_file" --upload 2>&1 | tee error.log
220+
python -u scripts/build.py -w 64 -t msvc -d -q "SWIFT_CONFIG_JSON+=$vatsim_key_file" --upload 2>&1 | tee error.log
222221
- name: Check warnings
223222
id: warnings
224223
run: |
@@ -299,12 +298,12 @@ jobs:
299298
if: ${{ env.do_symbols != 'true' }}
300299
shell: bash
301300
run: |
302-
python -u scripts/build.py -w 32 -t msvc -d -e $eol_months -q "SWIFT_CONFIG_JSON+=$vatsim_key_file" 2>&1 | tee error.log
301+
python -u scripts/build.py -w 32 -t msvc -d -q "SWIFT_CONFIG_JSON+=$vatsim_key_file" 2>&1 | tee error.log
303302
- name: Build swift (with symbols)
304303
if: ${{ env.do_symbols == 'true' }}
305304
shell: bash
306305
run: |
307-
python -u scripts/build.py -w 32 -t msvc -d -e $eol_months -q "SWIFT_CONFIG_JSON+=$vatsim_key_file" --upload 2>&1 | tee error.log
306+
python -u scripts/build.py -w 32 -t msvc -d -q "SWIFT_CONFIG_JSON+=$vatsim_key_file" --upload 2>&1 | tee error.log
308307
- name: Check warnings
309308
id: warnings
310309
run: |
@@ -374,11 +373,11 @@ jobs:
374373
- name: Build swift (without symbols)
375374
if: ${{ env.do_symbols != 'true' }}
376375
run: |
377-
python3 -u scripts/build.py -w 64 -t clang -d -j2 -e $eol_months -q "SWIFT_CONFIG_JSON+=$vatsim_key_file" 2> >(tee error.log >&2)
376+
python3 -u scripts/build.py -w 64 -t clang -d -j2 -q "SWIFT_CONFIG_JSON+=$vatsim_key_file" 2> >(tee error.log >&2)
378377
- name: Build swift (with symbols)
379378
if: ${{ env.do_symbols == 'true' }}
380379
run: |
381-
python3 -u scripts/build.py -w 64 -t clang -d -j2 -e $eol_months -q "SWIFT_CONFIG_JSON+=$vatsim_key_file" --upload 2> >(tee error.log >&2)
380+
python3 -u scripts/build.py -w 64 -t clang -d -j2 -q "SWIFT_CONFIG_JSON+=$vatsim_key_file" --upload 2> >(tee error.log >&2)
382381
- name: Check warnings
383382
id: warnings
384383
run: |

default.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@
3636
"doxygen": true,
3737
"devBranch": false,
3838
"stableBranch": false,
39-
"endOfLife": "20300101",
4039
"vatsimSupport": true,
4140
"vatsim": {
4241
"id": "0xb9ba",

install.pri

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,6 @@ bitrock_builder_bin = $$(BITROCK_BUILDER)
259259
project.installerFilename=$${INSTALLER_BASENAME}.$${INSTALLER_EXT} \
260260
project.version=$$swiftConfig(version.full) \
261261
versionFull=$$swiftConfig(version.full).$${VER_REV} \
262-
endOfLife=$$swiftConfig(endOfLife) \
263262
project.windows64bitMode=$${WINDOWS64BITMODE} \
264263
project.enableDebugger=$${INSTALLER_DEBUG} \
265264
architecture=$${ARCHITECTURE}

installer/installbuilder/project.xml

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -28,20 +28,6 @@
2828
</include>
2929
</componentList>
3030
<functionDefinitionList>
31-
<actionDefinition>
32-
<name>checkExpiryDate</name>
33-
<actionList>
34-
<createTimeStamp>
35-
<variable>installDate</variable>
36-
</createTimeStamp>
37-
<throwError>
38-
<ruleList>
39-
<compareValues value1="${installDate}" logic="greater_or_equal" value2="${endOfLife}" />
40-
</ruleList>
41-
<customErrorMessage>This version has expired. Please download a more recent version.</customErrorMessage>
42-
</throwError>
43-
</actionList>
44-
</actionDefinition>
4531
<actionDefinition>
4632
<name>checkForRunningSwift</name>
4733
<actionList>
@@ -104,7 +90,6 @@ It must be closed before the installation can proceed</progressText>
10490
</actionDefinition>
10591
</functionDefinitionList>
10692
<preInstallationActionList>
107-
<checkExpiryDate />
10893
<checkForRunningSwift />
10994
<killDBusDaemon />
11095
<!-- TODO Linux/MacOS: Save and load last install dir -->
@@ -358,9 +343,6 @@ https://swift-project.org/</text>
358343
<default></default>
359344
<allowEmptyValue>1</allowEmptyValue>
360345
</stringParameter>
361-
<stringParameter name="endOfLife" value="21000101" ask="0">
362-
<default>21000101</default>
363-
</stringParameter>
364346
<stringParameter name="architecture" value="64" ask="0">
365347
<description></description>
366348
<explanation></explanation>

scripts/build.py

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ def prepare(self):
4141
shared_path = os.path.abspath(os.path.join(source_path, 'resources', 'share'))
4242
datastore.update_shared(host, datastore_version, shared_path)
4343

44-
def build(self, jobs, qmake_args, dev_build, eolInMonth):
44+
def build(self, jobs, qmake_args, dev_build):
4545
"""
4646
Run the build itself. Pass dev_build=True to enable a dev build
4747
"""
@@ -55,15 +55,6 @@ def build(self, jobs, qmake_args, dev_build, eolInMonth):
5555
if dev_build:
5656
qmake_call += ['SWIFT_CONFIG.devBranch=true']
5757

58-
if eolInMonth > 0:
59-
eolYear = date.today().year
60-
eolMonth = date.today().month + eolInMonth - 1
61-
eolYear = eolYear + ( eolMonth / 12 )
62-
eolMonth = eolMonth % 12 + 1
63-
eolDate = date(int(eolYear), int(eolMonth), 1)
64-
print('Setting EOL date to ' + eolDate.strftime('%Y%m%d'))
65-
qmake_call += ['SWIFT_CONFIG.endOfLife=' + eolDate.strftime('%Y%m%d')]
66-
6758
qmake_call += ['-r', os.pardir]
6859
subprocess.check_call(qmake_call, env=dict(os.environ))
6960

@@ -353,7 +344,7 @@ def print_help():
353344
'Windows': ['msvc', 'mingw']
354345
}
355346
compiler_help = '|'.join(supported_compilers[platform.system()])
356-
print('build.py -w <32|64> -t <' + compiler_help + '> [-v] [-d] [-e <end of life in month>] [-q <extra qmake argument>]')
347+
print('build.py -w <32|64> -t <' + compiler_help + '> [-v] [-d] [-q <extra qmake argument>]')
357348

358349

359350
# Entry point if called as a standalone program
@@ -363,11 +354,10 @@ def main(argv):
363354
dev_build = False
364355
jobs = None
365356
upload_symbols = False
366-
eolInMonth = 0
367357
qmake_args = []
368358

369359
try:
370-
opts, args = getopt.getopt(argv, 'hw:t:j:due:q:v', ['wordsize=', 'toolchain=', 'jobs=', 'dev', 'upload', 'eol', 'qmake-arg=', 'version'])
360+
opts, args = getopt.getopt(argv, 'hw:t:j:duq:v', ['wordsize=', 'toolchain=', 'jobs=', 'dev', 'upload', 'qmake-arg=', 'version'])
371361
except getopt.GetoptError:
372362
print_help()
373363
sys.exit(2)
@@ -393,8 +383,6 @@ def main(argv):
393383
dev_build = True
394384
elif opt in ('-u', '--upload'):
395385
upload_symbols = True
396-
elif opt in ('-e', '--eol'):
397-
eolInMonth = int(arg)
398386
elif opt in ('-q', '--qmake-arg'):
399387
qmake_args += [arg]
400388

@@ -419,7 +407,7 @@ def main(argv):
419407
builder = builders[platform.system()][tool_chain](word_size)
420408

421409
builder.prepare()
422-
builder.build(jobs, qmake_args, dev_build, eolInMonth)
410+
builder.build(jobs, qmake_args, dev_build)
423411
builder.checks()
424412
builder.install()
425413
builder.publish()

src/blackconfig/buildconfig.cpp

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -91,17 +91,6 @@ namespace BlackConfig
9191
return devBuild;
9292
}
9393

94-
bool CBuildConfig::isLifetimeExpired()
95-
{
96-
if (!getEol().isValid()) { return true; }
97-
return QDateTime::currentDateTime() > getEol();
98-
}
99-
100-
int CBuildConfig::daysTillLifetimeExpiry()
101-
{
102-
return QDateTime::currentDateTime().daysTo(getEol());
103-
}
104-
10594
static QString boolToYesNo(bool v)
10695
{
10796
return v ? QStringLiteral("yes") : QStringLiteral("no");

src/blackconfig/buildconfig.h

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -103,15 +103,6 @@ namespace BlackConfig
103103
//! Known executable
104104
static bool isKnownExecutableName(const QString &executable);
105105

106-
//! End of lifetime
107-
static const QDateTime &getEol(); // defined in buildconfig_gen.cpp.in
108-
109-
//! Lifetime ended?
110-
static bool isLifetimeExpired();
111-
112-
//! Days till lifetime end
113-
static int daysTillLifetimeExpiry();
114-
115106
//! Vatsim client id
116107
static int vatsimClientId(); // defined in buildconfig_gen.cpp.in
117108

src/blackconfig/buildconfig_gen.cpp.in

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,6 @@
1111
#include <QString>
1212
#include <QDateTime>
1313

14-
const QDateTime &BlackConfig::CBuildConfig::getEol()
15-
{
16-
static const QString eol(\"$$swiftConfig(endOfLife)\"); // config.pri, defaults in default.json
17-
static const QDateTime dt(eol.isEmpty() ? QDateTime() : QDateTime::fromString(eol, \"yyyyMMdd\"));
18-
return dt;
19-
}
20-
2114
int BlackConfig::CBuildConfig::vatsimClientId()
2215
{
2316
static const int id { $$swiftConfig(vatsim.id) };

src/blackcore/application.cpp

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1430,19 +1430,6 @@ namespace BlackCore
14301430
if (m_parsed) { return m_parsed; } // already done
14311431

14321432
// checks
1433-
if (CBuildConfig::isLifetimeExpired())
1434-
{
1435-
this->cmdLineErrorMessage("Program expired since " + CBuildConfig::getEol().date().toString(),
1436-
"This version is no longer supported and usable. You have to install a newer version.");
1437-
return false;
1438-
}
1439-
1440-
if(CBuildConfig::daysTillLifetimeExpiry() <= 30)
1441-
{
1442-
this->cmdLineWarningMessage("This version will expire in " + QString::number(CBuildConfig::daysTillLifetimeExpiry()) + " days!",
1443-
"You'll need to update swift in order to use it thereafter.");
1444-
}
1445-
14461433
const QStringList verifyErrors = CSwiftDirectories::verifyRuntimeDirectoriesAndFiles();
14471434
if (!verifyErrors.isEmpty() && !m_applicationInfo.isUnitTest())
14481435
{

src/blackmisc/filelogger.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,8 +131,6 @@ namespace BlackMisc
131131
m_stream << " and running with Qt " << qVersion();
132132
m_stream << " " << QSysInfo::buildAbi() << Qt::endl;
133133

134-
m_stream << "Program is going to expire on " + CBuildConfig::getEol().toString() << "." << Qt::endl;
135-
136134
m_stream << "Application started." << Qt::endl;
137135
}
138136

0 commit comments

Comments
 (0)