mirror of
https://gitee.com/dromara/electron-egg.git
synced 2026-05-14 11:52:07 +08:00
优化软件调用
This commit is contained in:
@@ -38,8 +38,8 @@ class ExampleController extends Controller {
|
||||
async test () {
|
||||
const result = await this.service.example.test('electron');
|
||||
|
||||
// let tmpDir = Utils.getLogDir();
|
||||
// console.log('tmpDir:', tmpDir);
|
||||
let tmpDir = Utils.getLogDir();
|
||||
console.log('tmpDir:', tmpDir);
|
||||
|
||||
return result;
|
||||
}
|
||||
@@ -421,11 +421,12 @@ class ExampleController extends Controller {
|
||||
let softwarePath = '';
|
||||
if (electronApp.isPackaged) {
|
||||
// 打包后
|
||||
softwarePath = path.join(electronApp.getAppPath(), "..", "extraResources", softName);
|
||||
softwarePath = path.join(this.app.config.execDir, "resources", "extraResources", softName);
|
||||
} else {
|
||||
// 打包前
|
||||
softwarePath = path.join(electronApp.getAppPath(), "build", "extraResources", softName);
|
||||
softwarePath = path.join(this.app.config.execDir, "build", "extraResources", softName);
|
||||
}
|
||||
|
||||
// 检查程序是否存在
|
||||
if (!fs.existsSync(softwarePath)) {
|
||||
return false;
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<p/>
|
||||
<span class="sub-content">
|
||||
注:请先将【powershell.exe】复制到【electron-egg/build/extraResources】目录中
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
||||
<div class="one-block-2">
|
||||
<a-list bordered :data-source="data">
|
||||
|
||||
Reference in New Issue
Block a user