-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
initial release
- Loading branch information
Showing
34 changed files
with
3,693 additions
and
5,935 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -61,4 +61,6 @@ typings/ | |
.next | ||
|
||
.idea | ||
.iml | ||
.iml | ||
|
||
dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
env: | ||
global: | ||
- ELECTRON_BUILDER_ALLOW_UNRESOLVED_DEPENDENCIES=true | ||
|
||
matrix: | ||
include: | ||
- os: osx | ||
osx_image: xcode9.4 | ||
language: node_js | ||
node_js: "10" | ||
env: | ||
- ELECTRON_CACHE=$HOME/.cache/electron | ||
- ELECTRON_BUILDER_CACHE=$HOME/.cache/electron-builder | ||
- ELECTRON_BUILDER_ALLOW_UNRESOLVED_DEPENDENCIES=true | ||
|
||
- os: linux | ||
services: docker | ||
language: generic | ||
env: | ||
- ELECTRON_BUILDER_ALLOW_UNRESOLVED_DEPENDENCIES=true | ||
|
||
cache: | ||
directories: | ||
- node_modules | ||
- $HOME/.cache/electron | ||
- $HOME/.cache/electron-builder | ||
|
||
script: | ||
- | | ||
if [ "$TRAVIS_OS_NAME" == "linux" ]; then | ||
docker run --rm \ | ||
--env-file <(env | grep -vE '\r|\n' | grep -iE 'DEBUG|NODE_|ELECTRON_|YARN_|NPM_|CI|CIRCLE|TRAVIS|APPVEYOR_|CSC_|_TOKEN|_KEY|AWS_|STRIP|BUILD_') \ | ||
-v ${PWD}:/project \ | ||
-v ~/.cache/electron:/root/.cache/electron \ | ||
-v ~/.cache/electron-builder:/root/.cache/electron-builder \ | ||
electronuserland/builder:wine \ | ||
/bin/bash -c "ELECTRON_BUILDER_ALLOW_UNRESOLVED_DEPENDENCIES=true yarn --link-duplicates --pure-lockfile && \ | ||
ELECTRON_BUILDER_ALLOW_UNRESOLVED_DEPENDENCIES=true yarn release --linux --ia32 --x64 --armv7l && \ | ||
ELECTRON_BUILDER_ALLOW_UNRESOLVED_DEPENDENCIES=true yarn release --win" | ||
else | ||
yarn release | ||
fi | ||
before_cache: | ||
- rm -rf $HOME/.cache/electron-builder/wine | ||
|
||
branches: | ||
except: | ||
- "/^v\\d+\\.\\d+\\.\\d+$/" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# cast-web-api-desktop | ||
![GitHub release](https://img.shields.io/github/release/vervallsweg/cast-web-api-desktop.svg) | ||
![GitHub release beta](https://img.shields.io/github/release-pre/vervallsweg/cast-web-api-desktop.svg?label=beta) | ||
![Travis (.org)](https://img.shields.io/travis/vervallsweg/cast-web-api-desktop.svg) | ||
![GitHub](https://img.shields.io/github/license/vervallsweg/cast-web-api-desktop.svg) | ||
|
||
Desktop application for [cast-web-api](https://github.com/vervallsweg/cast-web-api). | ||
|
||
## Installation | ||
Download the latest version for your operating system [here](https://github.com/vervallsweg/cast-web-api-desktop/releases) and follow the install instructions on screen. | ||
|
||
![screenshot](img/screenshot-on.png) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<title>Background</title> | ||
</head> | ||
<body> | ||
<script> | ||
require('./renderer.js'); | ||
</script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
const { ipcRenderer } = require('electron'); | ||
const fs = require('fs'); | ||
const path = require('path'); | ||
const { Console } = require('console'); | ||
|
||
let api; | ||
let logger; | ||
|
||
console.log('let-api'); | ||
|
||
window.onerror = (error, url, line) => { | ||
console.error(error); | ||
setTimeout(()=>{ipcRenderer.send('api-error', error)}, 1000) | ||
}; | ||
|
||
// window. TODO: investigate window api, maybe to reroute stdout/err more reliably | ||
|
||
ipcRenderer.on('did-finish-load', (event, init) => { | ||
hookConsole(init.logsDir); | ||
try { | ||
api = require('cast-web-api/api'); | ||
|
||
ipcRenderer.send('api-logPath', { | ||
logPath: logger.logPath | ||
}); | ||
} catch (e) { | ||
ipcRenderer.send('api-error', e); | ||
} | ||
}); | ||
|
||
function hookConsole(logsDir) { | ||
let logPath = path.join(logsDir, Date.now()+".log" ).normalize(); | ||
let logStream = fs.createWriteStream(logPath); | ||
let readStream = fs.createReadStream(logPath); | ||
|
||
logger = new Console(logStream, logStream); | ||
logger.readStream = readStream; | ||
logger.logPath = logPath; | ||
|
||
console.log = logger.log; | ||
console.error = logger.error; | ||
|
||
logger.readStream.on('data', checkForAddress); | ||
|
||
module.exports = {console}; | ||
} | ||
|
||
function checkForAddress(data) { | ||
if (data.includes('running at http://')) { | ||
let address = 'http://'+(data.toString().split('http://'))[1].trim(); | ||
console.info('address: ' + address); | ||
ipcRenderer.send('api-address', { | ||
address: address, | ||
logPath: logger.logPath | ||
}); | ||
logger.readStream.removeListener('data', checkForAddress); | ||
logger.readStream.destroy(); | ||
delete logger.readStream; | ||
} | ||
} |
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Changelog | ||
## v1.2.0 | ||
- Release |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.