Security News
NIST Misses 2024 Deadline to Clear NVD Backlog
NIST has failed to meet its self-imposed deadline of clearing the NVD's backlog by the end of the fiscal year. Meanwhile, CVE's awaiting analysis have increased by 33% since June.
@electron/universal
Advanced tools
Utility for creating Universal macOS applications from two x64 and arm64 Electron applications
@electron/universal is an npm package designed to help developers create and manage universal builds of Electron applications. It allows you to combine multiple platform-specific builds (e.g., macOS, Windows, Linux) into a single package that can be distributed and run on different operating systems.
Combining Platform-Specific Builds
This feature allows you to combine x64 and arm64 builds of your Electron app into a single universal app. The code sample demonstrates how to use the `makeUniversalApp` function to specify the paths to the x64 and arm64 builds and the output path for the universal app.
const { makeUniversalApp } = require('@electron/universal');
makeUniversalApp({
x64AppPath: 'path/to/x64/app',
arm64AppPath: 'path/to/arm64/app',
outAppPath: 'path/to/universal/app'
}).then(() => {
console.log('Universal app created successfully!');
}).catch((err) => {
console.error('Error creating universal app:', err);
});
Extracting Platform-Specific Builds
This feature allows you to extract the x64 and arm64 builds from a universal app. The code sample demonstrates how to use the `extractFromUniversalApp` function to specify the path to the universal app and the output paths for the extracted x64 and arm64 builds.
const { extractFromUniversalApp } = require('@electron/universal');
extractFromUniversalApp({
universalAppPath: 'path/to/universal/app',
x64AppPath: 'path/to/extracted/x64/app',
arm64AppPath: 'path/to/extracted/arm64/app'
}).then(() => {
console.log('Platform-specific builds extracted successfully!');
}).catch((err) => {
console.error('Error extracting builds:', err);
});
electron-builder is a complete solution to package and build a ready-for-distribution Electron app for macOS, Windows, and Linux. It supports creating platform-specific builds and can be configured to handle various build tasks. Unlike @electron/universal, which focuses on creating universal builds, electron-builder provides a broader range of features for packaging and distributing Electron apps.
electron-packager is a command-line tool and Node.js library that bundles Electron-based application source code with a pre-built version of Electron, making it easy to create platform-specific builds. While it does not specifically focus on creating universal builds like @electron/universal, it is a popular tool for packaging Electron apps for different operating systems.
Create universal macOS Electron applications
import { makeUniversalApp } from '@electron/universal';
await makeUniversalApp({
x64AppPath: 'path/to/App_x64.app',
arm64AppPath: 'path/to/App_arm64.app',
outAppPath: 'path/to/App_universal.app',
});
Well, a Universal app isn't anything magical. It is literally the x64 app and the arm64 app glued together into a single application. It's twice as big because it contains two apps in one.
The way @electron/universal
works today means you don't need to worry about
things like building universal versions of your native modules. As long as
your x64 and arm64 apps work in isolation the Universal app will work as well.
Check out the Electron Apple silicon blog post
FAQs
Utility for creating Universal macOS applications from two x64 and arm64 Electron applications
We found that @electron/universal demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
NIST has failed to meet its self-imposed deadline of clearing the NVD's backlog by the end of the fiscal year. Meanwhile, CVE's awaiting analysis have increased by 33% since June.
Security News
Cloudflare has launched a setup wizard allowing users to easily create and manage a security.txt file for vulnerability disclosure on their websites.
Security News
The Socket Research team breaks down a malicious npm package targeting the legitimate DOMPurify library. It uses obfuscated code to hide that it is exfiltrating browser and crypto wallet data.