Sha256: 8e43ff3fb40a92883fc2e8b2762390d5555792106d04193bcd4e5e53acf07322
Contents?: true
Size: 1.41 KB
Versions: 15
Compression:
Stored size: 1.41 KB
Contents
# encoding: utf-8 require 'fileutils' module SixUpdaterWeb OLDLOCATION = if defined?(TAR2RUBYSCRIPT) oldlocation else ENV['BASE_PATH'] ? ENV['BASE_PATH'] : Dir.pwd end # unless ENV['BASE_PATH'] # ENV['BASE_PATH'] = OLDLOCATION # 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 => e puts "ERROR: #{e.class} #{e.message} #{e.backtrace.join("\n")}" end ENV["RAILS_ENV"] = "production" require_relative 'config/six-updater-web'
Version data entries
15 entries across 15 versions & 1 rubygems