forked from electron-userland/electron-windows-store
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
There's a lot of terminological/conceptual confusion in the current API. An .appx file should have an `AppXManifest.xml` which looks like the following, omitting unimportant elements: <?xml version="1.0" encoding="utf-8"?> <Package ...> <Identity Name="12345MyCompany.MyApp" ... /> ... <Applications> <Application Id="MyApp" ...> ... </Application> </Applications> </Package> Notice that there are two separate identities: the Package Name, and the Application Id. When you run `electron-windows-store`, it generates an `AppXManifest.xml` from the config you supply. [The template is here](https://github.com/felixrieseberg/electron-windows-store/blob/master/template/appxmanifest.xml) and it looks like: <?xml version="1.0" encoding="utf-8"?> <Package ...> <Identity Name="${identityName}" ... /> ... <Applications> <Application Id="${packageName}" ...> ... </Application> </Applications> </Package> Notice in the variable names: it calls the package name `identityName`, and calls the application id `packageName`. These template variables are subtituted by the user-supplied config like so: lib/convert.js: result = result.replace(/\${identityName}/g, program.identityName || program.packageName) lib/convert.js: result = result.replace(/\${packageName}/g, program.packageName) This means, to create a correct `AppXManifest.xml`, you need to call it like so: const convertToWindowsStore = require('electron-windows-store'); convertToWindowsStore({ identityName: '12345MyCompany.Ghost', // This is actually the package name! packageName: 'Ghost', // This is actually the application id!! // ... }); This is very confusing, and has led to many tickets: electron-userland#82 electron-userland#114 electron-userland#103 electron-userland#120 The best way forward would be to introduce a separate `program.applicationId` config, which is used in preference to the `packageName`.
- Loading branch information
1 parent
ecdcee1
commit aa70204
Showing
5 changed files
with
17 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters