Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Inno Setup script with MySQL ODBC
Message
De
22/12/2008 14:51:50
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Installation et configuration
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows XP
Database:
MySQL
Application:
Desktop
Divers
Thread ID:
01369043
Message ID:
01369236
Vues:
37
Thanks Christian.. I'll not user this routine.. But, this one help me on the path to follow to reach what I want (do this by inno)... I'll try something on this route.. As soon as I got something on the hand I'll share here..

Claudio

>I do the following: I include the MysQL ODBC driver files in the setup script to be copied into a subdirectory under the program directory.
>Then in VFP program, each time I start the application I check whether the ODBC driver is installed and if not, install it on demand using the copied ODBC files.
>
>*-- Check in the registry whether MySQL odbc driver is installed.
>*-- This is my own registry handler, you have to use your class for this.
>*-- The location of the key is: "Software\ODBC\ODBCINST.INI\ODBC Drivers\"
>lcValue = ""
>DoGetRegKey("MySQL ODBC 5.1 Driver",@lcValue)
>llODBCInstalled = UPPER(lcValue) == "INSTALLED"
>*
>IF NOT llODBCInstalled
>	*
>	*-- Copy the ODBC files into the system32 directory.
>	lcODBCPath = ADDBS(GETENV("windir")) + "System32"
>	*
>	*-- Our installation source files must have been copied to the install folder
>	*-- under the program directory in a folder called Install\MySQL\ODBC.
>	*
>	*-- The following files must be present in this folder:
>	*--	myodbc5.dll
>	*--	myodbc5.lib
>	*--	myodbc5.pdb
>	*--	myodbc5S.dll
>	*--	myodbc5S.lib
>	*--	myodbc5s.pdb
>	*--	myodbc-installer.exe
>	*--	myodbc-installer.pdb
>	*
>	lcODBCSourcePath = ADDBS(SYS(5)+CURDIR())+"Install\MySQL\ODBC"
>	*
>	LOCAL lnODBDFiles, lnNr
>	*
>	*-- Create a list of the required ODBC driver files that we find in the
>	*-- MySQL\ODBC folder in the installation directory.
>	lnODBCFiles = ADIR(laODBCFiles,FORCEPATH("*.*",lcODBCSourcePath))
>	*
>	FOR lnNr = 1 TO lnODBCFiles
>		*
>		*-- Copy these files to the odbc directory.
>		COPY FILE (FORCEPATH(laODBCFiles[lnNr,1],lcODBCSourcePath)) ;
>				TO ;
>				(FORCEPATH(laODBCFiles[lnNr,1],lcODBCPath))
>		*
>	ENDFOR
>	*
>	*-- Newest version is now 5.1
>	lcODBCDrivername = ["MySQL ODBC 5.1 Driver" -t "DRIVER=myodbc5.dll;SETUP=myodbc5S.dll"]
>	RUN myodbc-installer -d -a -n &lcODBCDriverName
>	*
>ENDIF
>
"Now to him who is able to do immeasurably more than all we ask or imagine, according to his power that is at work within us, Ephesians 3:20
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform