Desktop integration for electron app in appImage format - electron

I have created my electron app and built it on .deb format using electron-builder. But to enable auto-update, now I have switched into appImage format. But, for desktop integration to work, I have to use an external library as per their documentation.
As of my understanding, every user has to install AppImageLauncher for this to work. I think this is not a good method to distribute my app. Are there any suggestions?

Related

how to code in Mac for 8thwall web ar and test it?

how to setup 8th wall project for web ar for Mac and use our system instead of using their web editor . I want to code in my computer and test and then upload that to their console rather then coding it in their web editor .
Steps to locally develop 8thwall webAR without using 8th wall cloud editor
Create a project using 8thwall dashboard and navigate to the dashboard settings and copy the appkey.
copy this base glitch get-started project and replace the appkey with your project appkey.
Navigate back to the dashboard and authorize your browser with the help of the dev-token.
You are ready to now use and test 8thwall development locally.
You can later self-host the project instead of copy pasting the code and reformatting according to the 8thwall cloud editor.
You can also directly remix any of the glitch projects as well which is a much quicker option.
NOTE: The glitch projects are under-maintained hence refer docs for latest SDK version as well as syntax changes
You can develop locally by choosing self-hosted project option with 8thwall, then downloading 8thwall's own web repository to tinker with. I struggled with the 8thwall docs to figure this out but the web repository makes locally development pretty straight-forward.
Follow the steps on the getting started guide ,
firstly you'll need to create an 8thwall account and self-hosted project.
Copy your unique App Key from the project settings page.
Clone the source code from the repo, replacing the app key in index.html file with your own app key (this lives in the header of the html file) :
<script async src="//apps.8thwall.com/xrweb?appKey=insert-your-key-here"></script>
8thwall included a serve script, which serves your source code on local network over https. This means you can add your local URL as a trusted domain in your self-hosted project settings for testing.
you'll need to ensure Node.js and npm are installed to run the script
Using the serve script depends on your computer, (there's instructions here for Windows also) but for the case of Mac, open a terminal in your project directory :
cd <to_this_serve_directory>
npm install
cd ..
./serve/bin/serve -d <sample_project_location>
I use Node version 16.16.0 as I had issues with my current node version 18.12.1. You can get Node version manager npm package to help manage your Node versions.
What's great about this is when you run the serve script from your terminal, this generates a QR code so you can test your app on a mobile device over local network. Make sure you copy the entire Listening URL into your browser, including the port number. e.g. https://245.678.0.11:8080
Final thing to mention, don't include the port number in your trusted domains URL. e.g. https://245.678.0.11

How to run electron apps for wayland?

It seems that electron has not support wayland yet.
About electron issue: Consider providing a build for Wayland
Does anybody know how to compile electron to support wayland native? (step by step) And run electron apps in wayland(weston etc...).
It took hours to compile electron and i fail many times.
Initial Wayland support was merged in Electron 12.
There is nothing specifically about it in the release notes
but it can be tested with a recent electron version by running:
/path/to/yourElectronApplication --enable-features=UseOzonePlatform --ozone-platform=wayland
If you're using flatpack and your Electron application is Slack you need to create an override to expose the wayland socket as well as setting the GDK_BACKEND env variable to wayland.
The override will be permanently stored in ~/.local/share/flatpak/overrides
flatpak override --user --socket=wayland com.slack.Slack
GDK_BACKEND=wayland flatpak run com.slack.Slack --enable-features=UseOzonePlatform --ozone-platform=wayland

Electron as system service with ELECTRON_RUN_AS_NODE

What is The Correct(tm) way for an Electron application to run both as a desktop application and as a service?
I have looked high and low for this but to no avail. This is how I think it should work.
Create a launchd/systemd/windows service description that:
Sets ELECTRON_RUN_AS_NODE environment variable
Runs the packaged Electron application
Produces happiness?
Can the packaged Electron application run in this manner access the contents of the ASAR file? If it can, great.
Then just build and package two directories with the application. Both compiled for the ABI version Electron is on:
Directory electron_modules with binary modules compiled for an executable that reports being electron
Directory node_modules with binary modules compiled for an executable that reports being node
With the appropriate NODE_PATH also set in the service description, I should be all golden.
Right?
I am not 100% sure what the OP is asking but I found this question while looking for: how do I run an Electron application as a desktop application and also as a CLI service with no access to a display driver?
The answer from here is
Being based on Chromium, Electron requires a display driver to function. If Chromium can't find a display driver, Electron will fail to launch ... In essence, we need to use a virtual display driver.
The solution (on linux at least)
Install xvfb
Prefix your start command with xvfb-run e.g. xvfb-run node_modules/electron/dist/electron .

Embed/package mongodb with electron builder

is there a way to ember Embed/package mongodb installer with electron builder.
I have tried npm/github repos, and find none.
You cannot bundle MongoDB with Electron.
Quoting from this site: https://www.techiediaries.com/electron-data-persistence/
Pros and Cons of Using MongoDB
For the pros of using MongoDB with Electron apps:
Available for all Electron suppored platforms such as Windows, Linux
and MAC. So it doesn't limit the cross platform feature of Electron.
Can be installed and integrated easily with Electron.
There are also some cons:
Can't be bundled with Electron so the end users need to install it
separately from your application.
Overkill for small apps.
There are some other persistent databases you can package with Electron, such as NeDB, that you might consider trying.

How to bundle Electron application and windows service together?

I am very new with electron application. I need some help with election installation.
I have an Electron desktop application and a windows service.
I can start and stop my pre installed services by using sudo-prompt package.
I am creating windows installer by using electron-winstaller package.
But I want to bundle my windows service along with my electron application. My requirement is when I install my electron package then it should install my service also, when I uninstall my package then that service should be uninstalled.
Please help me out. Any clue, Any suggestions will be appreciated.
If you think this should be achieved with something else then please do suggest me.
Electron's windows installer packager strikes me a specific case tool that would likely hit limitations in scenarios like this. I would use a general case tool instead such as the Free and Open Source Windows Installer XML Toolset aka WiX. I would also use with that another FOSS application called Industrial Strength Windows Installer XML aka IsWiX.
WiX allows you to describe and build MSI databases using an XML/XSD domain specific language. It supports MSBuild for easy integration with your CI/CD pipeline. IsWiX* is a set of project templates and graphical designers that provide an opinionated project structuring (scaffolding) and greatly speeds up the learning curve and implementation. For example, this installer you describe could be done without writing a single line of XML.
For more information see: https://github.com/iswix-llc/iswix-tutorials
The desktop-application and windows-service tutorials should** show you everything you need to know to author this installer. Basically follow the desktop-application all the way through and then skip to the final portion of the windows-service tutorial where you define the windows service.
I'm the maintainer of IsWiX
** This assumes your service exe is a proper Windows service that interfaces with the windows service control manager. If it's really just a console app that runs as a service you will need to include a program such as srvany.exe. This will require one line of hand crafted XML to extended the service definition in the registry with the proper command line value to be passed to your exe. An example can be found here: Wix installer to replace INSTSRV and SRVANY for user defined service installation

Resources