How add field to latest.yml generated by electron-builder - electron

Due electron 23 stopped support windows 7, how can i prevent autoupdate my app on win7 if new version based on electron >23?
Only way i see, on event update-available get info from latest.yml, but how add this info to generated latest.yml file?
Can i add custom field, or something else?

Related

How to add my app to the default apps list in Windows 11 settings?

I am working on an email application and I want to have the ability to select it as the default mail client and to handle clicks on mailto links.
I understand that I need to register it in the Windows registry, but I don't know what exactly I should do.
My application is based on electron and I use electron-builder to build it, and it uses nsis installer.
Can someone please provide me with steps to achieve this or share any relevant resources?
I tried to modify the registry the following way, but it didn't work.
Windows Registry Editor Version 5.00
; Infamous capabilities:
[HKEY_LOCAL_MACHINE\SOFTWARE\MyEmailClient\Capabilities]
"ApplicationDescription"="My Email Client Description"
"ApplicationIcon"="C:\\Users\\user\\AppData\\Local\\Programs\\MyEmailClient\\MyEmailClient.exe"
"ApplicationName"="MyEmailClient"
[HKEY_LOCAL_MACHINE\SOFTWARE\MyEmailClient\URLAssociations]
"mailto"="MyEmailClient.Url.mailto"
; Register to Default Programs
[HKEY_LOCAL_MACHINE\SOFTWARE\RegisteredApplications]
"MyEmailClient"="Software\\MyEmailClient\\Capabilities"
[HKEY_LOCAL_MACHINE\Software\Classes\MyEmailClient.Url.mailto\shell]
[HKEY_LOCAL_MACHINE\Software\Classes\MyEmailClient.Url.mailto\shell\open]
[HKEY_LOCAL_MACHINE\Software\Classes\MyEmailClient.Url.mailto\shell\open\command]
#="\"C:\\Users\\user\\AppData\\Local\\Programs\\MyEmailClient\\MyEmailClient.exe\" -- \"%1\""

What are the implications of turning on the plugins attribute of an Electron webview?

Can somebody explain what the plugins attribute of the Webview tag actually does? What plugins does it allow? Only those that I, the developer, add?
<webview src="example.com" plugins></webview>
The docs just say:
When this attribute is present the guest page in webview will be able to use browser plugins.
My Electron app needs to show PDFs, which I can only do by setting this attribute, but I want to make sure that there aren't other adverse effects/implications of turning this on.
I don't want some random plugins to be running that I don't have control of (my understanding is that extensions are installed by users, but plugins are "installed" by the Chrome team, and we can't control what runs [barring Flash and the PDF Viewer]).
Running navigator.plugins in the console window of my Electron app shows an array of one element with name Chromium PDF Viewer, which is reasurring, but is there a chance that another plugin will get in that array, or would I have to be the one who adds that plugin?
Update: As of Chrome 57 (Electron 2 uses Chrome 61), the only plugins that we can control are the PDF Viewer (which Electron apparently ships with) and Flash.
If we want to use the built-in PDF Viewer, we have no choice but to specify the plugins attribute and trust Chrome's other plugins.
To answer my question above:
Is there a chance that another plugin will get in that array, or would I have to be the one who adds that plugin?
It would appear that I would have to be the one that adds it, but again, that's not stopping other Chrome plugins from running.

Atom Electron does not load local storage

I'm using electron to build a desktop application and needs to store data.
In the browser script I write
if localStorage.getItem("now") == null
localStorage.setItem("now", Date())
But this piece of code always get null for localStorage.getItem after page reload or electron application restart. The now value is always rewritten.
Disable Cache in the Network panel is not checked.
I've checked that localStorage has been written to local file /Users/user/Library/Application Support/app/Local Storage/file__0.localstorage. It appears the browser not load that file and will overwrite it on exist.
Change userData path to application directory does not help with this problem either.
I'm using electron 0.34.0 on OSX 10.11
Does someone have any suggestions to solve this?
It is possible that your app crashes when quitting or you use other ways like process.exit instead of app.quit to quit. If so, the localStorage will not be persisted by electron.

Pentaho 5.0.1 CE Adding folder to pentaho-solutions directory

How do I get a folder to appear in the browser after adding it to \pentaho-solutions in Pentaho 5.0.1 CE. The documentation I read does not seem to work with this new version.
1. Create a new directory in /pentaho/server/biserver-ee/pentaho-solutions/.
Use underscores instead of spaces in the solution directory name. Ensure that the directory has the appropriate user
and group ownership to be writable from the BI Platform.
2. Using an XML-aware text editor (or Design Studio), create a file named index.xmlin your new solution directory.
3. Copy the following text into the index.xml file, changing the content accordingly:
***<index>
<name>Example Solution</name>
<description>This solution contains examples I created while learning to
work with action sequences.</description>
<icon></icon>
<visible>true</visible>
<display-type>icons</display-type>
</index>***
4. Save the file and close the text editor.
5. Log into the Pentaho User Console as an administrator.
6. Refresh the solution repository cache by going to the Toolsmenu, then selecting the Refreshsubmenu, then
clicking on Repository Cache.
You now have a new solution directory. It will show up in all file dialogues in the Pentaho User Console as well as the
Solution Browser in the left pane.
Every time you add or edit an action sequence to your solution directory, you must refresh the repository cache as
explained above. Each user currently logged into the Pentaho User Console must also refresh their session cache; this
is best done by re-logging into the Pentaho User Console.
I am using Pentaho design studio to develop an xaction sequence script. I followed this procedure:
1. In Design Studio, go to the Filemenu, then select New, and click on Other...in the sub-menu.
The Newwindow will appear.
2. In the Newwindow, click the triangle next to Pentaho, select New Action Sequence Wizard, then click Next.
3. In the File namefield, type hello_world.xaction.
4. Select Hello Worldfrom the Templatedrop-down box, then click Finish.
The wizard will generate the new file and bring you back to the workbench.
5. Click on HelloWorldComponentin the Process Actionssection on the left.
The right side of the screen will change to show the options available for this action: Nameand Message. The
Name field controls the name of the component in the Process Actions list on the left; it doesn't do anything else of
note. The Message field contains the text that will appear on the screen when the action sequence is run. It is prepopulated with %quote, which is a token that represents a quote message in a nonexistent properties file. Pentaho
used to provide properties files for each example, but they have been removed from the standard Pentaho Business
Analytics distribution.
6. Replace the %quotewith a sufficiently inspiring message.
Alternatively, you could create a hello_world.propertiesfile and populate it with the appropriate messages and
tokens, but that has no advantage unless you intend to internationalize this action sequence.
7. Save the file.
You now have a working action sequence that prints a short text message: "Hello, World." plus whatever you typed into
the Message field. The first part of the message is determined by a message bundle packaged with the Pentaho Web
application archive.
To test the action sequence, use the Test tab if you are on Windows or OS X, or log into the Pentaho User Console and
run it from the Solution Browser.
Running the sample xaction fails with
Sorry. We really did try.
Something went wrong. Please try again
or contact your administrator.
I figure this is because pentaho cannot locate the xaction file as specified in the file path when I generate the url from within design studio. The folder I created within the solution directory does not appear in the browser directory list despite refreshing the cache. Any help?
With Version 5 the files and folders are no longer stored in "/pentaho/server/biserver-ee/pentaho-solutions/..."
It is stored now in a jackrabbit repository.
You can create folders and upload files in the user console.
I did mistake after starting biserver 5.2. Unexpectedly i deleted Public folder after configuring to jackrabbit. Now how do i create the folder so that i can see Public and Home Folders.
Sorry for getting back to this question some time later, just in case someone searches something related to Pentaho repositories management with no success, i hope this information can help.
Just to make things more clear, i'm using version 5.2.x and i'm supposing you want to create a new folder on the root directory of Browse Files screen, something that is not allowed on Pentaho5 CE Web Console.
The answers about repository management based on JackRabbit are correct, so the old way we used to configure new "solutions" folders doesn't work anymore. From version 5 on, Pentaho exposes an interesting REST api that allows you doing things not allowed in web console.
For instance, for creating a folder in root directory you should create a http REST PUT request against Pentaho Server (using tools like curl or if you appreciate Google Chrome, something like Advanced Rest Client, etc.) using the following URL:
http://localhost:8080/pentaho/api/repo/dirs/:new_directory_name?userid=admin&password=password
Pentaho repository directory REST api is documented here:
http://javadoc.pentaho.com/bi-platform500/webservice500/resource_DirectoryResource.html
It's worthy to spend some time reading REST API the documentation.

What's the quick way to make my change of firefox plugin take affect in windows?

Now I have to restart whenever I modified a single line...
Is there a way to make it refresh without restarting the firefox?
Yes, you use plain directories in your extension instead of a JAR file, add <em:unpack>true</em:unpack> to your install.rdf and add boolean nglayout.debug.disable_xul_cache/nglayout.debug.disable_xul_fastload preferences and set them to true. You also start Firefox with -purgecaches command line flag (for Firefox 4 and newer). Then you will be able to edit extension files directly in the profile and have these changes picked up immediately. If you have an own dialog window then closing it and opening it again will be enough. For browser window overlays you will have to open a new browser window. JavaScript modules and XPCOM component will still need a browser restart however, these are loaded only once per browser session. But at least you won't have to reinstall the extension.
More information: Setting up an extension development environment

Resources