Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shortcut icon is broken when installing with MSI #5965

Closed
futurliberta opened this issue Jun 17, 2021 · 3 comments
Closed

Shortcut icon is broken when installing with MSI #5965

futurliberta opened this issue Jun 17, 2021 · 3 comments
Labels

Comments

@futurliberta
Copy link

futurliberta commented Jun 17, 2021

  • Version: 22.11.7
  • Electron Version: 11.4.8
  • Electron Type (current, beta, nightly): current
  • Target: Windows (MSI)

When installing the app with MSI package, the shortcut icon created on the desktop is "broken".
The icon is good when starting the app in the task bar and in the list of installed programs though.

image

The shortcut icon is good when installing from NSIS package.

Here is package.json (used create-react-app with template cra-template-electron-builder-typescript)

{
    "name": "xxx",
    "version": "1.0.1",
    "private": true,
    "author": "xxx",
    "description": "xxx",
    "dependencies": {
        "@material-ui/core": "^4.11.4",
        "@material-ui/icons": "^4.11.2",
        "@testing-library/jest-dom": "^5.13.0",
        "@testing-library/react": "^11.2.7",
        "@testing-library/user-event": "^12.8.3",
        "@types/jest": "^26.0.23",
        "@types/node": "^14.17.3",
        "@types/react": "^17.0.11",
        "@types/react-dom": "^17.0.7",
        "cross-env": "^7.0.3",
        "electron-is-dev": "^1.2.0",
        "exceljs": "^4.2.1",
        "ldap-filters": "^2.2.2",
        "ldapts": "^3.0.1",
        "node-cmd": "^4.0.0",
        "react": "^17.0.2",
        "react-dom": "^17.0.2",
        "react-scripts": "4.0.3",
        "typescript": "^4.3.2",
        "web-vitals": "^1.1.2"
    },
    "scripts": {
        "start": "concurrently -k \"cross-env BROWSER=none npm run react-start\" \"wait-on http://localhost:3000 && electronmon .\"",
        "build": "react-scripts build",
        "test": "react-scripts test",
        "eject": "react-scripts eject",
        "dist:win": "npm run build && electron-builder -w -c.extraMetadata.main=build/electron.js",
        "dist:mac": "npm run build && electron-builder -m -c.extraMetadata.main=build/electron.js",
        "dist:linux": "npm run build && electron-builder -l -c.extraMetadata.main=build/electron.js",
        "react-start": "react-scripts start"
    },
    "eslintConfig": {
        "extends": [
            "react-app",
            "react-app/jest"
        ]
    },
    "browserslist": {
        "production": [
            ">0.2%",
            "not dead",
            "not op_mini all"
        ],
        "development": [
            "last 1 chrome version",
            "last 1 firefox version",
            "last 1 safari version"
        ]
    },
    "devDependencies": {
        "concurrently": "^5.3.0",
        "electron": "^11.4.8",
        "electron-builder": "^22.11.7",
        "electron-devtools-installer": "^3.2.0",
        "electronmon": "^1.1.2",
        "sass": "^1.34.1",
        "wait-on": "^5.3.0"
    },
    "homepage": "./",
    "main": "./public/electron.js",
    "build": {
        "productName": "xxx",
        "appId": "xxx",
        "files": [
            "build/**/*",
            "node_modules/**/*"
        ],
        "directories": {
            "buildResources": "public"
        },
        "mac": {
            "target": "dmg",
            "category": "utilities",
            "type": "development"
        },
        "win": {
            "target": "msi",
            "icon": "./public/logo512.png"
        },
        "linux": {
            "target": "deb",
            "category": "Development"
        }
    }
}
@stale
Copy link

stale bot commented Aug 22, 2021

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@stale stale bot added the backlog label Aug 22, 2021
@erikrz
Copy link
Contributor

erikrz commented Sep 8, 2021

Seems like an issue with the template project sent to Wix.

https://wixtoolset.org/documentation/manual/v4/reference/wxs/shortcut/

Icon (String)
Identifier reference to Icon element. The Icon identifier should have the same extension as the file that it points at. For example, a shortcut to an executable (e.g. "my.exe") should reference an Icon with identifier like "MyIcon.exe"

Taking a look at the shortcuts defined in MsiTarget.ts and in the template.xml, it seems that we need to update the Icon Id to match Wix expectations.

@stale
Copy link

stale bot commented Apr 17, 2022

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@stale stale bot added the backlog label Apr 17, 2022
@stale stale bot closed this as completed Apr 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants