commit
7d3ff96dd7
4 changed files with 10 additions and 13 deletions
|
@ -116,7 +116,7 @@ function openItem(fullPath) {
|
||||||
} else if (process.platform == 'linux') {
|
} else if (process.platform == 'linux') {
|
||||||
child = child_process.spawn('xdg-open', [fullPath], subprocOptions);
|
child = child_process.spawn('xdg-open', [fullPath], subprocOptions);
|
||||||
} else if (process.platform == 'win32') {
|
} else if (process.platform == 'win32') {
|
||||||
child = child_process.spawn(fullPath, [], subprocOptions);
|
child = child_process.spawn(fullPath, Object.assign({}, subprocOptions, {shell: true}));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Causes child process reference to be garbage collected, allowing main process to exit
|
// Causes child process reference to be garbage collected, allowing main process to exit
|
||||||
|
|
|
@ -2,7 +2,7 @@ import * as types from 'constants/action_types'
|
||||||
import lbry from 'lbry'
|
import lbry from 'lbry'
|
||||||
import {
|
import {
|
||||||
selectUpdateUrl,
|
selectUpdateUrl,
|
||||||
selectUpgradeDownloadDir,
|
selectUpgradeDownloadPath,
|
||||||
selectUpgradeDownloadItem,
|
selectUpgradeDownloadItem,
|
||||||
selectUpgradeFilename,
|
selectUpgradeFilename,
|
||||||
selectPageTitle,
|
selectPageTitle,
|
||||||
|
@ -110,7 +110,7 @@ export function doSkipUpgrade() {
|
||||||
export function doStartUpgrade() {
|
export function doStartUpgrade() {
|
||||||
return function(dispatch, getState) {
|
return function(dispatch, getState) {
|
||||||
const state = getState()
|
const state = getState()
|
||||||
const upgradeDownloadPath = selectUpgradeDownloadDir(state)
|
const upgradeDownloadPath = selectUpgradeDownloadPath(state)
|
||||||
|
|
||||||
ipcRenderer.send('upgrade', upgradeDownloadPath)
|
ipcRenderer.send('upgrade', upgradeDownloadPath)
|
||||||
}
|
}
|
||||||
|
@ -135,14 +135,11 @@ export function doDownloadUpgrade() {
|
||||||
* too soon.
|
* too soon.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
const _upgradeDownloadItem = downloadItem;
|
|
||||||
const _upgradeDownloadPath = path.join(dir, upgradeFilename);
|
|
||||||
|
|
||||||
dispatch({
|
dispatch({
|
||||||
type: types.UPGRADE_DOWNLOAD_COMPLETED,
|
type: types.UPGRADE_DOWNLOAD_COMPLETED,
|
||||||
data: {
|
data: {
|
||||||
dir,
|
downloadItem,
|
||||||
downloadItem
|
path: path.join(dir, upgradeFilename)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
|
|
|
@ -34,7 +34,7 @@ reducers[types.UPGRADE_CANCELLED] = function(state, action) {
|
||||||
|
|
||||||
reducers[types.UPGRADE_DOWNLOAD_COMPLETED] = function(state, action) {
|
reducers[types.UPGRADE_DOWNLOAD_COMPLETED] = function(state, action) {
|
||||||
return Object.assign({}, state, {
|
return Object.assign({}, state, {
|
||||||
downloadDir: action.data.dir,
|
downloadPath: action.data.path,
|
||||||
upgradeDownloading: false,
|
upgradeDownloading: false,
|
||||||
upgradeDownloadCompleted: true
|
upgradeDownloadCompleted: true
|
||||||
})
|
})
|
||||||
|
|
|
@ -107,11 +107,11 @@ export const selectUpgradeFilename = createSelector(
|
||||||
(platform, version) => {
|
(platform, version) => {
|
||||||
switch (platform) {
|
switch (platform) {
|
||||||
case 'darwin':
|
case 'darwin':
|
||||||
return `LBRY-${version}.dmg`;
|
return `LBRY_${version}.dmg`;
|
||||||
case 'linux':
|
case 'linux':
|
||||||
return `LBRY_${version}_amd64.deb`;
|
return `LBRY_${version}_amd64.deb`;
|
||||||
case 'win32':
|
case 'win32':
|
||||||
return `LBRY.Setup.${version}.exe`;
|
return `LBRY_${version}.exe`;
|
||||||
default:
|
default:
|
||||||
throw 'Unknown platform';
|
throw 'Unknown platform';
|
||||||
}
|
}
|
||||||
|
@ -170,9 +170,9 @@ export const selectUpgradeSkipped = createSelector(
|
||||||
(state) => state.upgradeSkipped
|
(state) => state.upgradeSkipped
|
||||||
)
|
)
|
||||||
|
|
||||||
export const selectUpgradeDownloadDir = createSelector(
|
export const selectUpgradeDownloadPath = createSelector(
|
||||||
_selectState,
|
_selectState,
|
||||||
(state) => state.downloadDir
|
(state) => state.downloadPath
|
||||||
)
|
)
|
||||||
|
|
||||||
export const selectUpgradeDownloadItem = createSelector(
|
export const selectUpgradeDownloadItem = createSelector(
|
||||||
|
|
Loading…
Reference in a new issue