mirror of
https://gitlab.com/vyla-entertainment/home.git
synced 2026-11-20 09:07:23 -05:00
Compare commits
9 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| e25e1c93f9 | |||
| 4c708ad97c | |||
| b81a4e044b | |||
| f6aa2daa01 | |||
| e03eb38adc | |||
| 2b690b47c1 | |||
| dffbdb92a5 | |||
| 45d6515f2e | |||
| a3e6a278fe |
@@ -27,6 +27,20 @@ workflows:
|
|||||||
export PATH="$HOME/.cargo/bin:$PATH"
|
export PATH="$HOME/.cargo/bin:$PATH"
|
||||||
PACKAGE_VERSION=$(node -p "require('./package.json').version")
|
PACKAGE_VERSION=$(node -p "require('./package.json').version")
|
||||||
node release.js --installer --tag="v$PACKAGE_VERSION"
|
node release.js --installer --tag="v$PACKAGE_VERSION"
|
||||||
|
- name: Verify bundled node permissions
|
||||||
|
script: |
|
||||||
|
if [ -f "bin/node" ]; then
|
||||||
|
chmod +x bin/node
|
||||||
|
xattr -cr bin/node || true
|
||||||
|
ls -la bin/node
|
||||||
|
file bin/node
|
||||||
|
fi
|
||||||
|
APP_NODE=$(find src-tauri/target/release/bundle -name "node" -path "*bin*" 2>/dev/null | head -1)
|
||||||
|
if [ -n "$APP_NODE" ]; then
|
||||||
|
chmod +x "$APP_NODE"
|
||||||
|
xattr -cr "$APP_NODE" || true
|
||||||
|
ls -la "$APP_NODE"
|
||||||
|
fi
|
||||||
artifacts:
|
artifacts:
|
||||||
- src-tauri/target/release/bundle/dmg/*.dmg
|
- src-tauri/target/release/bundle/dmg/*.dmg
|
||||||
- src-tauri/target/release/bundle/macos/*.app
|
- src-tauri/target/release/bundle/macos/*.app
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "vyla-home",
|
"name": "vyla-home",
|
||||||
"version": "1.1.14",
|
"version": "1.1.19",
|
||||||
"description": "Vyla Home Desktop App Launcher",
|
"description": "Vyla Home Desktop App Launcher",
|
||||||
"main": "main.js",
|
"main": "main.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
11
release.js
11
release.js
@@ -295,11 +295,18 @@ function ensureBundledNode() {
|
|||||||
try {
|
try {
|
||||||
execSync(`tar -xzf node.tar.gz ${tarName}/bin/node`, { cwd: binDir });
|
execSync(`tar -xzf node.tar.gz ${tarName}/bin/node`, { cwd: binDir });
|
||||||
|
|
||||||
fs.renameSync(path.join(binDir, tarName, 'bin', 'node'), path.join(binDir, 'node'));
|
const extractedNode = path.join(binDir, tarName, 'bin', 'node');
|
||||||
|
const finalNode = path.join(binDir, 'node');
|
||||||
|
|
||||||
|
fs.renameSync(extractedNode, finalNode);
|
||||||
fs.rmSync(path.join(binDir, tarName), { recursive: true, force: true });
|
fs.rmSync(path.join(binDir, tarName), { recursive: true, force: true });
|
||||||
fs.unlinkSync(tarPath);
|
fs.unlinkSync(tarPath);
|
||||||
|
|
||||||
execSync(`chmod +x node`, { cwd: binDir });
|
fs.chmodSync(finalNode, 0o755);
|
||||||
|
|
||||||
|
try {
|
||||||
|
execSync(`xattr -d com.apple.quarantine "${finalNode}"`);
|
||||||
|
} catch (_) { }
|
||||||
|
|
||||||
fs.writeFileSync(versionMarker, nodeVersion, 'utf8');
|
fs.writeFileSync(versionMarker, nodeVersion, 'utf8');
|
||||||
resolve();
|
resolve();
|
||||||
|
|||||||
2
src-tauri/Cargo.lock
generated
2
src-tauri/Cargo.lock
generated
@@ -4222,7 +4222,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "vyla-home"
|
name = "vyla-home"
|
||||||
version = "1.1.14"
|
version = "1.1.19"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"base64 0.22.1",
|
"base64 0.22.1",
|
||||||
"serde",
|
"serde",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "vyla-home"
|
name = "vyla-home"
|
||||||
version = "1.1.14"
|
version = "1.1.19"
|
||||||
description = "Vyla Home Desktop App Launcher"
|
description = "Vyla Home Desktop App Launcher"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
||||||
|
|||||||
@@ -589,10 +589,23 @@ fn main() {
|
|||||||
.setup(|app| {
|
.setup(|app| {
|
||||||
debug_log("Tauri setup started");
|
debug_log("Tauri setup started");
|
||||||
let app_data = app.path().app_data_dir().unwrap_or_default();
|
let app_data = app.path().app_data_dir().unwrap_or_default();
|
||||||
let _app_data_str = clean_path(&app_data);
|
|
||||||
|
|
||||||
let vyla_files = if let Ok(appdata_env) = std::env::var("APPDATA") {
|
let vyla_files = if let Ok(appdata_env) = std::env::var("APPDATA") {
|
||||||
std::path::PathBuf::from(appdata_env).join("vyla-home").join("vyla-home-files")
|
std::path::PathBuf::from(appdata_env)
|
||||||
|
.join("vyla-home")
|
||||||
|
.join("vyla-home-files")
|
||||||
|
} else if let Ok(home) = std::env::var("HOME") {
|
||||||
|
#[cfg(target_os = "macos")]
|
||||||
|
let base = std::path::PathBuf::from(&home)
|
||||||
|
.join("Library")
|
||||||
|
.join("Application Support");
|
||||||
|
#[cfg(target_os = "linux")]
|
||||||
|
let base = std::path::PathBuf::from(&home)
|
||||||
|
.join(".local")
|
||||||
|
.join("share");
|
||||||
|
#[cfg(not(any(target_os = "macos", target_os = "linux")))]
|
||||||
|
let base = app_data.clone();
|
||||||
|
base.join("vyla-home").join("vyla-home-files")
|
||||||
} else {
|
} else {
|
||||||
app_data.join("vyla-home-files")
|
app_data.join("vyla-home-files")
|
||||||
};
|
};
|
||||||
@@ -637,21 +650,25 @@ fn main() {
|
|||||||
.build()?;
|
.build()?;
|
||||||
|
|
||||||
let (main_js, root_dir) = resolve_script_and_root(app);
|
let (main_js, root_dir) = resolve_script_and_root(app);
|
||||||
|
debug_log("Searching for node binary...");
|
||||||
let node_bin = match find_node_binary(app) {
|
let node_bin = match find_node_binary(app) {
|
||||||
Some(bin) => bin,
|
Some(bin) => {
|
||||||
|
debug_log(&format!("Found node binary: {}", bin));
|
||||||
|
bin
|
||||||
|
}
|
||||||
None => {
|
None => {
|
||||||
let _ = window.emit(
|
debug_log("FATAL: No node binary found in bundle or PATH.");
|
||||||
"error",
|
std::thread::sleep(std::time::Duration::from_millis(600));
|
||||||
serde_json::json!({
|
let _ = window.eval("document.getElementById('status-message').textContent='Error: Node runtime missing. Please reinstall.';");
|
||||||
"message": "Node.js runtime not found. Please ensure Node.js is installed or bundled correctly."
|
let _ = window.eval("var b=document.getElementById('debug-log-box');b.style.display='block';b.textContent='Node binary not found. bin/node missing from app bundle or not executable.';");
|
||||||
}),
|
|
||||||
);
|
|
||||||
return Ok(());
|
return Ok(());
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
let vyla_files_str = clean_path(&vyla_files);
|
let vyla_files_str = clean_path(&vyla_files);
|
||||||
|
|
||||||
|
std::thread::sleep(std::time::Duration::from_millis(400));
|
||||||
|
|
||||||
let mut cmd = Command::new(&node_bin);
|
let mut cmd = Command::new(&node_bin);
|
||||||
cmd.arg(&main_js)
|
cmd.arg(&main_js)
|
||||||
.current_dir(&root_dir)
|
.current_dir(&root_dir)
|
||||||
@@ -847,12 +864,12 @@ fn main() {
|
|||||||
}
|
}
|
||||||
Err(e) => {
|
Err(e) => {
|
||||||
debug_log(&format!("Failed to spawn node: {}", e));
|
debug_log(&format!("Failed to spawn node: {}", e));
|
||||||
let _ = window.emit(
|
let emsg = format!("Failed to spawn node: {}", e);
|
||||||
"error",
|
let js = format!(
|
||||||
serde_json::json!({
|
"document.getElementById('status-message').textContent='Spawn Error';var b=document.getElementById('debug-log-box');b.style.display='block';b.textContent={};",
|
||||||
"message": format!("Failed to launch backend runtime: {}", e)
|
serde_json::to_string(&emsg).unwrap_or_default()
|
||||||
}),
|
|
||||||
);
|
);
|
||||||
|
let _ = window.eval(&js);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -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.14",
|
"version": "1.1.19",
|
||||||
"identifier": "com.vyla.home",
|
"identifier": "com.vyla.home",
|
||||||
"build": {
|
"build": {
|
||||||
"frontendDist": "../ui"
|
"frontendDist": "../ui"
|
||||||
|
|||||||
@@ -271,6 +271,11 @@
|
|||||||
console.warn("OGL Shader background failed to load (offline):", err);
|
console.warn("OGL Shader background failed to load (offline):", err);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
window.dispatchEvent(new Event('ogl-ready'));
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
window.addEventListener('ogl-ready', () => {
|
||||||
if (!window.__OGL_LOADED__) {
|
if (!window.__OGL_LOADED__) {
|
||||||
document.body.style.background = "radial-gradient(circle at 80% 20%, #1e1b4b 0%, #050505 70%)";
|
document.body.style.background = "radial-gradient(circle at 80% 20%, #1e1b4b 0%, #050505 70%)";
|
||||||
} else {
|
} else {
|
||||||
@@ -499,6 +504,7 @@ void main() {
|
|||||||
|
|
||||||
initLiquidButtons();
|
initLiquidButtons();
|
||||||
}
|
}
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
@@ -535,8 +541,17 @@ void main() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function initTauriEvents() {
|
async function initTauriEvents() {
|
||||||
const eventApi = window.__TAURI__?.event || window.__TAURI_INTERNALS__;
|
let eventApi = null;
|
||||||
if (!eventApi || typeof eventApi.listen !== 'function') {
|
|
||||||
|
if (window.__TAURI__?.event && typeof window.__TAURI__.event.listen === 'function') {
|
||||||
|
eventApi = window.__TAURI__.event;
|
||||||
|
} else if (window.__TAURI_INTERNALS__ && typeof window.__TAURI_INTERNALS__.listen === 'function') {
|
||||||
|
eventApi = window.__TAURI_INTERNALS__;
|
||||||
|
} else if (window.__TAURI__ && typeof window.__TAURI__.listen === 'function') {
|
||||||
|
eventApi = window.__TAURI__;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!eventApi) {
|
||||||
setTimeout(initTauriEvents, 50);
|
setTimeout(initTauriEvents, 50);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user