diff --git a/src/main/App.js b/src/main/App.js index 025a938b..3b3f15d7 100644 --- a/src/main/App.js +++ b/src/main/App.js @@ -24,7 +24,7 @@ export default class App { } static async isInstallRosetta() { - return await FsUtil.Exists('/usr/libexec/rosetta/runtime') + return await FsUtil.Exists('/Library/Apple/usr/libexec/oah/libRosettaRuntime') } static async init() { @@ -62,10 +62,15 @@ export default class App { } static async checkInstall(){ - if (GetAppPath.getDir().includes(' ')) { + const appPath = GetAppPath.getDir() + if (appPath.includes(' ')) { throw new Error('安装路径不能包含空格!') } + if (/[\u4e00-\u9fa5]/.test(appPath)) { + throw new Error('安装路径不能包含中文!') + } + if (isWindows) { const hmc = require('hmc-win32') const semverDiff = require('semver-diff')