How do I demo an electron app on the web - electron

Is there a way to easily distribute an electron.atom.io app as a static site?
I don't need all the functionality, I just want to allow the client to view the latest updates.
-- edit --
Perhaps a better way to ask the question is; "How do I build a web app that can be hosted online and run on electron with minimum rewriting" - similar to the Slack app that works the same way on web or electron app.

As long as your main use of Electron is to create a 'native browser wrapper' for a web-app this is entirely possible.
You will have to implement a check if your application is running inside a browser or inside Electron and wrap your electron specific code in it:
if (window && window.process && process.versions['electron']) {
const {BrowserWindow} = require('electron').remote
}
You'll probably have to step through your application and disable Electron specific functionality at multiple places.

You have other options to do a long distance demo of an Electron app
Electron is basically a shell to run node.js apps on the desktop. This means if you want to move it to the web, you have to give up all the Electron APIs that access the local system and you're left with a basic node.js app, which is most likely not desirable.
To demo your desktop app to an off-site client, you can either make a presentation with screenshots detailing the current user flow, or compile a sandboxed demo version of your app and send it over to them.
Screen presentation
This is your quickest and easiest solution if your client just wants to be kept in the loop and see some eye candy. You can just record how the app works with some example data, add some written or audio explanation to it, and let them enjoy the smooth ride.
Build a demo
If your client wants to actually have a hands-on demo with the app, you need to have some form of basic code distribution. The cleanest way to do this would be to tie up all loose ends in your current app flows, block all unfinished roads in it and compile it for whatever platform your client requested the demo for.
Take a look at the electron-packager and electron-builder docs to get an idea how to build an .exe, .dmg or whatever file from your Electron app, then send that file to them with some basic instructions.

Related

Google cloud to run Python program as localhost server using Cloud SDK shell

Google cloud to run Python program as localhost server using Cloud SDK shell
Error in google cloud shell:
ymal file codes
runtime:python37
api_version:1
threadsafe:false
handlers;
- url:/
script:test.py
test.py file code
print("hello world")
App Engine is used to host web apps.
I encourage you to have a look at Google's quickstart for App Engine and deploying a "Hello World!" app.
Your Python print("hello world") while valid Python is not a web server and won't work as-is on App Engine.
Google's documentation is comprehensive and should help you get to a running app.
Please don't include images in Stack overflow questions because these have poor accessibility.
In addition to the comments from DazWilkin,
You are using dev_appserver.py which is a development server that simulates Google App Engine (GAE) in Production. Google now discourages using that, especially for the newer runtimes like Python3. Instead Google encourages you to ..run your application in your local environment with the development tools that you usually use...
Another possible way of learning to use GAE is to look at/tinker with the code of an App which runs on GAE. For example, you can use our App, NoCommandLine, which has a hello world App in different languages including Python
a) Follow all the steps documented by Google here to install or update the Google Cloud App Engine SDK. You need to follow all the steps so that all the files are installed/copied and the necessary shortcuts created.
b) Download and install the NoCommandLine App
c) Open the App, then go to File > New Application, give your app a name (Application ID), select Python 3 under Runtime and click the 'Create' button.
d) A new application will be created. Select the App, click the 'run' icon. It will open your default browser and display 'Hello World'.
e) You can now navigate to the directory for the App and open the different files to see the structure and code and you can play around with the code
Note that to deploy your App to production i.e GAE Production, you first need to create a Project with the same name as your App running on local host and you need to provide a credit card (Google will not charge your card but you must provide it)

Is there other way to get the Microsoft Edge DevTools Preview without Microsoft store?

I always debug the WebView control with VS, I refer to the this official document Debug a WebView control in a UWP App.
Recently, I found there is a best way to debug the WebView control by using the
Microsoft Edge DevTools Preview App.
The problem is that it seems the only way to install the tools is Microsoft Store. Unfortunately the Miscrosoft Store is blocked on my machine, I want to know is there any other way to get the Microsoft Edge DevTools Preview tool? Any help would be appreciated, thank you in advance.
I found this article https://windowsreport.com/download-microsoft-store-apps-without-store which seems to show a way of doing this.
I cannot state if it definitely works yet as I have to wait for my IT to department to decide if it can be allowed.
Steps are:
Visit https://store.rg-adguard.net/
Enter https://www.microsoft.com/en-gb/p/microsoft-edge-devtools-preview/9mzbfrmz0mnj
Download the file ending in appxbundle (to it's own directory not just "downloads")
Open Powershell as Admin
Execute something like Add-AppxPackage -Path "C:\Users\WindowsReport\Downloads\ee2546d7-f0e5-4aa2-be54-032299162322" (change path to the download directory you used earlier)
If you get errors you may need to download additional files from the same place you got the appxbundle file

how to implement implement deferred deep linking in electron

Trying to find information on how to implement deferred deep linking in electron app but can't find it in the official electron documentation.
We have an electronic application. I need the following behavior: when a user tries to open a link of this type -> custom-protocol: // some-data in the browser, if the application is not installed, then automatically download the application and, after installation, pass the parameters contained in the link (some-data) to the application. Can anyone suggest how to implement this in electronic or a link to the documentation or show some abstract example of implementation
On Windows, custom protocols are stored in the registry. This is a chicken and egg problem because your application already has to be installed on the system for the registry entry to exist.
If you rewrite your application as a UWP app (lol) you might be able to check with getInstalledRelatedApps to see if the app is already installed.
If you want to streamline how your application is installed from the web, consider using ClickOnce.
So basically you just want a way to pass some query params to your application when installed from your website.
You can do this if you package your electron application as an MSIX. Check out the article below from Microsoft, that documents the process:
Passing query params to an MSIX packaged app

What is the advantage of using angular with electronJS

I want to create desktop application compatible with other OS.For that I'm using electron with angular.Because both are frame work whether it will effect performance or loading time, and also whether deploying easy,can we use all the features of angular when we use with electron like routing..?
Electron uses Chromium and NodeJS which is the reason why it is compatible with other OSs. You can talk with the NodeJS process from your angular-app which opens up some possibilities. For example opening native file-dialogs to let the user choose files. Electron also already abstracts some platform specific operations like getting the user home to save some configuration files for example.
You can use routing just like in any Angular app and I think you can use most features like you would normally but dont take me for granted on this one.
I would not say it affects your loading time to combine those too. During development you have to build your angular app before electron can start up and use those files but in production Angular is already ready to be loaded so they dont hinder each other.

Building Passbook Passes

I've been working on integration of Passbook for some of my apps. Right now, I've used Ray Wenderlich's tutorial on this, and it is quite frankly a pain to build even one Pass. I have to get the icon files all in place, program the JSON file, get the manifest file filled in with all the SHA1 values, and run a few lines in terminal to sign it, and then another line to zip it. Are there any online services or programs that can be used to save a pkpass file to computer, that I can then upload to my server?
There are also quite some developer tools that help you to create passes, you can find a list on wikipedia.
We provide an Objective-C SDK and a free cloud service that lets you create templates and generate passes. You can find the SDK on github (Sample App is included).
There are a number of services that can be used to generate passess. Take a look on wikipedia for a comprehensive list of providers, tools and projects.
If you want to update passes, then you will need to build a Passbook Web Service. When a pass is updated, the web service sends a new .pkpass bundle to the device. Therefore, your web service must also be capable of signing passes unless you want to manually create and upload them to your server before sending out a push request.
Using our service, PassKit, you can create a template using WSIYWIG editor then create a pass directly on your server via a simple API call. You can also update passes and push updates to passes via our API. If you just want to get hold of the .pkpass bundle, then you can append /d to the pass URL (the one beginning with r.pass.is), or use PassKit API in your User Agent string.
you should also check out Apple's Passbook Support Materials here:
https://developer.apple.com/passbook/
They have a simple XCode project called SignPass that you can use to easily create your own Passes.
Note: you need to be a member of Apple's Developer program to access these materials ..
There's lots more Passbook related info here:
http://www.flonsolutions.com
Andrew

Resources