Merge branch 'master' of git://git.assembla.com/fpdb-gimick
This commit is contained in:
		
						commit
						7acaa95151
					
				
							
								
								
									
										136
									
								
								packaging/windows/MySqlPython1.2.2WalkthroughPython26.txt
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										136
									
								
								packaging/windows/MySqlPython1.2.2WalkthroughPython26.txt
									
									
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,136 @@
 | 
				
			||||||
 | 
					Create MySqlPython windows installer for Python26
 | 
				
			||||||
 | 
					created by Gimick on 29th June 2010
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					The FPDB exe needs to build against the MySql-Python project.  Unfortunately, for python 2.6 there is no official installer for windows, and none is ever likely to be provided.
 | 
				
			||||||
 | 
					Community builds are available, but to reduce third-party dependencies, we will build our own here.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					This walkthrough is derived from excellent installation instructions here ... http://www.bcspcsonline.com/wiki/index.php?title=MySQL-5.1.34_Python-2.6_Module_Build_Instructions
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Step 0 Get a fresh XP installation
 | 
				
			||||||
 | 
					----------------------------------
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					0.1/ Using XPhome 32bit
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Step 1, VisualStudio 2008 express install
 | 
				
			||||||
 | 
					-----------------------------------------
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					1.1/ Get the ISO CD from here ... http://www.microsoft.com/express/Downloads/#2008-All
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					1.2/ Run and install Visual C++ only, don't bother with the additional packages offered
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					This package will run 30 days before registration is needed
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Step 2, setup Mysql Server
 | 
				
			||||||
 | 
					--------------------------
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					2.1/ Install MySQL server runtime ... http://downloads.mysql.com/archives/mysql-5.1/mysql-5.1.34-win32.msi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Choose Typical, choose configure, choose Standard Configuration, choose all defaults, supply admin username/password.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Step 3, more installs
 | 
				
			||||||
 | 
					----------------------
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					3.1/ install the following in sequence (accept all default options) there should be no errors !
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Python 2.6.5 ... http://www.python.org/ftp/python/2.6.5/python-2.6.5.msi
 | 
				
			||||||
 | 
					7zip 914 ... http://sourceforge.net/projects/sevenzip/files/7-Zip/9.14/7z914.exe/download
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Step 4, grab Mysql server Source
 | 
				
			||||||
 | 
					--------------------------------
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					4.1/ Download ... http://downloads.mysql.com/archives/mysql-5.1/mysql-noinstall-5.1.34-win32.zip
 | 
				
			||||||
 | 
					4.2/ Unpacking Desktop\mysqlsource (use 7zip)
 | 
				
			||||||
 | 
					4.3/ Copy the following source directories to the MySql installation:
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					dos> xcopy Desktop\mysqlsource\mysql-5.1.34-win32\data\* "c:\Program Files\MySQL\MySQL Server 5.1\data" /I/E/F/H
 | 
				
			||||||
 | 
					dos> xcopy Desktop\mysqlsource\mysql-5.1.34-win32\Embedded\* "c:\Program Files\MySQL\MySQL Server 5.1\Embedded" /I/E/F/H
 | 
				
			||||||
 | 
					dos> xcopy Desktop\mysqlsource\mysql-5.1.34-win32\include\* "c:\Program Files\MySQL\MySQL Server 5.1\include" /I/E/F/H
 | 
				
			||||||
 | 
					dos> xcopy Desktop\mysqlsource\mysql-5.1.34-win32\lib\* "c:\Program Files\MySQL\MySQL Server 5.1\lib" /I/E/F/H
 | 
				
			||||||
 | 
					dos> xcopy Desktop\mysqlsource\mysql-5.1.34-win32\mysql-test\* "c:\Program Files\MySQL\MySQL Server 5.1\mysql-test" /I/E/F/H
 | 
				
			||||||
 | 
					dos> xcopy Desktop\mysqlsource\mysql-5.1.34-win32\sql-bench\* "c:\Program Files\MySQL\MySQL Server 5.1\sql-bench" /I/E/F/H
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					4.4/ You can delete Destop\mysqlsource, is no longer needed.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Step 5, grab Mysql-python source
 | 
				
			||||||
 | 
					--------------------------------
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					5.1/ get download 
 | 
				
			||||||
 | 
					MySql for python ... http://sourceforge.net/projects/mysql-python/files/mysql-python/1.2.2/MySQL-python-1.2.2.tar.gz/download
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					5.2/ extract MySQL-python-1.2.2 directory to the Desktop using 7zip
 | 
				
			||||||
 | 
					(note: use 7zip,  open the gz, then open the tar, then extract the directory found inside there)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Desktop\MySQL-python-1.2.2 should now exist
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Step 6, get python build tools
 | 
				
			||||||
 | 
					------------------------------
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					6.1/ get Easy Setup installer
 | 
				
			||||||
 | 
					Easy setup installer ... http://peak.telecommunity.com/dist/ez_setup.py
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					6.2/ Check the DEFAULT VERSION specified in Easy Setup and get the corresponding setuptools  (version c11 in this case)
 | 
				
			||||||
 | 
					Setuptools version 11 ... http://pypi.python.org/packages/2.6/s/setuptools/setuptools-0.6c11-py2.6.egg
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					6.3/ Put both of these files into Desktop\MySQL-python-1.2.2, overwriting any existing files
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Step 7, install the build tool
 | 
				
			||||||
 | 
					------------------------------
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					dos> cd Desktop\MySQL-python-1.2.2
 | 
				
			||||||
 | 
					dos> c:\Python26\python.exe ez_setup.py setuptools-0.6c11-py2.6.egg
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Step 8, Tweak the configuration
 | 
				
			||||||
 | 
					-------------------------------
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					dos> cd Desktop\MySQL-python-1.2.2
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					8.1/ dos> write site.cfg
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Change registry_key = SOFTWARE\MySQL AB\MySQL Server 5.0
 | 
				
			||||||
 | 
					 to registry_key = SOFTWARE\MySQL AB\MySQL Server 5.1
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					8.2/ dos> write _mysql.c
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Find the following lines
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					...
 | 
				
			||||||
 | 
					#include <windows.h>
 | 
				
			||||||
 | 
					#include <config-win.h>
 | 
				
			||||||
 | 
					...
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Insert an additional winsock2 line
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					...
 | 
				
			||||||
 | 
					#include <winsock2.h>
 | 
				
			||||||
 | 
					#include <windows.h>
 | 
				
			||||||
 | 
					#include <config-win.h>
 | 
				
			||||||
 | 
					...
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Step 9, build
 | 
				
			||||||
 | 
					-------------
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					dos> cd Desktop\MySQL-python-1.2.2
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					9.1/ dos> c:\python26\python.exe setup.py build
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					* Note: You will probably get a bunch of warnings and maybe a manifest error, these are ok as long as there are no errors in compiling or linking.
 | 
				
			||||||
 | 
					* Note: This will generate the "MySQL-python-1.2.2/build" folder 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					9.2/ dos> c:\python26\python.exe setup.py bdist_wininst
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Step 10, done
 | 
				
			||||||
 | 
					-------------
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					10.1/ the \dist directory will contain MySQL-python-1.2.2.win32-py2.6.exe !!!!!
 | 
				
			||||||
 | 
					10.2/ rename to MySQL-python-1.2.2.win32-py2.6-fpdb0.20.exe
 | 
				
			||||||
| 
						 | 
					@ -21,16 +21,15 @@ pycairo 1.8.6 ... http://ftp.gnome.org/pub/GNOME/binaries/win32/pycairo/1.8/pyca
 | 
				
			||||||
pyGobject 2.20.0 ... http://ftp.gnome.org/pub/GNOME/binaries/win32/pygobject/2.20/pygobject-2.20.0.win32-py2.6.exe
 | 
					pyGobject 2.20.0 ... http://ftp.gnome.org/pub/GNOME/binaries/win32/pygobject/2.20/pygobject-2.20.0.win32-py2.6.exe
 | 
				
			||||||
py2exe 0.6.9 ... http://sourceforge.net/projects/py2exe/files/py2exe/0.6.9/py2exe-0.6.9.win32-py2.6.exe/download
 | 
					py2exe 0.6.9 ... http://sourceforge.net/projects/py2exe/files/py2exe/0.6.9/py2exe-0.6.9.win32-py2.6.exe/download
 | 
				
			||||||
psycopg2 ... http://www.stickpeople.com/projects/python/win-psycopg/psycopg2-2.2.1.win32-py2.6-pg8.4.3-release.exe
 | 
					psycopg2 ... http://www.stickpeople.com/projects/python/win-psycopg/psycopg2-2.2.1.win32-py2.6-pg8.4.3-release.exe
 | 
				
			||||||
 | 
					(Note: stickpeople is the offical repository, not a community build)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
1.2/ MySQL 
 | 
					1.2/ MySQL 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
mysql-python is needed
 | 
					MySQL-python-1.2.2.win32-py2.6-fpdb0.20.exe ... http://www.mediafire.com/file/zjyljynz2mz/MySQL-python-1.2.2.win32-py2.6-fpdb0.20.exe
 | 
				
			||||||
The sourceforge page is http://sourceforge.net/projects/mysql-python/files/
 | 
					
 | 
				
			||||||
Unfortunately there is no py2.6 build for windows yet.
 | 
					This is an intaller built from source by gimick.  There are no official mysql-python2.6 build for windows.
 | 
				
			||||||
Instructions to build the installer package can be found here 
 | 
					
 | 
				
			||||||
http://www.bcspcsonline.com/wiki/index.php?title=MySQL-5.1.34_Python-2.6_Module_Build_Instructions
 | 
					Community builds are also available from some developers.  see www.codegood.com for example.
 | 
				
			||||||
A pre-built intaller is available here
 | 
					 | 
				
			||||||
MySQL-python 1.2.3c1 ... http://www.codegood.com/download/4/  (MySQL-python-1.2.3c1.win32-py2.6.exe)
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Step 2 Setup GTK
 | 
					Step 2 Setup GTK
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue
	
	Block a user