From 43ec96e07382fceb9dcb6c5c565864e9051f110d Mon Sep 17 00:00:00 2001 From: Oj Date: Wed, 27 Apr 2022 21:54:08 +0100 Subject: [PATCH] [WinFirst] Restructure FirstRun as just WinFirst --- src/bootstrap.js | 2 +- src/firstRun/index.js | 9 --------- src/firstRun/stub.js | 2 -- src/{firstRun/win32.js => winFirst.js} | 2 +- 4 files changed, 2 insertions(+), 13 deletions(-) delete mode 100644 src/firstRun/index.js delete mode 100644 src/firstRun/stub.js rename src/{firstRun/win32.js => winFirst.js} (97%) diff --git a/src/bootstrap.js b/src/bootstrap.js index 6768228..4ce0187 100644 --- a/src/bootstrap.js +++ b/src/bootstrap.js @@ -103,7 +103,7 @@ const startUpdate = () => { inst.on('InconsistentInstallerState', fatal); inst.on('update-error', console.error); - require('./firstRun').do(inst); + require('./winFirst').do(inst); } else { moduleUpdater.init(Constants.UPDATE_ENDPOINT, buildInfo); } diff --git a/src/firstRun/index.js b/src/firstRun/index.js deleted file mode 100644 index b02f9ee..0000000 --- a/src/firstRun/index.js +++ /dev/null @@ -1,9 +0,0 @@ -// Depends on platform -switch (process.platform) { - case 'win32': - module.exports = require('./win32.js'); - break; - - default: - module.exports = require('./stub.js'); -} \ No newline at end of file diff --git a/src/firstRun/stub.js b/src/firstRun/stub.js deleted file mode 100644 index c212a8f..0000000 --- a/src/firstRun/stub.js +++ /dev/null @@ -1,2 +0,0 @@ -// Generic exports for stub (Linux and Darwin use it), normal Discord -exports.do = () => {}; \ No newline at end of file diff --git a/src/firstRun/win32.js b/src/winFirst.js similarity index 97% rename from src/firstRun/win32.js rename to src/winFirst.js index 317c0e8..df49426 100644 --- a/src/firstRun/win32.js +++ b/src/winFirst.js @@ -1,7 +1,7 @@ const fs = require('fs'); const { join, resolve, basename } = require('path'); -const Constants = require('../Constants'); +const Constants = require('./Constants'); const exec = process.execPath; const app = resolve(exec, '..');