diff --git a/electron/main.js b/app/main.js similarity index 98% rename from electron/main.js rename to app/main.js index 6961caac9..a1eb61e31 100644 --- a/electron/main.js +++ b/app/main.js @@ -35,6 +35,7 @@ function lauchDaemon() { if (subpy) { return; } + console.log(`${__dirname}/dist/lbry`); subpy = require('child_process').spawn(`${__dirname}/dist/lbry`, ['--no-launch', '--log-to-console'], {stdio: ['ignore', process.stdout, process.stderr]}) subpy.on('exit', () => { console.log('The daemon has exited. Quitting the app'); diff --git a/app/package.json b/app/package.json new file mode 100644 index 000000000..637c440d7 --- /dev/null +++ b/app/package.json @@ -0,0 +1,10 @@ +{ + "name": "LBRY", + "version": "0.9.0", + "main": "main.js", + "description": "LBRY is a fully decentralized, open-source protocol facilitating the discovery, access, and (sometimes) purchase of data.", + "author": "lbry.io", + "dependencies": { + "jayson": "^2.0.2" + } +} diff --git a/build.sh b/build.sh index 3da37f96c..527fb6da9 100755 --- a/build.sh +++ b/build.sh @@ -5,9 +5,9 @@ set -eu ROOT="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" if [ "$(uname)" == "Darwin" ]; then - ICON="$ROOT/package/osx/app.icns" + ICON="$ROOT/build/icon.icns" else - ICON="$ROOT/package/icons/lbry48.png" + ICON="$ROOT/build/icons/lbry48.png" fi @@ -28,7 +28,7 @@ fi ( - cd "$ROOT/electron" + cd "$ROOT/app" npm install ) @@ -53,15 +53,15 @@ fi npm install node_modules/.bin/node-sass --output dist/css --sourcemap=none scss/ node_modules/.bin/webpack - rm -rf "$ROOT/electron/dist" - cp -r dist "$ROOT/electron/dist" + rm -rf "$ROOT/app/dist" + cp -r dist "$ROOT/app/dist" ) -mv "$ROOT/lbrynet/dist/lbry" "$ROOT/electron/dist" +mv "$ROOT/lbrynet/dist/lbry" "$ROOT/app/dist" if [ -n "${TEAMCITY_VERSION:-}" ]; then - electron-packager --electron-version=1.4.14 --overwrite "$ROOT/electron" LBRY --icon="${ICON}" + electron-packager --electron-version=1.4.14 --overwrite "$ROOT/app" LBRY --icon="${ICON}" ( pushd "$ROOT/lbry" diff --git a/electron/build/background.png b/build/background.png similarity index 100% rename from electron/build/background.png rename to build/background.png diff --git a/electron/build/icon.icns b/build/icon.icns similarity index 100% rename from electron/build/icon.icns rename to build/icon.icns diff --git a/package/icons/lbry128.png b/build/icons/lbry128.png similarity index 100% rename from package/icons/lbry128.png rename to build/icons/lbry128.png diff --git a/package/icons/lbry256.png b/build/icons/lbry256.png similarity index 100% rename from package/icons/lbry256.png rename to build/icons/lbry256.png diff --git a/package/icons/lbry32.png b/build/icons/lbry32.png similarity index 100% rename from package/icons/lbry32.png rename to build/icons/lbry32.png diff --git a/package/icons/lbry48.png b/build/icons/lbry48.png similarity index 100% rename from package/icons/lbry48.png rename to build/icons/lbry48.png diff --git a/package/icons/lbry96.png b/build/icons/lbry96.png similarity index 100% rename from package/icons/lbry96.png rename to build/icons/lbry96.png diff --git a/electron/package.json b/package.json similarity index 64% rename from electron/package.json rename to package.json index 5137ef6c6..71cd16676 100644 --- a/electron/package.json +++ b/package.json @@ -1,13 +1,10 @@ { - "name": "LBRY", - "version": "0.1.0", - "main": "main.js", - "description": "LBRY is a fully decentralized, open-source protocol facilitating the discovery, access, and (sometimes) purchase of data.", - "author": "lbry.io", - "dependencies": { - "jayson": "^2.0.2" - }, + "postinstall": "install-app-deps", "build": { + "asar": false, + "directories": { + "app": "app" + }, "appId": "io.lbry.LBRY", "mac": { "category": "public.app-category.utilities", @@ -31,8 +28,9 @@ "x": 200, "y": 200, "width": 500, - "height": 320 - } + "height": 300 + }, + "backgroundColor": "155B4A" } }, "devDependencies": { diff --git a/package/osx/dmg_settings.py b/package/osx/dmg_settings.py deleted file mode 100644 index 1fa6b0b03..000000000 --- a/package/osx/dmg_settings.py +++ /dev/null @@ -1,12 +0,0 @@ -badge_icon = 'app.icns' -icon_locations = { - 'LBRY.app': (115, 164), - 'Applications': (387, 164) -} -background='dmg_background.png' -default_view='icon-view' -symlinks = { 'Applications': '/Applications' } -window_rect=((200, 200), (500, 320)) -files = [ 'LBRY.app' ] -icon_size=128 -size = '200M'