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