"electron-builder - initially designated for building app for Mac only, but now configured to build for both Mac

This is my first attempt at creating an electronjs app, so I may not have a full grasp on what I'm doing.

I've been following the instructions on GitHub and also this guide from Medium. Here's a snippet of my package.json:

{
  (package.json data)
}

In the build script in the package.json, I have specified setups for both mac and win. However, when I run:

nom run dist

only a DMG file is successfully built. There is no output related to building for Windows. Any idea what setting I might be missing?

I'm using a MacBook with macOS 10.12.6. Is it possible that you can only build for your own platform? Can a Mac system build for Windows?

Update01 I removed the build script section entirely from the package.json and the build still went through without errors. Could it mean that the build script is referenced elsewhere perhaps?

Answer №1

When using electron-builder, the default is to build for the current platform only. To build for both Mac and Windows, you can include the following script in your configuration:

"dist-all": "electron-builder -mw"

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Tips for integrating jwt token into axios request

I am facing an issue with my backend endpoint. I can successfully retrieve a list of customers using jwt token on Postman, but when I try to fetch the list from a React app using axios get request, it fails. After reading through this question, I implemen ...

Is there a way to dynamically fetch and run JavaScript code from the server without resorting to the use of the

In my current project, I am developing a unique PHP framework that empowers PHP developers to effortlessly craft ExtJS interfaces containing forms, grids, tabpanels, and menus exclusively through PHP classes. To illustrate, creating a TabPanel in this fra ...

Karma is reporting an error with TypeScript, saying it cannot locate the variable 'exports'

Currently, I am in the process of mastering how to write Unit Test cases for an angular project coded in Typescript. To facilitate this, I have opted for utilizing Karma and Mocha. Below lays out the structure of the application: Project/ ├── app/ ...

What could be the reason for the sudden lack of content from the Blogger API?

For weeks, I've been using the Google API to retrieve JSON data from my Blogger account and showcase and style blog posts on my personal website. Everything was functioning flawlessly until yesterday when, out of the blue, the content section stopped ...

Guide to Updating Store State with API Data

My goal is to update my component state with data retrieved from an API using a getter in the store. Within the mounted() lifecycle hook, I call the getProducts() getter which is defined as: export const getters = { async getProducts() { axios.ge ...

Error encountered while parsing data in Internet Explorer versions 7, 8, 9, and 10 due to an invalid character. The status

This block of code is functioning correctly on Chrome and Firefox, however it seems to be having issues with Internet Explorer! It involves a simple JSON file call, fetching data, and then displaying it on an HTML webpage. Here's the code snippet: $. ...

Issue with Docker: Docker does not support Parcel (Parceljs) installation

When I try to run my Node.js application within a Docker container, the parcel build process fails with an unhelpful error message. However, the application runs smoothly without any issues when executed locally outside of Docker. To troubleshoot this pro ...

switch out asterisk on innerhtml using javascript

Is there a way to replace the asterisks with a blank ("") in the innerHTML using JavaScript? I've attempted this method: document.getElementById("lab").innerHTML = document.getElementById("lab").innerHTML.replace(/*/g, ''); I also ...

There's just something really irritating me about that Facebook Timer feature

Have you ever noticed the timers constantly updating on Facebook? Whether it's an Ajax Request triggered by a timer or a client-side timer, there are numerous timers being used. Does this affect the performance of the website, and is there something c ...

Tips for updating process.version in a Node.js environment

After upgrading my node version from v3 to v11 using nvm with the command nvm use 11.12.0, I noticed that when I check the version using node -v in the terminal, it correctly shows 11.12.0. I also have a node js application that is started through pm2. I ...

Increase in JQuery .ajax timeout not effective

My website has a process where JavaScript sends a POST request to a PHP server using the .ajax() function. The PHP server then communicates with a third-party API to perform text analysis tasks. After submitting the job, the PHP server waits for a minute b ...

Transferring an array of objects from one array to another with the click of a button

I'm facing an issue with moving data between two arrays of objects using buttons in a Nextjs project. The functionality works correctly when selecting a single data item, but it gives unexpected results when selecting multiple items. Although my code ...

Developing a dynamic user interface using an Angular framework and populating it with

I am currently learning Angular (version 1) and facing an issue with my layout. I need to dynamically change the navigation based on the type of user that is logged in. To achieve this, I make an API request when the page loads to fetch the user object dat ...

Unable to determine why node.js express path is not working

const express = require("express"); const app = express(); app.use(express.static("public")); var dirname = __dirname; app.get("/:lang/:app",function(req,res){ console.log(req.params.lang + " " + req.params.app); ...

Obtain both Firefox and Chrome binaries simultaneously using Puppeteer

I can easily obtain firefox binaries for my project by setting the environment variable: npm config set PUPPETEER_PRODUCT firefox npm i puppeteer Next, within my project directory, I execute: npm i puppeteer This process works smoothly. However, when I s ...

I am looking to preload a separate webpage prior to the HTML loading in AngularJS

I am looking to implement a feature in my AngularJS app where a different webpage (e.g. google.com) will be loaded based on the response of a REST API before any default HTML content is displayed. I have attempted to make a REST service call within a fact ...

Using the React Hook useCallback with no dependencies

Is it beneficial to utilize useCallback without dependencies for straightforward event handlers? Take, for instance: const MyComponent = React.memo(() => { const handleClick = useCallback(() => { console.log('clicked'); }, []); ...

What steps should be taken to retrieve the contents of a file that has been chosen using the browse

You have successfully implemented a browse button that allows the user to navigate the directory and choose a file. The path and file name are then displayed in the text element of the Browse button complex. Now, the question arises - how can I extract dat ...

Error encountered when attempting to install NPM with root user due to permission denial

After successfully installing npm/node on my local machine using NVM with root user, I ran into an issue when trying to install a project using npm install --unsafe-perm -verbose. An error popped up in my terminal. npm verb stack Error: Command failed: /u ...

Unable to iterate through nested arrays in Contentful mapping

I am facing an issue while trying to map further into the array after successfully retrieving data from Contentful. The error message field.fields.map is not a function keeps popping up and I can't figure out what I'm doing wrong. export defau ...