|
|
|
@ -35,13 +35,13 @@ async function downloadFile(url: string, dest: string) { |
|
|
|
|
export function getInstallationPath(version) { |
|
|
|
|
switch (process.platform) { |
|
|
|
|
case 'win32': |
|
|
|
|
return path.join(app.getPath('temp'), 'circom-download', version, 'circom-windows-amd64.exe') |
|
|
|
|
return process.env.NODE_ENV === 'production' ? path.join(app.getPath('temp'), 'circom-download', version, 'circom-windows-amd64.exe') : path.join(app.getAppPath(), 'circom-download', version, 'circom-windows-amd64.exe') |
|
|
|
|
|
|
|
|
|
case 'darwin': |
|
|
|
|
return path.join(app.getAppPath(), 'circom-download', version, 'circom-macos-amd64') |
|
|
|
|
return process.env.NODE_ENV === 'production' ? path.join(app.getPath('temp'), 'circom-download', version, 'circom-macos-amd64') : path.join(app.getAppPath(), 'circom-download', version, 'circom-macos-amd64') |
|
|
|
|
|
|
|
|
|
case 'linux': |
|
|
|
|
return path.join(app.getAppPath(), 'circom-download', version, 'circom-linux-amd64') |
|
|
|
|
return process.env.NODE_ENV === 'production' ? path.join(app.getPath('temp'), 'circom-download', version, 'circom-linux-amd64') : path.join(app.getAppPath(), 'circom-download', version, 'circom-linux-amd64') |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -61,13 +61,13 @@ export function getInstallationUrl(version) { |
|
|
|
|
export function getLogInputSignalsPath() { |
|
|
|
|
switch (process.platform) { |
|
|
|
|
case 'win32': |
|
|
|
|
return path.join(app.getPath('temp'), 'log_input_signals.txt') |
|
|
|
|
return process.env.NODE_ENV === 'production' ? path.join(app.getPath('temp'), 'log_input_signals.txt') : path.join(app.getAppPath(), 'log_input_signals.txt') |
|
|
|
|
|
|
|
|
|
case 'darwin': |
|
|
|
|
return path.join(app.getAppPath(), 'log_input_signals.txt') |
|
|
|
|
return process.env.NODE_ENV === 'production' ? path.join(app.getPath('temp'), 'log_input_signals.txt') : path.join(app.getAppPath(), 'log_input_signals.txt') |
|
|
|
|
|
|
|
|
|
case 'linux': |
|
|
|
|
return path.join(app.getAppPath(), 'log_input_signals.txt') |
|
|
|
|
return process.env.NODE_ENV === 'production' ? path.join(app.getPath('temp'), 'log_input_signals.txt') : path.join(app.getAppPath(), 'log_input_signals.txt') |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|