mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-03-09 15:40:26 +00:00
fix: copy vbs script to app resources
This commit is contained in:
parent
6e2136e155
commit
ebda8eccc6
3 changed files with 14 additions and 10 deletions
|
@ -2,6 +2,8 @@ import { gameRepository } from "@main/repository";
|
|||
import { registerEvent } from "../register-event";
|
||||
import { IsNull, Not } from "typeorm";
|
||||
import createDesktopShortcut from "create-desktop-shortcuts";
|
||||
import path from "node:path";
|
||||
import { app } from "electron";
|
||||
|
||||
const createGameShortcut = async (
|
||||
_event: Electron.IpcMainInvokeEvent,
|
||||
|
@ -14,10 +16,17 @@ const createGameShortcut = async (
|
|||
if (game) {
|
||||
const filePath = game.executablePath;
|
||||
|
||||
const options = { filePath, name: game.title };
|
||||
const windowVbsPath = app.isPackaged
|
||||
? path.join(process.resourcesPath, "windows.vbs")
|
||||
: undefined;
|
||||
|
||||
const options = {
|
||||
filePath,
|
||||
name: game.title,
|
||||
};
|
||||
|
||||
return createDesktopShortcut({
|
||||
windows: options,
|
||||
windows: { ...options, VBScriptPath: windowVbsPath },
|
||||
linux: options,
|
||||
osx: options,
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue