How-to guide: a one-click Mac and Win installer creation method on OS X

[quote=204421:@Tobias Bussmann]What I was looking into a while ago was to complete the whole building, signing and installer-building process for Windows apps on a mac, without the need to process steps on a (virtual) Windows box. It seems doable, but I didn’t find the time to build an test a workflow, yet: there is osslsigntool a OpenSSL based signtool at http://osslsigncode.sourceforge.net/ and the Nullsoft installer NSIS can build it’s packages on any POSIX system: http://nsis.sourceforge.net/ Both can be installed easily using homebrew on the Mac.

Does anybody have experience with such a workflow or these tools?[/quote]

Don’t forget the need to build an installer.

The best you can do is to contact them and get this sorted out.
Heres a laugh… I sent Comodo an email using the contact address KSoftware supplied.
I got an automated reply (paraphrased) ‘You cant just send us an email, you have to register first, click here…’
So I clicked there and got this message:

Certificate-based authentication failed ERR_BAD_SSL_CLIENT_AUTH_CERT
Ironic, no?

Yes, if you want a certficate as a business you may end up with having to go to a local attorney who issues a written confirmation of your identity. This is cumbersome and costs to much.

So I registered as an individual with an email address corresponding to the registrant email of a domain I own, plus name and address corresponding as well. If I remember well, then i also had to send in a copy of an ID card or passport. Finally I received the certficate without any further cost.

Hi there,
Jeff: it took a while to get our cert; Comodo were terrible. In the end we went with GoDaddy. They were much better.
Bob: thanks for the tips above. I’ve spent the morning rewriting things. What I’ve done now - still with just the one Build click - is added a new set of steps which a) use kSign to individually sign all the DLLs and EXEs in the built application (i.e. before the installer’s created), and b) amended the InnoSetup script so that it signs the installer and uninstaller as it goes, rather than using kSign after the fact. With those amendments, would you say that the process now does what it needs to? If so I’ll amend my Word document and make a new video (but I don’t want to do that if you think I should change stuff, because it takes about half an hour to record!).
Cheers,
Hamish

this is what you can do with NSIS: [quote]The NSIS compiler can be compiled for POSIX platforms like Linux and *BSD. Generated installer will still run on Windows only, but this way they can be generated without Windows or WINE.[/quote]

How are you adding the files to kSign?

I’m using a Shell command on the Mac to (recursively) list all files in my built project. I’m then using a combination of sed and grep to extract just the .exe and .dll files, and building a list of calls to kSignCMD.exe to sign each individually. I’m then saving those to a .bat and calling that .bat in the same way I did before.

(The command line interface to kSign won’t let me recursively sign a project. I think that the GUI for adding a folder simply trawls the folder and adds all the files to its queue, so it’s essentially doing the same thing.)

(I will happily post all the code here; I just want to make sure that I’m signing everything that should be signed before I spend a while packaging it all up.)

That sounds right. It’s a shame that it won’t let you recursively add files.

Super. I’m just bogged down in a date issue at the moment, but when I’ve done that I’ll package up the code and record a new video. I agree that it would be lovely to be able to give kSignCMD a folder and say ‘sign everything useful in there’ - would’ve saved me a few hours romping around the Terminal…

would find not be a good tool to use.

find . -name “.dll" -o -name ".exe” -exec ksign {} \;

It would be, but kSign is a Windows program, so you can’t use those commands, sadly…

ah, i thought you were using sed and grep

you could use it with -print instead of exec to write a batchfile mind.

Yeah, that’s true. I’m basically using sed and grep to write the batch file commands for kSign; I’m sure that you could do it with a Find command as well. Like I say, I’m really fumbling around with this, and I’ve hit on a method that works - doesn’t mean there’s not a faster method! :slight_smile:
New upload coming soon - just finished the video.

Hi there -

OK; new video now up. Thanks to @Bob Keeney for the heads-up on Windows signing. (Bob - might this now solve your kSign automation problem?)

If anyone has any suggestions for improvements to the process then do shout, but I probably won’t record another video unless it really changes - it takes a chunk of time to do!

Hope it’ll be of use to people.

New video, Word document and sample files, as before, at https://dl.dropboxusercontent.com/u/15108631/One-Click%20Build.zip

H

Thanks, very useful.

It would be nice if you’d not publish Word docs, though. Even though Preview can read them, it would be much nicer if you’d generate a PDF from it. Should be easy using the Print command, then using the “PDF” button at the bottom left.

Also, I wonder if this thread shouldn’t rather appear under the Add-Ons topic where I’d look for enhancements.

Hey there Thomas,
I left it as a Word document so that people could edit it themselves - there are a bunch of paths and stuff in there which are specific to my setup. I suppose I could’ve provided it as a .txt file, but… well, I didn’t!
Channel changed…
H