YehudaKremer / msix

Create Msix installer for flutter windows-build files.
https://pub.dev/packages/msix
MIT License
280 stars 70 forks source link

How to generate certificate.pfx? #27

Closed SahajRana closed 3 years ago

SahajRana commented 3 years ago

Hi @YehudaKremer, thanks for the msix lib for flutter. It's truly a life savor. I was wondering how can we generate the certificate.pfx file? I couldn't find the docs on this.

YehudaKremer commented 3 years ago

Hey :) There are many guides online for this, please find one you like

SahajRana commented 3 years ago

@YehudaKremer, it is really confusing and overwhelming for someone who is not primarily from the Windows development community.

I have created a simplified step-by-step process Medium post to help others in the future. here

If you would like, you can include it in the readme to help other devs. :)

YehudaKremer commented 3 years ago

hey @SahajRana i added your excellent guide here: image

richard457 commented 3 years ago

@YehudaKremer, it is really confusing and overwhelming for someone who is not primarily from the Windows development community.

I have created a simplified step-by-step process Medium post to help others in the future. here

If you would like, you can include it in the readme to help other devs. :)

Followd your steps but I am getting this error AppxManifest.xml" as the manifest for the package. MakeAppx : error: Failure at appxFactory->CreateManifestReader(manifestStream, &manifestReader) - 0x80080204 - The specified package format is not valid: The package manifest is not valid. MakeAppx : error: Error info: /*[local-name()="Package" and namespace-uri()="http://schemas.microsoft.com/appx/manifest/foundation/windows10"]/*[local-name()="Identity" and namespace-uri()="http://schemas.microsoft.com/appx/manifest/foundation/windows10"][1]/@Publisher 'subject=C=RW, ST=Some-State, L=Kigali, O=Yegobox Ltd, CN=yegobox.com, emailAddress=yegobox@gmail.com' violates pattern constraint of '(CN|L|O|OU|E|C|S|STREET|T|G|I|SN|DC|SERIALNUMBER|Description|PostalCode|POBox|Phone|X21Address|dnQualifier|(OID\.(0|[1-9][0-9]*)(\.(0|[1-9][0-9]*))+))=(([^,+="<>#;])+|".*")(, ((CN|L|O|OU|E|C|S|STREET|T|G|I|SN|DC|SERIALNUMBER|Description|PostalCode|POBox|Phone|X21Address|dnQualifier|(OID\.(0|[1-9][0-9]*)(\.(0|[1-9][0-9]*))+))=(([^,+="<>#;])+|".*")))*'. The attribute 'Publisher' with value 'subject=C=RW, ST=Some-State, L=Kigali, O=Yegobox Ltd, CN=yegobox.com, emailAddress=yegobox@gmail.com' failed to parse. Cleaning up output file "\\?\E:\demos\flipper-new\flipper\build\windows\runner\Release\flipper.msix". MakeAppx : error: Failure at (CreatePackage( overwrite, hashAlgorithm, fileList, outputPath, manifestStream.Get(), forceCompressionNone, performanceOptions, encryptPackage, encryptionOptions, cgmPath, mainPackagePathForResourceExemption, makepriExeFullPath)) - 0x80080204 - The specified package format is not valid: The package manifest is not valid. MakeAppx : error: Package creation failed. MakeAppx : error: 0x80080204 - The specified package format is not valid: The package manifest is not valid.

richard457 commented 3 years ago

Now changed the publisher to publisher: CN=Yegobox Ltd, O=Yegobox Ltd, L=Kigali, S=Kigali, C=RW and a new error comes


Error information: "Error: SignerSign() failed." (-2147024885/0x8007000b)

SignTool Error: An unexpected internal error has occurred.```
richard457 commented 3 years ago

@YehudaKremer, it is really confusing and overwhelming for someone who is not primarily from the Windows development community.

I have created a simplified step-by-step process Medium post to help others in the future. here

If you would like, you can include it in the readme to help other devs. :)

Would be nice to have a youtube video would be helpful.

SahajRana commented 3 years ago

Hi @richard457, Make sure when you double-click(direct open file) of your .crt file. Go to Details tab. Under it go to Subject and all the details are there in your pubspec.yaml file.

publisher: E=s...@gmail.com, CN=b..p.in, OU=B..p, O=O...s Pvt Ltd, L=M...t, S=UP, C=IN

Screenshot (776)

PS: This pfx certificate is for testing purposes.

SahajRana commented 3 years ago

If the problem still persists please include your msix_config from your pubspec.yaml. It can help to understand the problem further.