Make renegade importable, tweak game runner for renegade (tt patch launcher doesn't work well with wine apparently)

This commit is contained in:
2026-09-21 09:32:23 -05:00
parent 80954522e5
commit 9348367994
2 changed files with 12 additions and 3 deletions

View File

@@ -12,7 +12,14 @@ module W3DHubLauncher
end end
def self.run(app, *args) def self.run(app, *args)
exe_path = app.id == "ecw" ? format("%s/game500.exe", app.installation_path) : format("%s/game.exe", app.installation_path) exe_path = case app.id
when "ecw" # ecw is a little special. each of its numbered exes represents a max render distance.
format("%s/game500.exe", app.installation_path)
when "ren" # little hacky. TT auto patching launcher doesn't work* on linux so bypass it.
format("%s/game2.exe", app.installation_path)
else # the rest of the games are reasonably sane.
format("%s/game.exe", app.installation_path)
end
env = {} env = {}
unless wine_prefix(app).to_s.empty? unless wine_prefix(app).to_s.empty?
@@ -22,7 +29,7 @@ module W3DHubLauncher
pid = Process.spawn( pid = Process.spawn(
env, env,
"#{wine_command(app)}#{exe_path} -launcher #{args.join(' ')}" "#{wine_command(app)}\"#{exe_path}\" -launcher #{args.join(' ')}"
) )
Process.detach(pid) Process.detach(pid)

View File

@@ -227,7 +227,9 @@ module W3DHubLauncher
end end
end end
else else
button "Import", enabled: false, tip: "Import existing application installation", fill: true, height: 1.0, **CTA_BUTTON_THEME button "Import", tip: "Import existing application installation", fill: true, height: 1.0, **CTA_BUTTON_THEME do |btn|
dialog(Dialog::ImportApplication, application: @current_app, channel: @current_channel)
end
end end
end end
end end