Feature: Added support for PrismLauncher forks, notably FreesmLauncher

This commit is contained in:
princearia
2026-07-17 14:29:26 +02:00
parent c5ee4f4fe1
commit f50a65d125
3 changed files with 22 additions and 4 deletions
+9 -2
View File
@@ -1,13 +1,13 @@
id = "radimous/prismlauncher-instances" id = "radimous/prismlauncher-instances"
name = "PrismLauncher Instances" name = "PrismLauncher Instances"
version = "1.0.0" version = "1.0.1"
plugin_api = 3 plugin_api = 3
author = "radimous" author = "radimous"
license = "MIT" license = "MIT"
dependencies = ["prismlauncher"] dependencies = ["prismlauncher"]
icon = "nut" icon = "nut"
deprecated = false deprecated = false
description = "A launcher provider that adds PrismLauncher instances to the noctalia launcher." description = "A launcher provider that adds PrismLauncher and PrismLauncher fork instances to the noctalia launcher."
tags = ["gaming", "launcher"] tags = ["gaming", "launcher"]
[[launcher_provider]] [[launcher_provider]]
@@ -24,3 +24,10 @@ type = "string"
label_key = "settings.prismlauncher_path.label" label_key = "settings.prismlauncher_path.label"
description_key = "settings.prismlauncher_path.description" description_key = "settings.prismlauncher_path.description"
default = "~/.local/share/PrismLauncher" default = "~/.local/share/PrismLauncher"
[[setting]]
key = "launcher_exec_command"
type = "string"
label_key = "settings.launcher_exec_command.label"
description_key = "settings.launcher_exec_command.description"
default = "prismlauncher"
@@ -5,10 +5,15 @@ local function getPrismPath()
return noctalia.expandPath(prismPath) return noctalia.expandPath(prismPath)
end end
local function getLauncherCommand()
local launcherCommand = noctalia.getConfig("launcher_exec_command")
return noctalia.expandPath(launcherCommand)
end
local function getInstancesDir() local function getInstancesDir()
local prismPath = getPrismPath() local prismPath = getPrismPath()
local configuredInstanceDir = getCfgValue(prismPath .. "/prismlauncher.cfg", "InstanceDir") local configuredInstanceDir = getCfgValue(prismPath .. "/*.cfg", "InstanceDir")
local instances local instances
if configuredInstanceDir == nil then -- default path if configuredInstanceDir == nil then -- default path
@@ -91,8 +96,10 @@ local function shellQuote(s)
end end
function onActivate(id) function onActivate(id)
local launcherCommand = getLauncherCommand()
if id == "" then return end if id == "" then return end
noctalia.runAsync(string.format("prismlauncher --launch %s &>/dev/null", shellQuote(id))) noctalia.runAsync(string.format(launcherCommand .. " --launch %s &>/dev/null", shellQuote(id)))
end end
-- doesn't handle icons that were changed to different default icon, rest is fine -- doesn't handle icons that were changed to different default icon, rest is fine
@@ -3,6 +3,10 @@
"prismlauncher_path": { "prismlauncher_path": {
"label": "PrismLauncher path", "label": "PrismLauncher path",
"description": "Path to PrismLauncher" "description": "Path to PrismLauncher"
},
"launcher_exec_command": {
"label": "Prism Executable",
"description": "Start Prismlauncher or fork of choice"
} }
}, },
"no_instances": { "no_instances": {