diff options
| author | Andrej Mihajlov <and@mullvad.net> | 2019-02-27 16:08:01 +0100 |
|---|---|---|
| committer | Andrej Mihajlov <and@mullvad.net> | 2019-03-01 16:22:24 +0100 |
| commit | ddccc2beafa9ec5305ce2746d3eb095d3bd21b6c (patch) | |
| tree | 645bf5d10836595b9d7f04e4ea7685fb7c71be9c | |
| parent | 3f5426c08aedcb88e131b0be94308ccb342fc1d4 (diff) | |
| download | mullvadvpn-ddccc2beafa9ec5305ce2746d3eb095d3bd21b6c.tar.xz mullvadvpn-ddccc2beafa9ec5305ce2746d3eb095d3bd21b6c.zip | |
Update relative paths
| -rwxr-xr-x | gui/electron-builder.yml | 84 | ||||
| -rw-r--r-- | gui/package.json | 2 | ||||
| -rw-r--r-- | gui/scripts/serve.js | 17 | ||||
| -rw-r--r-- | gui/src/main/proc.ts | 3 | ||||
| -rw-r--r-- | gui/tsconfig.json | 2 |
5 files changed, 49 insertions, 59 deletions
diff --git a/gui/electron-builder.yml b/gui/electron-builder.yml index a5df3de58b..e005178a91 100755 --- a/gui/electron-builder.yml +++ b/gui/electron-builder.yml @@ -8,18 +8,18 @@ compression: maximum # assets bundled on all platforms extraResources: # Mullvad root CA certificate used by OpenVPN - - from: ../../../dist-assets/ca.crt + - from: ../dist-assets/ca.crt to: . - - from: ../../../dist-assets/api_root_ca.pem + - from: ../dist-assets/api_root_ca.pem to: . - - from: ../../../dist-assets/relays.json + - from: ../dist-assets/relays.json to: . - - from: ../../../CHANGELOG.md + - from: ../CHANGELOG.md to: . directories: - buildResources: ../../../dist-assets/ - output: ../../../dist/ + buildResources: ../dist-assets/ + output: ../dist/ # override package.json extraMetadata: @@ -39,19 +39,19 @@ mac: LSUIElement: true NSUserNotificationAlertStyle: alert extraResources: - - from: ../../../dist-assets/mullvad + - from: ../dist-assets/mullvad to: . - - from: ../../../dist-assets/problem-report + - from: ../dist-assets/problem-report to: . - - from: ../../../dist-assets/mullvad-daemon + - from: ../dist-assets/mullvad-daemon to: . - - from: ../../../dist-assets/libtalpid_openvpn_plugin.dylib + - from: ../dist-assets/libtalpid_openvpn_plugin.dylib to: . - - from: ../../../dist-assets/binaries/macos/openvpn + - from: ../dist-assets/binaries/macos/openvpn to: . - - from: ../../../dist-assets/binaries/macos/sslocal + - from: ../dist-assets/binaries/macos/sslocal to: . - - from: ../../../dist-assets/uninstall_macos.sh + - from: ../dist-assets/uninstall_macos.sh to: ./uninstall.sh pkg: @@ -65,8 +65,8 @@ nsis: perMachine: true allowElevation: true allowToChangeInstallationDirectory: false - include: ../../../dist-assets/windows/installer.nsh - installerSidebar: ../../../dist-assets/windows/installersidebar.bmp + include: ../dist-assets/windows/installer.nsh + installerSidebar: ../dist-assets/windows/installersidebar.bmp win: target: @@ -79,23 +79,23 @@ win: - sha256 signDlls: true extraResources: - - from: ../../../dist-assets/mullvad.exe + - from: ../dist-assets/mullvad.exe to: . - - from: ../../../dist-assets/problem-report.exe + - from: ../dist-assets/problem-report.exe to: . - - from: ../../../dist-assets/mullvad-daemon.exe + - from: ../dist-assets/mullvad-daemon.exe to: . - - from: ../../../dist-assets/talpid_openvpn_plugin.dll + - from: ../dist-assets/talpid_openvpn_plugin.dll to: . - - from: ../../../windows/winfw/bin/x64-Release/winfw.dll + - from: ../windows/winfw/bin/x64-Release/winfw.dll to: . - - from: ../../../windows/windns/bin/x64-Release/windns.dll + - from: ../windows/windns/bin/x64-Release/windns.dll to: . - - from: ../../../windows/winroute/bin/x64-Release/winroute.dll + - from: ../windows/winroute/bin/x64-Release/winroute.dll to: . - - from: ../../../dist-assets/binaries/windows/openvpn.exe + - from: ../dist-assets/binaries/windows/openvpn.exe to: . - - from: ../../../dist-assets/binaries/windows/sslocal.exe + - from: ../dist-assets/binaries/windows/sslocal.exe to: . linux: @@ -105,41 +105,41 @@ linux: artifactName: MullvadVPN-${version}_${arch}.${ext} category: Network extraResources: - - from: ../../../dist-assets/problem-report + - from: ../dist-assets/problem-report to: . - - from: ../../../dist-assets/mullvad-daemon + - from: ../dist-assets/mullvad-daemon to: . - - from: ../../../dist-assets/libtalpid_openvpn_plugin.so + - from: ../dist-assets/libtalpid_openvpn_plugin.so to: . - - from: ../../../dist-assets/binaries/linux/openvpn + - from: ../dist-assets/binaries/linux/openvpn to: . - - from: ../../../dist-assets/binaries/linux/sslocal + - from: ../dist-assets/binaries/linux/sslocal to: . - - from: ../../../dist-assets/linux/mullvad-daemon.conf + - from: ../dist-assets/linux/mullvad-daemon.conf to: . - - from: ../../../dist-assets/linux/mullvad-daemon.service + - from: ../dist-assets/linux/mullvad-daemon.service to: . deb: - fpm: ["--before-install", "../../../dist-assets/linux/before-install.sh", - "--before-remove", "../../../dist-assets/linux/before-remove.sh", + fpm: ["--before-install", "../dist-assets/linux/before-install.sh", + "--before-remove", "../dist-assets/linux/before-remove.sh", "--config-files", "/opt/Mullvad VPN/resources/mullvad-daemon.service", "--config-files", "/opt/Mullvad VPN/resources/mullvad-daemon.conf", - "../../../dist-assets/mullvad=/usr/bin/", + "../dist-assets/mullvad=/usr/bin/", ] - afterInstall: ../../../dist-assets/linux/after-install.sh - afterRemove: ../../../dist-assets/linux/after-remove.sh + afterInstall: ../dist-assets/linux/after-install.sh + afterRemove: ../dist-assets/linux/after-remove.sh rpm: - fpm: ["--before-install", "../../../dist-assets/linux/before-install.sh", - "--before-remove", "../../../dist-assets/linux/before-remove.sh", - "--rpm-posttrans", "../../../dist-assets/linux/post-transaction.sh", + fpm: ["--before-install", "../dist-assets/linux/before-install.sh", + "--before-remove", "../dist-assets/linux/before-remove.sh", + "--rpm-posttrans", "../dist-assets/linux/post-transaction.sh", "--config-files", "/opt/Mullvad VPN/resources/mullvad-daemon.service", "--config-files", "/opt/Mullvad VPN/resources/mullvad-daemon.conf", - "../../../dist-assets/mullvad=/usr/bin/", + "../dist-assets/mullvad=/usr/bin/", ] - afterInstall: ../../../dist-assets/linux/after-install.sh - afterRemove: ../../../dist-assets/linux/after-remove.sh + afterInstall: ../dist-assets/linux/after-install.sh + afterRemove: ../dist-assets/linux/after-remove.sh depends: - libXScrnSaver - libnotify diff --git a/gui/package.json b/gui/package.json index 232f8be258..b079df61c9 100644 --- a/gui/package.json +++ b/gui/package.json @@ -93,7 +93,7 @@ "pack:linux": "run-s build private:build:linux", "private:format": "prettier \"packages/**/*.{js,css,ts,tsx}\"", "private:build:mac": "yarn run private:build --mac", - "private:postbuild:mac": "rimraf ../../../dist/mac", + "private:postbuild:mac": "rimraf ../dist/mac", "private:build:win": "yarn run private:build --win", "private:build:linux": "yarn run private:build --linux", "private:build": "electron-builder", diff --git a/gui/scripts/serve.js b/gui/scripts/serve.js index e2b91813dc..7629628aa2 100644 --- a/gui/scripts/serve.js +++ b/gui/scripts/serve.js @@ -67,9 +67,7 @@ function startBrowserSync() { child.kill(); }); - bsync - .watch(['build/src/renderer/**/*', path.resolve('../components/build/**')]) - .on('change', bsync.reload); + bsync.watch(['build/src/renderer/**/*']).on('change', bsync.reload); }, ); } @@ -78,15 +76,8 @@ function prepareWatchArguments(projectPath) { return ['--noClear', '--sourceMap', '--project', projectPath]; } -const appWatcher = new TscWatchClient(); -const componentsWatcher = new TscWatchClient(); - -componentsWatcher.on('first_success', () => { - appWatcher.start(...prepareWatchArguments(path.resolve(__dirname, '..'))); -}); - -appWatcher.on('first_success', () => { +const watch = new TscWatchClient(); +watch.start(...prepareWatchArguments(path.resolve(__dirname, '..'))); +watch.on('first_success', () => { startBrowserSync(); }); - -componentsWatcher.start(...prepareWatchArguments(path.resolve(__dirname, '../../components'))); diff --git a/gui/src/main/proc.ts b/gui/src/main/proc.ts index b9c1bbe743..238c08c172 100644 --- a/gui/src/main/proc.ts +++ b/gui/src/main/proc.ts @@ -7,8 +7,7 @@ export function resolveBin(binaryName: string) { function getBasePath(): string { if (process.env.NODE_ENV === 'development') { return ( - process.env.MULLVAD_PATH || - path.resolve(path.join(__dirname, '../../../../../../target/debug')) + process.env.MULLVAD_PATH || path.resolve(path.join(__dirname, '../../../../target/debug')) ); } else { return process.resourcesPath!; diff --git a/gui/tsconfig.json b/gui/tsconfig.json index 6a6be45ae3..09250ee0be 100644 --- a/gui/tsconfig.json +++ b/gui/tsconfig.json @@ -17,7 +17,7 @@ "strict": true, "target": "es2017", "typeRoots": [ - "../../types", + "./types", "node_modules/@types" ] }, |
