Publish bytecode release package
This commit is contained in:
@@ -0,0 +1,45 @@
|
||||
import streamDeck, { SingletonAction } from "@elgato/streamdeck";
|
||||
import { spawn } from "node:child_process";
|
||||
import { existsSync, readFileSync } from "node:fs";
|
||||
import { dirname, join } from "node:path";
|
||||
import { fileURLToPath } from "node:url";
|
||||
|
||||
const pluginDir = dirname(dirname(fileURLToPath(import.meta.url)));
|
||||
const launcherConfig = join(pluginDir, "launcher.json");
|
||||
const fallbackLauncher = "F:\\AI\\TopSecretProjects\\ffmpeg-projects\\rimpac_gif_creator\\rimpac_gif_creator.vbs";
|
||||
|
||||
function getAppLauncher() {
|
||||
if (!existsSync(launcherConfig)) {
|
||||
return fallbackLauncher;
|
||||
}
|
||||
try {
|
||||
const config = JSON.parse(readFileSync(launcherConfig, "utf8"));
|
||||
return config.appLauncher || fallbackLauncher;
|
||||
} catch {
|
||||
return fallbackLauncher;
|
||||
}
|
||||
}
|
||||
|
||||
class LaunchGifCreatorAction extends SingletonAction {
|
||||
manifestId = "com.rimpac.gif-creator.launch";
|
||||
|
||||
async onKeyDown(ev) {
|
||||
const appLauncher = getAppLauncher();
|
||||
if (!existsSync(appLauncher)) {
|
||||
streamDeck.logger.error(`Launcher not found: ${appLauncher}`);
|
||||
await ev.action.showAlert();
|
||||
return;
|
||||
}
|
||||
|
||||
const child = spawn("wscript.exe", [appLauncher], {
|
||||
detached: true,
|
||||
stdio: "ignore",
|
||||
windowsHide: true,
|
||||
});
|
||||
child.unref();
|
||||
await ev.action.showOk();
|
||||
}
|
||||
}
|
||||
|
||||
streamDeck.actions.registerAction(new LaunchGifCreatorAction());
|
||||
streamDeck.connect();
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 2.6 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 5.3 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 2.6 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 5.3 KiB |
@@ -0,0 +1,39 @@
|
||||
{
|
||||
"$schema": "https://schemas.elgato.com/streamdeck/plugins/manifest.json",
|
||||
"UUID": "com.rimpac.gif-creator",
|
||||
"Name": "RIMPAC GIF Creator",
|
||||
"Description": "Launches the local rimpac_gif_creator screen GIF recorder.",
|
||||
"Author": "RIMPAC",
|
||||
"Version": "1.0.0.0",
|
||||
"SDKVersion": 2,
|
||||
"Software": {
|
||||
"MinimumVersion": "7.1"
|
||||
},
|
||||
"Nodejs": {
|
||||
"Version": "24"
|
||||
},
|
||||
"OS": [
|
||||
{
|
||||
"Platform": "windows",
|
||||
"MinimumVersion": "10"
|
||||
}
|
||||
],
|
||||
"CodePath": "bin/plugin.js",
|
||||
"Category": "RIMPAC ffmpeg",
|
||||
"CategoryIcon": "imgs/actions/launch/icon",
|
||||
"Icon": "imgs/actions/launch/icon",
|
||||
"Actions": [
|
||||
{
|
||||
"UUID": "com.rimpac.gif-creator.launch",
|
||||
"Name": "GIF Creator",
|
||||
"Tooltip": "Start rimpac_gif_creator.",
|
||||
"Icon": "imgs/actions/launch/icon",
|
||||
"States": [
|
||||
{
|
||||
"Image": "imgs/actions/launch/key",
|
||||
"Title": ""
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,74 @@
|
||||
{
|
||||
"name": "com.rimpac.gif-creator.sdplugin",
|
||||
"version": "1.0.0",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "com.rimpac.gif-creator.sdplugin",
|
||||
"version": "1.0.0",
|
||||
"dependencies": {
|
||||
"@elgato/streamdeck": "^2.0.4"
|
||||
}
|
||||
},
|
||||
"node_modules/@elgato/schemas": {
|
||||
"version": "0.4.15",
|
||||
"resolved": "https://registry.npmjs.org/@elgato/schemas/-/schemas-0.4.15.tgz",
|
||||
"integrity": "sha512-UpELAqazf52PFer+hqg/hvEhYoPHCH3R0af6P7Ih3Hk6xCCJENn7cA5TIpXAIGEWe6dIteHuo/e/iPGLUP7yXA==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@elgato/streamdeck": {
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/@elgato/streamdeck/-/streamdeck-2.1.0.tgz",
|
||||
"integrity": "sha512-d6wgSe93NbKAW0yT6/rabGCYUWic6nAoQoSLAXVadqTIUVmt+5Tfu7OaIGKnGER6AOn6dOpX6havRLFFFcUmOw==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@elgato/schemas": "^0.4.14",
|
||||
"@elgato/utils": "^0.4.4",
|
||||
"ws": "^8.19.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=20.5.1"
|
||||
}
|
||||
},
|
||||
"node_modules/@elgato/utils": {
|
||||
"version": "0.4.5",
|
||||
"resolved": "https://registry.npmjs.org/@elgato/utils/-/utils-0.4.5.tgz",
|
||||
"integrity": "sha512-kBoqM8LEhhVLv7lNftYqaecNna3T/L85QQWU56yR1iFCvqlyyD22WmBljRcQkw5ZNvib55Br3cnrsxX3ajp+dQ==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"zod": "^3.25.24"
|
||||
}
|
||||
},
|
||||
"node_modules/ws": {
|
||||
"version": "8.21.0",
|
||||
"resolved": "https://registry.npmjs.org/ws/-/ws-8.21.0.tgz",
|
||||
"integrity": "sha512-Vsp28b7DRcimFQvrqu2Wek3z1iYxDCWqHYB8Qsnk/S4RfaCQzPGPyBNuVjJV3cd6UiKtUtp6sNM77gWvzcCH+g==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=10.0.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"bufferutil": "^4.0.1",
|
||||
"utf-8-validate": ">=5.0.2"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"bufferutil": {
|
||||
"optional": true
|
||||
},
|
||||
"utf-8-validate": {
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/zod": {
|
||||
"version": "3.25.76",
|
||||
"resolved": "https://registry.npmjs.org/zod/-/zod-3.25.76.tgz",
|
||||
"integrity": "sha512-gzUt/qt81nXsFGKIFcC3YnfEAx5NkunCfnDlvuBSSFS02bcXu4Lmea0AFIUwbLWxWPx3d9p8S5QoaujKcNQxcQ==",
|
||||
"license": "MIT",
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/colinhacks"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"name": "com.rimpac.gif-creator.sdplugin",
|
||||
"version": "1.0.0",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"dependencies": {
|
||||
"@elgato/streamdeck": "^2.0.4"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user