2022-04-06 01:10:12 +02:00
|
|
|
const { app, protocol } = require('electron');
|
|
|
|
|
const path = require('path');
|
2020-05-12 03:00:33 +02:00
|
|
|
|
2021-02-01 20:43:26 +01:00
|
|
|
app.on('window-all-closed', e => e.preventDefault());
|
2022-04-06 01:10:12 +02:00
|
|
|
|
|
|
|
|
app.whenReady().then(() => {
|
|
|
|
|
protocol.registerFileProtocol('vscode-file', (request, callback) => {
|
|
|
|
|
const url = request.url.substring('vscode-file'.length + 3);
|
|
|
|
|
callback({ path: path.join(__dirname, 'assets', url) });
|
|
|
|
|
});
|
|
|
|
|
});
|