Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
M
mycard
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
syntax_j
mycard
Commits
488befb2
Commit
488befb2
authored
Dec 19, 2011
by
zh99998
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
加入适用于linux的sh脚本启动
parent
0874201f
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
18 deletions
+19
-18
LICENSE.txt
LICENSE.txt
+2
-2
lib/main.rb
lib/main.rb
+2
-13
mycard.cmd
mycard.cmd
+3
-3
mycard.sh
mycard.sh
+12
-0
No files found.
LICENSE.txt
View file @
488befb2
==
iduel
==
mycard
Put appropriate LICENSE for your project here.
禁止用于作弊
\ No newline at end of file
lib/main.rb
View file @
488befb2
#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/i
DuelPanel_32512.ico
"
)
WM
::
set_caption
(
"
MyCard"
,
"graphics/system/icon.gif
"
)
WM
::
icon
=
Surface
.
load
(
"graphics/system/i
con.gif
"
)
style
=
HWSURFACE
style
|=
FULLSCREEN
if
$config
[
"fullscreen"
]
...
...
mycard.cmd
View file @
488befb2
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
mycard.sh
0 → 100755
View file @
488befb2
# 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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment