mirror of
https://github.com/cyberarm/w3d_hub_linux_launcher.git
synced 2025-12-16 01:02:34 +00:00
Write data/paths.ini file
This commit is contained in:
@@ -42,12 +42,19 @@ class W3DHub
|
|||||||
|
|
||||||
cfg = @data[:"extended-data"].find { |h| h[:name] == "usesEngineCfg" }
|
cfg = @data[:"extended-data"].find { |h| h[:name] == "usesEngineCfg" }
|
||||||
@uses_engine_cfg = (cfg && cfg[:value].to_s.downcase.strip == "true") == true # explicit truthy compare to prevent return `nil`
|
@uses_engine_cfg = (cfg && cfg[:value].to_s.downcase.strip == "true") == true # explicit truthy compare to prevent return `nil`
|
||||||
|
|
||||||
|
cfg = @data[:"extended-data"].find { |h| h[:name] == "usesRenFolder" }
|
||||||
|
@uses_ren_folder = (cfg && cfg[:value].to_s.downcase.strip == "true") == true # explicit truthy compare to prevent return `nil`
|
||||||
end
|
end
|
||||||
|
|
||||||
def uses_engine_cfg?
|
def uses_engine_cfg?
|
||||||
@uses_engine_cfg
|
@uses_engine_cfg
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def uses_ren_folder?
|
||||||
|
@uses_ren_folder
|
||||||
|
end
|
||||||
|
|
||||||
class Channel
|
class Channel
|
||||||
attr_reader :id, :name, :user_level, :current_version
|
attr_reader :id, :name, :user_level, :current_version
|
||||||
|
|
||||||
|
|||||||
@@ -552,6 +552,22 @@ class W3DHub
|
|||||||
@status.step = :install_dependencies
|
@status.step = :install_dependencies
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def write_paths_ini
|
||||||
|
path = Cache.install_path(@application, @channel)
|
||||||
|
|
||||||
|
File.open("#{path}/data/paths.ini", "w") do |file|
|
||||||
|
file.puts("[paths]")
|
||||||
|
file.puts("RegBase=W3D Hub")
|
||||||
|
file.puts("RegClient=#{@application.category}\\#{@application.id}-#{@channel.id}")
|
||||||
|
file.puts("RegFDS=#{@application.category}\\#{@application.id}-#{@channel.id}-server")
|
||||||
|
file.puts("FileBase=W3D Hub");
|
||||||
|
file.puts("FileClient=#{@application.category}\\#{@application.id}-#{@channel.id}")
|
||||||
|
file.puts("FileFDS=#{@application.category}\\#{@application.id}-#{@channel.id}-server")
|
||||||
|
|
||||||
|
file.puts("UseRenFolder=#{@application.uses_ren_folder?}")
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
def mark_application_installed
|
def mark_application_installed
|
||||||
Store.application_manager.installed!(self)
|
Store.application_manager.installed!(self)
|
||||||
|
|
||||||
|
|||||||
@@ -40,6 +40,9 @@ class W3DHub
|
|||||||
install_dependencies
|
install_dependencies
|
||||||
return false if failed?
|
return false if failed?
|
||||||
|
|
||||||
|
write_paths_ini
|
||||||
|
return false if failed?
|
||||||
|
|
||||||
mark_application_installed
|
mark_application_installed
|
||||||
return false if failed?
|
return false if failed?
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user