diff --git a/.travis.yml b/.travis.yml index 739fa6bbe..5a0c97194 100644 --- a/.travis.yml +++ b/.travis.yml @@ -50,7 +50,7 @@ addons: artifacts: working_dir: dist paths: - - $(git ls-files -o dist/{*.dmg,*.exe,*.deb} | tr "\n" ":") + - $(git ls-files -o dist/{*.dmg,*.exe,*.deb,*.AppImage} | tr "\n" ":") target_paths: - '/app/build-${TRAVIS_BUILD_NUMBER}_commit-${TRAVIS_COMMIT:0:7}$([ ! -z ${TRAVIS_TAG} ] && echo _tag-${TRAVIS_TAG})' diff --git a/electron-builder.json b/electron-builder.json index 0c08881c2..c1580016f 100644 --- a/electron-builder.json +++ b/electron-builder.json @@ -73,7 +73,7 @@ } ], "linux": { - "target": "deb", + "target": ["AppImage", "deb"], "executableName": "lbry", "category": "AudioVideo;Video", "desktop": { diff --git a/electron/index.js b/electron/index.js index 026a42672..6851f2047 100644 --- a/electron/index.js +++ b/electron/index.js @@ -318,17 +318,14 @@ ipcMain.on('version-info-requested', () => { requestLatestRelease(); }); - +// In a few months, we can remove the keytar dependency and below calls once +// enough users have moved over to cookies ipcMain.on('get-auth-token', event => { keytar.getPassword('LBRY', 'auth_token').then(token => { event.sender.send('auth-token-response', token ? token.toString().trim() : null); }); }); -ipcMain.on('set-auth-token', (event, token) => { - keytar.setPassword('LBRY', 'auth_token', token ? token.toString().trim() : null); -}); - ipcMain.on('delete-auth-token', (event, password) => { keytar.deletePassword('LBRY', 'auth_token', password).then(res => { event.sender.send('delete-auth-token-response', res); diff --git a/ui/index.jsx b/ui/index.jsx index 352857200..f0fe7fe2b 100644 --- a/ui/index.jsx +++ b/ui/index.jsx @@ -109,10 +109,6 @@ Lbryio.setOverride( authToken = response.auth_token; setAuthToken(authToken); - // @if TARGET='app' - ipcRenderer.send('set-auth-token', authToken); - // @endif - resolve(authToken); }); }) @@ -123,6 +119,10 @@ Lbryio.setOverride( () => new Promise(resolve => { // @if TARGET='app' + // NEED TO DO SOMETHING HERE TO CHECK FOR A COOKIE AUTH TOKEN. + // IF IT EXISTS, SKIP AND CONTINUE BELOW THE @ENDIF + // IF NOT, COPY THE KEYTAR AUTH TOKEN AND PASSWORD TO THE COOKIE (SetAuthToken/SetPassword?) + // AND THEN DELETE KEYTAR ONE (Or leave for now?) if (authToken) { resolve(authToken); } @@ -135,7 +135,6 @@ Lbryio.setOverride( ipcRenderer.send('get-auth-token'); // @endif - // @if TARGET='web' const authTokenToReturn = authToken || getAuthToken(); if (authTokenToReturn !== null) { @@ -143,7 +142,6 @@ Lbryio.setOverride( } resolve(authTokenToReturn); - // @endif }) ); @@ -245,7 +243,7 @@ function AppWrapper() { console.error(error.message); // eslint-disable-line no-console }); - if (['win32', 'darwin'].includes(process.platform)) { + if (['win32', 'darwin'].includes(process.platform) || !!process.env.APPIMAGE) { autoUpdater.on('update-available', () => { console.log('Update available'); // eslint-disable-line no-console }); diff --git a/ui/modal/modalDownloading/view.jsx b/ui/modal/modalDownloading/view.jsx index c5fab6262..1629f25a6 100644 --- a/ui/modal/modalDownloading/view.jsx +++ b/ui/modal/modalDownloading/view.jsx @@ -33,6 +33,12 @@ class ModalDownloading extends React.PureComponent {

sudo dpkg -i {downloadItem}

{__('After the install is complete, please reopen the app.')}

+

+ {__('Note: You can also install the AppImage version for streamlined updates.')}{' '} + +