-
Notifications
You must be signed in to change notification settings - Fork 86
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
No support for creating a .appxbundle #136
Comments
I got this working. I'd be willing to submit a PR adding this support. However it seems like this repo is dead/unmaintained |
Here's the essence of my soln: const convertToWindowsStore = require('electron-windows-store');
const electronWindowsStoreUtils = require('electron-windows-store/lib/utils');
const opts = { /* */ };
await convertToWindowsStore(opts);
// This is how electron-windows-store seems to behave
const appxPath = `${opts.outputDirectory}\\${opts.packageName}.appx`;
const APPXBUNDLE_FILEPATH = 'some\\output\\dir\\MyAppName.appxbundle';
const TMP_APPXBUNDLE_MAP_FILEPATH = 'some\\tmp\\dir\\AppxBundle.map';
// https://docs.microsoft.com/en-us/windows/msix/package/create-app-package-with-makeappx-tool#mapping-files
fs.writeFileSync(TMP_APPXBUNDLE_MAP_FILEPATH, [
'[Files]',
`"${appxPath}" "MyAppName.appx"`, // Note: the filename within the .appxbundle seems to be unimportant?
].join("\n"));
// This makes an unsigned bundle ...
const makeappx = path.join(windowsKitPath, 'makeappx.exe');
await electronWindowsStoreUtils.executeChildProcess(makeappx,
['bundle', '/f', TMP_APPXBUNDLE_MAP_FILEPATH, '/p', APPXBUNDLE_FILEPATH, '/o']);
// ... so we have to sign it with:
const signtool = path.join(windowsKitPath, 'signtool.exe');
await electronWindowsStoreUtils.executeChildProcess(signtool,
['sign', '-f', opts.devCert, '-p', opts.certPass, '-fd', 'SHA256', '-v', APPXBUNDLE_FILEPATH]); |
@jameshfisher Why are you signing the application/bundle? It looks like it might not be signed for submission to the Store. |
I'm signing it for submission to the Microsoft Store, which requires a bundle signed with my Microsoft developer identity |
@jameshfisher I was able to submit not signed @felixrieseberg is this project dead? |
@felixrieseberg could you please pay attention to this issue. |
When submitting my .appx file to the Microsoft Store, I get the error:
So producing an .appx, as electron-windows-store does, is not always sufficient for the Microsoft Store. We need to create a .appxbundle from this. But I don't see options for this in electron-windows-store API.
This answer provides some clues, but it's not very pretty. And it produces an unsigned .appxbundle, meaning I have to manually re-sign the .appxbundle it creates.
The text was updated successfully, but these errors were encountered: