DEV Community

Cover image for Cross-compile a distributed Electron App
Greg, The JavaScript Whisperer
Greg, The JavaScript Whisperer

Posted on

1

Cross-compile a distributed Electron App

Another quick post, I see a lot of developers would rather complain on github than go into hacker mode and solve their issue.

My last post around LiveCaptioning mentions WhisperScript a macOS only electron app. On the thread there are (rightly so) 50ish complaints about it not being availalbe for Windows or Linux.

Let's fix that! Electron was great back in the day, but security was never one of them. A lot of these app even commercially distributed unknowingly I hope, ship there source code. 🫨🫨🫨

An electron package app format is called ASAR, and luckily for us you can unpack it, it's basically a zip or rar type compression format.

Easiest if you can install to say mac then right click and show package contents.

Image description

Let's find the ASAR here, Contents/Resources

Image description

Now one liner npx asar pack untouched app.asar

Naviagte to the newly created "app" folder install the deps eg. yarn

and repackage npx electron-forge package --platform=win32 --arch="x64"

windows users rejoice, there may be additional fiddling with native binaries etc but this is 90% the work.

It is important to of course only do this on properly licensed (APACHE etc) or rather unlicensed software.

We are in luck
Image description

Heroku

Amplify your impact where it matters most β€” building exceptional apps.

Leave the infrastructure headaches to us, while you focus on pushing boundaries, realizing your vision, and making a lasting impression on your users.

Get Started

Top comments (1)

Collapse
 
jswhisperer profile image
Greg, The JavaScript Whisperer β€’

If you are compiling from macOS to Windows you will need Wine... to drink optional but the app. brew install --cask wine-stable

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

πŸ‘‹ Kindness is contagious

Engage with a wealth of insights in this thoughtful article, valued within the supportive DEV Community. Coders of every background are welcome to join in and add to our collective wisdom.

A sincere "thank you" often brightens someone’s day. Share your gratitude in the comments below!

On DEV, the act of sharing knowledge eases our journey and fortifies our community ties. Found value in this? A quick thank you to the author can make a significant impact.

Okay