Sha256: 9f268e7cb60f21ba369839cceb2c81d4f84237450524fde66586268aae667406
Contents?: true
Size: 1.5 KB
Versions: 1
Compression:
Stored size: 1.5 KB
Contents
# encoding: utf-8 # Set default encoding Encoding.default_internal, Encoding.default_external = ['utf-8'] * 2 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
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
six-updater-web-0.14.4 | lib/six-updater-web/common.rb |