Added wine configuration game link if on unix

This commit is contained in:
2021-11-20 11:16:46 -06:00
parent 1e7f5cbc88
commit f483086c90
2 changed files with 17 additions and 0 deletions

View File

@@ -51,6 +51,22 @@ class W3DHub
end
end
def wine_configuration(app_id, channel)
puts "Wine Configuration Request: #{app_id}-#{channel}"
# open wwconfig.exe or config.exe for ecw
if (app_data = installed?(app_id, channel) && W3DHub.unix?)
exe = if window.settings[:wine_prefix]
"WINEPREFIX=\"#{window.settings[:wine_prefix]}\" winecfg"
else
"winecfg"
end
Process.spawn("#{exe}")
end
end
def repair(app_id, channel)
puts "Repair Installation Request: #{app_id}-#{channel}"

View File

@@ -88,6 +88,7 @@ class W3DHub
if window.application_manager.installed?(game.id, channel.id)
Hash.new.tap { |hash|
hash["Game Settings"] = { icon: "gear", block: proc { window.application_manager.settings(game.id, channel.id) } }
hash["Wine Configuration"] = { icon: "gear", block: proc { window.application_manager.wine_configuration(game.id, channel.id) } } if W3DHub.unix?
if game.id != "ren"
hash["Repair Installation"] = { icon: "wrench", block: proc { window.application_manager.repair(game.id, channel.id) } }
hash["Uninstall"] = { icon: "trashCan", block: proc { window.application_manager.uninstall(game.id, channel.id) } }