PhobosK’s Blog

My personal weblog

HOWTO easy compile SubDownloader on Windows for free


I hope this post will help all the Windows users of SubDownloader that are dissatisfied with the new silly and insipid “Dual-Licensing” policy of the application concerning Windows OS binaries.

I wrote this HOWTO for the users that want to have SubDownloader packed and independent of any Python on the machine… like in situations when you put it on another MS computer, or you uninstall the Python and it’s modules etc.

The steps to follow for the building of SubDownloader on Windows are:

1. Depending on your Windows version, install

Microsoft Visual C++ 2005 Redistributable Package (x86) from here
or
Microsoft Visual C++ 2008 Redistributable Package (x86) from here.

2. Download and install the Windows 2.6.(x) version of Python from here:

http://www.python.org/ftp/python/2.6.1/python-2.6.1.msi
As an install folder use something simple (for convenience) like:
C:\python26

3. Download and install the PyQt4 for Windows (it should match the Python version you have downloaded in step 1 i.e. PyQt-Py2.6-gpl…) from here:

http://www.riverbankcomputing.co.uk/static/Downloads/PyQt4/PyQt-Py2.6-gpl-4.4.4-2.exe

4. Download and install the py2exe binary (it should match the Python version you have downloaded in step 1 i.e. …win32-py2.6.exe ) from here:

http://downloads.sourceforge.net/py2exe/py2exe-0.6.9.win32-py2.6.exe?modtime=1226789831&big_mirror=0

5. Download the latest sources of SubDownloader from here:

http://code.launchpad.net/subdownloader/trunk/2.0.9/+download/SubDownloader-2.0.9.tar.gz

6. Create the folder “PROJECTS” in the install folder of Python from step 1 (C:\python26\PROJECTS)

7. Extract the SubDownloader-2.0.9.tar.gz into C:\python26\PROJECTS.

You may use any archive program for that like IZArc (it is a very good and free application).
After the extraction of the archive you should have this directory containing all the files of SubDownloader:
C:\python26\PROJECTS\subdownloader

8. Download and put in the C:\python26\PROJECTS\subdownloader folder these two files:

“setup.py”
“installer.nsi”

9. Download and install the NSIS (Nullsoft Scriptable Install System) from here:

http://downloads.sourceforge.net/nsis/nsis-2.42-setup.exe?modtime=1229784695&big_mirror=0

10. Open Windows command shell (Command Prompt) window and issue these commands in it (copy/paste them one line at a time):

Code:
cd C:\python26\PROJECTS\subdownloader
..\..\python -OO setup.py py2exe

11. You are ready with the build. The result is in the “dist” directory – C:\python26\PROJECTS\subdownloader\dist.

Test if the build works by starting the C:\python26\PROJECTS\subdownloader\dist\SubDownloader.exe file.
If it works you may proceed to next step and use the “dist” folder without making an install package
OR
you may go directly to step 14 to prepare the install package of SubDownloader.

12. Uninstall any previous versions of SubDownloader, copy the “dist” directory to your “Program Files” folder, rename it to: “SubDownloader” and create a shortcut to the “SubDownloader.exe” file.

13. Start the SubDownloader.exe and you will have a working, no time limit and open source, free application for Windows.

Below are the steps to prepare an install package of the already built SubDownloader.exe.

14. Open Windows command shell (Command Prompt) window and issue these commands in it (copy/paste them one line at a time):

Code:
cd C:\python26\PROJECTS\subdownloader
“C:\Program Files\NSIS\makensis.exe” installer.nsi

15. You are ready with the install package. You may find it in the C:\python26\PROJECTS\subdownloader folder as:

C:\python26\PROJECTS\subdownloader\SubDownloader_2.0.9-Installer.exe.
Now you have a python independent and free SubDownloader Windows installer that will uninstall the shareware version you have and install the free version.

If you have any questions i will be glad to help you.

NOTE: In case the above steps produce errors on your OS or something is not working, please try to use the Python 2.5.2 version and all the other versions of the programs listed above for that python version. Links are as follow:
1. Python – http://www.python.org/ftp/python/2.5.2/python-2.5.2.msi
2. PyQt4 – http://www.riverbankcomputing.co.uk/static/Downloads/PyQt4/PyQt-Py2.5-gpl-4.4.3-1.exe
3. py2exe – http://downloads.sourceforge.net/py2exe/py2exe-0.6.9.win32-py2.5.exe?use_mirror=kent

Your feedback on this is very welcome because probably some tweaking of this HOWTO is needed for the different Windows versions, but for this to happen you should share your experience in the building and packaging. To do this please answer the following questions no matter if building works or not:

1. What version of Windows you are using (98, XP, Vista)?
2. What version of Python/PyQt4/py2exe did you use?
3. Did you need to install some additional stuff from MS like Microsoft Visual C++ 2005 Redistributable Package (x86) etc.?
4. Did you need to do anything else not described in the HOWTO to make all work?

Thanks in advance…

For getting more info read the following thread here.

WARNING: Distributing the installer or the binaries that you get from this HOWTO breaks the EULAs with Microsoft and this makes their distribution ILLEGAL. BTW the same issue is with the official SubDownloader installer/binaries… Smile

Advertisements

29/12/2008 Posted by | Tech, Tutorials | , | 2 Comments