Skip to content

Commit

Permalink
need better commit messages
Browse files Browse the repository at this point in the history
  • Loading branch information
freemountain committed Nov 19, 2015
1 parent bc4d216 commit eecf854
Show file tree
Hide file tree
Showing 7 changed files with 76 additions and 19 deletions.
23 changes: 23 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
The MIT License (MIT)

Copyright (c) 2015 Sergey Radionov
Copyright (c) 2015 Ivo Georgiev
Copyright (c) 2015 Alexandru Branza

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
39 changes: 39 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# fritz-player
> :exclamation: Bis jetzt gerade so unter OSX benutzbar
Ein Live TV Player. Kann Streams anzeigen, welche von libvlc verarbeitet werden können.
Erkennt eine `FRITZ!WLAN Repeater DVB-C` Box im Netzwerk und zeigt die verfügbaren Sender (inklusive HD) in der Seitenleiste an.

## Bedienung
* Maus an linker Fensterseite -> Seitenleiste erscheint
* Maus an rechter Fensterseite -> Seitenleiste verschwindet


## Screenshot
![screenshot-osx](./screenshot-osx.png)


## Benutzen

### Quelltext
```
npm install
npm run build
npm start
```

### Binaries
* Unter Github Release
* OSX funktioniert
* Linux
* libvlc muss vorhanden sein
* startet, mehr wurde nicht getestet, da kein WebGL in VM
* Windows noch nicht unterstützt


## Release History
* 0.0.1 - init


## License
Licensed under the MIT license.
24 changes: 10 additions & 14 deletions build.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ require('shelljs/global');
var program = require('commander');

var legalPlatforms = ['osx', 'linux'];
var envVAr = {
var envVar = {
osx: {
'NW_VERSION': '0.12.3',
'NW_PLATFORM': 'osx64',
Expand All @@ -18,6 +18,9 @@ var envVAr = {
}
}

var getVar = (v) => envVar[platform][v];
var getEnv = (v) => v + '=' + getVar(v);

function die(msg) {
console.log('PANIC: ', msg);
exit(-1);
Expand All @@ -32,43 +35,36 @@ function sync(target, destination, exclude) {

program
.version('0.0.1')
.option('-P, --pack', 'pack step')
.option('-p, --platform [p]', 'dd')
.option('-f, --force', 'false')
.parse(process.argv);

var platform = process.platform;
var force = program.force || false;
var packStep = program.pack || false;

if(program.platform) platform = program.platform;
if(platform === 'darwin') platform = 'osx';

if(legalPlatforms.indexOf(platform) === -1)
die('platform "' + platform + '" not supported');

console.log('Platform: ', platform);
console.log('Force: ', force);

var get = (v) => envVAr[platform][v];
var f = (p, v) => v + '=' + envVAr[platform][v];
var envString = f('osx', 'WCJS_ARCH') + ' ' + f('osx', 'WCJS_PLATFORM');

mkdir('-p', 'out/work/node');

rm('out/work/index.html', 'out/work/package.json');
cp('src/index.html', 'out/work/index.html');
cp('nw_package.json', 'out/work/package.json');

sync('src/node/*', 'out/work/node');
cd('out/work/node');

if (force) rm('-rf', 'node_modules');
exec(envString + ' npm install');
exec(getEnv('WCJS_ARCH') + ' ' + getEnv('WCJS_PLATFORM') + ' npm install');
cd('../../../');

console.log('build browser bundle...');
exec('./node_modules/.bin/browserify src/browser.js -t babelify --s app --outfile out/work/bundle.js');

var makeApp = ls('out/fritz-player/' + get('NW_PLATFORM')).length !== 0 && force;
if(!makeApp) exit();

if(!packStep) exit();
console.log('build app bundle...');
exec('./node_modules/.bin/nwbuild -v ' + get('NW_VERSION') + ' -p ' + get('NW_PLATFORM') + ' -o out out/work');
exec('./node_modules/.bin/nwbuild -v ' + getVar('NW_VERSION') + ' -p ' + getVar('NW_PLATFORM') + ' -o out out/work');
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "fritz-player",
"description": "avm dvb-c tv player",
"version": "0.0.1",
"main": "build/app.js",
"main": "out/work/index.html",
"scripts": {
"build": "node build.js",
"clean": "rm -rf out/",
Expand Down
Binary file added screenshot-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added screenshot-osx.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 3 additions & 4 deletions src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,9 @@
<body>
<div id="content"></div>
<script>
console.log('ccccss', document);
var c = document.getElementById('content');

setTimeout(function() {app(require);}, 2000 );
document.addEventListener('DOMContentLoaded', function(){
app(require);
}, false);
</script>
<script type="text/javascript" src="./bundle.js"></script>
</body>
Expand Down

0 comments on commit eecf854

Please sign in to comment.