import AutoLaunch from "auto-launch" ; import { app } from "electron" ; import { settings } from "./settingsManager" ; let autoLaunch = new AutoLaunch ( { name : app . name , isHidden : true } ) ; /**
 * Updates autoLaunch
 */ export async function update ( ) { if ( ! app . isPackaged || ( app . isPackaged && app . name . includes ( "Portable" ) ) ) { console . log ( ( app . isPackaged ? "Portable version detected," : "Debug version detected," ) + " skipping autoLaunch" ) ; return ; } if ( settings . get ( "autoLaunch" , true ) ) autoLaunch . enable ( ) ; else autoLaunch . disable ( ) ; }