Sha256: 8b3c63b30dcc4344820098a8f0691d09d49fbcf4980832377739b630c090d693
Contents?: true
Size: 1.86 KB
Versions: 5
Compression:
Stored size: 1.86 KB
Contents
# $stdout, $stderr = # File or String in Memory (any cleanup measures?) #require 'RubyGems' module SixUpdaterWeb DEFAULT_PORT = 16333 DEFAULT_IP = '127.0.0.1' OLDLOCATION = if defined?(TAR2RUBYSCRIPT) oldlocation else Dir.pwd end SPECIAL = true # TODO: TEMPORARY UNTIL GOLDBERG DATAMIGRATIONS ARE VALIDATED SIX_ADMIN = true =begin if ARGV.include?("--admin") ARGV =- ["--admin"] true else false end =end SIX_PORT = if ARGV.to_s[/--port=([0-9]*)|-p/] $1 else ARGV << "--port=#{DEFAULT_PORT}" DEFAULT_PORT end unless ARGV.to_s[/--binding=|-b/] ARGV << "--binding=#{DEFAULT_IP}" end end puts "Starting the web client... please be patient..." puts "This window needs to remain running during GUI operations" 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" # Kick off Rails load 'script/server'
Version data entries
5 entries across 5 versions & 1 rubygems
Version | Path |
---|---|
six-updater-web-0.12.3 | lib/init.rb |
six-updater-web-0.12.2 | lib/init.rb |
six-updater-web-0.12.1 | lib/init.rb |
six-updater-web-0.11.2 | lib/init.rb |
six-updater-web-0.11.1 | lib/init.rb |