mirror of
https://github.com/cyberarm/w3d_hub_linux_launcher.git
synced 2025-12-15 16:52:34 +00:00
Fixed Windows silliness
This commit is contained in:
@@ -98,8 +98,8 @@ class W3DHub
|
||||
# Quick checks before network and computational work starts
|
||||
def fail_fast
|
||||
# tar present?
|
||||
bsdtar_present = system("bsdtar --help")
|
||||
fail!("FAIL FAST: `bsdtar --help` command failed, bsdtar is not installed. Will be unable to unpack packages.") unless bsdtar_present
|
||||
bsdtar_present = system("#{W3DHub.tar_command} --help")
|
||||
fail!("FAIL FAST: `#{W3DHub.tar_command} --help` command failed, #{W3DHub.tar_command} is not installed. Will be unable to unpack packages.") unless bsdtar_present
|
||||
|
||||
if W3DHub.unix?
|
||||
wine_present = system("which #{window.settings[:wine_command]}")
|
||||
@@ -263,8 +263,8 @@ class W3DHub
|
||||
puts " #{package.name}:#{package.version}"
|
||||
package_path = Cache.package_path(package.category, package.subcategory, "#{package.name}.zip", package.version)
|
||||
|
||||
puts " Running bsdtar command: #{"bsdtar -xf #{package_path} -C #{path}"}"
|
||||
status = system("bsdtar -xf #{package_path} -C #{path}")
|
||||
puts " Running #{W3DHub.tar_command} command: #{"#{W3DHub.tar_command} -xf #{package_path} -C #{path}"}"
|
||||
status = system("#{W3DHub.tar_command} -xf #{package_path} -C #{path}")
|
||||
if status
|
||||
else
|
||||
puts "COMMAND FAILED!"
|
||||
|
||||
@@ -32,6 +32,14 @@ class W3DHub
|
||||
linux? || mac?
|
||||
end
|
||||
|
||||
def self.tar_command
|
||||
if windows?
|
||||
"tar"
|
||||
else
|
||||
"bsdtar"
|
||||
end
|
||||
end
|
||||
|
||||
def self.home_directory
|
||||
File.expand_path("~")
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user