diff --git a/src/autoStart/index.js b/src/autoStart/index.js index b7d5423..9ec7bab 100644 --- a/src/autoStart/index.js +++ b/src/autoStart/index.js @@ -1,3 +1,13 @@ -// Stub for now at least, also retaining OpenAsar - -module.exports = require('./' + process.platform); \ No newline at end of file +// Depends on platform +switch (process.platform) { + case 'win32': + module.exports = require('./win32.js'); + break; + + case 'linux': + module.exports = require('./linux.js'); + break; + + default: + module.exports = require('./stub.js'); +} \ No newline at end of file diff --git a/src/autoStart/darwin.js b/src/autoStart/stub.js similarity index 57% rename from src/autoStart/darwin.js rename to src/autoStart/stub.js index 4fd80e9..5185272 100644 --- a/src/autoStart/darwin.js +++ b/src/autoStart/stub.js @@ -1,5 +1,5 @@ -// Stub in normal Discord +// Stub (Darwin) exports.install = (callback) => { callback(); }; exports.update = (callback) => { callback(); }; exports.uninstall = (callback) => { callback(); }; -exports.isInstalled = (callback) => { callback(false); }; // Stub to true or false? \ No newline at end of file +exports.isInstalled = (callback) => { callback(false); }; \ No newline at end of file