mirror of
https://gitlab.com/vyla-entertainment/home.git
synced 2026-11-22 01:55:38 -05:00
Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| c89da8623c | |||
| a2010e9dc1 | |||
| 8a6c515601 | |||
| 8abcdf2c16 | |||
| 4e2e7c1e6f | |||
| 8678870c2d | |||
| 1be2aea1dd | |||
| c5909d656d |
4
main.js
4
main.js
@@ -276,14 +276,14 @@ async function start() {
|
|||||||
if (release && release.installer && process.platform === 'win32' && process.env.VYLA_DEV !== '1') {
|
if (release && release.installer && process.platform === 'win32' && process.env.VYLA_DEV !== '1') {
|
||||||
const appVersion = process.env.VYLA_APP_VERSION || '0.0.0';
|
const appVersion = process.env.VYLA_APP_VERSION || '0.0.0';
|
||||||
const tried = updateClient.readCache().selfUpdate || {};
|
const tried = updateClient.readCache().selfUpdate || {};
|
||||||
const recentlyTried = tried.version === release.installer.version && Date.now() - (tried.at || 0) < 24 * 60 * 60 * 1000;
|
const recentlyTried = tried.version === release.installer.version && Date.now() - (tried.at || 0) < 10 * 60 * 1000;
|
||||||
if (isNewer(release.installer.version, appVersion) && !recentlyTried) {
|
if (isNewer(release.installer.version, appVersion) && !recentlyTried) {
|
||||||
try {
|
try {
|
||||||
const dest = path.join(APPDATA_DIR, `vyla-installer-${normalizeVer(release.installer.version)}.exe`);
|
const dest = path.join(APPDATA_DIR, `vyla-installer-${normalizeVer(release.installer.version)}.exe`);
|
||||||
sendToTauri('status', { message: 'Downloading launcher update...' });
|
sendToTauri('status', { message: 'Downloading launcher update...' });
|
||||||
await downloadVerified('launcher', release.installer, dest);
|
await downloadVerified('launcher', release.installer, dest);
|
||||||
updateClient.writeCache({ selfUpdate: { version: release.installer.version, at: Date.now() } });
|
updateClient.writeCache({ selfUpdate: { version: release.installer.version, at: Date.now() } });
|
||||||
sendToTauri('status', { message: 'Installing launcher update...' });
|
sendToTauri('status', { message: 'Removing old version and installing the latest...' });
|
||||||
sendToTauri('self-update', { path: dest });
|
sendToTauri('self-update', { path: dest });
|
||||||
await sleep(30000);
|
await sleep(30000);
|
||||||
sendToTauri('notice', { message: 'Launcher update did not start. Continuing on the current version.' });
|
sendToTauri('notice', { message: 'Launcher update did not start. Continuing on the current version.' });
|
||||||
|
|||||||
465
package-lock.json
generated
465
package-lock.json
generated
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "vyla-home",
|
"name": "vyla-home",
|
||||||
"version": "1.1.56",
|
"version": "1.1.62",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "vyla-home",
|
"name": "vyla-home",
|
||||||
"version": "1.1.56",
|
"version": "1.1.62",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@tauri-apps/api": "2.12.1",
|
"@tauri-apps/api": "2.12.1",
|
||||||
"@tauri-apps/plugin-opener": "2.7.0",
|
"@tauri-apps/plugin-opener": "2.7.0",
|
||||||
@@ -20,311 +20,6 @@
|
|||||||
"@tauri-apps/cli": "2.12.1"
|
"@tauri-apps/cli": "2.12.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@napi-rs/nice": {
|
|
||||||
"version": "1.1.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/@napi-rs/nice/-/nice-1.1.1.tgz",
|
|
||||||
"integrity": "sha512-xJIPs+bYuc9ASBl+cvGsKbGrJmS6fAKaSZCnT0lhahT5rhA2VVy9/EcIgd2JhtEuFOJNx7UHNn/qiTPTY4nrQw==",
|
|
||||||
"license": "MIT",
|
|
||||||
"optional": true,
|
|
||||||
"engines": {
|
|
||||||
"node": ">= 10"
|
|
||||||
},
|
|
||||||
"funding": {
|
|
||||||
"type": "github",
|
|
||||||
"url": "https://github.com/sponsors/Brooooooklyn"
|
|
||||||
},
|
|
||||||
"optionalDependencies": {
|
|
||||||
"@napi-rs/nice-android-arm-eabi": "1.1.1",
|
|
||||||
"@napi-rs/nice-android-arm64": "1.1.1",
|
|
||||||
"@napi-rs/nice-darwin-arm64": "1.1.1",
|
|
||||||
"@napi-rs/nice-darwin-x64": "1.1.1",
|
|
||||||
"@napi-rs/nice-freebsd-x64": "1.1.1",
|
|
||||||
"@napi-rs/nice-linux-arm-gnueabihf": "1.1.1",
|
|
||||||
"@napi-rs/nice-linux-arm64-gnu": "1.1.1",
|
|
||||||
"@napi-rs/nice-linux-arm64-musl": "1.1.1",
|
|
||||||
"@napi-rs/nice-linux-ppc64-gnu": "1.1.1",
|
|
||||||
"@napi-rs/nice-linux-riscv64-gnu": "1.1.1",
|
|
||||||
"@napi-rs/nice-linux-s390x-gnu": "1.1.1",
|
|
||||||
"@napi-rs/nice-linux-x64-gnu": "1.1.1",
|
|
||||||
"@napi-rs/nice-linux-x64-musl": "1.1.1",
|
|
||||||
"@napi-rs/nice-openharmony-arm64": "1.1.1",
|
|
||||||
"@napi-rs/nice-win32-arm64-msvc": "1.1.1",
|
|
||||||
"@napi-rs/nice-win32-ia32-msvc": "1.1.1",
|
|
||||||
"@napi-rs/nice-win32-x64-msvc": "1.1.1"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@napi-rs/nice-android-arm-eabi": {
|
|
||||||
"version": "1.1.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/@napi-rs/nice-android-arm-eabi/-/nice-android-arm-eabi-1.1.1.tgz",
|
|
||||||
"integrity": "sha512-kjirL3N6TnRPv5iuHw36wnucNqXAO46dzK9oPb0wj076R5Xm8PfUVA9nAFB5ZNMmfJQJVKACAPd/Z2KYMppthw==",
|
|
||||||
"cpu": [
|
|
||||||
"arm"
|
|
||||||
],
|
|
||||||
"license": "MIT",
|
|
||||||
"optional": true,
|
|
||||||
"os": [
|
|
||||||
"android"
|
|
||||||
],
|
|
||||||
"engines": {
|
|
||||||
"node": ">= 10"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@napi-rs/nice-android-arm64": {
|
|
||||||
"version": "1.1.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/@napi-rs/nice-android-arm64/-/nice-android-arm64-1.1.1.tgz",
|
|
||||||
"integrity": "sha512-blG0i7dXgbInN5urONoUCNf+DUEAavRffrO7fZSeoRMJc5qD+BJeNcpr54msPF6qfDD6kzs9AQJogZvT2KD5nw==",
|
|
||||||
"cpu": [
|
|
||||||
"arm64"
|
|
||||||
],
|
|
||||||
"license": "MIT",
|
|
||||||
"optional": true,
|
|
||||||
"os": [
|
|
||||||
"android"
|
|
||||||
],
|
|
||||||
"engines": {
|
|
||||||
"node": ">= 10"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@napi-rs/nice-darwin-arm64": {
|
|
||||||
"version": "1.1.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/@napi-rs/nice-darwin-arm64/-/nice-darwin-arm64-1.1.1.tgz",
|
|
||||||
"integrity": "sha512-s/E7w45NaLqTGuOjC2p96pct4jRfo61xb9bU1unM/MJ/RFkKlJyJDx7OJI/O0ll/hrfpqKopuAFDV8yo0hfT7A==",
|
|
||||||
"cpu": [
|
|
||||||
"arm64"
|
|
||||||
],
|
|
||||||
"license": "MIT",
|
|
||||||
"optional": true,
|
|
||||||
"os": [
|
|
||||||
"darwin"
|
|
||||||
],
|
|
||||||
"engines": {
|
|
||||||
"node": ">= 10"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@napi-rs/nice-darwin-x64": {
|
|
||||||
"version": "1.1.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/@napi-rs/nice-darwin-x64/-/nice-darwin-x64-1.1.1.tgz",
|
|
||||||
"integrity": "sha512-dGoEBnVpsdcC+oHHmW1LRK5eiyzLwdgNQq3BmZIav+9/5WTZwBYX7r5ZkQC07Nxd3KHOCkgbHSh4wPkH1N1LiQ==",
|
|
||||||
"cpu": [
|
|
||||||
"x64"
|
|
||||||
],
|
|
||||||
"license": "MIT",
|
|
||||||
"optional": true,
|
|
||||||
"os": [
|
|
||||||
"darwin"
|
|
||||||
],
|
|
||||||
"engines": {
|
|
||||||
"node": ">= 10"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@napi-rs/nice-freebsd-x64": {
|
|
||||||
"version": "1.1.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/@napi-rs/nice-freebsd-x64/-/nice-freebsd-x64-1.1.1.tgz",
|
|
||||||
"integrity": "sha512-kHv4kEHAylMYmlNwcQcDtXjklYp4FCf0b05E+0h6nDHsZ+F0bDe04U/tXNOqrx5CmIAth4vwfkjjUmp4c4JktQ==",
|
|
||||||
"cpu": [
|
|
||||||
"x64"
|
|
||||||
],
|
|
||||||
"license": "MIT",
|
|
||||||
"optional": true,
|
|
||||||
"os": [
|
|
||||||
"freebsd"
|
|
||||||
],
|
|
||||||
"engines": {
|
|
||||||
"node": ">= 10"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@napi-rs/nice-linux-arm-gnueabihf": {
|
|
||||||
"version": "1.1.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/@napi-rs/nice-linux-arm-gnueabihf/-/nice-linux-arm-gnueabihf-1.1.1.tgz",
|
|
||||||
"integrity": "sha512-E1t7K0efyKXZDoZg1LzCOLxgolxV58HCkaEkEvIYQx12ht2pa8hoBo+4OB3qh7e+QiBlp1SRf+voWUZFxyhyqg==",
|
|
||||||
"cpu": [
|
|
||||||
"arm"
|
|
||||||
],
|
|
||||||
"license": "MIT",
|
|
||||||
"optional": true,
|
|
||||||
"os": [
|
|
||||||
"linux"
|
|
||||||
],
|
|
||||||
"engines": {
|
|
||||||
"node": ">= 10"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@napi-rs/nice-linux-arm64-gnu": {
|
|
||||||
"version": "1.1.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/@napi-rs/nice-linux-arm64-gnu/-/nice-linux-arm64-gnu-1.1.1.tgz",
|
|
||||||
"integrity": "sha512-CIKLA12DTIZlmTaaKhQP88R3Xao+gyJxNWEn04wZwC2wmRapNnxCUZkVwggInMJvtVElA+D4ZzOU5sX4jV+SmQ==",
|
|
||||||
"cpu": [
|
|
||||||
"arm64"
|
|
||||||
],
|
|
||||||
"license": "MIT",
|
|
||||||
"optional": true,
|
|
||||||
"os": [
|
|
||||||
"linux"
|
|
||||||
],
|
|
||||||
"engines": {
|
|
||||||
"node": ">= 10"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@napi-rs/nice-linux-arm64-musl": {
|
|
||||||
"version": "1.1.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/@napi-rs/nice-linux-arm64-musl/-/nice-linux-arm64-musl-1.1.1.tgz",
|
|
||||||
"integrity": "sha512-+2Rzdb3nTIYZ0YJF43qf2twhqOCkiSrHx2Pg6DJaCPYhhaxbLcdlV8hCRMHghQ+EtZQWGNcS2xF4KxBhSGeutg==",
|
|
||||||
"cpu": [
|
|
||||||
"arm64"
|
|
||||||
],
|
|
||||||
"license": "MIT",
|
|
||||||
"optional": true,
|
|
||||||
"os": [
|
|
||||||
"linux"
|
|
||||||
],
|
|
||||||
"engines": {
|
|
||||||
"node": ">= 10"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@napi-rs/nice-linux-ppc64-gnu": {
|
|
||||||
"version": "1.1.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/@napi-rs/nice-linux-ppc64-gnu/-/nice-linux-ppc64-gnu-1.1.1.tgz",
|
|
||||||
"integrity": "sha512-4FS8oc0GeHpwvv4tKciKkw3Y4jKsL7FRhaOeiPei0X9T4Jd619wHNe4xCLmN2EMgZoeGg+Q7GY7BsvwKpL22Tg==",
|
|
||||||
"cpu": [
|
|
||||||
"ppc64"
|
|
||||||
],
|
|
||||||
"license": "MIT",
|
|
||||||
"optional": true,
|
|
||||||
"os": [
|
|
||||||
"linux"
|
|
||||||
],
|
|
||||||
"engines": {
|
|
||||||
"node": ">= 10"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@napi-rs/nice-linux-riscv64-gnu": {
|
|
||||||
"version": "1.1.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/@napi-rs/nice-linux-riscv64-gnu/-/nice-linux-riscv64-gnu-1.1.1.tgz",
|
|
||||||
"integrity": "sha512-HU0nw9uD4FO/oGCCk409tCi5IzIZpH2agE6nN4fqpwVlCn5BOq0MS1dXGjXaG17JaAvrlpV5ZeyZwSon10XOXw==",
|
|
||||||
"cpu": [
|
|
||||||
"riscv64"
|
|
||||||
],
|
|
||||||
"license": "MIT",
|
|
||||||
"optional": true,
|
|
||||||
"os": [
|
|
||||||
"linux"
|
|
||||||
],
|
|
||||||
"engines": {
|
|
||||||
"node": ">= 10"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@napi-rs/nice-linux-s390x-gnu": {
|
|
||||||
"version": "1.1.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/@napi-rs/nice-linux-s390x-gnu/-/nice-linux-s390x-gnu-1.1.1.tgz",
|
|
||||||
"integrity": "sha512-2YqKJWWl24EwrX0DzCQgPLKQBxYDdBxOHot1KWEq7aY2uYeX+Uvtv4I8xFVVygJDgf6/92h9N3Y43WPx8+PAgQ==",
|
|
||||||
"cpu": [
|
|
||||||
"s390x"
|
|
||||||
],
|
|
||||||
"license": "MIT",
|
|
||||||
"optional": true,
|
|
||||||
"os": [
|
|
||||||
"linux"
|
|
||||||
],
|
|
||||||
"engines": {
|
|
||||||
"node": ">= 10"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@napi-rs/nice-linux-x64-gnu": {
|
|
||||||
"version": "1.1.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/@napi-rs/nice-linux-x64-gnu/-/nice-linux-x64-gnu-1.1.1.tgz",
|
|
||||||
"integrity": "sha512-/gaNz3R92t+dcrfCw/96pDopcmec7oCcAQ3l/M+Zxr82KT4DljD37CpgrnXV+pJC263JkW572pdbP3hP+KjcIg==",
|
|
||||||
"cpu": [
|
|
||||||
"x64"
|
|
||||||
],
|
|
||||||
"license": "MIT",
|
|
||||||
"optional": true,
|
|
||||||
"os": [
|
|
||||||
"linux"
|
|
||||||
],
|
|
||||||
"engines": {
|
|
||||||
"node": ">= 10"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@napi-rs/nice-linux-x64-musl": {
|
|
||||||
"version": "1.1.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/@napi-rs/nice-linux-x64-musl/-/nice-linux-x64-musl-1.1.1.tgz",
|
|
||||||
"integrity": "sha512-xScCGnyj/oppsNPMnevsBe3pvNaoK7FGvMjT35riz9YdhB2WtTG47ZlbxtOLpjeO9SqqQ2J2igCmz6IJOD5JYw==",
|
|
||||||
"cpu": [
|
|
||||||
"x64"
|
|
||||||
],
|
|
||||||
"license": "MIT",
|
|
||||||
"optional": true,
|
|
||||||
"os": [
|
|
||||||
"linux"
|
|
||||||
],
|
|
||||||
"engines": {
|
|
||||||
"node": ">= 10"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@napi-rs/nice-openharmony-arm64": {
|
|
||||||
"version": "1.1.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/@napi-rs/nice-openharmony-arm64/-/nice-openharmony-arm64-1.1.1.tgz",
|
|
||||||
"integrity": "sha512-6uJPRVwVCLDeoOaNyeiW0gp2kFIM4r7PL2MczdZQHkFi9gVlgm+Vn+V6nTWRcu856mJ2WjYJiumEajfSm7arPQ==",
|
|
||||||
"cpu": [
|
|
||||||
"arm64"
|
|
||||||
],
|
|
||||||
"license": "MIT",
|
|
||||||
"optional": true,
|
|
||||||
"os": [
|
|
||||||
"openharmony"
|
|
||||||
],
|
|
||||||
"engines": {
|
|
||||||
"node": ">= 10"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@napi-rs/nice-win32-arm64-msvc": {
|
|
||||||
"version": "1.1.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/@napi-rs/nice-win32-arm64-msvc/-/nice-win32-arm64-msvc-1.1.1.tgz",
|
|
||||||
"integrity": "sha512-uoTb4eAvM5B2aj/z8j+Nv8OttPf2m+HVx3UjA5jcFxASvNhQriyCQF1OB1lHL43ZhW+VwZlgvjmP5qF3+59atA==",
|
|
||||||
"cpu": [
|
|
||||||
"arm64"
|
|
||||||
],
|
|
||||||
"license": "MIT",
|
|
||||||
"optional": true,
|
|
||||||
"os": [
|
|
||||||
"win32"
|
|
||||||
],
|
|
||||||
"engines": {
|
|
||||||
"node": ">= 10"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@napi-rs/nice-win32-ia32-msvc": {
|
|
||||||
"version": "1.1.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/@napi-rs/nice-win32-ia32-msvc/-/nice-win32-ia32-msvc-1.1.1.tgz",
|
|
||||||
"integrity": "sha512-CNQqlQT9MwuCsg1Vd/oKXiuH+TcsSPJmlAFc5frFyX/KkOh0UpBLEj7aoY656d5UKZQMQFP7vJNa1DNUNORvug==",
|
|
||||||
"cpu": [
|
|
||||||
"ia32"
|
|
||||||
],
|
|
||||||
"license": "MIT",
|
|
||||||
"optional": true,
|
|
||||||
"os": [
|
|
||||||
"win32"
|
|
||||||
],
|
|
||||||
"engines": {
|
|
||||||
"node": ">= 10"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@napi-rs/nice-win32-x64-msvc": {
|
|
||||||
"version": "1.1.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/@napi-rs/nice-win32-x64-msvc/-/nice-win32-x64-msvc-1.1.1.tgz",
|
|
||||||
"integrity": "sha512-vB+4G/jBQCAh0jelMTY3+kgFy00Hlx2f2/1zjMoH821IbplbWZOkLiTYXQkygNTzQJTq5cvwBDgn2ppHD+bglQ==",
|
|
||||||
"cpu": [
|
|
||||||
"x64"
|
|
||||||
],
|
|
||||||
"license": "MIT",
|
|
||||||
"optional": true,
|
|
||||||
"os": [
|
|
||||||
"win32"
|
|
||||||
],
|
|
||||||
"engines": {
|
|
||||||
"node": ">= 10"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@tauri-apps/api": {
|
"node_modules/@tauri-apps/api": {
|
||||||
"version": "2.12.1",
|
"version": "2.12.1",
|
||||||
"resolved": "https://registry.npmjs.org/@tauri-apps/api/-/api-2.12.1.tgz",
|
"resolved": "https://registry.npmjs.org/@tauri-apps/api/-/api-2.12.1.tgz",
|
||||||
@@ -580,12 +275,12 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@vyla-entertainment/sdk": {
|
"node_modules/@vyla-entertainment/sdk": {
|
||||||
"version": "1.20.0",
|
"version": "1.33.0",
|
||||||
"resolved": "https://registry.npmjs.org/@vyla-entertainment/sdk/-/sdk-1.20.0.tgz",
|
"resolved": "https://registry.npmjs.org/@vyla-entertainment/sdk/-/sdk-1.33.0.tgz",
|
||||||
"integrity": "sha512-jJeA/a67bw5tiRE4qAeWdkeSGPVsyKM7n2FcL+OX+D9ovUHMgatVLzsiMNOZ9SWDD+K8b7HgyTuTw79g71IT0g==",
|
"integrity": "sha512-gm6p3jtXcKxzc4fUyGvtx19XRJm79clXJPBngQn9iCI/mdoZX9dDZ04nulTE3sECe3XE0MZigSouPsk/Wez57Q==",
|
||||||
"license": "CC-BY-NC-4.0",
|
"license": "CC-BY-NC-4.0",
|
||||||
"dependencies": {
|
"engines": {
|
||||||
"node-tls-client": "^2.1.0"
|
"node": ">=18.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/accepts": {
|
"node_modules/accepts": {
|
||||||
@@ -708,25 +403,6 @@
|
|||||||
"node": ">= 0.6"
|
"node": ">= 0.6"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/cookie-parser": {
|
|
||||||
"version": "1.4.7",
|
|
||||||
"resolved": "https://registry.npmjs.org/cookie-parser/-/cookie-parser-1.4.7.tgz",
|
|
||||||
"integrity": "sha512-nGUvgXnotP3BsjiLX2ypbQnWoGUPIIfHQNZkkC668ntrzGWEZVW70HDEB1qnNGMicPje6EttlIgzo51YSwNQGw==",
|
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
|
||||||
"cookie": "0.7.2",
|
|
||||||
"cookie-signature": "1.0.6"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">= 0.8.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/cookie-parser/node_modules/cookie-signature": {
|
|
||||||
"version": "1.0.6",
|
|
||||||
"resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz",
|
|
||||||
"integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==",
|
|
||||||
"license": "MIT"
|
|
||||||
},
|
|
||||||
"node_modules/cookie-signature": {
|
"node_modules/cookie-signature": {
|
||||||
"version": "1.0.7",
|
"version": "1.0.7",
|
||||||
"resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.7.tgz",
|
"resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.7.tgz",
|
||||||
@@ -782,12 +458,16 @@
|
|||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
"node_modules/encodeurl": {
|
"node_modules/encodeurl": {
|
||||||
"version": "2.0.0",
|
"version": "2.0.3",
|
||||||
"resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-2.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-2.0.3.tgz",
|
||||||
"integrity": "sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==",
|
"integrity": "sha512-mIteYONiEfc4xWf2F1WXovh1c8npzS00vNeiUPdwFF+QlVJni+gNvpQltLMQhob8rew/bWWc/bGTuUr0EUGt0w==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">= 0.8"
|
"node": ">= 0.8"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"type": "opencollective",
|
||||||
|
"url": "https://opencollective.com/express"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/es-define-property": {
|
"node_modules/es-define-property": {
|
||||||
@@ -1046,16 +726,6 @@
|
|||||||
"node": ">= 0.10"
|
"node": ">= 0.10"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/koffi": {
|
|
||||||
"version": "2.16.3",
|
|
||||||
"resolved": "https://registry.npmjs.org/koffi/-/koffi-2.16.3.tgz",
|
|
||||||
"integrity": "sha512-E9y1AsgYGlaxMhcZzHr8y96QF2U5XzA12GGVAfbWqIubTwPNMXQarfBzePNXHe0xtIEtNd6ifAv3GAKYGUeBAQ==",
|
|
||||||
"hasInstallScript": true,
|
|
||||||
"license": "MIT",
|
|
||||||
"funding": {
|
|
||||||
"url": "https://liberapay.com/Koromix"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/math-intrinsics": {
|
"node_modules/math-intrinsics": {
|
||||||
"version": "1.1.0",
|
"version": "1.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz",
|
||||||
@@ -1140,22 +810,10 @@
|
|||||||
"node": ">= 0.6"
|
"node": ">= 0.6"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/node-tls-client": {
|
|
||||||
"version": "2.1.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/node-tls-client/-/node-tls-client-2.1.0.tgz",
|
|
||||||
"integrity": "sha512-b1Y2WFdQ7BJXa5CT6qRafCFeaNiTsZP+UFqNy+8hrHExlPHe3ccEtFkKt3WDGzGIfNvb4Ws9EEQmzFS9Jztisg==",
|
|
||||||
"license": "GPL-3.0",
|
|
||||||
"dependencies": {
|
|
||||||
"cookie-parser": "^1.4.7",
|
|
||||||
"koffi": "^2.8.9",
|
|
||||||
"piscina": "^5.1.1",
|
|
||||||
"tough-cookie": "^4.1.4"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/object-inspect": {
|
"node_modules/object-inspect": {
|
||||||
"version": "1.13.4",
|
"version": "1.14.0",
|
||||||
"resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.4.tgz",
|
"resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.14.0.tgz",
|
||||||
"integrity": "sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew==",
|
"integrity": "sha512-IVgHNlp/jwQX271+Xzoq9LZNTWXxZK+cEOrGBOBxXNbn7fapnZ+Ts6TVMgNOuAezwG2wdtnMX97tTPK6VEnuOQ==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">= 0.4"
|
"node": ">= 0.4"
|
||||||
@@ -1165,15 +823,19 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/on-finished": {
|
"node_modules/on-finished": {
|
||||||
"version": "2.4.1",
|
"version": "2.4.2",
|
||||||
"resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz",
|
"resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.2.tgz",
|
||||||
"integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==",
|
"integrity": "sha512-ATWUv387i+nLD49EiDoOft5scf32Vsdz3ktrQJG9bi7jRFmaXTssvyvj1EmeKVVgvesbqUtvQQvaS2TpTukAZQ==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"ee-first": "1.1.1"
|
"ee-first": "1.1.1"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">= 0.8"
|
"node": ">= 0.8"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"type": "opencollective",
|
||||||
|
"url": "https://opencollective.com/express"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/parseurl": {
|
"node_modules/parseurl": {
|
||||||
@@ -1191,18 +853,6 @@
|
|||||||
"integrity": "sha512-A/AGNMFN3c8bOlvV9RreMdrv7jsmF9XIfDeCd87+I8RNg6s78BhJxMu69NEMHBSJFxKidViTEdruRwEk/WIKqA==",
|
"integrity": "sha512-A/AGNMFN3c8bOlvV9RreMdrv7jsmF9XIfDeCd87+I8RNg6s78BhJxMu69NEMHBSJFxKidViTEdruRwEk/WIKqA==",
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
"node_modules/piscina": {
|
|
||||||
"version": "5.3.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/piscina/-/piscina-5.3.2.tgz",
|
|
||||||
"integrity": "sha512-vv7l/mM7B9WgrhDaudIqv1x6v4LOBRYYmpWGdWushhpbCmVHp11sUB2v4hj1CAeTGXVxuZFz6xOU1RalAiPKfQ==",
|
|
||||||
"license": "MIT",
|
|
||||||
"engines": {
|
|
||||||
"node": ">=20.x"
|
|
||||||
},
|
|
||||||
"optionalDependencies": {
|
|
||||||
"@napi-rs/nice": "^1.0.4"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/proxy-addr": {
|
"node_modules/proxy-addr": {
|
||||||
"version": "2.0.8",
|
"version": "2.0.8",
|
||||||
"resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.8.tgz",
|
"resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.8.tgz",
|
||||||
@@ -1220,27 +870,6 @@
|
|||||||
"url": "https://opencollective.com/express"
|
"url": "https://opencollective.com/express"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/psl": {
|
|
||||||
"version": "1.15.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/psl/-/psl-1.15.0.tgz",
|
|
||||||
"integrity": "sha512-JZd3gMVBAVQkSs6HdNZo9Sdo0LNcQeMNP3CozBJb3JYC/QUYZTnKxP+f8oWRX4rHP5EurWxqAHTSwUCjlNKa1w==",
|
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
|
||||||
"punycode": "^2.3.1"
|
|
||||||
},
|
|
||||||
"funding": {
|
|
||||||
"url": "https://github.com/sponsors/lupomontero"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/punycode": {
|
|
||||||
"version": "2.3.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz",
|
|
||||||
"integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==",
|
|
||||||
"license": "MIT",
|
|
||||||
"engines": {
|
|
||||||
"node": ">=6"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/qs": {
|
"node_modules/qs": {
|
||||||
"version": "6.16.2",
|
"version": "6.16.2",
|
||||||
"resolved": "https://registry.npmjs.org/qs/-/qs-6.16.2.tgz",
|
"resolved": "https://registry.npmjs.org/qs/-/qs-6.16.2.tgz",
|
||||||
@@ -1257,12 +886,6 @@
|
|||||||
"url": "https://github.com/sponsors/ljharb"
|
"url": "https://github.com/sponsors/ljharb"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/querystringify": {
|
|
||||||
"version": "2.2.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.2.0.tgz",
|
|
||||||
"integrity": "sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==",
|
|
||||||
"license": "MIT"
|
|
||||||
},
|
|
||||||
"node_modules/range-parser": {
|
"node_modules/range-parser": {
|
||||||
"version": "1.2.1",
|
"version": "1.2.1",
|
||||||
"resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz",
|
"resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz",
|
||||||
@@ -1287,12 +910,6 @@
|
|||||||
"node": ">= 0.8"
|
"node": ">= 0.8"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/requires-port": {
|
|
||||||
"version": "1.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz",
|
|
||||||
"integrity": "sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==",
|
|
||||||
"license": "MIT"
|
|
||||||
},
|
|
||||||
"node_modules/safe-buffer": {
|
"node_modules/safe-buffer": {
|
||||||
"version": "5.2.1",
|
"version": "5.2.1",
|
||||||
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
|
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
|
||||||
@@ -1460,21 +1077,6 @@
|
|||||||
"node": ">=0.6"
|
"node": ">=0.6"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/tough-cookie": {
|
|
||||||
"version": "4.1.4",
|
|
||||||
"resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.1.4.tgz",
|
|
||||||
"integrity": "sha512-Loo5UUvLD9ScZ6jh8beX1T6sO1w2/MpCRpEP7V280GKMVUQ0Jzar2U3UJPsrdbziLEMMhu3Ujnq//rhiFuIeag==",
|
|
||||||
"license": "BSD-3-Clause",
|
|
||||||
"dependencies": {
|
|
||||||
"psl": "^1.1.33",
|
|
||||||
"punycode": "^2.1.1",
|
|
||||||
"universalify": "^0.2.0",
|
|
||||||
"url-parse": "^1.5.3"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=6"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/type-is": {
|
"node_modules/type-is": {
|
||||||
"version": "1.6.18",
|
"version": "1.6.18",
|
||||||
"resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz",
|
"resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz",
|
||||||
@@ -1488,15 +1090,6 @@
|
|||||||
"node": ">= 0.6"
|
"node": ">= 0.6"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/universalify": {
|
|
||||||
"version": "0.2.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/universalify/-/universalify-0.2.0.tgz",
|
|
||||||
"integrity": "sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg==",
|
|
||||||
"license": "MIT",
|
|
||||||
"engines": {
|
|
||||||
"node": ">= 4.0.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/unpipe": {
|
"node_modules/unpipe": {
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz",
|
||||||
@@ -1506,16 +1099,6 @@
|
|||||||
"node": ">= 0.8"
|
"node": ">= 0.8"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/url-parse": {
|
|
||||||
"version": "1.5.10",
|
|
||||||
"resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.5.10.tgz",
|
|
||||||
"integrity": "sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ==",
|
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
|
||||||
"querystringify": "^2.1.1",
|
|
||||||
"requires-port": "^1.0.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/utils-merge": {
|
"node_modules/utils-merge": {
|
||||||
"version": "1.0.1",
|
"version": "1.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "vyla-home",
|
"name": "vyla-home",
|
||||||
"version": "1.1.58",
|
"version": "1.1.62",
|
||||||
"description": "Vyla Home Desktop App Launcher",
|
"description": "Vyla Home Desktop App Launcher",
|
||||||
"main": "main.js",
|
"main": "main.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
@@ -15,7 +15,7 @@
|
|||||||
"@tauri-apps/plugin-opener": "2.7.0",
|
"@tauri-apps/plugin-opener": "2.7.0",
|
||||||
"@tauri-apps/plugin-process": "2.4.0",
|
"@tauri-apps/plugin-process": "2.4.0",
|
||||||
"@tauri-apps/plugin-shell": "2.5.0",
|
"@tauri-apps/plugin-shell": "2.5.0",
|
||||||
"@vyla-entertainment/sdk": "^1.20.0",
|
"@vyla-entertainment/sdk": "latest",
|
||||||
"adm-zip": "^0.6.1",
|
"adm-zip": "^0.6.1",
|
||||||
"express": "^4.22.3"
|
"express": "^4.22.3"
|
||||||
},
|
},
|
||||||
|
|||||||
22
release.js
22
release.js
@@ -137,18 +137,22 @@ function createGitLabRelease(tag, releaseLinks) {
|
|||||||
console.log(`[CI Sync] Release ${tag} already exists. Appending our OS-specific files to it...`);
|
console.log(`[CI Sync] Release ${tag} already exists. Appending our OS-specific files to it...`);
|
||||||
let promiseChain = Promise.resolve();
|
let promiseChain = Promise.resolve();
|
||||||
|
|
||||||
|
const linksPath = `/api/v4/projects/${PROJECT_ID}/releases/${encodeURIComponent(tag)}/assets/links`;
|
||||||
|
const hasInstaller = releaseLinks.some((l) => l.link_type === 'package');
|
||||||
for (const link of releaseLinks) {
|
for (const link of releaseLinks) {
|
||||||
promiseChain = promiseChain.then(() => {
|
promiseChain = promiseChain.then(async () => {
|
||||||
return sendRequest('POST', `/api/v4/projects/${PROJECT_ID}/releases/${encodeURIComponent(tag)}/assets/links`, {
|
const current = await sendRequest('GET', linksPath);
|
||||||
|
const clash = (Array.isArray(current) ? current : []).find((l) => l.name === link.name);
|
||||||
|
if (clash && link.name === 'manifest.json' && hasInstaller) {
|
||||||
|
await sendRequest('DELETE', `${linksPath}/${clash.id}`);
|
||||||
|
} else if (clash) {
|
||||||
|
console.log(`[CI Sync] Asset link '${link.name}' is already attached. Skipping.`);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
await sendRequest('POST', linksPath, {
|
||||||
name: link.name,
|
name: link.name,
|
||||||
url: link.url,
|
url: link.url,
|
||||||
link_type: link.link_type
|
link_type: link.link_type
|
||||||
}).catch(e => {
|
|
||||||
if (e.message.includes('already been taken') || e.message.includes('HTTP 409') || e.message.includes('HTTP 400')) {
|
|
||||||
console.log(`[CI Sync] Asset link '${link.name}' is already attached. Skipping.`);
|
|
||||||
return Promise.resolve();
|
|
||||||
}
|
|
||||||
throw e;
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -161,7 +165,7 @@ function createGitLabRelease(tag, releaseLinks) {
|
|||||||
function injectDiscordConfig() {
|
function injectDiscordConfig() {
|
||||||
const envPath = path.join(__dirname, 'config', 'env.json');
|
const envPath = path.join(__dirname, 'config', 'env.json');
|
||||||
const cfg = fs.existsSync(envPath) ? JSON.parse(fs.readFileSync(envPath, 'utf8')) : {};
|
const cfg = fs.existsSync(envPath) ? JSON.parse(fs.readFileSync(envPath, 'utf8')) : {};
|
||||||
const tmdb = process.env.TMDB_API_KEY || process.env.TMDB_KEY || '';
|
const tmdb = process.env.TMDB_API_KEY || process.env.TMDB_KEY || '3f6703f3e2a0b2b40fe4fbb3e1546244';
|
||||||
const clientId = process.env.DISCORD_CLIENT_ID || '';
|
const clientId = process.env.DISCORD_CLIENT_ID || '';
|
||||||
|
|
||||||
cfg.discord = cfg.discord || {};
|
cfg.discord = cfg.discord || {};
|
||||||
|
|||||||
2
src-tauri/Cargo.lock
generated
2
src-tauri/Cargo.lock
generated
@@ -4073,7 +4073,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "vyla-home"
|
name = "vyla-home"
|
||||||
version = "1.1.58"
|
version = "1.1.62"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"libc",
|
"libc",
|
||||||
"objc2 0.5.2",
|
"objc2 0.5.2",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "vyla-home"
|
name = "vyla-home"
|
||||||
version = "1.1.58"
|
version = "1.1.62"
|
||||||
description = "Vyla Home Desktop App Launcher"
|
description = "Vyla Home Desktop App Launcher"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
||||||
|
|||||||
@@ -564,6 +564,87 @@ const LINK_HANDLER_SCRIPT: &str = r##"
|
|||||||
})();
|
})();
|
||||||
"##;
|
"##;
|
||||||
|
|
||||||
|
#[cfg(windows)]
|
||||||
|
const REINSTALL_SCRIPT: &str = r##"
|
||||||
|
param([int]$ProcId,[string]$Installer,[string]$InstallDir,[string]$ExePath)
|
||||||
|
$ErrorActionPreference = 'SilentlyContinue'
|
||||||
|
function Log($m) { Add-Content -LiteralPath (Join-Path $env:TEMP 'vyla-reinstall.log') -Value "$(Get-Date -Format s) $m" }
|
||||||
|
Log "start pid=$ProcId installer=$Installer dir=$InstallDir exe=$ExePath"
|
||||||
|
$setup = Join-Path $env:TEMP 'vyla-setup.exe'
|
||||||
|
Copy-Item -LiteralPath $Installer -Destination $setup -Force
|
||||||
|
if (-not (Test-Path -LiteralPath $setup)) { exit 1 }
|
||||||
|
Wait-Process -Id $ProcId -Timeout 30
|
||||||
|
Get-Process | Where-Object { $_.Path -and $_.Path.StartsWith($InstallDir, [System.StringComparison]::OrdinalIgnoreCase) } | Stop-Process -Force
|
||||||
|
Start-Sleep -Seconds 2
|
||||||
|
$un = Join-Path $InstallDir 'uninstall.exe'
|
||||||
|
if (Test-Path -LiteralPath $un) {
|
||||||
|
Start-Process -FilePath $un -ArgumentList '/S', "_?=$InstallDir" -Wait
|
||||||
|
}
|
||||||
|
$targets = @($InstallDir, "$env:APPDATA\vyla-home", "$env:APPDATA\com.vyla.home", "$env:LOCALAPPDATA\com.vyla.home", "$env:LOCALAPPDATA\vyla-home")
|
||||||
|
foreach ($t in $targets) {
|
||||||
|
for ($i = 0; $i -lt 5; $i++) {
|
||||||
|
if (-not (Test-Path -LiteralPath $t)) { break }
|
||||||
|
Remove-Item -LiteralPath $t -Recurse -Force
|
||||||
|
if (Test-Path -LiteralPath $t) { Start-Sleep -Seconds 1 }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Log "uninstall and cleanup done, installing"
|
||||||
|
Start-Process -FilePath $setup -ArgumentList '/S', "/D=$InstallDir" -Wait
|
||||||
|
Log "installer finished"
|
||||||
|
Remove-Item -LiteralPath $setup -Force
|
||||||
|
$target = $null
|
||||||
|
for ($i = 0; $i -lt 40; $i++) {
|
||||||
|
if (Test-Path -LiteralPath $ExePath) { $target = $ExePath; break }
|
||||||
|
$found = Get-ChildItem -LiteralPath $InstallDir -Filter '*.exe' | Where-Object { $_.Name -notmatch 'uninstall|node' } | Select-Object -First 1
|
||||||
|
if ($found) { $target = $found.FullName; break }
|
||||||
|
Start-Sleep -Milliseconds 500
|
||||||
|
}
|
||||||
|
Log "launch target: $target"
|
||||||
|
if ($target) {
|
||||||
|
Start-Process -FilePath $target -WorkingDirectory (Split-Path -Parent $target)
|
||||||
|
Start-Sleep -Seconds 4
|
||||||
|
if (-not (Get-Process | Where-Object { $_.Path -eq $target })) {
|
||||||
|
Log "not running, retrying via explorer"
|
||||||
|
Start-Process -FilePath 'explorer.exe' -ArgumentList "`"$target`""
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Log "done"
|
||||||
|
"##;
|
||||||
|
|
||||||
|
#[cfg(windows)]
|
||||||
|
fn run_clean_reinstall(installer: &std::path::Path) -> bool {
|
||||||
|
use std::os::windows::process::CommandExt;
|
||||||
|
let exe = match std::env::current_exe() {
|
||||||
|
Ok(e) => e,
|
||||||
|
Err(_) => return false,
|
||||||
|
};
|
||||||
|
let dir = match exe.parent() {
|
||||||
|
Some(d) => d.to_path_buf(),
|
||||||
|
None => return false,
|
||||||
|
};
|
||||||
|
if !dir.join("uninstall.exe").exists() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
let script = std::env::temp_dir().join("vyla-reinstall.ps1");
|
||||||
|
if std::fs::write(&script, REINSTALL_SCRIPT).is_err() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
Command::new("powershell")
|
||||||
|
.args(["-NoProfile", "-ExecutionPolicy", "Bypass", "-WindowStyle", "Hidden", "-File"])
|
||||||
|
.arg(&script)
|
||||||
|
.arg("-ProcId")
|
||||||
|
.arg(std::process::id().to_string())
|
||||||
|
.arg("-Installer")
|
||||||
|
.arg(installer)
|
||||||
|
.arg("-InstallDir")
|
||||||
|
.arg(clean_path(&dir))
|
||||||
|
.arg("-ExePath")
|
||||||
|
.arg(clean_path(&exe))
|
||||||
|
.creation_flags(0x08000000 | 0x00000200)
|
||||||
|
.spawn()
|
||||||
|
.is_ok()
|
||||||
|
}
|
||||||
|
|
||||||
#[tauri::command]
|
#[tauri::command]
|
||||||
fn win_minimize(window: tauri::Window) -> Result<(), String> {
|
fn win_minimize(window: tauri::Window) -> Result<(), String> {
|
||||||
window.minimize().map_err(|e| e.to_string())
|
window.minimize().map_err(|e| e.to_string())
|
||||||
@@ -949,21 +1030,18 @@ fn main() {
|
|||||||
&& name.ends_with(".exe")
|
&& name.ends_with(".exe")
|
||||||
&& p.exists()
|
&& p.exists()
|
||||||
{
|
{
|
||||||
let state: State<NodeServices> = w.state();
|
|
||||||
if let Ok(mut lock) = state.0.lock() {
|
|
||||||
if let Some(mut child) = lock.take() {
|
|
||||||
kill_child_process(&mut child);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
let mut installer = Command::new(&p);
|
|
||||||
installer.args(["/S", "/UPDATE"]);
|
|
||||||
#[cfg(windows)]
|
#[cfg(windows)]
|
||||||
{
|
{
|
||||||
use std::os::windows::process::CommandExt;
|
if run_clean_reinstall(&p) {
|
||||||
installer.creation_flags(0x00000008 | 0x00000200);
|
let state: State<NodeServices> = w.state();
|
||||||
|
if let Ok(mut lock) = state.0.lock() {
|
||||||
|
if let Some(mut child) = lock.take() {
|
||||||
|
kill_child_process(&mut child);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
w.app_handle().exit(0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
let _ = installer.spawn();
|
|
||||||
w.app_handle().exit(0);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"$schema": "https://schema.tauri.app/config/2",
|
"$schema": "https://schema.tauri.app/config/2",
|
||||||
"productName": "Vyla Home",
|
"productName": "Vyla Home",
|
||||||
"version": "1.1.58",
|
"version": "1.1.62",
|
||||||
"identifier": "com.vyla.home",
|
"identifier": "com.vyla.home",
|
||||||
"build": {
|
"build": {
|
||||||
"frontendDist": "../ui"
|
"frontendDist": "../ui"
|
||||||
|
|||||||
@@ -358,7 +358,8 @@ class UpdateClient {
|
|||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
};
|
};
|
||||||
const release = releases.slice().sort((a, b) => cmp(b.tag_name, a.tag_name))[0];
|
const ordered = releases.slice().sort((a, b) => cmp(b.tag_name, a.tag_name));
|
||||||
|
const release = ordered[0];
|
||||||
const links = release.assets && release.assets.links ? release.assets.links : [];
|
const links = release.assets && release.assets.links ? release.assets.links : [];
|
||||||
const manifestAsset = links.find((a) => a.name === 'manifest.json');
|
const manifestAsset = links.find((a) => a.name === 'manifest.json');
|
||||||
|
|
||||||
@@ -403,6 +404,10 @@ class UpdateClient {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!installer) {
|
||||||
|
installer = await this.findInstaller(ordered, release.tag_name);
|
||||||
|
}
|
||||||
|
|
||||||
const out = {
|
const out = {
|
||||||
version: release.tag_name,
|
version: release.tag_name,
|
||||||
sha256: manifest.sha256 || null,
|
sha256: manifest.sha256 || null,
|
||||||
@@ -414,6 +419,28 @@ class UpdateClient {
|
|||||||
return out;
|
return out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async findInstaller(ordered, skipTag) {
|
||||||
|
for (const r of ordered.slice(0, 6)) {
|
||||||
|
if (r.tag_name === skipTag) continue;
|
||||||
|
const rl = r.assets && r.assets.links ? r.assets.links : [];
|
||||||
|
const ma = rl.find((a) => a.name === 'manifest.json');
|
||||||
|
if (!ma) continue;
|
||||||
|
try {
|
||||||
|
const m = await this.fetchAssetJson(ma.url);
|
||||||
|
if (!m.installer || !verifyManifest(m)) continue;
|
||||||
|
const link = rl.find((a) => a.name === m.installer.file);
|
||||||
|
if (!link) continue;
|
||||||
|
return {
|
||||||
|
url: link.url,
|
||||||
|
sha256: m.installer.sha256,
|
||||||
|
size: m.installer.size,
|
||||||
|
version: m.installer.version
|
||||||
|
};
|
||||||
|
} catch (e) { }
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
async downloadUpdate(release, destPath, onProgress) {
|
async downloadUpdate(release, destPath, onProgress) {
|
||||||
await this.downloadFile(release.url, destPath, onProgress);
|
await this.downloadFile(release.url, destPath, onProgress);
|
||||||
return destPath;
|
return destPath;
|
||||||
|
|||||||
Reference in New Issue
Block a user