Commit fa87ef73 authored by wudizhanche1000's avatar wudizhanche1000

旧作wine下运行

parent 24384455
...@@ -137,10 +137,12 @@ export class AppsService { ...@@ -137,10 +137,12 @@ export class AppsService {
} }
let execute = path.join(cwd, action.execute); let execute = path.join(cwd, action.execute);
if (action.open) { if (action.open) {
let openAction: Action;
openAction = <Action>action.open.actions.get('main');
if (action.open.id == 'np2fmgen') { if (action.open.id == 'np2fmgen') {
const config_file = path.join((<AppLocal>(<App>action.open).local).path, 'np21nt.ini'); const config_file = path.join((<AppLocal>(<App>action.open).local).path, 'np21nt.ini');
let config = await new Promise((resolve, reject) => { let config = await new Promise((resolve, reject) => {
let config = fs.readFile(config_file, {encoding: 'utf-8'}, (error, data) => { fs.readFile(config_file, {encoding: 'utf-8'}, (error, data) => {
if (error) return reject(error); if (error) return reject(error);
resolve(ini.parse(data)); resolve(ini.parse(data));
}); });
...@@ -156,8 +158,10 @@ export class AppsService { ...@@ -156,8 +158,10 @@ export class AppsService {
} }
}) })
}); });
args.push(openAction.execute);
args = args.concat(openAction.args);
openAction = <Action>(<App>openAction.open).actions.get("main");
} }
let openAction = <Action>action.open.actions.get('main');
args = args.concat(openAction.args); args = args.concat(openAction.args);
args.push(action.execute); args.push(action.execute);
execute = path.join((<AppLocal>action.open.local).path, openAction.execute); execute = path.join((<AppLocal>action.open.local).path, openAction.execute);
......
...@@ -2031,6 +2031,12 @@ ...@@ -2031,6 +2031,12 @@
"name": { "name": {
"zh-CN": "np2fmgen" "zh-CN": "np2fmgen"
}, },
"dependencies": {
"win32": [],
"darwin": [
"wine"
]
},
"description": { "description": {
"zh-CN": "np2fmgen" "zh-CN": "np2fmgen"
}, },
...@@ -2048,6 +2054,12 @@ ...@@ -2048,6 +2054,12 @@
} }
}, },
"darwin": { "darwin": {
"main": {
"execute": "np21nt.exe",
"args": [],
"env": {},
"open": "wine"
}
} }
} }
}, },
...@@ -2066,13 +2078,13 @@ ...@@ -2066,13 +2078,13 @@
"category": "emulator", "category": "emulator",
"actions": { "actions": {
"win32": { "win32": {
}, },
"darwin": { "darwin": {
"main": { "main": {
"execute": "bin/wine.bin", "execute": "bin/wine.bin",
"args": [], "args": [],
"env": "", "env": ""
"open": ""
} }
} }
} }
......
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