Commit 27db3c0b authored by 神楽坂玲奈's avatar 神楽坂玲奈

rakefile

parent aa607677
/nbproject/
/ruby/
/pkg/
/log.log
/err.log
/replay/*
/graphics/avatars/*_*.png
Thumbs.db
\ No newline at end of file
require 'rubygems'
require 'rake'
require 'rake/clean'
require 'rake/gempackagetask'
#require 'rake/rdoctask'
#require 'rake/testtask'
Windows = RUBY_PLATFORM["mingw"] || RUBY_PLATFORM["mswin"]
spec = Gem::Specification.new do |s|
s.name = 'mycard'
s.version = '0.1'
s.extra_rdoc_files = ['README.txt', 'LICENSE.txt']
s.summary = 'a card game'
s.description = s.summary
s.author = 'zh99998'
s.email = 'zh99998@gmail.com'
s.homepage = 'http://card.touhou,cc'
# s.executables = ['your_executable_here']
s.files = %w(LICENSE.txt README.txt config.yml replay) + Dir.glob("{lib,audio,data,fonts,graphics}/**/*")
if Windows
s.files += %w(mycard.cmd) + Dir.glob("{ruby}/**/*")
else
s.files += %w(mycard.sh) + Dir.glob("{ruby}/**/*")
end
s.require_path = "lib"
#s.bindir = "bin"
end
Rake::GemPackageTask.new(spec) do |p|
p.gem_spec = spec
if Windows
p.need_zip = true
p.zip_command = '7z a -tzip'
else
p.need_tar = true
end
end
CLOBBER.include %w(log.log err.log) + Dir.glob("{replay}/**/*") + Dir.glob("**/Thumbs.db") + Dir.glob("graphics/avatars/*_*.png")
\ No newline at end of file
cd /d %~dp0
del graphics\avatars\*_*.png
del Thumbs.db /s /F /A:S
del log.txt
del err.txt
\ No newline at end of file
#encoding: UTF-8
#仅用于调试,发布时删
alias gbk_puts puts
def puts(*args)
gbk_puts(*(args.collect{|item|item.encode "GBK", :invalid => :replace, :undef => :replace}))
end
def p(*args)
print(args.collect{|item|item.inspect.encode "GBK", :invalid => :replace, :undef => :replace}.join("\n")+"\n") rescue print(args.join("\n")+"\n")
end
def filesize_inspect(size)
case size
when 0...1024
......
#encoding: UTF-8
class Room
Color = [[0,0,0], [255,0,0], [0,255,0], [0,0,255], [255, 165, 0]]
extend Cacheable
......
@echo off
cd /d %~dp0
echo ------------------ >> log.log
echo ------------------ >> err.log
......
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