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"
name = "PrismLauncher Instances"
version = "1.0.0"
version = "1.0.1"
plugin_api = 3
author = "radimous"
license = "MIT"
dependencies = ["prismlauncher"]
icon = "nut"
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"]
[[launcher_provider]]
@@ -24,3 +24,10 @@ type = "string"
label_key = "settings.prismlauncher_path.label"
description_key = "settings.prismlauncher_path.description"
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)
end
local function getLauncherCommand()
local launcherCommand = noctalia.getConfig("launcher_exec_command")
return noctalia.expandPath(launcherCommand)
end
local function getInstancesDir()
local prismPath = getPrismPath()
local configuredInstanceDir = getCfgValue(prismPath .. "/prismlauncher.cfg", "InstanceDir")
local configuredInstanceDir = getCfgValue(prismPath .. "/*.cfg", "InstanceDir")
local instances
if configuredInstanceDir == nil then -- default path
@@ -91,8 +96,10 @@ local function shellQuote(s)
end
function onActivate(id)
local launcherCommand = getLauncherCommand()
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
-- doesn't handle icons that were changed to different default icon, rest is fine
@@ -3,6 +3,10 @@
"prismlauncher_path": {
"label": "PrismLauncher path",
"description": "Path to PrismLauncher"
},
"launcher_exec_command": {
"label": "Prism Executable",
"description": "Start Prismlauncher or fork of choice"
}
},
"no_instances": {