From: Daniel P. <da...@pr...> - 2008-07-21 19:20:33
|
No, AFAIK, py2exe loads the DLLs directly from the zipfile (attached to the executable). Someone like Mark Hammond would know for sure, but I believe zipimport decompresses the DLL data directly into a memory-mapped file and calls LoadLibrary on that (right?). Distributing both executables and COM servers is one of the reasons installer programs were invented in the first place. Inno Setup is quite good (although it doesn't do MSI), and I've heard good things about NSIS (I believe Mozilla uses NSIS for all their stuff). And of course you can always use a commercial solution like InstallShield, Wise, etc. Or you could go the fun route and do MSI by hand... good luck with that one :-) If you *really* want to go the "one executable, no installation, just click it and go" approach, you might try a self-extracting archive (e.g. WinZip SFX) that extracts a bundle of files to a temporary directory and then invokes your executable. The problem with that approach is always cleanup... cleanup when your program is done is tricky (because it's easy to leave locks and/or create race conditions). In particular, you need to make sure to unregister the COM server before you delete the DLL file (you weren't just going to leave the COM server registered and the DLL file lying around in a temp directory, were you?). Again, there's a reason that every time this kind of question comes up on the list, everyone says "just use an installer" -- it's because that's what you need to do. - Daniel. Gal Aviel wrote: > David Bolen <db3l.net <at> gmail.com> writes: > >> Gal Aviel <galaviel <at> yahoo.com> writes: >> >>> However there is still the question of how to register the 3rd >>> party com DLL? On my machine, I can use 'regsvr32' from the Windows >>> command shell, however how to I achieve this grammatically >>> on the target machine? >> I would suggest wrapping your packaged (output from py2exe) >> application using one of the freely available Windows installers, such >> as Inno Setup (what I typically use) or NSIS. Then, use that >> installer's mechanism for handling the registration during >> installation, and de-registration during removal. >> >> In Inno Setup, for example, all you need to do is specify the >> "regserver" flag on the relevant file. >> > > > just wondering ... > > When bundling the DLLs into the executable with the method explained in > http://www.py2exe.org/index.cgi/OverridingCriteraForIncludingDlls, > I can't use 'regsvr32', the file is not found at runtime. > > What is the path to the file? I am assuming py2exe extracts the > bundled DLLs into a temporary directory? > > Any help would be appreciated :) > > Gal. > > > How > > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ |