Skip to content

Commit

Permalink
Add (portable) to version for portable app
Browse files Browse the repository at this point in the history
  • Loading branch information
Mattk70 committed May 22, 2024
1 parent e6583f1 commit 6f9ae90
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion main.js
Original file line number Diff line number Diff line change
Expand Up @@ -346,8 +346,12 @@ async function createWorker() {
// This method will be called when Electron has finished loading
app.whenReady().then(async () => {
// Update the userData path for portable app
if (process.env.PORTABLE_EXECUTABLE_DIR)
if (process.env.PORTABLE_EXECUTABLE_DIR) {
app.setPath ('userData', path.join(process.env.PORTABLE_EXECUTABLE_DIR, "chirpity-data"));
ipcMain.handle('getVersion', () => app.getVersion() + ' (Portable)');
} else {
ipcMain.handle('getVersion', () => app.getVersion());
}
ipcMain.handle('getPath', () => app.getPath('userData'));
ipcMain.handle('getTemp', () => app.getPath('temp'));
ipcMain.handle('getVersion', () => app.getVersion());
Expand Down

0 comments on commit 6f9ae90

Please sign in to comment.