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
1
Issues
1
List
Boards
Labels
Service Desk
Milestones
Merge Requests
3
Merge Requests
3
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
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
MyCard
srvpro
Commits
a0bab0a1
Commit
a0bab0a1
authored
May 18, 2020
by
mercury233
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update pre util to generate ypk
parent
0bd6d0cd
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
17 deletions
+34
-17
data/default_config.json
data/default_config.json
+1
-0
ygopro-pre.js
ygopro-pre.js
+33
-17
No files found.
data/default_config.json
View file @
a0bab0a1
...
@@ -188,6 +188,7 @@
...
@@ -188,6 +188,7 @@
"html_filename"
:
"pre.html"
,
"html_filename"
:
"pre.html"
,
"git_db_path"
:
"../ygopro-pre-data/"
,
"git_db_path"
:
"../ygopro-pre-data/"
,
"db_path"
:
"../ygopro-pre-data/unofficial/"
,
"db_path"
:
"../ygopro-pre-data/unofficial/"
,
"ypk_name"
:
"pre-release.ypk"
,
"html_img_rel_path"
:
"pre/pics/"
,
"html_img_rel_path"
:
"pre/pics/"
,
"html_img_thumbnail"
:
"thumbnail/"
,
"html_img_thumbnail"
:
"thumbnail/"
,
"html_img_thumbnail_suffix"
:
"!thumb"
,
"html_img_thumbnail_suffix"
:
"!thumb"
,
...
...
ygopro-pre.js
View file @
a0bab0a1
...
@@ -396,8 +396,8 @@ var copyToYGOPRO = function(callback) {
...
@@ -396,8 +396,8 @@ var copyToYGOPRO = function(callback) {
});
});
}
}
function
run7z
(
params
,
callback
)
{
function
run7z
(
params
,
c
wd
,
c
allback
)
{
let
proc
=
spawn
(
settings
.
modules
.
tournament_mode
.
replay_archive_tool
,
params
,
{
cwd
:
c
onfig
.
db_path
,
env
:
process
.
env
});
let
proc
=
spawn
(
settings
.
modules
.
tournament_mode
.
replay_archive_tool
,
params
,
{
cwd
:
c
wd
,
env
:
process
.
env
});
proc
.
stdout
.
setEncoding
(
'
utf8
'
);
proc
.
stdout
.
setEncoding
(
'
utf8
'
);
proc
.
stdout
.
on
(
'
data
'
,
function
(
data
)
{
proc
.
stdout
.
on
(
'
data
'
,
function
(
data
)
{
//sendResponse("7z: "+data);
//sendResponse("7z: "+data);
...
@@ -421,28 +421,43 @@ var packDatas = function (callback) {
...
@@ -421,28 +421,43 @@ var packDatas = function (callback) {
_async
.
auto
({
_async
.
auto
({
preCommands
:
(
done
)
=>
{
preCommands
:
(
done
)
=>
{
execCommands
([
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
+
'
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
+
'
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"
'
'
cp -r "
'
+
config
.
db_path
+
'
field" "
'
+
config
.
db_path
+
'
picture/field"
'
],
done
);
],
done
);
},
},
run7zPC
:
[
"
preCommands
"
,
(
results
,
done
)
=>
{
run7zYPK
:
[
"
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
);
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
)
=>
{
run7zMobile
:
[
"
run7zYPK
"
,
(
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
);
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
)
=>
{
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
)
=>
{
commandsAfterPC
:
[
"
run7zPC
"
,
(
results
,
done
)
=>
{
execCommands
([
execCommands
([
'
mv -f "
'
+
config
.
db_path
+
'
ygosrv233-pre.zip" "
'
+
file_path
+
'
"
'
,
'
mv -f "
'
+
config
.
db_path
+
'
ygosrv233-pre.zip" "
'
+
file_path
+
'
"
'
'
rm -rf "
'
+
config
.
db_path
+
'
expansions/script"
'
,
'
rm -rf "
'
+
config
.
db_path
+
'
expansions/pics"
'
],
(
err
)
=>
{
],
(
err
)
=>
{
if
(
!
err
)
{
if
(
!
err
)
{
sendResponse
(
"
电脑更新包打包完成。
"
);
sendResponse
(
"
电脑更新包打包完成。
"
);
...
@@ -450,10 +465,12 @@ var packDatas = function (callback) {
...
@@ -450,10 +465,12 @@ var packDatas = function (callback) {
done
(
err
);
done
(
err
);
});
});
}],
}],
commandsAfterMobile
:
[
"
run7zMobile
"
,
(
results
,
done
)
=>
{
commandsAfterMobile
:
[
"
run7z
PC
"
,
"
run7z
Mobile
"
,
(
results
,
done
)
=>
{
execCommands
([
execCommands
([
'
mv -f "
'
+
config
.
db_path
+
'
ygosrv233-pre-mobile.zip" "
'
+
file_path
+
'
"
'
,
'
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
)
=>
{
],
(
err
)
=>
{
if
(
!
err
)
{
if
(
!
err
)
{
sendResponse
(
"
手机更新包打包完成。
"
);
sendResponse
(
"
手机更新包打包完成。
"
);
...
@@ -465,8 +482,7 @@ var packDatas = function (callback) {
...
@@ -465,8 +482,7 @@ var packDatas = function (callback) {
execCommands
([
execCommands
([
'
mv -f "
'
+
config
.
db_path
+
'
ygosrv233-pre-2.zip" "
'
+
file_path
+
'
"
'
,
'
mv -f "
'
+
config
.
db_path
+
'
ygosrv233-pre-2.zip" "
'
+
file_path
+
'
"
'
,
'
rm -rf "
'
+
config
.
db_path
+
'
cdb"
'
,
'
rm -rf "
'
+
config
.
db_path
+
'
cdb"
'
,
'
rm -rf "
'
+
config
.
db_path
+
'
picture/card"
'
,
'
rm -rf "
'
+
config
.
db_path
+
'
picture"
'
'
rm -rf "
'
+
config
.
db_path
+
'
picture/field"
'
],
(
err
)
=>
{
],
(
err
)
=>
{
if
(
!
err
)
{
if
(
!
err
)
{
sendResponse
(
"
Pro2更新包打包完成。
"
);
sendResponse
(
"
Pro2更新包打包完成。
"
);
...
...
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