Windows URI handling #121

Merged
alexliebowitz merged 8 commits from windows-linux-uris into master 2017-05-12 22:46:49 +02:00
4 changed files with 25 additions and 0 deletions
Showing only changes of commit 856aa28db2 - Show all commits

View file

@ -177,6 +177,27 @@ function quitNow() {
app.quit();
}
const isSecondaryInstance = app.makeSingleInstance((argv) => {
if (process.argv.length < 3) {
return;
}
if (!win) {
openUri = argv[2];
} else {
if (win.isMinimized()) {
win.restore();
win.focus();
}
win.webContents.send('open-uri-requested', argv[2]);
}
});
if (isSecondaryInstance) { // We're not in the original process, so quit
quitNow();
return;
}
app.on('ready', function(){
launchDaemonIfNotRunning();
@ -316,6 +337,7 @@ function upgrade(event, installerPath) {
ipcMain.on('upgrade', upgrade);
app.setAsDefaultProtocolClient('lbry');
if (process.platform == 'darwin') {
app.on('open-url', (event, uri) => {
if (!win) {

1
lbry Submodule

@ -0,0 +1 @@
Subproject commit d99fc519b56ee910a44ef4af668b0770e9430d12

1
lbryschema Submodule

@ -0,0 +1 @@
Subproject commit 5c2441fa13e39ba7280292519041e14ec696d753

1
lbryum Submodule

@ -0,0 +1 @@
Subproject commit 950b95aa7e45a2c15b269d807f6ff8e16bae4304