ee-core 1.2.7-beta.2 → 1.2.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/utils/index.js +5 -0
package/package.json
CHANGED
package/utils/index.js
CHANGED
|
@@ -7,6 +7,7 @@ const convert = require('koa-convert');
|
|
|
7
7
|
const is = require('is-type-of');
|
|
8
8
|
const co = require('co');
|
|
9
9
|
const utility = require('utility');
|
|
10
|
+
const eis = require('electron-is');
|
|
10
11
|
|
|
11
12
|
/**
|
|
12
13
|
* 创建文件夹
|
|
@@ -149,7 +150,11 @@ exports.getExtraResourcesDir = function() {
|
|
|
149
150
|
let dir = '';
|
|
150
151
|
if (config.isPackaged) {
|
|
151
152
|
// 打包后 execDir为 应用程序 exe\dmg\dep软件所在目录;打包前该值是项目根目录
|
|
153
|
+
// windows和MacOs不一样
|
|
152
154
|
dir = path.join(execDir, "resources", "extraResources");
|
|
155
|
+
if (eis.macOS()) {
|
|
156
|
+
dir = path.join(execDir, "..", "Resources", "extraResources");
|
|
157
|
+
}
|
|
153
158
|
} else {
|
|
154
159
|
// 打包前
|
|
155
160
|
dir = path.join(execDir, "build", "extraResources");
|