Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I put a space in my electron app's title?

First off I obviously know how to rename the app after I export it, but I want to have it export with the correct name the first time. How do I put a space in the name of it? Here is the relevant portion of the package.json code:

"name": "Calculator",
  "build": {
    "appId": "Calculator.id",
    "mac": {
      "icon": "img/calculatoricon.png",
      "target": []
    },    
like image 639
Ethan Koehler-Bryant Avatar asked Nov 08 '19 17:11

Ethan Koehler-Bryant


People also ask

What is Electron kiosk mode?

Kiosk mode is a common way to lock down a Windows device when that device is used for a specific task or used in a public setting. So in electron kiosk mode, we'd have the ability to lock down our application to a point that users are restricted to the actions that we want them to perform.

How to create a Windows 10 title bar in electron?

Make the window frameless 3. Create a replacement title bar 4. Make the title bar draggable 5. Add window control buttons 6. Style the window control buttons 7. Add the window title 8. Implement window controls functionality 9. Adding styling for when the window is maximized A guide to creating a seamless Windows 10 title bar in your Electron app.

How do I add electron-builder to my App?

Configure your app to use electron-builder : Create a directory build in the root of the project and save a background.png (macOS DMG background), icon.icns (macOS app icon) and icon.ico (Windows app icon) into it. The Linux icon set will be generated automatically based on the macOS. Add electron-builder to your app devDependencies by running:

How do I package an electron app?

Packaging an electron app simply means creating a desktop installer (dmg, exe, deb, etc). Now if you decide to go around manually packaging your app, you’re gonna have a bad time. Luckily there are modules, especially the two mentioned below which make the task easier.

How to add a title and icon in electron packager?

If you specify the title in the browser window options it will appear momentarily before being replaced with the title from the index.html. On a related note, to specify the icon, you have to specify it on the electron.packager command line, in the form "--icon=favicon.ico".


1 Answers

A month late reply but I also encountered a similar issue. You can use productName key for it.

{
  "name": "calculator",
  "productName": "Calculator with Spaces",
  "build": {
    "appId": "calculator.id",
    "mac": {
      "icon": "img/calculator_icon.png",
      "target": []
    }
  }
}

Here is the reference: https://electronjs.org/docs/api/app#appgetname

like image 149
Belial Avatar answered Oct 25 '22 02:10

Belial