summaryrefslogtreecommitdiffhomepage
path: root/desktop
diff options
context:
space:
mode:
authorOskar <oskar@mullvad.net>2024-11-05 09:07:25 +0100
committerOskar <oskar@mullvad.net>2024-11-14 16:43:38 +0100
commitd40ddb0ecc2a41b41d1b96af277e8f34994ccaa8 (patch)
tree41d24919aa752f42cc8e44cac2a2268337d4c6d7 /desktop
parent56d5c5d9bc5064014c1afbecca7e2a67ccb6509e (diff)
downloadmullvadvpn-d40ddb0ecc2a41b41d1b96af277e8f34994ccaa8.tar.xz
mullvadvpn-d40ddb0ecc2a41b41d1b96af277e8f34994ccaa8.zip
Update script and code references to gui-directory
Diffstat (limited to 'desktop')
-rwxr-xr-xdesktop/packages/mullvad-vpn/scripts/build-proto.sh4
-rwxr-xr-xdesktop/packages/mullvad-vpn/scripts/build-test-executable.sh7
-rw-r--r--desktop/packages/mullvad-vpn/standalone-tests.pkg.json13
-rw-r--r--desktop/packages/mullvad-vpn/standalone-tests.ts2
-rw-r--r--desktop/packages/mullvad-vpn/tasks/assets.js2
-rw-r--r--desktop/packages/mullvad-vpn/tasks/distribution.js6
6 files changed, 12 insertions, 22 deletions
diff --git a/desktop/packages/mullvad-vpn/scripts/build-proto.sh b/desktop/packages/mullvad-vpn/scripts/build-proto.sh
index 8861eb5730..69023b72ce 100755
--- a/desktop/packages/mullvad-vpn/scripts/build-proto.sh
+++ b/desktop/packages/mullvad-vpn/scripts/build-proto.sh
@@ -8,8 +8,8 @@ cd "$SCRIPT_DIR"
ARCH="$(uname -m)"
PLATFORM="$(uname -s)"
MANAGEMENT_INTERFACE_PROTO_BUILD_DIR=${MANAGEMENT_INTERFACE_PROTO_BUILD_DIR:-}
-NODE_MODULES_DIR="$(cd ../node_modules/.bin && pwd)"
-PROTO_DIR="../../mullvad-management-interface/proto"
+NODE_MODULES_DIR="$(cd ../../../node_modules/.bin && pwd)"
+PROTO_DIR="../../../../mullvad-management-interface/proto"
PROTO_FILENAME="management_interface.proto"
DESTINATION_DIR="../build/src/main/management_interface"
TYPES_DESTINATION_DIR="../src/main/management_interface"
diff --git a/desktop/packages/mullvad-vpn/scripts/build-test-executable.sh b/desktop/packages/mullvad-vpn/scripts/build-test-executable.sh
index dd2758ebc3..9e79adf91b 100755
--- a/desktop/packages/mullvad-vpn/scripts/build-test-executable.sh
+++ b/desktop/packages/mullvad-vpn/scripts/build-test-executable.sh
@@ -15,6 +15,9 @@ ASSETS=(
"build/test/e2e/shared/*.js"
"build/test/e2e/installed/*.js"
"build/test/e2e/installed/**/*.js"
+)
+
+NODE_MODULES=(
"node_modules/.bin/playwright"
"node_modules/playwright"
"node_modules/playwright-core"
@@ -27,7 +30,7 @@ function build_test_executable {
local temp_dir
temp_dir="$(mktemp -d)"
local temp_executable="$temp_dir/temp-test-executable$bin_suffix"
- local output="../dist/app-e2e-tests-$PRODUCT_VERSION-$TARGET$bin_suffix"
+ local output="../../../dist/app-e2e-tests-$PRODUCT_VERSION-$TARGET$bin_suffix"
local node_copy_path="$temp_dir/node$bin_suffix"
local node_path
node_path="$(volta which node || which node)"
@@ -35,7 +38,7 @@ function build_test_executable {
# pack assets
cp "$node_path" "$node_copy_path"
# shellcheck disable=SC2068
- tar -czf ./build/test/assets.tar.gz ${ASSETS[@]}
+ tar -czf ./build/test/assets.tar.gz ${ASSETS[@]} -C ../../ ${NODE_MODULES[@]}
cp "$node_copy_path" "$temp_executable"
node --experimental-sea-config standalone-tests.sea.json
diff --git a/desktop/packages/mullvad-vpn/standalone-tests.pkg.json b/desktop/packages/mullvad-vpn/standalone-tests.pkg.json
deleted file mode 100644
index 8be6b53d5a..0000000000
--- a/desktop/packages/mullvad-vpn/standalone-tests.pkg.json
+++ /dev/null
@@ -1,13 +0,0 @@
-{
- "assets": [
- "build/src/config.json",
- "build/src/renderer/lib/routes.js",
- "build/test/e2e/utils.js",
- "build/test/e2e/shared/*.js",
- "build/test/e2e/installed/**/*.js",
- "node_modules/.bin/playwright",
- "node_modules/playwright",
- "node_modules/playwright-core",
- "node_modules/@playwright/test"
- ]
-}
diff --git a/desktop/packages/mullvad-vpn/standalone-tests.ts b/desktop/packages/mullvad-vpn/standalone-tests.ts
index 176711b1d5..ddba27fb6f 100644
--- a/desktop/packages/mullvad-vpn/standalone-tests.ts
+++ b/desktop/packages/mullvad-vpn/standalone-tests.ts
@@ -7,7 +7,7 @@ import path from 'path';
// This file is bundled into a standalone executable able to run e2e tests against an installed
// version of the app. This file is the entrypoint in the executable and extracts the required
-// assets and performs the tests. More info in /gui/README.md.
+// assets and performs the tests. More info in /desktop/packages/mullvad-vpn/README.md.
const tmpDir = path.join(os.tmpdir(), 'mullvad-standalone-tests');
diff --git a/desktop/packages/mullvad-vpn/tasks/assets.js b/desktop/packages/mullvad-vpn/tasks/assets.js
index 8028124180..686b969e70 100644
--- a/desktop/packages/mullvad-vpn/tasks/assets.js
+++ b/desktop/packages/mullvad-vpn/tasks/assets.js
@@ -21,7 +21,7 @@ function copyLocales() {
}
function copyGeoData() {
- return src('../dist-assets/geo/*.gl').pipe(dest('build/assets/geo'));
+ return src('../../../dist-assets/geo/*.gl').pipe(dest('build/assets/geo'));
}
copyStaticAssets.displayName = 'copy-static-assets';
diff --git a/desktop/packages/mullvad-vpn/tasks/distribution.js b/desktop/packages/mullvad-vpn/tasks/distribution.js
index dab7b9d9e7..c99be22fda 100644
--- a/desktop/packages/mullvad-vpn/tasks/distribution.js
+++ b/desktop/packages/mullvad-vpn/tasks/distribution.js
@@ -435,15 +435,15 @@ function packLinux() {
}
function buildAssets(relativePath) {
- return path.join(path.resolve(__dirname, '../../build'), relativePath);
+ return root(path.join('build', relativePath));
}
function distAssets(relativePath) {
- return path.join(path.resolve(__dirname, '../../dist-assets'), relativePath);
+ return root(path.join('dist-assets', relativePath));
}
function root(relativePath) {
- return path.join(path.resolve(__dirname, '../../'), relativePath);
+ return path.join(path.resolve(__dirname, '../../../../'), relativePath);
}
function getWindowsDistSubdir() {