Commit fa87ef73 authored by wudizhanche1000's avatar wudizhanche1000

旧作wine下运行

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