Sha256: ab983ebf53379f7e45381bf524c10d9b94ed6a175bef3f09c75463a683dc6e5d

Contents?: true

Size: 1.22 KB

Versions: 1

Compression:

Stored size: 1.22 KB

Contents

module SixUpdaterWeb
  DEFAULT_PORT = 16333
  DEFAULT_IP = '127.0.0.1'
  OLDLOCATION = if defined?(TAR2RUBYSCRIPT)
		oldlocation
	else
		Dir.pwd
  end
  SPECIAL = true

  SIX_ADMIN = true
end

case RUBY_PLATFORM
when /-mingw32$/, /-mswin32$/
	begin
	  %x[chcp]
	rescue
	  puts "WARNING: chcp was not found. If the web-client doesn't start properly, "
	  puts "Please follow these steps:"
	  puts
	  f = File.join(ENV['WINDIR'], 'system32', 'chcp.com').gsub!("/", "\\")
	  path = SixUpdaterWeb::OLDLOCATION
	  nf = File.join(path, "tools", "ruby", "bin").gsub!("/", "\\")
	  puts "Copy #{f} to #{nf}"
	  puts "And rename the copy to chcp.EXE. Then restart this program"
	  puts
	  puts "More info, at: http://dev-heaven.net/wiki/six-arma-updater/Six_Updater_Suite#Known-Issues"
	  sleep 10
	end
end

begin
  # If env var VERSION exists and is a number, and no VERSION= argument is passed, migration will likely fail.
  # move original env VERSION value to OS_VERSION, in case it's needed, and reset ENV["VERSION"].
  if not ARGV.any?{ |arg| /^VERSION=/i.match(arg) }
    ENV["OS_VERSION"] = ENV["VERSION"]
    ENV["VERSION"] = nil
  end
rescue
  puts "ERROR: #{$!}"
end

ENV["RAILS_ENV"] = "production"

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
six-updater-web-0.12.4 lib/common.rb