FIX: .desktop files environment discrepency
All checks were successful
publish / publish-tauri (, ubuntu-22.04) (push) Successful in 4m15s

This commit is contained in:
valerio 2026-07-26 16:35:11 +02:00
parent c95c259da5
commit 0d375a4474

View File

@ -183,14 +183,27 @@ export async function createDesktopFile(version, forceRecreate = false) {
return;
}
await remove(desktopFilePath);
}
const settings = get(currentSettings);
const libraryDir = settings.libraryDir;
if (!libraryDir) {
return {
success: false,
message: `couldn't find library`
};
}
const blenderConfigPath = await join(libraryDir, BASE_LIBRARY_DIR, 'config', version.version);
let bannerPath = await join(version.path, 'banner.png');
try {
const desktopFileContent = `[Desktop Entry]
Type=Application
Name=Blender ${version.version}
Comment=Blender ${version.version} - 3D creation suite
Exec=${version.executable.replace(/ /g, '\\ ')} %F
Exec=env BLENDER_USER_RESOURCES=${blenderConfigPath.replace(/ /g, '\\ ')} BLENDER_CUSTOM_SPLASH_BANNER=${bannerPath.replace(/ /g, '\\ ')} ${version.executable.replace(/ /g, '\\ ')} %F
Icon=${version.path.replace(/ /g, '\\ ')}/icon.png
Terminal=false
Categories=Graphics;3DGraphics;