mirror of
https://github.com/cyberarm/w3d_hub_linux_launcher.git
synced 2025-12-16 09:12:35 +00:00
Brought back Excon for package downloading as the method recommended by async-http is unreliable, added support for importing games, repairer and updater tasks are both now simple subclasses of installer, implemented verify_files for checking installed files to prune download package list (currently causes Api.package_details to fail..., so disabled for now), misc. changes.
This commit is contained in:
@@ -36,14 +36,14 @@ class W3DHub
|
||||
@tasks.push(updater)
|
||||
end
|
||||
|
||||
def import(app_id, channel, path)
|
||||
puts "Import Request: #{app_id}-#{channel} -> #{path}"
|
||||
def import(app_id, channel)
|
||||
puts "Import Request: #{app_id}-#{channel}"
|
||||
|
||||
# Check registry for auto-import if windows
|
||||
# if auto-import fails ask user for path to game exe
|
||||
# mark app as imported/installed
|
||||
|
||||
@tasks.push(Importer.new(app_id, channel, path))
|
||||
@tasks.push(Importer.new(app_id, channel))
|
||||
end
|
||||
|
||||
def settings(app_id, channel)
|
||||
@@ -238,6 +238,19 @@ class W3DHub
|
||||
end
|
||||
end
|
||||
|
||||
def imported!(task, exe_path)
|
||||
application_data = {
|
||||
install_directory: File.basename(exe_path),
|
||||
installed_version: task.channel.current_version,
|
||||
install_path: exe_path,
|
||||
wine_prefix: task.wine_prefix
|
||||
}
|
||||
|
||||
Store.settings[:games] ||= {}
|
||||
Store.settings[:games][:"#{task.app_id}_#{task.release_channel}"] = application_data
|
||||
Store.settings.save_settings
|
||||
end
|
||||
|
||||
def installed!(task)
|
||||
# install_dir
|
||||
# installed_version
|
||||
|
||||
Reference in New Issue
Block a user