Open anthony-tuininga opened 8 years ago
Original comment by Anthony Tuininga (Bitbucket: anthony_tuininga, GitHub: Unknown):
If you can create a pull request for this based on the equivalent Mac code I'd be happy to integrate it. I have no real way of testing the code as I am not a Windows developer.
As far as I can tell, there's no way to actually code sign the .exe files if you want to use cx_Freeze's feature to build a .msi.
A "fix"/enhancement for that would be welcome too! ☺
I would use this as well, and would not mind writing the PR. Doesn't seem too difficult to implement a shell out but If there is someone that can help me navigate the cx_freeze code base it would be appreciated, I am pretty unfamiliar with the project.
Looks like this has been idle for some time. I did find a work-around for anyone else who happens across this:
'skip_build': True
option to the bdist_msi_options.python setup.py build
to generate the exe.python setup.py bdist_msi
to build the windows installer from the previously built exe.Looks like this has been idle for some time. I did find a work-around for anyone else who happens across this:
- Add
'skip_build': True
option to the bdist_msi_options.- Run
python setup.py build
to generate the exe.- Code Sign the built exe using your favorite method, such as the signtool.exe mentioned above.
- Run
python setup.py bdist_msi
to build the windows installer from the previously built exe.
It worked like charm ,thank you
Originally reported by: Micah Lee (Bitbucket: micahflee, GitHub: micahflee)
Right now cx_Freeze already supports Apple code signing with the bdist_mac command, but there's no support for Microsoft Authenticode code signing. Right now, in Windows, if you run
python setup.py build
it creates unsigned .exe files, and if you runpython setup.py bdist_msi
it creates unsigned .exe files, and then it packages them inside of an unsigned .msi file. As far as I can tell, there's no way to actually code sign the .exe files if you want to use cx_Freeze's feature to build a .msi.It would be great if there were bdist_msi options for code signing using Microsoft's
codesign.exe
tool: https://msdn.microsoft.com/en-us/library/8s9b9yaz(v=vs.110).aspxIf the options are present, it just needs to subprocess out to:
signtool.exe sign /v /d [software name] /a /tr [timestamp server url] /fd sha256 [path to .exe or .msi]
each time it builds a Windows executable.