mirror of
https://github.com/CringeStudios/element-desktop.git
synced 2025-01-18 23:44:59 +01:00
Merge pull request #27 from vector-im/dbkr/copy_hak_modules
Add our native modules separately into the files
This commit is contained in:
commit
6cb90add1d
@ -65,7 +65,11 @@
|
|||||||
"appId": "im.riot.app",
|
"appId": "im.riot.app",
|
||||||
"electronVersion": "7.1.3",
|
"electronVersion": "7.1.3",
|
||||||
"files": [
|
"files": [
|
||||||
"node_modules/**",
|
"package.json",
|
||||||
|
{
|
||||||
|
"from": ".hak/hakModules",
|
||||||
|
"to": "node_modules"
|
||||||
|
},
|
||||||
"src/**"
|
"src/**"
|
||||||
],
|
],
|
||||||
"extraResources": [
|
"extraResources": [
|
||||||
|
@ -105,7 +105,15 @@ async function fetch(hakEnv, moduleInfo) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
// also extract another copy to the output directory at this point
|
// also extract another copy to the output directory at this point
|
||||||
// nb. we do not yarn install in the output copy
|
// nb. we do not yarn install in the output copy: we could install in
|
||||||
|
// production mode to get only runtime dependencies and not devDependencies,
|
||||||
|
// but usually native modules come with dependencies that are needed for
|
||||||
|
// building/fetching the native modules (eg. node-pre-gyp) rather than
|
||||||
|
// actually used at runtime: we do not want to bundle these into our app.
|
||||||
|
// We therefore just install no dependencies at all, and accept that any
|
||||||
|
// actual runtime dependencies will have to be added to the main app's
|
||||||
|
// dependencies. We can't tell what dependencies are real runtime deps
|
||||||
|
// and which are just used for native module building.
|
||||||
await mkdirp(moduleInfo.moduleOutDir);
|
await mkdirp(moduleInfo.moduleOutDir);
|
||||||
await tar.x({
|
await tar.x({
|
||||||
file: tarballFile,
|
file: tarballFile,
|
||||||
|
@ -76,7 +76,7 @@ async function main() {
|
|||||||
moduleHakDir: path.join(prefix, 'hak', dep),
|
moduleHakDir: path.join(prefix, 'hak', dep),
|
||||||
moduleDotHakDir: path.join(hakEnv.dotHakDir, dep),
|
moduleDotHakDir: path.join(hakEnv.dotHakDir, dep),
|
||||||
moduleBuildDir: path.join(hakEnv.dotHakDir, dep, 'build'),
|
moduleBuildDir: path.join(hakEnv.dotHakDir, dep, 'build'),
|
||||||
moduleOutDir: path.join(hakEnv.dotHakDir, dep, 'out'),
|
moduleOutDir: path.join(hakEnv.dotHakDir, 'hakModules', dep),
|
||||||
nodeModuleBinDir: path.join(hakEnv.dotHakDir, dep, 'build', 'node_modules', '.bin'),
|
nodeModuleBinDir: path.join(hakEnv.dotHakDir, dep, 'build', 'node_modules', '.bin'),
|
||||||
depPrefix: path.join(hakEnv.dotHakDir, dep, 'opt'),
|
depPrefix: path.join(hakEnv.dotHakDir, dep, 'opt'),
|
||||||
scripts: {},
|
scripts: {},
|
||||||
|
Loading…
Reference in New Issue
Block a user