electron 本地及打包后获取的路径()

electron 本地及打包后获取的路径

    // 打印                                // 本地                                                     //  打包 安装
    console.log(app.getAppPath())         // D:\workPrivately\polarPeak\dist_electron                 /---/--   C:\Users\17639\AppData\Local\Programs\polarpeak\resources\app.asar   
    console.log(app.getPath('home'))      // C:\Users\17639                                           /---/--   C:\Users\17639
    console.log(app.getPath('appData'))   // C:\Users\17639\AppData\Roaming                           /---/--   C:\Users\17639\AppData\Roaming
    console.log(app.getPath('userData'))  // C:\Users\17639\AppData\Roaming\polarpeak                 /---/--   C:\Users\17639\AppData\Roaming\polarpeak
    console.log(app.getPath('cache'))     // C:\Users\17639\AppData\Roaming                           /---/--   C:\Users\17639\AppData\Roaming
    console.log(app.getPath('temp'))      // C:\Users\17639\AppData\Local\Temp                        /---/--   C:\Users\17639\AppData\Local\Temp
    console.log(app.getPath('exe'))       // D:\workPrivately\polarPeak\node_modules\electron.exe     /---/--   C:\Users\17639\AppData\Local\Programs\polarpeak\极峰CRM.exe
    console.log(app.getPath('module'))    // D:\workPrivately\polarPeak\node_modules\electrin.exe     /---/--   C:\Users\17639\AppData\Local\Programs\polarpeak\极峰CRM.exe
    console.log(app.getPath('desktop'))   // C:\Users\17639\Desktop                                   /---/--   C:\Users\17639\Desktop
    console.log(app.getPath('documents')) // C:\Users\17639\Documents                                 /---/--   C:\Users\17639\Documents
    console.log(app.getPath('downloads')) // C:\Users\17639\Downloads                                 /---/--   C:\Users\17639\Downloads
    console.log(app.getPath('music'))     // C:\Users\17639\Music                                     /---/--   C:\Users\17639\Music
    console.log(app.getPath('pictures'))  // C:\Users\17639\Pictures                                  /---/--   C:\Users\17639\Pictures
    console.log(app.getPath('videos'))    // C:\Users\17639\Videos                                    /---/--   C:\Users\17639\Videos
    console.log(app.getPath('recent'))    // C:\Users\17639\AppData\Roaming\Microsoft\Windows\Recent  /---/--   C:\Users\17639\AppData\Roaming\Microsoft\Windows\Recent
    console.log(app.getPath('logs'))      // C:\Users\17639\AppData\Roaming\polarpeak\Electron\logs   /---/--   C:\Users\17639\AppData\Roaming\polarpeak\极峰CRM\logs
    console.log(app.getPath('crashDumps'))// C:\Users\17639\AppData\Roaming\polarpeak\Crashpad        /---/--   C:\Users\17639\AppData\Roaming\polarpeak\Crashpad
 
————————

electron 本地及打包后获取的路径

    // 打印                                // 本地                                                     //  打包 安装
    console.log(app.getAppPath())         // D:\workPrivately\polarPeak\dist_electron                 /---/--   C:\Users\17639\AppData\Local\Programs\polarpeak\resources\app.asar   
    console.log(app.getPath('home'))      // C:\Users\17639                                           /---/--   C:\Users\17639
    console.log(app.getPath('appData'))   // C:\Users\17639\AppData\Roaming                           /---/--   C:\Users\17639\AppData\Roaming
    console.log(app.getPath('userData'))  // C:\Users\17639\AppData\Roaming\polarpeak                 /---/--   C:\Users\17639\AppData\Roaming\polarpeak
    console.log(app.getPath('cache'))     // C:\Users\17639\AppData\Roaming                           /---/--   C:\Users\17639\AppData\Roaming
    console.log(app.getPath('temp'))      // C:\Users\17639\AppData\Local\Temp                        /---/--   C:\Users\17639\AppData\Local\Temp
    console.log(app.getPath('exe'))       // D:\workPrivately\polarPeak\node_modules\electron.exe     /---/--   C:\Users\17639\AppData\Local\Programs\polarpeak\极峰CRM.exe
    console.log(app.getPath('module'))    // D:\workPrivately\polarPeak\node_modules\electrin.exe     /---/--   C:\Users\17639\AppData\Local\Programs\polarpeak\极峰CRM.exe
    console.log(app.getPath('desktop'))   // C:\Users\17639\Desktop                                   /---/--   C:\Users\17639\Desktop
    console.log(app.getPath('documents')) // C:\Users\17639\Documents                                 /---/--   C:\Users\17639\Documents
    console.log(app.getPath('downloads')) // C:\Users\17639\Downloads                                 /---/--   C:\Users\17639\Downloads
    console.log(app.getPath('music'))     // C:\Users\17639\Music                                     /---/--   C:\Users\17639\Music
    console.log(app.getPath('pictures'))  // C:\Users\17639\Pictures                                  /---/--   C:\Users\17639\Pictures
    console.log(app.getPath('videos'))    // C:\Users\17639\Videos                                    /---/--   C:\Users\17639\Videos
    console.log(app.getPath('recent'))    // C:\Users\17639\AppData\Roaming\Microsoft\Windows\Recent  /---/--   C:\Users\17639\AppData\Roaming\Microsoft\Windows\Recent
    console.log(app.getPath('logs'))      // C:\Users\17639\AppData\Roaming\polarpeak\Electron\logs   /---/--   C:\Users\17639\AppData\Roaming\polarpeak\极峰CRM\logs
    console.log(app.getPath('crashDumps'))// C:\Users\17639\AppData\Roaming\polarpeak\Crashpad        /---/--   C:\Users\17639\AppData\Roaming\polarpeak\Crashpad