Commit 70d97d71 authored by 神楽坂玲奈's avatar 神楽坂玲奈

0.9.9

parent add67496
/Gemfile.lock /nbproject/
/nbproject/ /.idea/
/.idea/
/ruby/ Thumbs.db
/pkg/
/config.yml /fonts/
/log.log /replay/
/profile.log /ygocore/
/replay/ /mycard.exe
/mycard/ /config.yml
/mycard.exe /log.log
/7z.exe /profile.log
/ygocore/ /error-程序出错请到论坛反馈.txt
/images/
/error-程序出错请到论坛反馈.txt /ruby/
Thumbs.db /pkg/
\ No newline at end of file /Gemfile.lock
\ No newline at end of file
source 'http://rubygems.org' source 'https://rubygems.org'
ruby '1.9.3' ruby '1.9.3'
gem 'rubysdl', :platform => :ruby gem 'rubysdl', :platform => :ruby
...@@ -13,3 +13,8 @@ gem 'sqlite3' ...@@ -13,3 +13,8 @@ gem 'sqlite3'
gem 'zip' gem 'zip'
gem 'websocket' gem 'websocket'
gem 'net-http-pipeline' gem 'net-http-pipeline'
group :development do
gem 'rake'
gem 'bundler'
end
#encoding: UTF-8 #encoding: UTF-8
require 'rubygems' require 'rubygems'
require 'rake' require 'rake'
require 'rake/clean' require 'rake/clean'
require 'rubygems/package_task' require 'rubygems/package_task'
require 'rdoc/task' require 'rdoc/task'
#require 'rake/testtask' #require 'rake/testtask'
Windows = RUBY_PLATFORM["mingw"] || RUBY_PLATFORM["mswin"] Windows = RUBY_PLATFORM["mingw"] || RUBY_PLATFORM["mswin"]
#在windows上UTF-8脚本编码环境中 Dir.glob无法列出中文目录下的文件 所以自己写个递归 #在windows上UTF-8脚本编码环境中 Dir.glob无法列出中文目录下的文件 所以自己写个递归
def list(path) def list(path)
result = [] result = []
Dir.foreach(path) do |file| Dir.foreach(path) do |file|
next if file == "." or file == ".." next if file == "." or file == ".."
result << "#{path}/#{file}" result << "#{path}/#{file}"
result.concat list(result.last) if File.directory? result.last result.concat list(result.last) if File.directory? result.last
end rescue p $! end rescue p $!
result result
end end
spec = Gem::Specification.new do |s| spec = Gem::Specification.new do |s|
s.name = 'mycard' s.name = 'mycard'
s.version = '0.9.8' s.version = '0.9.9'
s.extra_rdoc_files = ['README.txt', 'LICENSE.txt'] s.extra_rdoc_files = ['README.txt', 'LICENSE.txt']
s.summary = 'a card game platform' s.summary = 'a card game platform'
s.description = s.summary s.description = s.summary
s.author = 'zh99998' s.author = 'zh99998'
s.email = 'zh99998@gmail.com' s.email = 'zh99998@gmail.com'
s.homepage = 'http://my-card.in/' s.homepage = 'http://my-card.in/'
# s.executables = ['your_executable_here'] # s.executables = ['your_executable_here']
s.files = %w(LICENSE.txt README.txt replay) s.files = %w(LICENSE.txt README.txt replay)
%w{lib audio data locales graphics ygocore}.each{|dir|s.files.concat list(dir)} %w{lib audio data locales graphics ygocore}.each{|dir|s.files.concat list(dir)}
if Windows if Windows
s.files += %w(fonts ruby mycard.exe) s.files += %w(mycard.exe) + list("ruby") + list("fonts")
else else
s.files += %w(mycard.sh) s.files += %w(mycard.sh)
s.platform = Gem::Platform::CURRENT s.platform = Gem::Platform::CURRENT
end end
s.require_path = "lib" s.require_path = "lib"
#s.bindir = "bin" #s.bindir = "bin"
end end
Gem::PackageTask.new(spec) do |p| Gem::PackageTask.new(spec) do |p|
p.gem_spec = spec p.gem_spec = spec
if Windows if Windows
p.need_zip = true p.need_zip = true
p.zip_command = '7z a' p.zip_command = '7z a'
def p.zip_file def p.zip_file
"#{package_name}-win32.7z" "#{package_name}-win32.7z"
end end
else else
p.need_tar_gz = true p.need_tar_gz = true
end end
end end
Rake::RDocTask.new do |rdoc| Rake::RDocTask.new do |rdoc|
files =['README.txt', 'LICENSE.txt', 'lib/**/*.rb'] files =['README.txt', 'LICENSE.txt', 'lib/**/*.rb']
rdoc.rdoc_files.add(files) rdoc.rdoc_files.add(files)
rdoc.main = "README.txt" # page to start on rdoc.main = "README.txt" # page to start on
rdoc.title = "Mycard Docs" rdoc.title = "Mycard Docs"
rdoc.rdoc_dir = 'doc/rdoc' # rdoc output folder rdoc.rdoc_dir = 'doc/rdoc' # rdoc output folder
rdoc.options << '--line-numbers' rdoc.options << '--line-numbers'
end end
CLOBBER.include %w(error-程序出错请到论坛反馈.txt log.log profile.log config.yml doc ygocore/pics) + list('replay') + list('ygocore/replay') + list('.').keep_if{|file|File.basename(file) == "Thumbs.db"} + list("graphics/avatars").reject{|file|File.basename(file) =~ /(?:error|loading)_(?:small|middle|large)\.png/} + list("ygocore/deck").keep_if{|file|File.basename(file) != 'sample.ydk'} CLOBBER.include %w(error-程序出错请到论坛反馈.txt log.log profile.log config.yml doc ygocore/pics) + list('replay') + list('ygocore/replay') + list('.').keep_if{|file|File.basename(file) == "Thumbs.db"} + list("graphics/avatars").reject{|file|File.basename(file) =~ /(?:error|loading)_(?:small|middle|large)\.png/} + list("ygocore/deck").keep_if{|file|File.basename(file) != 'sample.ydk'}
No preview for this file type
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require "fileutils" require "fileutils"
require_relative 'card' require_relative 'card'
module Update module Update
Version = '0.9.8' Version = '0.9.9'
URL = "http://my-card.in/mycard/update.json?version=#{Version}" URL = "http://my-card.in/mycard/update.json?version=#{Version}"
class <<self class <<self
attr_reader :thumbnails, :images, :status attr_reader :thumbnails, :images, :status
......
...@@ -121,7 +121,7 @@ class Ygocore < Game ...@@ -121,7 +121,7 @@ class Ygocore < Game
connected = false connected = false
if @@im.jid.domain == "my-card.in" if @@im.jid.domain == "my-card.in"
begin begin
@@im.connect("ygopro-server.my-card.in", 5223) @@im.connect("chat.my-card.in", 5223)
connected = true connected = true
rescue rescue
Game_Event.push Game_Event::Error.new('登录', '连接服务器失败') Game_Event.push Game_Event::Error.new('登录', '连接服务器失败')
...@@ -278,11 +278,11 @@ class Ygocore < Game ...@@ -278,11 +278,11 @@ class Ygocore < Game
end end
font, size = system_conf['textfont'].split(' ') font, size = system_conf['textfont'].split(' ')
if !File.file?(font) or size.to_i.to_s != size if !File.file?(File.expand_path(font, File.dirname(ygocore_path))) or size.to_i.to_s != size
require 'pathname' require 'pathname'
font_path = Pathname.new(Font) font_path = Pathname.new(Font)
font_path = font_path.relative_path_from(Pathname.new(File.dirname(ygocore_path))) if font_path.relative? font_path = font_path.relative_path_from(Pathname.new(File.dirname(ygocore_path))) if font_path.relative?
system_conf['textfont'] = font_path + ' 14' system_conf['textfont'] = "#{font_path} 14"
end end
if !File.file?(system_conf['numfont']) if !File.file?(system_conf['numfont'])
system_conf['textfont'] = Windows ? 'c:/windows/fonts/arialbd.ttf' : '/usr/share/fonts/gnu-free/FreeSansBold.ttf' system_conf['textfont'] = Windows ? 'c:/windows/fonts/arialbd.ttf' : '/usr/share/fonts/gnu-free/FreeSansBold.ttf'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment