Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions electron-app/resources/entitlements.mac.plist
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,5 @@
<true/>
<key>com.apple.security.cs.disable-library-validation</key>
<true/>
<key>com.apple.security.cs.allow-dyld-environment-variables</key>
<true/>
</dict>
</plist>
23 changes: 23 additions & 0 deletions electron-app/webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
const path = require('node:path');
const fs = require('fs');
const webpack = require('webpack');
const TheiaNativeWebpackPlugin = require('@theia/native-webpack-plugin');
const frontend = require('./gen-webpack.config');
const backend = require('./gen-webpack.node.config');
const {
Expand Down Expand Up @@ -39,6 +41,27 @@ backend.config.entry['parcel-watcher'] = {
},
};

// Override Theia native dependency bundler to assign stricter file permissions (chmod 755)
// https://github.com/eclipse-theia/theia/blob/9a52544fb4c1ea1d3d0d6bcbe106b97184279030/dev-packages/native-webpack-plugin/src/native-webpack-plugin.ts#L149
class NativeWebpackPlugin extends TheiaNativeWebpackPlugin {
// Override the method that writes/copies files
async copyExecutable(source, target) {
const targetDirectory = path.dirname(target);
await fs.promises.mkdir(targetDirectory, { recursive: true });
await fs.promises.copyFile(source, target);
await fs.promises.chmod(target, 0o755);
}
}
backend.config.plugins.push(new NativeWebpackPlugin({
out: 'native',
trash: true,
ripgrep: true,
pty: true,
nativeBindings: {
drivelist: 'drivelist/build/Release/drivelist.node',
},
}));

// Use a customized backend main that can enable the file logger in bundled mode.
backend.config.entry['main'] = require.resolve('./arduino-ide-backend-main.js');

Expand Down
Loading