FIX: .desktop files environment discrepency
All checks were successful
publish / publish-tauri (, ubuntu-22.04) (push) Successful in 4m15s
All checks were successful
publish / publish-tauri (, ubuntu-22.04) (push) Successful in 4m15s
This commit is contained in:
parent
c95c259da5
commit
0d375a4474
@ -183,14 +183,27 @@ export async function createDesktopFile(version, forceRecreate = false) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
await remove(desktopFilePath);
|
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 {
|
try {
|
||||||
const desktopFileContent = `[Desktop Entry]
|
const desktopFileContent = `[Desktop Entry]
|
||||||
Type=Application
|
Type=Application
|
||||||
Name=Blender ${version.version}
|
Name=Blender ${version.version}
|
||||||
Comment=Blender ${version.version} - 3D creation suite
|
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
|
Icon=${version.path.replace(/ /g, '\\ ')}/icon.png
|
||||||
Terminal=false
|
Terminal=false
|
||||||
Categories=Graphics;3DGraphics;
|
Categories=Graphics;3DGraphics;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user