mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-01-23 13:34:54 +03:00
fix: copy vbs script to app resources
This commit is contained in:
parent
6e2136e155
commit
ebda8eccc6
@ -5,7 +5,9 @@ directories:
|
|||||||
extraResources:
|
extraResources:
|
||||||
- aria2
|
- aria2
|
||||||
- seeds
|
- seeds
|
||||||
- fastlist.exe
|
- from: node_modules/ps-list/vendor/fastlist-0.3.0-x64.exe
|
||||||
|
to: fastlist.exe
|
||||||
|
- from: node_modules/create-desktop-shortcuts/src/windows.vbs
|
||||||
files:
|
files:
|
||||||
- "!**/.vscode/*"
|
- "!**/.vscode/*"
|
||||||
- "!src/*"
|
- "!src/*"
|
||||||
|
@ -47,11 +47,4 @@ const downloadAria2 = async () => {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
if (process.platform === "win32") {
|
|
||||||
fs.copyFileSync(
|
|
||||||
"node_modules/ps-list/vendor/fastlist-0.3.0-x64.exe",
|
|
||||||
"fastlist.exe"
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
downloadAria2();
|
downloadAria2();
|
||||||
|
@ -2,6 +2,8 @@ import { gameRepository } from "@main/repository";
|
|||||||
import { registerEvent } from "../register-event";
|
import { registerEvent } from "../register-event";
|
||||||
import { IsNull, Not } from "typeorm";
|
import { IsNull, Not } from "typeorm";
|
||||||
import createDesktopShortcut from "create-desktop-shortcuts";
|
import createDesktopShortcut from "create-desktop-shortcuts";
|
||||||
|
import path from "node:path";
|
||||||
|
import { app } from "electron";
|
||||||
|
|
||||||
const createGameShortcut = async (
|
const createGameShortcut = async (
|
||||||
_event: Electron.IpcMainInvokeEvent,
|
_event: Electron.IpcMainInvokeEvent,
|
||||||
@ -14,10 +16,17 @@ const createGameShortcut = async (
|
|||||||
if (game) {
|
if (game) {
|
||||||
const filePath = game.executablePath;
|
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({
|
return createDesktopShortcut({
|
||||||
windows: options,
|
windows: { ...options, VBScriptPath: windowVbsPath },
|
||||||
linux: options,
|
linux: options,
|
||||||
osx: options,
|
osx: options,
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user