Commit 4136eb34 authored by 神楽坂玲奈's avatar 神楽坂玲奈

ghost trick

parent f7fa7a08
......@@ -107,7 +107,7 @@ export class DownloadService {
return app;
} else {
let meta4link = `${this.baseURL}${id}.meta4`;
if (id === "ygopro") {
if (["ygopro", 'desmume'].includes(id)) {
meta4link = `${this.baseURL}${id}-${process.platform}.meta4`
}
let response = await this.http.get(meta4link).toPromise();
......
......@@ -122,7 +122,7 @@ export class InstallService {
async getChecksumFile(app: App): Promise<Map<string,string> > {
let checksumUrl = this.checksumUri + app.id;
if (app.id === "ygopro") {
if (["ygopro", 'desmume'].includes(app.id)) {
checksumUrl = this.checksumUri + app.id + "-" + process.platform;
}
let checksumMap: Map<string,string> = await this.http.get(checksumUrl)
......@@ -148,7 +148,7 @@ export class InstallService {
let options = <InstallConfig>this.installQueue.get(app);
let checksumMap = await this.getChecksumFile(app);
let packagePath = path.join(options.installLibrary, 'downloading', `${app.id}.tar.xz`);
if (app.id === "ygopro") {
if (["ygopro", 'desmume'].includes(app.id)) {
packagePath = path.join(options.installLibrary, 'downloading', `${app.id}-${process.platform}.tar.xz`);
}
let destPath: string;
......
......@@ -25,6 +25,12 @@
<a (click)="chooseApp(app)" href="#">{{app.name}}</a>
</li>
</ul>
<span *ngIf="grouped_apps.runtime_installed">已安装的运行库</span>
<ul *ngIf="grouped_apps.runtime_installed" class="nav nav-sidebar">
<li *ngFor="let app of grouped_apps.runtime_installed" [class.active]="app===currentApp">
<a (click)="chooseApp(app)" href="#">{{app.name}}</a>
</li>
</ul>
</div>
<app-detail *ngIf="currentApp" [currentApp]="currentApp"></app-detail>
<roster></roster>
......
......@@ -119,20 +119,27 @@ export class LobbyComponent implements OnInit {
get grouped_apps() {
let contains = ["game", "music", "book"].map((value) => Category[value]);
let result = {};
let result = {runtime: []};
for (let app of this.apps.values()) {
let tag;
if (contains.includes(app.category)) {
let tag;
if (app.isInstalled()) {
tag = 'installed';
} else {
tag = app.tags[0];
}
if (!result[tag]) {
result[tag] = []
} else {
if (app.isInstalled()) {
tag = 'runtime_installed';
} else {
tag = 'runtime';
}
result[tag].push(app)
}
if (!result[tag]) {
result[tag] = []
}
result[tag].push(app)
}
return result
}
......
......@@ -2159,12 +2159,20 @@
"yugioh"
],
"dependencies": {
"win32": [],
"darwin": []
"win32": [
"desmume"
],
"darwin": [
"desmume"
]
},
"references": {
"win32": [],
"darwin": []
"win32": [
"ghost_trick-lang-zh-CN"
],
"darwin": [
"ghost_trick-lang-zh-CN"
]
},
"author": "Fluorohydride",
"homepage": "https://github.com/Fluorohydride/ygopro",
......@@ -2208,21 +2216,42 @@
"yugioh"
],
"dependencies": {
"win32": [],
"darwin": []
"win32": [
"desmume",
"ghost_trick"
],
"darwin": [
"desmume",
"ghost_trick"
]
},
"references": {
"win32": [],
"darwin": []
},
"parent": "ghost_trick",
"author": "Fluorohydride",
"homepage": "https://github.com/Fluorohydride/ygopro",
"locales": [
"zh-CN"
],
"actions": {
"win32": {},
"darwin": {}
"win32": {
"main": {
"execute": "5017 - Ghost Trick (J).nds",
"args": [],
"env": {},
"open": "desmume"
}
},
"darwin": {
"main": {
"execute": "5017 - Ghost Trick (J).nds",
"args": [],
"env": {},
"open": "desmume"
}
}
},
"version": {
"darwin": "1.06"
......
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