Compare commits

..

5 Commits

7 changed files with 5196 additions and 29 deletions

Binary file not shown.

View File

@@ -1,12 +1,12 @@
{
"name": "vyla-home",
"version": "1.1.0",
"version": "1.1.3",
"description": "Vyla Home Desktop App Launcher",
"main": "main.js",
"scripts": {
"dev": "tauri dev",
"build:payload": "node build-pipeline.js",
"build": "node -e \"require('child_process').execSync('tauri build', {stdio:'inherit', env:Object.assign({}, process.env, {WEBVIEW2_STATIC_LIB:'1'})})\"",
"build": "tauri build",
"release": "node release.js",
"release:full": "node release.js --installer"
},
@@ -54,4 +54,4 @@
"installerHeaderIcon": "build/icon.ico"
}
}
}
}

View File

@@ -156,9 +156,13 @@ async function main() {
console.log('Ensuring bundled Node.js runtime...');
await ensureBundledNode();
console.log('Ensuring WebView2Loader.dll is present for packaging...');
await ensureWebView2Loader();
const bundleDir = path.join(__dirname, 'src-tauri', 'target', 'release', 'bundle');
if (fs.existsSync(bundleDir)) {
fs.rmSync(bundleDir, { recursive: true, force: true });
}
console.log('Compiling Windows Tauri installer locally...');
execSync('npm run build', {
stdio: 'inherit'
@@ -166,7 +170,9 @@ async function main() {
const nsisDir = path.join(__dirname, 'src-tauri/target/release/bundle/nsis');
if (fs.existsSync(nsisDir)) {
const files = fs.readdirSync(nsisDir).filter(f => f.endsWith('.exe'));
const targetVersion = version.startsWith('v') ? version.substring(1) : version;
const files = fs.readdirSync(nsisDir).filter(f => f.endsWith('.exe') && f.includes(targetVersion));
if (files.length > 0) {
const originalName = files[0];
installerPath = path.join(nsisDir, originalName);
@@ -242,31 +248,18 @@ function ensureBundledNode() {
function ensureWebView2Loader() {
const releaseDir = path.join(__dirname, 'src-tauri', 'target', 'release');
const binDir = path.join(__dirname, 'bin');
const rootDllPath = path.join(__dirname, 'src-tauri', 'WebView2Loader.dll');
fs.mkdirSync(releaseDir, { recursive: true });
fs.mkdirSync(binDir, { recursive: true });
const targetDllPath = path.join(releaseDir, 'WebView2Loader.dll');
const binDllPath = path.join(binDir, 'WebView2Loader.dll');
const buildDir = path.join(__dirname, 'src-tauri', 'target', 'release', 'build');
if (fs.existsSync(buildDir)) {
const entries = fs.readdirSync(buildDir);
for (const entry of entries) {
if (entry.startsWith('webview2-com-sys-')) {
const candidate = path.join(buildDir, entry, 'out', 'x64', 'WebView2Loader.dll');
if (fs.existsSync(candidate)) {
fs.copyFileSync(candidate, targetDllPath);
fs.copyFileSync(candidate, binDllPath);
return Promise.resolve();
}
}
}
if (fs.existsSync(rootDllPath) && fs.existsSync(targetDllPath)) {
return Promise.resolve();
}
const AdmZip = require('adm-zip');
const tempNupkg = path.join(__dirname, 'temp-wv2.zip');
const nupkgUrl = 'https://www.nuget.org/api/v2/package/Microsoft.Web.WebView2/1.0.4129.50';
const nupkgUrl = 'https://www.nuget.org/api/v2/package/Microsoft.Web.WebView2/1.0.2903.40';
return new Promise((resolve, reject) => {
const fileStream = fs.createWriteStream(tempNupkg);
@@ -281,12 +274,16 @@ function ensureWebView2Loader() {
try {
const zip = new AdmZip(tempNupkg);
const zipEntries = zip.getEntries();
const dllEntry = zipEntries.find(e => e.entryName.includes('x64/WebView2Loader.dll') || e.entryName.includes('x64\\WebView2Loader.dll'));
const dllEntry = zipEntries.find(e =>
e.entryName.includes('x64/WebView2Loader.dll') ||
e.entryName.includes('x64\\WebView2Loader.dll')
);
if (dllEntry) {
fs.writeFileSync(targetDllPath, dllEntry.getData());
fs.writeFileSync(binDllPath, dllEntry.getData());
const buffer = dllEntry.getData();
fs.writeFileSync(targetDllPath, buffer);
fs.writeFileSync(rootDllPath, buffer);
}
fs.unlinkSync(tempNupkg);
try { fs.unlinkSync(tempNupkg); } catch (_) { }
resolve();
} catch (e) {
try { fs.unlinkSync(tempNupkg); } catch (_) { }

5169
src-tauri/Cargo.lock generated Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -1,6 +1,6 @@
[package]
name = "vyla-home"
version = "1.1.0"
version = "1.1.3"
description = "Vyla Home Desktop App Launcher"
edition = "2021"

Binary file not shown.

View File

@@ -1,7 +1,7 @@
{
"$schema": "https://schema.tauri.app/config/2",
"productName": "Vyla Home",
"version": "1.1.0",
"version": "1.1.3",
"identifier": "com.vyla.home",
"build": {
"frontendDist": "../ui"
@@ -28,6 +28,7 @@
}
},
"resources": [
"WebView2Loader.dll",
"../bin/*",
"../main.js",
"../service-manager.js",
@@ -39,4 +40,4 @@
"../node_modules/**/*"
]
}
}
}