Skip to content
This repository has been archived by the owner on Sep 17, 2020. It is now read-only.

Commit

Permalink
setup updates:
Browse files Browse the repository at this point in the history
- add ./build-wr.sh to build webrecorder submodule
- rename 'webrecorder' -> 'webrecorder_player' in python-binary and in code to match built binary
- set version to 1.5.0 instead of 2.0.0
- update node packages
  • Loading branch information
ikreymer committed Sep 21, 2018
1 parent 9f56482 commit 6d60677
Show file tree
Hide file tree
Showing 7 changed files with 309 additions and 28 deletions.
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
*~

node_modules
python-binaries/webrecorder
python-binaries/*
dll
app/static/

app/main.prod.js
app/main.prod.js.map
app/main.prod.js.map
12 changes: 6 additions & 6 deletions app/main.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ let spawnOptions;
let webrecorderProcess;

const projectDir = path.join(__dirname, '../');
const webrecorderDir = path.join(projectDir, 'python-binaries', 'webrecorder');
const webrecorderBin = path.join(projectDir, 'python-binaries', 'webrecorder_player');
const stdio = ['ignore', 'pipe', 'pipe'];
const wrConfig = {};
const pluginDir = 'plugins';
Expand Down Expand Up @@ -130,7 +130,7 @@ function killProcess() {

const registerOpenWarc = function () {
// get versions for stack
child_process.execFile(webrecorderDir, ['--version'], (err, stdout, stderr) => {
child_process.execFile(webrecorderBin, ['--version'], (err, stdout, stderr) => {
const electronVersion = `electron ${process.versions.electron}<BR>
chrome ${process.versions.chrome}`;
Object.assign(wrConfig, {
Expand All @@ -150,14 +150,14 @@ const registerOpenWarc = function () {
killProcess();

webrecorderProcess = child_process.spawn(
webrecorderDir,
webrecorderBin,
['--no-browser', '--loglevel', 'error', '--cache-dir', '_warc_cache', '--port', 0, warc],
spawnOptions
);

// catch any errors spawning webrecorder binary and add to debug info
webrecorderProcess.on('error', (err) => {
debugOutput.push(`Error spawning ${webrecorderDir} binary:\n ${err}\n\n`);
debugOutput.push(`Error spawning ${webrecorderBin} binary:\n ${err}\n\n`);
});

// log any stderr notices
Expand Down Expand Up @@ -285,14 +285,14 @@ ipcMain.on('sync-dat', (evt, datKey) => {
killProcess();

webrecorderProcess = child_process.spawn(
webrecorderDir,
webrecorderBin,
['--no-browser', '--loglevel', 'error', '--cache-dir', '_warc_cache', '--port', 0, '--coll-dir', dlDir],
spawnOptions
);

// catch any errors spawning webrecorder binary and add to debug info
webrecorderProcess.on('error', (err) => {
debugOutput.push(`Error spawning ${webrecorderDir} binary:\n ${err}\n\n`);
debugOutput.push(`Error spawning ${webrecorderBin} binary:\n ${err}\n\n`);
});

// log any stderr notices
Expand Down
2 changes: 1 addition & 1 deletion app/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "webrecorder-player",
"productName": "Webrecorder Player",
"version": "2.0.0",
"version": "1.5.0",
"description": "Webrecorder Player -- Standalone Web Archive Browser App",
"main": "./main.prod.js",
"scripts": {
Expand Down
5 changes: 5 additions & 0 deletions build-wr.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash
bash ./webrecorder/webrecorder/webrecorder/standalone/build_player.sh
mv ./webrecorder/webrecorder/webrecorder/standalone/dist/webrecorder_player ./python-binaries/
chmod a+x ./python-binaries/webrecorder_player

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "webrecorderplayer",
"productName": "Webrecorder Player",
"version": "2.0.0",
"version": "1.5.0",
"description": "Webrecorder Player -- Standalone Web Archive Browser App",
"scripts": {
"build": "concurrently \"npm run build-main\" \"npm run build-frontend\"",
Expand Down Expand Up @@ -79,6 +79,7 @@
"electron-devtools-installer": "^2.2.1",
"electron-publisher-s3": "^19.15.0",
"electron-window-state": "^4.1.1",
"node-sass": "^4.9.3",
"webpack": "3.10.0"
},
"devEngines": {
Expand Down
2 changes: 1 addition & 1 deletion webrecorder
Loading

0 comments on commit 6d60677

Please sign in to comment.