Mac OS X method. From the app directory I ran the following commands in Terminal to include the ffmpeg binary as a module. Bundle modules with electron app.
The top-level mac key contains set of options instructing electron-builder on how it should build macOS targets. These options applicable for any macOS target.
category
String - The application category type, as shown in the Finder via View -> Arrange by Application Category when viewing the Applications directory.For example,'category': 'public.app-category.developer-tools'
will set the application category to Developer Tools.Valid values are listed in Apple’s documentation.target
String | TargetConfiguration - The target package type: list ofdefault
,dmg
,mas
,mas-dev
,pkg
,7z
,zip
,tar.xz
,tar.lz
,tar.gz
,tar.bz2
,dir
. Defaults todefault
(dmg and zip for Squirrel.Mac).identity
String - The name of certificate to use when signing. Consider using environment variables CSC_LINK or CSC_NAME instead of specifying this option. MAS installer identity is specified in the mas.icon
=build/icon.icns
String - The path to application icon.entitlements
String - The path to entitlements file for signing the app.build/entitlements.mac.plist
will be used if exists (it is a recommended way to set). MAS entitlements is specified in the mas.entitlementsInherit
String - The path to child entitlements which inherit the security settings for signing frameworks and bundles of a distribution.build/entitlements.mac.inherit.plist
will be used if exists (it is a recommended way to set). Otherwise default.This option only applies when signing withentitlements
provided.provisioningProfile
String - The path to the provisioning profile to use when signing, absolute or relative to the app root.bundleVersion
String - TheCFBundleVersion
. Do not use it unless you need to.bundleShortVersion
String - TheCFBundleShortVersionString
. Do not use it unless you need to.darkModeSupport
=false
Boolean - Whether a dark mode is supported. If your app does have a dark mode, you can make your app follow the system-wide dark mode setting.helperBundleId
=${appBundleIdentifier}.helper
String - The bundle identifier to use in the application helper’s plist.type
=distribution
“distribution” | “development” - Whether to sign app for development or for distribution.extendInfo
any - The extra entries forInfo.plist
.binaries
Array<String> - Paths of any extra binaries that need to be signed.minimumSystemVersion
String - The minimum version of macOS required for the app to run. Corresponds toLSMinimumSystemVersion
.requirements
String - Path of requirements file used in signing. Not applicable for MAS.electronLanguages
Array<String> | String - The electron locales. By default Electron locales used as is.extraDistFiles
Array<String> | String - Extra files to put in archive. Not applicable fortar.*
.hardenedRuntime
=true
Boolean - Whether your app has to be signed with hardened runtime.gatekeeperAssess
=false
Boolean - Whether to let electron-osx-sign validate the signing or not.
And all common platform-specific options.
- Electron-webpack ¶ Because setting up webpack in the electron environment shouldn’t be difficult. Overview¶ Modern web development practices today require a lot of setup with things like webpack to bundle your code, babel for transpiling, eslint for linting, and so much more that the list just.
- Finding the best Mac App Bundles has always been a challenge. With more than 7 years of experience, we are able to find the best deals for you – regarding software, apps, bundles, assets and so on. We make sure to find offers which lets you buy the apps cheaper or get the software even for free. Here is what underlines our experience.
- Mac developers are reporting that apps made using Electron (which is a framework that allows companies to ship web apps in a native app wrapper) are now being rejected by the automated Mac App Store review process. From a report: The apps in question are getting flagged because of their usage of private API calls. These API calls are not in the app itself, but part of the underlying Electron framework.
- Electron Cash now comes with the. El Capitan version. 4.2.0-0 APK file. IOS.AppImage is for any Linux 64 bit (it's a self-contained app bundle.
Electron was first open-sourced in 2014, and gained immediate popularity as a way to build desktop apps using web technologies (HTML+CSS+JS). At the core of its design is the idea of bundling a predictable environment:
- It bundles its own copy of Chromium, so you know for sure how your HTML/CSS will be rendered and don’t have to worry about random old versions of IE (etc.)
- It bundles its own copy of Node.js, so you have a known version of a portable programming platform that goes beyond the browser sandbox and can interact with the host OS directly
These choices offered a lot of value five years ago, but in late 2019 you might choose differently. And these choices are also key to why Electron has a reputation for being unusually resource-hungry. A default blank Electron 8.0.0 application is 164MB to download (66MB compressed), and runs as 4 separate processes consuming 150MB RAM in total.
It’s completely possible that these numbers look fine to you and are satisfactory for your scenario. If that’s the case, good for you! This post is not an attempt to bash Electron, which is a well-run project that people are clearly using successfully. https://yellowstocks427.weebly.com/mac-app-for-mysql.html. In this post, I simply want to consider what other options we might have.
How light could it get?
Electron Bundle Mac App Software
What if…
- …we didn’t bundle Chromium, but instead used whatever webview already exists in the OS? In 2019, just about any desktop OS is going to have a sufficiently modern, usually Chromium-based browser, ready to go. For your app, it likely doesn’t matter whether it’s Chromium from last week or last year.
- …we didn’t bundle Node, but instead made use of the programming environment already in the OS, or optionally brought a different one? A framework-dependent .NET Core app can easily be under 1MB, and a standalone one (i.e., bundling its own copy of .NET Core) can get down to ~20MB linked and compressed.
Various Electron-lite alternative projects have already sprung up [1]. Of course, there are also PWAs, but that’s not what this post is about, since PWAs don’t have native access to the underlying OS.
Blazor on Electron
We’ve had a lot of interest in using Blazor to build cross-platform desktop apps. It’s not surprising: combining the performance and productivity of C#/.NET with the familiarity of HTML/CSS UI rendering is powerful and appealing.
So, we published a sample and an experimental package for hosting Blazor on Electron. The key innovation here is that it’s not running on WebAssembly, but rather uses the normal cross-platform .NET Core runtime to achieve full native .NET performance and enable full access to the host OS without any browser sandbox limitations.
Microsoft Electron Apps
You can try this out today. Just note that it’s only an “asplabs” project, as we haven’t yet made any commitment to ship and support this technology.
Blazor on pure webview
It’s not hard to imagine how a Blazor hybrid desktop app could be slimmed down dramatically further. We could swap out Electron for a pure OS-native web view, reasoning that in 2019, there’s virtually always a good enough one available on your target machine. Plus we don’t really need Node as a cross-platform programming environment, since .NET Core already plays that role for us.
To verify this, I built an experiment called BlazorDesktop. This is very similar to BlazorElectron, and in fact most of the code is a copy-paste from it. Again, it runs on native .NET Core (so not on WebAssembly), but now it’s running on a much smaller rendering stack, without any bundled Chromium or Node.js.
It’s a fully-functional Blazor application into which you can add any native .NET Core-based functionality, and runs as an extremely lightweight desktop app - see below for numbers. Unlike a PWA, it’s not limited to the browser sandbox.
If you’re interested in trying this out, please note that it’s purely a quick proof-of-concept, and currently is Windows only. Expanding it to be cross-platform wouldn’t be too hard (I’d use something like webview to add Mac+Linux support) but is not something I’m actively doing right now. Send a PR if you’re interested.
The stats
Not surprisingly, this minimal Blazor + webview application is significantly smaller and less memory-hungry than one built on the whole Chromium + Node stack: https://yellowstocks427.weebly.com/blog/quit-apps-in-mac.
One of the neat things about .NET Core apps is that, with a simple switch, you can control whether the publish output bundles its own copy of the .NET Core runtime (a.k.a. standalone), or whether it assumes the runtime will already be installed on the target OS (a.k.a. framework-dependent). This is captured in the first graph above, and you can see it makes a huge difference to the output size, since the Blazor libraries themselves are very compact.
In corporate environments where you know that certain software is already installed, you can safely distribute tiny < 1MB framework-dependent apps, where the same binaries run on any supported OS. But for public distribution, you’d most likely publish a standalone app - generating different binaries for each of Windows, Mac, and Linux users.
Note that about 200KB of the compressed Blazor webview app above consists of Bootstrap styling, so you could drop that if you’re using something else.
What would have to be built to make this viable
As I’ve said, Blazor Desktop is currently just a quick proof-of-concept, built entirely during the waking part of my return journey from NDC Sydney. It would have a long way to go to turn into a viable product.
Kik desktop app mac. It would need:
- Cross-platform support, e.g., using webview
- Edge (Chromium) support, so that on Windows 10 we’re using the OS’s own Chromium-based browser instead of the Edge-based webview used in my prototype. This would also enable access to Chrome-style browser dev tools automatically.
- Handling the scenario where a suitable webview can’t be found. In the rare case where a user’s OS doesn’t supply an acceptable webview technology, we could prompt the user and download a standalone Chromium distribution (likely via CEF).
- Desktop APIs - this is the big one that would be expensive to achieve from scratch. Electron doesn’t just use Node as a general-purpose programming environment; it also ships a set of cross-platform APIs for interacting with the desktop OS for tasks like copying to clipboard, changing the taskbar/dock icon, displaying native dropdown menus, showing native prompts/dialogs, and many more such things. .NET Core itself supplies a huge proportion of the APIs that applications need, but today it doesn’t address many of the desktop-focused ones, since there isn’t today any standard cross-platform .NET Core-based UI technology. Any realistic app needs these capabilities. Conceivably it might be worth bundling Node just to get cross-platform implementations for these APIs (though still without bundling Chromium).
- Publishing and downloading updates automatically
![Electron web app Electron web app](/uploads/1/3/4/1/134124343/367270833.jpg)
Feedback requested
Electron Mac Store
My reason for writing this is mainly to learn more about how the developer community feels about these technologies. Do you have scenarios for building hybrid desktop apps with .NET+HTML+CSS? Would you be happy to use Blazor with Electron, or do you feel it’s necessary to have something more bare-metal?
Footnote: existing Electron alternatives
Electron Mac App
Many people have thought about building lighter alternatives to Electron over the years. Various open-source projects now exist, though it’s not clear that any really have the critical momentum for mass adoption. Some of them, like Chromely, eliminate Node and only bundle Chromium. Others, like Neutralino, eliminate Chromium and only bundle a Node-based programming model combined with the host OS’s browser technology. At the ultra-minimal end, webview is simply an abstraction over the idea of a webview: it shows your HTML/CSS in whatever browser technology is built into the host OS, and doesn’t provide any cross-platform programming model of its own.