Commit 488befb2 authored by zh99998's avatar zh99998

加入适用于linux的sh脚本启动

parent 0874201f
== iduel
== mycard
Put appropriate LICENSE for your project here.
禁止用于作弊
\ No newline at end of file
#encoding: UTF-8
=begin
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
=end
def filesize_inspect(size)
case size
when 0...1024
......@@ -20,15 +10,14 @@ def filesize_inspect(size)
end
end
require 'sdl'
include SDL
require 'yaml'
$config = YAML.load_file("config.yml") rescue YAML.load_file("data/config_default.yml")
SDL.init(INIT_VIDEO | INIT_AUDIO)
WM::set_caption("iDuel - 享受决斗", "graphics/system/iDuelPanel_32512.ico")
WM::icon = Surface.load("graphics/system/iDuelPanel_32512.ico")
WM::set_caption("MyCard", "graphics/system/icon.gif")
WM::icon = Surface.load("graphics/system/icon.gif")
style = HWSURFACE
style |= FULLSCREEN if $config["fullscreen"]
......
cd /d %~dp0
echo ------------------ >> log.txt
echo ------------------ >> err.txt
ruby\bin\ruby lib/main.rb 0>>log.txt 2>>err.txt
\ No newline at end of file
echo ------------------ >> log.log
echo ------------------ >> err.log
ruby\bin\ruby lib/main.rb 0>>log.log 2>>err.log
\ No newline at end of file
# Move to the script's dir
readlink $0 > /dev/null 2>&1
isLink=$?
if [ $isLink -eq 0 ]; then
cd $(dirname $(readlink $0))
else
cd $(dirname $0)
fi
echo ------------------ >> log.log
echo ------------------ >> err.log
ruby lib/main.rb 0>>log.log 2>>err.log
\ No newline at end of file
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