01-07-2011, 04:57 PM | #1 |
Sigil Developer
Posts: 8,156
Karma: 5450818
Join Date: Nov 2009
Device: many
|
how do you create your application installer for Windows.
Hi Kovid,
We are thinking about packaging a pure python drag and drop application for Windows and to make it work we would need to use PyCrypto and Python 2.7 much like you do with Calibre. Do you use a special tool for creating your Windows installers that bundle in python, pycrypto, etc? Do you include the entire Python executable and libs as one used to do when making apps that needed the java virtual machine run time environment? Or do you compile your python code to standalone exe files using py2exe? I have seen links to PyInstaller and NSIS installers but I have no idea which is better and hoped to pick your brain as to the best way to create a pure python application that can be run on Windows without worrying about which if any version of Python they have installed, ditto for Pycrypto. Thanks for any hints on what the best way to do this is. KevinH |
01-07-2011, 05:36 PM | #2 |
creator of calibre
Posts: 44,534
Karma: 24495948
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
I've written my own C code that hosts the python interpreter and my own python code that copies the python libs (and all other dependencies) into an installation package. The installation package is created using WiX.
All relevant code is in setup/installer/windows/* Basically my code is a custom replacement for py2exe. I used to use py2exe, but eventually decided to write my own code for various reasons. |
Advert | |
|
01-07-2011, 07:09 PM | #3 |
Sigil Developer
Posts: 8,156
Karma: 5450818
Join Date: Nov 2009
Device: many
|
Thanks for that information. I will take a look at what you have done and see if I can get a version of it to work for us as well. I am not a Windows Developer so even finding the right tools to compile the main.c will be as issue for me. I will grab cygwin since it is free.
Thanks, KevinH |
01-07-2011, 08:57 PM | #4 |
creator of calibre
Posts: 44,534
Karma: 24495948
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Use the free edition of microsoft visual c++ that is what python itself is compiled with. Do not use cygwin, if you want to use a GNU compiler use, msys.
|
01-07-2011, 10:04 PM | #5 |
Sigil Developer
Posts: 8,156
Karma: 5450818
Join Date: Nov 2009
Device: many
|
Hi,
Thanks, I will use the free version Microsoft Visual C++ one then. Kevin |
Advert | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Problem with Windows installer | AprilHare | Calibre | 6 | 12-29-2009 08:47 PM |
Windows Installer? | radamo | Calibre | 4 | 12-27-2009 09:09 AM |
New windows build and installer | kovidgoyal | Calibre | 17 | 10-11-2009 10:44 AM |
What is the best application to create PDF fit on a Reader? | komugi | 14 | 07-29-2009 04:20 PM | |
Installer doesn't run on Windows 7 | drogo | Calibre | 5 | 02-09-2009 09:13 PM |