Skip to content

Commit

Permalink
Merge branch 'release/0.4.1-16'
Browse files Browse the repository at this point in the history
  • Loading branch information
captainyarr committed Aug 29, 2018
2 parents cea0230 + c0c377f commit ca7c7c8
Show file tree
Hide file tree
Showing 52 changed files with 19,169 additions and 12,190 deletions.
6 changes: 3 additions & 3 deletions .circleci/config.yml
Expand Up @@ -32,11 +32,11 @@ jobs:
- run: sudo npm install -g gulp

# run tests!
#- run: gulp build linux32,linux64,win32,osx64
- run: gulp build -p linux32,linux64,win32,win64,osx64
#- run: gulp build linux32,linux64,win32,win64,osx64
- run: gulp build -p linux32,linux64,win32,win64

- deploy:
command: gulp zip
command: gulp zip -p linux32,linux64,win32,win64

#store cache dependencies
- save_cache:
Expand Down
34 changes: 34 additions & 0 deletions CHANGELOG.md
@@ -1,3 +1,37 @@
## 0.4.1-16 Beta - Summer Dream - 28 August 2018

New Features:
- OpenSubtitles: Add link to create account
- OpenSubtitles: Added Username and Password for OpenSubtitles API into the settings screen.
- ExtPlayer: Added Windows Media Player
- Player: Added a "Download Only" option to the player selection
- gulp: Add ffmpeg update to cache sdk
- gulp: Add ffmpeg update to builds
- gulp: Add commandline paramters to set nw.js version and downloadUrl location

BugFixes:
- Register: Fixed default torrent
- Settings: Fixed Download direction selection
- Magnet and Torrent: Fixed Magnet and Torrent Drop
- Cache: Fixed SQL execute methods
- About: Added OpenSubtitles.org link
- circleci: Removed osx64 from automated builds and zip
- Trackers: Updated trackers
- GulpArm: Updated LinuxArm downloadUrl
- GulpArmSupport: Add support for linuxarm platform
- OpenSubtitles: Better handling of subtitle information downloading
- OpenSubtitles: Better error handling and fixed settings

Updated:
- Nodejs: Updated to version 0.31.5
- jQuery: Updated to version 3.3.1
- Mousetrap: Updated to latest version 1.6.2
- gitlab: Updated to version 3.11.0
- xmlbuilder: Updated to version 10.0.0
- webtorrent: Updated to version 0.102.1
- yargs: Updated to version 12.0.1
- opensubtitles-api: Updated to version 4.1.0

## 0.4.1-15 Beta - Ides of March - 11 March 2018

BugFixes:
Expand Down
4 changes: 2 additions & 2 deletions LICENSE.txt
@@ -1,5 +1,5 @@
Popcorn Time - Streaming video through torrents
Copyright © 2014 - 2015 Popcorn Time and the contributors (popcorntime.ag)
Copyright © 2014 - 2018 Popcorn Time and the contributors (popcorntime.ag)

If you distribute a copy or make a fork of the project, you have to credit this project as source.

Expand All @@ -20,7 +20,7 @@ If you want to contact us : hello@popcorntime.ag


Popcorn Time - Streaming video through torrents
Copyright © 2014 - 2015 Popcorn Time and the contributors (popcorntime.ag)
Copyright © 2014 - 2018 Popcorn Time and the contributors (popcorntime.ag)
Popcorn Time is released under the GPL

Last update: May 4, 2014
Expand Down
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -101,4 +101,4 @@ You should have received a copy of the GNU General Public License along with thi

If you want to contact us : send pm to [samewhiterabbits](https://www.reddit.com/user/Samewhiterabbits) on reddit or [use the form](http://yify.is/index.php/blog/contact) on the yify website.

Copyright (c) 2015 Popcorn Time Community - Released under the [GPL v3 license](LICENSE.txt).
Copyright (c) 2018 Popcorn Time Community - Released under the [GPL v3 license](LICENSE.txt).
214 changes: 186 additions & 28 deletions gulpfile.js
@@ -1,22 +1,61 @@
var gulp = require('gulp');
var NwBuilder = require('nw-builder');
var os = require('os');
var argv = require('yargs')
.alias('p', 'platforms')
.argv;
var del = require('del');
var detectCurrentPlatform = require('nw-builder/lib/detectCurrentPlatform.js');
var zip = require('gulp-zip');
var unzip = require('gulp-unzip');
var gzip = require('gulp-gzip');
var tar = require('gulp-tar');
var download = require('gulp-download');
var package = require('./package.json');
var merge2 = require('merge2');

//Commandline
var argv = require('yargs')
.alias('p', 'platforms')
.options({
'nwversion': {
alias: 'nwv',
describe: 'Set nw.js version'
},
'nwdownloadurl': {
alias: 'nwurl',
describe: 'Provide an alt download URL'
}
})
.help()
.argv;

//Set Default nw.js version
var nwVersion = '0.31.5';
var buildDownloadUrl = 'https://dl.nwjs.io/';

nwVersion = argv.nwv ? argv.nwv : nwVersion;
buildDownloadUrl = argv.nwurl ? argv.nwurl : buildDownloadUrl;

var buildplatforms = argv.p ? argv.p.split(',') : [detectCurrentPlatform()];

//Example URL FFMPEG Location:
//https://github.com/iteufel/nwjs-ffmpeg-prebuilt/releases/download/0.31.4/0.31.4-osx-x64.zip
var ffmpegDownloadurl = 'https://github.com/iteufel/nwjs-ffmpeg-prebuilt/releases/download/' + nwVersion;

//Platform specific overrides if needed

if (buildplatforms.indexOf("linuxarm") >= 0) {
nwVersion = '0.31.2';
}

if (buildplatforms.indexOf("linuxarm") >= 0) {
buildDownloadUrl = 'https://github.com/LeonardLaszlo/nw.js-armv7-binaries/releases/download/v0.27.6/nwjs-sdk-v0.27.6-linux-arm-chrome-branding.tar.gz';
}

var nw = new NwBuilder({
files: ['./src/**', './node_modules/**', './package.json','./install','LICENSE.txt','CHANGELOG.md','README.md'],
version: '0.20.1',
files: ['./src/**', './node_modules/**', './package.json', './install', 'LICENSE.txt', 'CHANGELOG.md', 'README.md'],
version: nwVersion,
zip: false,
downloadUrl: 'http://builds.butterproject.org/nw/',
platforms: argv.p ? argv.p.split(',') : [detectCurrentPlatform()]
downloadUrl: buildDownloadUrl,
platforms: buildplatforms,
}).on('log', console.log);

gulp.task('run', function() {
Expand All @@ -36,28 +75,147 @@ gulp.task('clean', function() {
return del('build/');
});

gulp.task('zip', function () {

gulp.src('./build/Popcorn-Time-CE/osx64/**/*')
.pipe(tar('popcorn-time-ce_osx64_'+package.version+'.tar'))
.pipe(gzip())
.pipe(gulp.dest('./dist'));
gulp.src('./build/Popcorn-Time-CE/win32/**')
.pipe(zip('popcorn-time-ce_win32_'+package.version+'.zip'))
.pipe(gulp.dest('./dist'));
gulp.src('./build/Popcorn-Time-CE/win64/**')
.pipe(zip('popcorn-time-ce_win64_'+package.version+'.zip'))
.pipe(gulp.dest('./dist'));
gulp.src('./build/Popcorn-Time-CE/linux32/**')
.pipe(tar('popcorn-time-ce_linux32_'+package.version+'.tar'))
.pipe(gzip())
.pipe(gulp.dest('./dist'));
return gulp.src('./build/Popcorn-Time-CE/linux64/**')
.pipe(tar('popcorn-time-ce_linux64_'+package.version+'.tar'))
.pipe(gzip())
.pipe(gulp.dest('./dist'));
gulp.task('ffmpegbuild', function() {
var downloadArray = merge2();
var item = 0;
buildplatforms.forEach(item => {
switch (item) {
case "linux64":
//Copy updated FFMPEG into the cache directory before building
downloadArray.add(download(ffmpegDownloadurl + '/' + nwVersion + '-linux-x64.zip')
.pipe(unzip())
.pipe(gulp.dest("./pre/" + item))
.pipe(gulp.dest("./build/Popcorn-Time-CE/" + item + "/lib")));
break;
case "linux32":
//Copy updated FFMPEG into the cache directory before building
downloadArray.add(download(ffmpegDownloadurl + '/' + nwVersion + '-linux-ia32.zip')
.pipe(unzip())
.pipe(gulp.dest("./pre/" + item))
.pipe(gulp.dest("./build/Popcorn-Time-CE/" + item + "/lib")));
break;
case "win32":
//Copy updated FFMPEG into the cache directory before building
downloadArray.add(download(ffmpegDownloadurl + '/' + nwVersion + '-win-ia32.zip')
.pipe(unzip())
.pipe(gulp.dest("./pre/" + item))
.pipe(gulp.dest("./build/Popcorn-Time-CE/" + item)));
break;
case "win64":
//Copy updated FFMPEG into the cache directory before building
downloadArray.add(download(ffmpegDownloadurl + '/' + nwVersion + '-win-x64.zip')
.pipe(unzip())
.pipe(gulp.dest("./pre/" + item))
.pipe(gulp.dest("./build/Popcorn-Time-CE/" + item)));
break;
case "osx64":
var fs = require("fs");
var osxBuilddir = "./build/Popcorn-Time-CE/" + item + '/' + 'Popcorn-Time-CE.app/Contents/Versions/';
var files = fs.readdirSync(osxBuilddir);
if (files.length > 0) {
//osxCachedir = './cache/' + nwVersion + '-sdk/osx64/nwjs.app/Contents/Versions/' + files[0];
osxBuilddir = "./build/Popcorn-Time-CE/" + item + '/' + 'Popcorn-Time-CE.app/Contents/Versions/' + files[0];
}
//Copy updated FFMPEG into the cache directory before building
//https://github.com/iteufel/nwjs-ffmpeg-prebuilt/releases/download/0.31.4/0.31.4-osx-x64.zip
downloadArray.add(download(ffmpegDownloadurl + '/' + nwVersion + '-osx-x64.zip')
.pipe(unzip())
.pipe(gulp.dest("./pre/" + item))
.pipe(gulp.dest(osxBuilddir)));
break;
}
});
return downloadArray;
});

gulp.task('ffmpegcache', function() {
var cacheDir = './cache/' + nwVersion + '-sdk';
var downloadArray = merge2();
var item = 0;

buildplatforms.forEach(item => {
switch (item) {
case "linux64":
//Copy updated FFMPEG into the cache directory before building
downloadArray.add(download(ffmpegDownloadurl + '/' + nwVersion + '-linux-x64.zip')
.pipe(unzip())
.pipe(gulp.dest(cacheDir + '/' + item + "/lib")));
break;
case "linux32":
//Copy updated FFMPEG into the cache directory before building
downloadArray.add(download(ffmpegDownloadurl + '/' + nwVersion + '-linux-ia32.zip')
.pipe(unzip())
.pipe(gulp.dest(cacheDir + '/' + item + "/lib")));
break;
case "win32":
//Copy updated FFMPEG into the cache directory before building
downloadArray.add(download(ffmpegDownloadurl + '/' + nwVersion + '-win-ia32.zip')
.pipe(unzip())
.pipe(gulp.dest(cacheDir + '/' + item)));
break;
case "win64":
//Copy updated FFMPEG into the cache directory before building
downloadArray.add(download(ffmpegDownloadurl + '/' + nwVersion + '-win-x64.zip')
.pipe(unzip())
.pipe(gulp.dest(cacheDir + '/' + item)));
break;
case "osx64":
var fs = require("fs");
var osxCachedir = './cache/' + nwVersion + '-sdk/osx64/nwjs.app/Contents/Versions/';
var files = fs.readdirSync(osxCachedir);
if (files.length > 0) {
osxCachedir = './cache/' + nwVersion + '-sdk/osx64/nwjs.app/Contents/Versions/' + files[0];
}
downloadArray.add(download(ffmpegDownloadurl + '/' + nwVersion + '-osx-x64.zip')
.pipe(unzip())
.pipe(gulp.dest(osxCachedir)));
break;
}
});

return downloadArray;
});

gulp.task('zip', ['ffmpegbuild'], function() {
var zipArray = merge2();

buildplatforms.forEach(item => {
switch (item) {
case "linux64":
zipArray.add(gulp.src('./build/Popcorn-Time-CE/linux64/**')
.pipe(tar('popcorn-time-ce_linux64_' + package.version + '.tar'))
.pipe(gzip())
.pipe(gulp.dest('./dist')));
break;
case "linux32":
zipArray.add(gulp.src('./build/Popcorn-Time-CE/linux32/**')
.pipe(tar('popcorn-time-ce_linux32_' + package.version + '.tar'))
.pipe(gzip())
.pipe(gulp.dest('./dist')));
break;
case "win32":
zipArray.add(gulp.src('./build/Popcorn-Time-CE/win32/**')
.pipe(zip('popcorn-time-ce_win32_' + package.version + '.zip'))
.pipe(gulp.dest('./dist')));
break;
case "win64":
zipArray.add(gulp.src('./build/Popcorn-Time-CE/win64/**')
.pipe(zip('popcorn-time-ce_win64_' + package.version + '.zip'))
.pipe(gulp.dest('./dist')));
break;
case "osx64":
zipArray.add(gulp.src('./build/Popcorn-Time-CE/osx64/**')
.pipe(zip('popcorn-time-ce_osx64_' + package.version + '.zip'))
//.pipe(gzip())
.pipe(gulp.dest('./dist')));
break;
}
});

return zipArray;
});

gulp.task('default', function() {
// place code for your default task here
// place code for your default task here
console.log(nwVersion);
});
4 changes: 2 additions & 2 deletions install
Expand Up @@ -23,7 +23,7 @@ fi
func_error

#Variables
version="0.4.1-15"
version="0.4.1-16"
tos="http://popcorn-time.is/tos.html"
$path="$HOME/.Popcorn-Time-CE"

Expand All @@ -36,7 +36,7 @@ Popcorn Time CE $version - Linux $arch bits
Please read our Terms of service:
$tos
This installer will install Popcorn Time in:
This installer will install Popcorn Time CE in:
~/.Popcorn-Time-CE
~/.local/share/applications
~/.local/share/icons
Expand Down

0 comments on commit ca7c7c8

Please sign in to comment.