replaced mysqllaz package with mysql3laz and mysql4laz

git-svn-id: trunk@6311 -
This commit is contained in:
mattias 2004-11-28 10:35:27 +00:00
parent 9e27d65951
commit 83f7725cc0
8 changed files with 148 additions and 31 deletions

7
.gitattributes vendored
View File

@ -127,8 +127,11 @@ components/memds/memdslaz.lpk svneol=native#text/pascal
components/memds/memdslaz.pas svneol=native#text/pascal
components/memds/tmemdataset.xpm -text svneol=native#image/x-xpixmap
components/mpaslex/mpaslex.pp svneol=native#text/pascal
components/mysql/mysqllaz.lpk svneol=native#text/pascal
components/mysql/mysqllaz.pas svneol=native#text/pascal
components/mysql/README.txt svneol=native#text/plain
components/mysql/mysql3laz.lpk svneol=native#text/pascal
components/mysql/mysql3laz.pas svneol=native#text/pascal
components/mysql/mysql4laz.lpk svneol=native#text/pascal
components/mysql/mysql4laz.pas svneol=native#text/pascal
components/mysql/registermysql.lrs svneol=native#text/pascal
components/mysql/registermysql.pas svneol=native#text/pascal
components/mysql/tmysqldatabase.xpm -text svneol=native#image/x-xpixmap

View File

@ -0,0 +1,21 @@
Lazarus Packages for the FreePascal MySQL units:
MySQL3Laz, MySQL4Laz
FreePascal supports MySQL versions 3.2.2, 3.2.3 and 4.0.
Because the MySQL interface differs too much, there are separate units.
The package mysql3laz.lpk is for version 3.2.2 and 3.2.3.
The package mysql4laz.lpk is for version 4.0.
You have to choose one of them. Trying to use both into an application will give
linking errors.
The packages defines a macro MySQL3 respectively MySQL4, so you can write the
following in your code:
{$IFDEF MySQL3}
// do something MySQL3 specific
{$ENDIF}
{$IFDEF MySQL4}
// do something MySQL4 specific
{$ENDIF}

View File

@ -0,0 +1,54 @@
<?xml version="1.0"?>
<CONFIG>
<Package Version="2">
<Name Value="MySQL3Laz"/>
<Author Value="Mattias Gaertner"/>
<CompilerOptions>
<Version Value="2"/>
<SearchPaths>
<UnitOutputDirectory Value="lib3/"/>
</SearchPaths>
<CodeGeneration>
<Generate Value="Faster"/>
</CodeGeneration>
<Other>
<CustomOptions Value="-dMySQL3"/>
<CompilerPath Value="$(CompPath)"/>
</Other>
</CompilerOptions>
<Description Value="Lazarus package for MySQL3
The MySQL3 units are part of FreePascal"/>
<License Value="LGPL"/>
<Version Minor="1" Release="1"/>
<Files Count="3">
<Item1>
<Filename Value="registermysql.lrs"/>
<Type Value="LRS"/>
</Item1>
<Item2>
<Filename Value="registermysql.pas"/>
<HasRegisterProc Value="True"/>
<UnitName Value="RegisterMySQL"/>
</Item2>
<Item3>
<Filename Value="mysqldb3.pp"/>
<Type Value="Virtual Unit"/>
<UnitName Value="MySQLDB3"/>
</Item3>
</Files>
<Type Value="RunAndDesignTime"/>
<RequiredPkgs Count="1">
<Item1>
<PackageName Value="LCL"/>
</Item1>
</RequiredPkgs>
<UsageOptions>
<CustomOptions Value="-dMySQL3"/>
<UnitPath Value="$(PkgOutDir)/"/>
</UsageOptions>
<PublishOptions>
<Version Value="2"/>
<IgnoreBinaries Value="False"/>
</PublishOptions>
</Package>
</CONFIG>

View File

@ -0,0 +1,22 @@
{ This file was automatically created by Lazarus. Do not edit!
This source is only used to compile and install
the package MySQL3Laz 0.1.1.
}
unit MySQL3Laz;
interface
uses
RegisterMySQL, MySQLDB3, LazarusPackageIntf;
implementation
procedure Register;
begin
RegisterUnit('RegisterMySQL', @RegisterMySQL.Register);
end;
initialization
RegisterPackage('MySQL3Laz', @Register);
end.

View File

@ -1,17 +1,23 @@
<?xml version="1.0"?>
<CONFIG>
<Package Version="2">
<Name Value="MySQLLaz"/>
<Name Value="MySQL4Laz"/>
<Author Value="Mattias Gaertner"/>
<CompilerOptions>
<Version Value="2"/>
<SearchPaths>
<UnitOutputDirectory Value="lib/"/>
<UnitOutputDirectory Value="lib4"/>
</SearchPaths>
<CodeGeneration>
<Generate Value="Faster"/>
</CodeGeneration>
<Other>
<CustomOptions Value="-dMySQL4"/>
<CompilerPath Value="$(CompPath)"/>
</Other>
</CompilerOptions>
<Description Value="Lazarus package for MySQL"/>
<Description Value="Lazarus package for MySQL4
The MySQL3 units are part of FreePascal"/>
<License Value="LGPL"/>
<Version Minor="1" Release="1"/>
<Files Count="3">
@ -25,9 +31,9 @@
<UnitName Value="RegisterMySQL"/>
</Item2>
<Item3>
<Filename Value="mysqldb.pp"/>
<Filename Value="mysqldb4.pp"/>
<Type Value="Virtual Unit"/>
<UnitName Value="MySQLDB"/>
<UnitName Value="MySQLDB4"/>
</Item3>
</Files>
<Type Value="RunAndDesignTime"/>
@ -37,6 +43,7 @@
</Item1>
</RequiredPkgs>
<UsageOptions>
<CustomOptions Value="-dMySQL4"/>
<UnitPath Value="$(PkgOutDir)/"/>
</UsageOptions>
<PublishOptions>

View File

@ -0,0 +1,22 @@
{ This file was automatically created by Lazarus. Do not edit!
This source is only used to compile and install
the package MySQL4Laz 0.1.1.
}
unit MySQL4Laz;
interface
uses
RegisterMySQL, MySQLDB4, LazarusPackageIntf;
implementation
procedure Register;
begin
RegisterUnit('RegisterMySQL', @RegisterMySQL.Register);
end;
initialization
RegisterPackage('MySQL4Laz', @Register);
end.

View File

@ -1,22 +0,0 @@
{ This file was automatically created by Lazarus. Do not edit!
This source is only used to compile and install
the package MySQLLaz 0.0.
}
unit MySQLLaz;
interface
uses
RegisterMySQL, LazarusPackageIntf;
implementation
procedure Register;
begin
RegisterUnit('RegisterMySQL', @RegisterMySQL.Register);
end;
initialization
RegisterPackage('MySQLLaz', @Register)
end.

View File

@ -22,7 +22,13 @@ unit RegisterMySQL;
interface
uses
Classes, SysUtils, LResources, MySQLDB, LazarusPackageIntf;
Classes, SysUtils, LResources,
{$IFDEF MySQL3}
MySQLDB3,
{$ELSE}
MySQLDB4,
{$ENDIF}
LazarusPackageIntf;
procedure Register;
@ -35,7 +41,11 @@ end;
procedure Register;
begin
RegisterUnit('MySQLDB',@RegisterUnitMySQLDB);
{$IFDEF MySQL3}
RegisterUnit('MySQLDB3',@RegisterUnitMySQLDB);
{$ELSE}
RegisterUnit('MySQLDB4',@RegisterUnitMySQLDB);
{$ENDIF}
end;
initialization