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

ghost trick

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