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
402fcdc7
Commit
402fcdc7
authored
Nov 24, 2016
by
神楽坂玲奈
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
custom
parent
da462e73
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
385 additions
and
122 deletions
+385
-122
README.md
README.md
+1
-1
app/app-detail.component.html
app/app-detail.component.html
+43
-43
app/app-detail.component.ts
app/app-detail.component.ts
+11
-7
app/apps.service.ts
app/apps.service.ts
+11
-5
apps.json
apps.json
+318
-65
appveyor.yml
appveyor.yml
+1
-1
No files found.
README.md
View file @
402fcdc7
...
...
@@ -31,5 +31,5 @@ unzip -o aria2-1.28.0-win-32bit-build1.zip aria2-1.28.0-win-32bit-build1/aria2c.
mv
aria2-1.28.0-win-32bit-build1/aria2c.exe bin
rm
-rf
aria2-1.28.0-win-32bit-build1 aria2-1.27.1-win-32bit-build1.zip
curl
-L
'http://downloads.sourceforge.net/project/msys2/REPOS/MSYS2/i686/bsdtar-3.2.1-1-i686.pkg.tar.xz'
|
tar
--strip-components
=
2
-C
bin
-Jxf
- usr/bin/bsdtar.exe
curl
-L
'http://downloads.sourceforge.net/project/msys2/Base/i686/msys2-base-i686-20161025.tar.xz'
|
tar
--strip-components
=
3
-C
bin
-Jxf
- msys32/usr/bin/msys-2.0.dll msys32/usr/bin/msys-bz2-1.dll msys32/usr/bin/msys-gcc_s-1.dll msys32/usr/bin/msys-iconv-2.dll msys32/usr/bin/msys-lzma-5.dll msys32/usr/bin/msys-lzo2-2.dll msys32/usr/bin/msys-nettle-6.dll msys32/usr/bin/msys-xml2-2.dll msys32/usr/bin/msys-z.dll
curl
-L
'http://downloads.sourceforge.net/project/msys2/Base/i686/msys2-base-i686-20161025.tar.xz'
|
tar
--strip-components
=
3
-C
bin
-Jxf
- msys32/usr/bin/msys-2.0.dll msys32/usr/bin/msys-bz2-1.dll msys32/usr/bin/msys-gcc_s-1.dll msys32/usr/bin/msys-iconv-2.dll msys32/usr/bin/msys-lzma-5.dll msys32/usr/bin/msys-lzo2-2.dll msys32/usr/bin/msys-nettle-6.dll msys32/usr/bin/msys-xml2-2.dll msys32/usr/bin/msys-z.dll
msys32/usr/bin/sha256sum.exe
```
\ No newline at end of file
app/app-detail.component.html
View file @
402fcdc7
...
...
@@ -13,7 +13,7 @@
value=
"{{currentApp.status.progress}}"
max=
"{{currentApp.status.total}}"
></progress>
<div
*ngIf=
"currentApp.status.status==='ready' && (currentApp.id != 'ygopro')"
>
<button
(click)=
"runApp(currentApp)"
type=
"button"
class=
"btn btn-primary"
>
运行
</button>
<button
type=
"button"
data-toggle=
"modal"
data-target=
"#settings-modal
"
class=
"btn btn-secondary"
>
设置
</button>
<button
*ngIf=
"currentApp.actions.get('custom')"
(click)=
"custom(currentApp)"
type=
"button
"
class=
"btn btn-secondary"
>
设置
</button>
<!--<button (click)="appsService.browse(currentApp)" type="button" class="btn btn-secondary">游览本地文件</button>-->
<div
id=
"network"
*ngIf=
"currentApp.network && currentApp.network.protocol == 'maotama'"
>
...
...
@@ -119,51 +119,51 @@
</button>
</div>
<
div
class=
"modal fade"
id=
"settings-modal"
tabindex=
"-1"
>
<
div
class=
"modal-dialog"
role=
"document"
>
<
div
class=
"modal-content"
>
<
div
class=
"modal-header"
>
<
button
type=
"button"
class=
"close"
data-dismiss=
"modal"
aria-label=
"Close"
>
<
span
aria-hidden=
"true"
>
×
</span
>
<
/button
>
<
h4
class=
"modal-title"
>
{{'settings'|translate}}
</h4
>
<
ul
class=
"nav nav-tabs"
>
<
li
class=
"nav-item"
>
<
a
class=
"nav-link active"
data-toggle=
"tab"
href=
"#general"
>
{{'general'|translate}}
</a
>
<
/li
>
<
li
class=
"nav-item"
>
<
a
class=
"nav-link"
data-toggle=
"tab"
href=
"#updates"
>
{{'updates'|translate}}
</a
>
<
/li
>
<
li
class=
"nav-item"
>
<
a
class=
"nav-link"
data-toggle=
"tab"
href=
"#local-files"
>
{{'local files'|translate}}
</a
>
<
/li
>
<
/ul
>
<
/div
>
<
div
class=
"modal-body"
>
<
div
class=
"tab-content"
>
<
div
id=
"general"
role=
"tabpanel"
class=
"tab-pane fade active"
>
<
!--<div class="modal fade" id="settings-modal" tabindex="-1">--
>
<
!--<div class="modal-dialog" role="document">--
>
<
!--<div class="modal-content">--
>
<
!--<div class="modal-header">--
>
<
!--<button type="button" class="close" data-dismiss="modal" aria-label="Close">--
>
<
!--<span aria-hidden="true">×</span>--
>
<
!--</button>--
>
<
!--<h4 class="modal-title">{{'settings'|translate}}</h4>--
>
<
!--<ul class="nav nav-tabs">--
>
<
!--<li class="nav-item">--
>
<
!--<a class="nav-link active" data-toggle="tab" href="#general"> {{'general'|translate}} </a>--
>
<
!--</li>--
>
<
!--<li class="nav-item">--
>
<
!--<a class="nav-link" data-toggle="tab" href="#updates"> {{'updates'|translate}} </a>--
>
<
!--</li>--
>
<
!--<li class="nav-item">--
>
<
!--<a class="nav-link" data-toggle="tab" href="#local-files"> {{'local files'|translate}} </a>--
>
<
!--</li>--
>
<
!--</ul>--
>
<
!--</div>--
>
<
!--<div class="modal-body">--
>
<
!--<div class="tab-content">--
>
<
!--<div id="general" role="tabpanel" class="tab-pane fade active">--
>
<
/div
>
<
div
id=
"updates"
role=
"tabpanel"
class=
"tab-pane fade"
>
<
!--</div>--
>
<
!--<div id="updates" role="tabpanel" class="tab-pane fade">--
>
<
/div
>
<
div
id=
"local-files"
role=
"tabpanel"
class=
"tab-pane fade"
>
<
div
class=
"list-inline"
>
<
button
type=
"button"
[disabled]=
"!currentApp.isInstalled()"
(click)=
"uninstall()"
>
{{'uninstall'|translate}}
<
/button
>
<
i
*ngIf=
"uninstalling"
class=
"fa fa-circle-o-notch fa-spin fa-3x fa-fw"
></i
>
<
span
class=
"sr-only"
>
Loading...
</span
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
div
>
<
!--</div>--
>
<
!--<div id="local-files" role="tabpanel" class="tab-pane fade">--
>
<
!--<div class="list-inline">--
>
<
!--<button type="button" [disabled]="!currentApp.isInstalled()" (click)="uninstall()">--
>
<!--{{'uninstall'|translate}}-->
<
!--</button>--
>
<
!--<i *ngIf="uninstalling" class="fa fa-circle-o-notch fa-spin fa-3x fa-fw"></i>--
>
<
!--<span class="sr-only">Loading...</span>--
>
<
!--</div>--
>
<
!--</div>--
>
<
!--</div>--
>
<
!--</div>--
>
<
!--<div>--
>
<
/div
>
<
/div
>
<
/div
>
<
/div>
<!-- Modal
-->
<
!--</div>--
>
<
!--</div>--
>
<
!--</div>--
>
<
!--</div><!– Modal –>
-->
<div
class=
"modal fade"
id=
"install-modal"
tabindex=
"-1"
role=
"dialog"
aria-labelledby=
"myModalLabel"
aria-hidden=
"true"
*ngIf=
"installConfig"
>
<div
class=
"modal-dialog"
role=
"document"
>
...
...
app/app-detail.component.ts
View file @
402fcdc7
...
...
@@ -42,7 +42,7 @@ export class AppDetailComponent implements OnInit {
}
get
libraries
():
string
[]
{
return
this
.
settingsService
.
getLibraries
().
map
((
item
)
=>
item
.
path
);
return
this
.
settingsService
.
getLibraries
().
map
((
item
)
=>
item
.
path
);
}
get
news
()
{
...
...
@@ -97,7 +97,7 @@ export class AppDetailComponent implements OnInit {
let
options
=
this
.
installConfig
;
let
dependencies
=
currentApp
.
findDependencies
();
let
apps
=
dependencies
.
concat
(
currentApp
).
filter
((
app
)
=>
!
app
.
isInstalled
());
let
apps
=
dependencies
.
concat
(
currentApp
).
filter
((
app
)
=>
!
app
.
isInstalled
());
for
(
let
reference
of
options
.
references
)
{
if
(
reference
.
install
)
{
...
...
@@ -110,24 +110,24 @@ export class AppDetailComponent implements OnInit {
try
{
let
downloadApps
=
await
this
.
downloadService
.
addUris
(
apps
,
downloadPath
);
this
.
downloadService
.
getProgress
(
currentApp
)
.
subscribe
((
progress
)
=>
{
.
subscribe
((
progress
)
=>
{
currentApp
.
status
.
status
=
"
downloading
"
;
currentApp
.
status
.
progress
=
progress
.
progress
;
currentApp
.
status
.
total
=
progress
.
total
;
this
.
ref
.
detectChanges
();
},
(
error
)
=>
{
(
error
)
=>
{
},
()
=>
{
()
=>
{
// 避免安装过快
if
(
currentApp
.
status
.
status
===
"
downloading
"
)
{
currentApp
.
status
.
status
=
"
waiting
"
;
this
.
ref
.
detectChanges
();
}
});
await
Promise
.
all
(
downloadApps
.
map
((
app
)
=>
{
await
Promise
.
all
(
downloadApps
.
map
((
app
)
=>
{
return
this
.
downloadService
.
getComplete
(
app
)
.
then
((
completeApp
:
App
)
=>
{
.
then
((
completeApp
:
App
)
=>
{
return
this
.
installService
.
add
(
completeApp
,
options
);
});
}));
...
...
@@ -152,6 +152,10 @@ export class AppDetailComponent implements OnInit {
this
.
appsService
.
runApp
(
app
);
}
custom
(
app
:
App
)
{
this
.
appsService
.
runApp
(
app
,
'
custom
'
);
}
copy
(
text
)
{
clipboard
.
writeText
(
text
);
}
...
...
app/apps.service.ts
View file @
402fcdc7
...
...
@@ -122,21 +122,28 @@ export class AppsService {
return
children
;
}
async
runApp
(
app
:
App
)
{
async
runApp
(
app
:
App
,
action_name
=
'
main
'
)
{
let
children
=
this
.
findChildren
(
app
);
let
cwd
=
(
<
AppLocal
>
app
.
local
).
path
;
let
action
:
Action
=
<
Action
>
app
.
actions
.
get
(
'
main
'
);
let
action
:
Action
=
<
Action
>
app
.
actions
.
get
(
action_name
);
let
args
:
string
[]
=
[];
let
env
=
{};
for
(
let
child
of
children
)
{
if
(
child
.
isInstalled
())
{
let
_action
=
child
.
actions
.
get
(
'
main
'
);
let
_action
=
child
.
actions
.
get
(
action_name
);
if
(
_action
)
{
action
=
_action
}
}
}
let
execute
=
path
.
join
(
cwd
,
action
.
execute
);
if
(
app
.
id
==
'
th123
'
){
let
th105
=
<
App
>
app
.
references
.
get
(
'
th105
'
);
if
(
th105
.
isInstalled
()){
const
config_file
=
path
.
join
((
<
AppLocal
>
app
.
local
).
path
,
'
np21nt.ini
'
);
}
}
if
(
action
.
open
)
{
let
np2
=
<
App
>
action
.
open
;
let
openAction
:
Action
;
...
...
@@ -173,14 +180,13 @@ export class AppsService {
args
=
args
.
concat
(
openAction
.
args
);
let
wine
=
<
App
>
openAction
.
open
;
openPath
=
(
<
AppLocal
>
wine
.
local
).
path
;
openAction
=
<
Action
>
(
<
App
>
openAction
.
open
).
actions
.
get
(
"
main
"
);
openAction
=
<
Action
>
(
<
App
>
openAction
.
open
).
actions
.
get
(
'
main
'
);
cwd
=
(
<
AppLocal
>
np2
.
local
).
path
;
}
args
=
args
.
concat
(
openAction
.
args
);
args
.
push
(
action
.
execute
);
execute
=
path
.
join
(
openPath
,
openAction
.
execute
);
env
=
Object
.
assign
(
env
,
openAction
.
env
);
}
args
=
args
.
concat
(
action
.
args
);
env
=
Object
.
assign
(
env
,
action
.
env
);
...
...
apps.json
View file @
402fcdc7
This diff is collapsed.
Click to expand it.
appveyor.yml
View file @
402fcdc7
...
...
@@ -39,7 +39,7 @@ install:
-
mv aria2-1.28.0-win-32bit-build1/aria2c.exe bin
-
rm -rf aria2-1.28.0-win-32bit-build1 aria2-1.27.1-win-32bit-build1.zip
-
curl -L 'http://downloads.sourceforge.net/project/msys2/REPOS/MSYS2/i686/bsdtar-3.2.1-1-i686.pkg.tar.xz' | tar --strip-components=2 -C bin -Jxf - usr/bin/bsdtar.exe
-
curl -L 'http://downloads.sourceforge.net/project/msys2/Base/i686/msys2-base-i686-20161025.tar.xz' | tar --strip-components=3 -C bin -Jxf - msys32/usr/bin/msys-2.0.dll msys32/usr/bin/msys-bz2-1.dll msys32/usr/bin/msys-gcc_s-1.dll msys32/usr/bin/msys-iconv-2.dll msys32/usr/bin/msys-lzma-5.dll msys32/usr/bin/msys-lzo2-2.dll msys32/usr/bin/msys-nettle-6.dll msys32/usr/bin/msys-xml2-2.dll msys32/usr/bin/msys-z.dll
-
curl -L 'http://downloads.sourceforge.net/project/msys2/Base/i686/msys2-base-i686-20161025.tar.xz' | tar --strip-components=3 -C bin -Jxf - msys32/usr/bin/msys-2.0.dll msys32/usr/bin/msys-bz2-1.dll msys32/usr/bin/msys-gcc_s-1.dll msys32/usr/bin/msys-iconv-2.dll msys32/usr/bin/msys-lzma-5.dll msys32/usr/bin/msys-lzo2-2.dll msys32/usr/bin/msys-nettle-6.dll msys32/usr/bin/msys-xml2-2.dll msys32/usr/bin/msys-z.dll
msys32/usr/bin/sha256sum.exe
-
ps
:
Install-Product node
-
npm install
...
...
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