Lightcord/src/autoStart/index.ts

37 lines
744 B
TypeScript
Raw Normal View History

2020-06-13 13:49:36 +02:00
import autoLaunch from "auto-launch"
const autoStart = new autoLaunch({
name: "Lightcord"
})
export default {
install(callback){
autoStart.enable()
.then(callback, callback)
},
isInstalled(callback){
autoStart.isEnabled()
.then(callback)
},
uninstall(callback){
autoStart.disable()
.then(callback, callback)
},
update(callback){
autoStart.enable()
.then(callback, callback)
}
}
/*
2020-05-16 23:24:51 +02:00
let autoStart
if(process.platform === "win32"){
autoStart = require("./win32")
}else if(process.platform === "darwin"){
autoStart = require("./darwin")
}else{
autoStart = require("./linux")
}
2020-06-13 13:49:36 +02:00
export default autoStart as typeof import("./win32")*/