Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
S
srvpro
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
nanahira
srvpro
Commits
96e236f3
Commit
96e236f3
authored
May 19, 2020
by
nanahira
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of github.com:moecube/srvpro
parents
3366728b
3ce3b6b7
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
36 additions
and
19 deletions
+36
-19
data/default_config.json
data/default_config.json
+1
-0
ygopro-pre.js
ygopro-pre.js
+33
-17
ygopro-server.coffee
ygopro-server.coffee
+1
-1
ygopro-server.js
ygopro-server.js
+1
-1
No files found.
data/default_config.json
View file @
96e236f3
...
...
@@ -202,6 +202,7 @@
"html_filename"
:
"pre.html"
,
"git_db_path"
:
"../ygopro-pre-data/"
,
"db_path"
:
"../ygopro-pre-data/unofficial/"
,
"ypk_name"
:
"pre-release.ypk"
,
"html_img_rel_path"
:
"pre/pics/"
,
"html_img_thumbnail"
:
"thumbnail/"
,
"html_img_thumbnail_suffix"
:
"!thumb"
,
...
...
ygopro-pre.js
View file @
96e236f3
...
...
@@ -399,8 +399,8 @@ var copyToYGOPRO = function(callback) {
});
}
function
run7z
(
params
,
callback
)
{
let
proc
=
spawn
(
settings
.
modules
.
tournament_mode
.
replay_archive_tool
,
params
,
{
cwd
:
c
onfig
.
db_path
,
env
:
process
.
env
});
function
run7z
(
params
,
c
wd
,
c
allback
)
{
let
proc
=
spawn
(
settings
.
modules
.
tournament_mode
.
replay_archive_tool
,
params
,
{
cwd
:
c
wd
,
env
:
process
.
env
});
proc
.
stdout
.
setEncoding
(
'
utf8
'
);
proc
.
stdout
.
on
(
'
data
'
,
function
(
data
)
{
//sendResponse("7z: "+data);
...
...
@@ -424,28 +424,43 @@ var packDatas = function (callback) {
_async
.
auto
({
preCommands
:
(
done
)
=>
{
execCommands
([
'
rm -rf "
'
+
config
.
db_path
+
'
expansions/
'
+
config
.
ypk_name
+
'
"
'
,
'
rm -rf "
'
+
config
.
db_path
+
'
expansions/script"
'
,
'
rm -rf "
'
+
config
.
db_path
+
'
expansions/pics"
'
,
'
rm -rf "
'
+
config
.
db_path
+
'
cdb"
'
,
'
rm -rf "
'
+
config
.
db_path
+
'
picture"
'
,
'
mkdir "
'
+
config
.
db_path
+
'
picture"
'
,
'
cp -r "
'
+
config
.
db_path
+
'
expansions" "
'
+
config
.
db_path
+
'
cdb"
'
,
'
cp -r "
'
+
config
.
db_path
+
'
script" "
'
+
config
.
db_path
+
'
expansions/script"
'
,
'
cp -r "
'
+
config
.
db_path
+
'
field" "
'
+
config
.
db_path
+
'
pics/field"
'
,
'
cp -r "
'
+
config
.
db_path
+
'
pics" "
'
+
config
.
db_path
+
'
expansions/pics"
'
,
'
cp -r "
'
+
config
.
db_path
+
'
picn" "
'
+
config
.
db_path
+
'
picture/card"
'
,
'
cp -r "
'
+
config
.
db_path
+
'
field" "
'
+
config
.
db_path
+
'
expansions/pics/field"
'
,
'
cp -r "
'
+
config
.
db_path
+
'
script" "
'
+
config
.
db_path
+
'
expansions/script"
'
,
'
cp -r "
'
+
config
.
db_path
+
'
pics" "
'
+
config
.
db_path
+
'
picture/card"
'
,
'
cp -r "
'
+
config
.
db_path
+
'
field" "
'
+
config
.
db_path
+
'
picture/field"
'
],
done
);
},
run7zPC
:
[
"
preCommands
"
,
(
results
,
done
)
=>
{
run7z
([
"
a
"
,
"
-x!*.zip
"
,
"
-x!.git
"
,
"
-x!LICENSE
"
,
"
-x!README.md
"
,
"
-x!mobile.cdb
"
,
"
-x!cdb
"
,
"
-x!picn
"
,
"
-x!field
"
,
"
-x!script
"
,
"
-x!pics
"
,
"
-x!expansions/pics/thumbnail
"
,
"
-x!picture
"
,
"
ygosrv233-pre.zip
"
,
"
*
"
],
done
);
run7zYPK
:
[
"
preCommands
"
,
(
results
,
done
)
=>
{
run7z
([
"
a
"
,
"
-tzip
"
,
"
-x!*.ypk
"
,
config
.
ypk_name
,
"
*
"
],
config
.
db_path
+
"
expansions/
"
,
done
);
}],
run7zPC
:
[
"
run7zYPK
"
,
(
results
,
done
)
=>
{
run7z
([
"
a
"
,
"
-x!*.zip
"
,
"
-x!.git
"
,
"
-x!LICENSE
"
,
"
-x!README.md
"
,
"
-x!cdb
"
,
"
-x!picture
"
,
"
-x!field
"
,
"
-x!script
"
,
"
-x!pics
"
,
"
-x!expansions/pics
"
,
"
-x!expansions/script
"
,
"
-x!expansions/*.cdb
"
,
"
-x!expansions/*.conf
"
,
"
ygosrv233-pre.zip
"
,
"
*
"
],
config
.
db_path
,
done
);
}],
run7zMobile
:
[
"
preCommands
"
,
(
results
,
done
)
=>
{
run7z
([
"
a
"
,
"
-x!*.zip
"
,
"
-x!.git
"
,
"
-x!LICENSE
"
,
"
-x!README.md
"
,
"
-x!expansions/pics
"
,
"
-x!expansions/script
"
,
"
-x!cdb
"
,
"
-x!picn
"
,
"
-x!field
"
,
"
-x!pics/thumbnail
"
,
"
-x!picture
"
,
"
ygosrv233-pre-mobile.zip
"
,
"
*
"
],
done
);
run7zMobile
:
[
"
run7zYPK
"
,
(
results
,
done
)
=>
{
run7z
([
"
a
"
,
"
-x!*.zip
"
,
"
-x!.git
"
,
"
-x!LICENSE
"
,
"
-x!README.md
"
,
"
-x!cdb
"
,
"
-x!picture
"
,
"
-x!field
"
,
"
-x!script
"
,
"
-x!pics
"
,
"
-x!expansions/pics
"
,
"
-x!expansions/script
"
,
"
-x!expansions/*.cdb
"
,
"
-x!expansions/*.conf
"
,
"
ygosrv233-pre-mobile.zip
"
,
"
*
"
],
config
.
db_path
,
done
);
}],
run7zPro2
:
[
"
preCommands
"
,
(
results
,
done
)
=>
{
run7z
([
"
a
"
,
"
-x!*.zip
"
,
"
-x!.git
"
,
"
-x!LICENSE
"
,
"
-x!README.md
"
,
"
-x!expansions
"
,
"
-x!pics
"
,
"
-x!picn
"
,
"
-x!field
"
,
"
ygosrv233-pre-2.zip
"
,
"
*
"
],
done
);
run7z
([
"
a
"
,
"
-x!*.zip
"
,
"
-x!.git
"
,
"
-x!LICENSE
"
,
"
-x!README.md
"
,
"
-x!expansions
"
,
"
-x!pics
"
,
"
-x!field
"
,
"
ygosrv233-pre-2.zip
"
,
"
*
"
],
config
.
db_path
,
done
);
}],
commandsAfterPC
:
[
"
run7zPC
"
,
(
results
,
done
)
=>
{
execCommands
([
'
mv -f "
'
+
config
.
db_path
+
'
ygosrv233-pre.zip" "
'
+
file_path
+
'
"
'
,
'
rm -rf "
'
+
config
.
db_path
+
'
expansions/script"
'
,
'
rm -rf "
'
+
config
.
db_path
+
'
expansions/pics"
'
'
mv -f "
'
+
config
.
db_path
+
'
ygosrv233-pre.zip" "
'
+
file_path
+
'
"
'
],
(
err
)
=>
{
if
(
!
err
)
{
sendResponse
(
"
电脑更新包打包完成。
"
);
...
...
@@ -453,10 +468,12 @@ var packDatas = function (callback) {
done
(
err
);
});
}],
commandsAfterMobile
:
[
"
run7zMobile
"
,
(
results
,
done
)
=>
{
commandsAfterMobile
:
[
"
run7z
PC
"
,
"
run7z
Mobile
"
,
(
results
,
done
)
=>
{
execCommands
([
'
mv -f "
'
+
config
.
db_path
+
'
ygosrv233-pre-mobile.zip" "
'
+
file_path
+
'
"
'
,
'
rm -rf "
'
+
config
.
db_path
+
'
pics/field"
'
'
rm -rf "
'
+
config
.
db_path
+
'
expansions/
'
+
config
.
ypk_name
+
'
"
'
,
'
rm -rf "
'
+
config
.
db_path
+
'
expansions/script"
'
,
'
rm -rf "
'
+
config
.
db_path
+
'
expansions/pics"
'
],
(
err
)
=>
{
if
(
!
err
)
{
sendResponse
(
"
手机更新包打包完成。
"
);
...
...
@@ -468,8 +485,7 @@ var packDatas = function (callback) {
execCommands
([
'
mv -f "
'
+
config
.
db_path
+
'
ygosrv233-pre-2.zip" "
'
+
file_path
+
'
"
'
,
'
rm -rf "
'
+
config
.
db_path
+
'
cdb"
'
,
'
rm -rf "
'
+
config
.
db_path
+
'
picture/card"
'
,
'
rm -rf "
'
+
config
.
db_path
+
'
picture/field"
'
'
rm -rf "
'
+
config
.
db_path
+
'
picture"
'
],
(
err
)
=>
{
if
(
!
err
)
{
sendResponse
(
"
Pro2更新包打包完成。
"
);
...
...
ygopro-server.coffee
View file @
96e236f3
...
...
@@ -4287,7 +4287,7 @@ if settings.modules.http
response
.
end
(
addCallback
(
u
.
query
.
callback
,
"['密码错误', 0]"
))
return
try
await
util
.
promisify
(
setting_change
)(
settings
,
'modules:
stop
'
,
u
.
query
.
welcome
)
await
util
.
promisify
(
setting_change
)(
settings
,
'modules:
welcome
'
,
u
.
query
.
welcome
)
response
.
end
(
addCallback
(
u
.
query
.
callback
,
"['welcome ok', '"
+
u
.
query
.
welcome
+
"']"
))
catch
err
response
.
end
(
addCallback
(
u
.
query
.
callback
,
"['welcome fail', '"
+
u
.
query
.
welcome
+
"']"
))
...
...
ygopro-server.js
View file @
96e236f3
...
...
@@ -5736,7 +5736,7 @@
return
;
}
try
{
await
util
.
promisify
(
setting_change
)(
settings
,
'
modules:
stop
'
,
u
.
query
.
welcome
);
await
util
.
promisify
(
setting_change
)(
settings
,
'
modules:
welcome
'
,
u
.
query
.
welcome
);
response
.
end
(
addCallback
(
u
.
query
.
callback
,
"
['welcome ok', '
"
+
u
.
query
.
welcome
+
"
']
"
));
}
catch
(
error1
)
{
err
=
error1
;
...
...
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