dan*_*ani 4 air flash executable flash-builder
我正在构建一个使用.app/.exe文件作为硬件设备桥接器的Air应用程序.
理想情况下,我希望将可执行文件包含在Air应用程序安装程序中,并与Air应用程序一起启动外部程序.
1)这可能吗?
2)如何确定要启动哪个操作系统特定文件?
编辑:好的,上面不是很难:
var file:File = File.applicationDirectory;
file = file.resolvePath("src/assets/NativeApps");
if (Capabilities.os.toLowerCase().indexOf("win") > -1) {
file = file.resolvePath("Windows/echoTestWin.exe");
}
else if (Capabilities.os.toLowerCase().indexOf("mac") > -1) {
file = file.resolvePath("Mac/echoTestMac.app");
}
var nativeProcessStartupInfo:NativeProcessStartupInfo = new NativeProcessStartupInfo();
nativeProcessStartupInfo.executable = file;
var process = new NativeProcess();
process.start(nativeProcessStartupInfo)
Run Code Online (Sandbox Code Playgroud)
但为什么我会收到此错误消息?
ArgumentError:错误#3214:NativeProcessStartupInfo.executable未指定有效的可执行文件.
.app扩展名不是有效的吗?
| 归档时间: |
|
| 查看次数: |
4457 次 |
| 最近记录: |