On macOS/Linux you can build Electron app for Windows locally, except Appx for Windows Store (in the future (feel free to file issue) electron-build-service will support Appx target). You can use build servers — e.g. Travis to build macOS/Linux apps and AppVeyor to build Windows app. By default build for current platform and current arch. In fact, the most popular Electron apps (Atom, Slack, Visual Studio Code, etc) display primarily local content (or trusted, secure remote content without Node integration) – if your application executes code from an online source, it is your responsibility to ensure that the code is not malicious. Without further ado, let’s find out more about Electron and create our first app! What is Electron? Electron is a framework for creating native applications with web technologies like JavaScript, HTML, and CSS. It uses Chromium and Node.js so you can build your app with HTML, CSS, and JavaScript similar to a web-based application.
- Electron Build Mac App Free
- Electron Create Mac App
- Electron App Store
- Electron Build Mac App Download
- Electron Build Mac App Installer
In developing the DSM2 HYDRO Viz Tool, we were faced with deciding how to deploy a Shiny app that required interaction with large local files. I first heard about the possibility of using Electron to deploy Shiny apps as standalone desktop applications in this talk by Katie Sasso, but it wasn't until I discovered the R Shiny Electron (RSE) template that I decided to take the plunge.
Electron Build Mac App Free
UPDATE (2020-09-06): The approach described in this post is fragile and I no longer use it. Here are a couple of alternatives: electricShine and photon.
![App App](/uploads/1/3/4/1/134183429/383629334.jpg)
R Shiny Electron Build Process
The R Shiny Electron (RSE) template includes only very basic instructions for how to get started with this process (and they clearly specify that it is not ready for production). There were considerable gaps in my understanding that left me flailing while trying to get things to work (especially on Windows). Below I am describing what I did to get up and running but I make no argument that this process represents best practices.
Basic setup
https://browntn480.weebly.com/dell-c1765nfw-driver-download-mac.html. The RSE template doesn't mention anything about the arguably obvious steps of installing Node, Electron, and Electron Forge.
- Install Node with one of the pre-built installers available from the Node website.
After installing Node, Electron and Electron Forge are installed using
npm
from the command line. On Windows, Node installs a Node.js command prompt that I used for any npm
and electron-forge
commands (rather than the default Windows command prompt). The Node installer provides Windows users with the option to automatically install the necessary tools, including Chocolatey. I checked the box to automatically install these tools, but I'm not sure if this step is necessary to build the Electron app. - Run
npm install -g electron-forge
in the Terminal (macOS) [1] or Node.js command prompt (Windows) to install Electron Forge globally. - Clone or download the GitHub repository for the RSE template.
Edit: The RSE template hasn't been updated in over a year and the Node ecosystem evolves rapidly. I forked the repository, searched for each dependency package in
package.json
via the npm website, and updated version numbers to the latest version found in the npm package search. I also removed electron-forge
from the devDependencies because it is installed globally. If you are having trouble with the original repository, you should try the forked version of the RSE template repository.Build process on macOS
The RSE template repository includes a simple Shiny app. As a first step, I recommend following the steps below to confirm that you can build the executable with the simple app before trying your own app. At the end of this post, I will write more about extra steps required to build the executable for the DSM2 Viz Tool.
- Open the Terminal and change the directory to the location of
r-shiny-electron
orr-shiny-electron-master
(see how to use the Terminal). - Run
npm install --save-dev electron
in the Terminal to install Electron locally. - Run
npm install
to set up the project in ther-shiny-electron
directory.
You will get lots of warnings about outdated packages [2]. I tried to fix the warnings with
npm audit fix
, but ran into problems and started over with a fresh clone of the RSE template.- Download R binary for macOS by running
./get-r-mac.sh
[3]. - Identify and download packages used in Shiny app by running
Rscript add-cran-binary-pkgs.R
. - Run
npm start
to test if app launches (and works correctly). - If the app works correctly, run
electron-forge make
Djay pro windows piratebay. to build the macOS executable.
The build process will create a folder called
Out
in the r-shiny-electron
directory. In Out/r-shiny-electron-darwin-x64
, you will have an executable (r-shiny-electron.app
) that you can run to test that the app is working correctly. In Out/make
, you will have a zip file that contains the executable but is better for distributing because of the smaller file size [4].It is possible to build a Windows installer on macOS, but it 'takes forever.' I tried going down this road, but bailed after the process had run for 2 hours without finishing because I had access to a Windows machine for building the app.
Build process on Windows
As mentioned in the macOS section, I recommend following the steps below to confirm that you can build the executable with the simple Shiny app available through the RSE template before trying your own app.
- Install Cygwin and the wget package, which is not installed by default. The
wget
function is used in./get-r-win.sh
. If you havewget
from another installation process, then you might be able to skip this step. - Install
innoextract
with Chocolatey by runningchoco install innoextract
from the command prompt with administrative privileges, i.e., right click on the command prompt and chooseRun as administrator
.innoextract 1.8
is required. If you have a previous version of innoextract installed, then runchoco upgrade innoextract
[5]. Omnisphere 2 preview. - Open the Node.js command prompt and change the directory to the location of
r-shiny-electron
orr-shiny-electron-master
. - Run
npm install --save-dev electron
in the Node.js command prompt to install Electron locally. - Run
npm install
in the Node.js command prompt to set up the project in ther-shiny-electron
directory. - Change the directory to
r-shiny-electron
in Cygwin, e.g., typecd
in the Cygwin terminal and drag ther-shiny-electron
folder to Cygwin to paste the path. Use Notepad++ to open./get-r-win.sh
and confirm that the EOL characters are in Unix format. Download R binary for Windows by running./get-r-win.sh
in Cygwin. - Identify and download packages used in the Shiny app by running
Rscript add-cran-binary-pkgs.R
from the RStudio Terminal. Remember to first change the directory tor-shiny-electron
. You may also need to install theautomagic
package first. - Run
npm start
in the Node.js command prompt to test if the app launches (and works correctly) [6]. - If the app works correctly, run
electron-forge make
in the Node.js command prompt to build the Windows executable.
The build process will create a folder called
Out
in the r-shiny-electron
directory. In Out/make/squirrel.windows/x64
, you will have an installer executable called r-shiny-electron-1.0.0 Setup.exe
.Customizing build process for DSM2 Viz Tool
After working through the build process on the r-shiny-electron example app, I downloaded a fresh version of the RSE template, renamed the
r-shiny-electron
directory to DSM2-Viz-Tool
, removed the app.R
file from DSM2-Viz-Tool/shiny
, and replaced it with the files for the DSM2 Viz Tool Shiny app. I also opened package.json
in a text editor and changed a few fields (e.g., name, productName, version, description, author). Next, I started working through the build process described above. However, before running
npm start
I needed to add the binary files for the rhdf5
and Rhdf5lib
packages because Rscript add-cran-binary-pkgs.R
doesn't find Bioconductor packages. You can find where R packages are installed on your machine by running .libPaths()
from the R console. I manually copied and pasted the rhdf5
and Rhdf5lib
folders from the location indicated by the output of .libPaths()
to DSM2-Viz-Tool/r-mac/library
and DSM2-Viz-Tool/r-win/library
on macOS and Windows, respectively. Then, I was able to finish the build process.Working through this process involved plenty of frustration (because of my knowledge gaps), but it was extremely satisfying to arrive at the end goal of packaging the DSM2 Viz Tool as a standalone desktop application.
[1] On macOS, you may need to provide permission to access
/usr/local/lib/node_modules
. Solve the permission error by running sudo chown -R $USER /usr/local/lib/node_modules
from the Terminal. [2] I personally find all the security warnings alarming, but this article suggests that I shouldn't worry about it.
Electron Create Mac App
[3] The R version specified in this shell script should be the same R version that was used to build the shiny app.
[4] On macOS Catalina, the first time that you run the app, you will be prompted to give permmission to access the file system. After granting permission, you may need to quit the app and then launch it again.
[5] If that doesn't work, run
choco uninstall innoextract
and then run choco install innoextract
. [6] One of the requirements is that
git
Hakko 927 e s d manual dexterity. is installed. An installer is available here.I just released LosslessCut to stores on three different platforms Windows, Mac and Linux: Mac App Store, Microsoft Store, Snapcraft. I want to share the process and the hurdles I went through in this article.
I think the key to any well-maintained project is to have an automated release pipeline, or else it will be a hassle every time one wants to do bug fixes and improvements. I have now taken some time to set up automated build and signing for Mac OS (notarization) as well as release to the Mac App Store, Microsoft Store and Snapcraft. I have used many CI systems but I find that the new Github Actions are very fast and feature rich, and with its reusable action ecosystem it is quite easy to use. And all the setup and configuration is of course available open source for anyone to see here. See the actions in action(heh) here, as a free reference for anyone else needing to set up an automated build and release process of their Electron app.
Building and releasing for big stores like Microsoft and Mac App Store can be a true hassle and a nightmare that can take weeks to set up, however thanks to awesome projects like
electron-builder
and action-electron-builder
, it is not really that bad and only took me a few days.Here are the most valuable resources I used to set up everything:
The things that I had the most trouble with were:
Getting all the correct metadata in place
This is mostly handled by
electron-builder
and can be seen in package.json, but some things did not give an error until a human looked at it during the review process.Hardened runtime
In
package.json
, hardenedRuntime
needs to be set to true
for the mac
platform, because notarized apps need to be hardened.However for Mac App Store signed apps
mas
, it needs to be set to false.![Electron Build Mac App Electron Build Mac App](/uploads/1/3/4/1/134183429/986461677.png)
Microsoft Store
Microsoft Store review
Reviewers complained about:
- Screenshot did not have Windows style border, but Mac style. Easy fix.
- Missing icons in
appx
XML config. Need to be configured correctly inpackage.json
: https://www.electron.build/configuration/appx#appx-assets
Mac App Store
The entitlements files
These files need to contain the correct entitlements in order to be able to open files and directories on the filesystem, as well as inherit these rights to the
ffmpeg
process. Without any entitlements, the app is not allowed to read/write files.One thing I struggled a bit with is that Mac Store Apps need to have opened a file using the system open dialog before the app can read or write. In order to write to a directory, like LosslessCut does, I need to first present the user with an Open dialog to select which directory to output to. This seems to be a requirement in order for apps not to just write to any folder on the system.
App Icon
Icon needs to be
.icns
format and have 512 and 1024 sizes in itTouch Bar API
Reviewers complained about what I believe is Electron using the Touch Bar API, but my app does not use it:
Electron App Store
“If your app does not integrate Touch Bar functionality, please indicate this information in the Review Notes section for each version of your app in iTunes Connect when submitting for review”
Electron Build Mac App Download
So need to make sure to write this in Review notes for every release.
ffmpeg private API usage
Electron Build Mac App Installer
Getting ffmpeg through App Store review is a bit tricky. The ffmpeg static build that I originally used has a lot of stuff built into them. One thing that App Store review complained about is a call to
_SecIdentityCreate
which I traced back to this file. But it could be disabled by the --disable-securetransport option. So I needed to build a custom ffmpeg without this flag.See also:
Other than that, with Electron 8, there was no other private API usages complained about.
Building a signable ffmpeg without dynamic links
When building ffmpeg on Mac OS, even with all options indicating it should include everything as static, it will still link
.dylib
files dynamically.I solved this by only building my own ffmpeg using GitHub Actions and stripping away all external dependencies like codecs (because we are only doing muxing operations which only requires ffmpeg core functionality.)
See also:
Building ffmpeg to support older Mac OS versions
Antares auto tune 8 crack mac. On the first try I got an error report on older Mac OS X (10.13):
This can be verified by running
nm ffprobe | grep ____chkstk_darwin
In order to fix this I had to add
-mmacosx-version-min=10.10
to --extra-clfags
and --extra-ldflags
Then rebuild and verify that the
____chkstk_darwin
symbol reference is gone.See also: