Commit cb65c10a authored by rocosen's avatar rocosen

feat:自启动

parent ba844740
......@@ -39,6 +39,9 @@ const getAssetPath = (...paths: string[]): string => {
return path.join(RESOURCES_PATH, ...paths);
};
const exeName = path.basename(process.execPath)
let image:any
if (process.platform === 'darwin') {
......@@ -53,6 +56,15 @@ if (!gotTheLock) {
app.quit()
}
app.setLoginItemSettings({
openAtLogin: true,
openAsHidden:false,
path: process.execPath,
args: [
'--processStart', `"${exeName}"`,
]
})
ipcMain.on('createNewWindow-site', (event, arg) => {
if (siteWindown) {
siteWindown.focus();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment