[Mysql-cocoa-commits] CVS: SMySQL MCPConnection.h,1.1,1.2 MCPConnection.m,1.1,1.2 MCPFastQueries.h,1
Brought to you by:
sergecohen
From: Serge C. <ser...@us...> - 2002-12-25 21:17:41
|
Update of /cvsroot/mysql-cocoa/SMySQL In directory sc8-pr-cvs1:/tmp/cvs-serv14705 Modified Files: README SMySQL.h Added Files: MCPConnection.h MCPConnection.m MCPFastQueries.h MCPFastQueries.m MCPNull.h MCPNull.m MCPResult.h MCPResult.m MCPResultPlus.h MCPResultPlus.m SMySQLConstants.h TO_DO Removed Files: SMySQLConnection.h SMySQLConnection.m SMySQLResult.h Log Message: Making the version-2 the trunk of the repository. 2002-12-25; Serge Cohen. Index: README =================================================================== RCS file: /cvsroot/mysql-cocoa/SMySQL/README,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** README 1 Jan 2002 17:16:29 -0000 1.1.1.1 --- README 25 Dec 2002 21:17:37 -0000 1.2 *************** *** 1,18 **** READ ME file for SMySQL, from MySQL Cocoa project. - To install this framework, you need a properly compiled libmysqlclient.dylib. - To find instruction on how to compile mysql on Mac OSX 10.1.x, go to the Documentation package from the site. - You need also to have the headers coming with libmysqlclient: ! mysql.h ! mysql_com.h ! mysql_version.h ! These headers should be in : /usr/local/include/mysql/ ! The library should be in : /usr/local/lib/mysql/ ! Otherwise you will have to change some settings in the target, so that the compiler and linker can find the proper files. ! Serge Cohen, 30 December 2001. --- 1,82 ---- READ ME file for SMySQL, from MySQL Cocoa project. ! ++++++++++++++++++++++++++++++++ ! + Aim of this Framework: ! ++++++++++++++++++++++++++++++++ ! This framework is aimed at programers which want to connect to a MySQL database from a application developed with Cocoa (and maybe GNUStep, although I've not tried myself). The framework is based on the C API of MySQL and hence uses (or include) the libmysqlclient library coming from MySQL. ! Objects from this framework (namely MCPConnection and MCPResult) belongs to the Model layer and uses anly the Foundation API. The development is done with Project Builder (the IDE from Apple -previously NeXT-), and no other environment is supported (yet !! if you want ot port it to another env. I'll be glad to provide you with all the information I know which can help you). ! ! ++++++++++++++++++++++++++++++++ ! + Flavours: ! ++++++++++++++++++++++++++++++++ ! ! The SMySQL framework comes in 3 flavours, that's because: ! 1. Frameworks can have different policies to be installed on a system and used by an App. ! 2. The framework relies on the code from the libmysqlclient library to work. ! ! Let's first adress these two points, and then the description of the flavoured should much clearer. ! ! 1. Frameworks location (Indeed I would suggest you read Apple doc about OS X...): ! If a framework is used by many applications, it's better to have a central repository for him. This repository exist, it's the folder Library/Frameworks (of any of the domains: System, Network, User ...). Any application which need one of these framework just declare the of the framework, and the dynamic linker will look for it in all these repository (in a given order which you'll find in Apple doc). ! -> Lets call this kind of framework a 'Global framework' ! ! In the mean time, an application programmer might want to wrap some of his application capabilities in a framework (to be able to use it in another app easily). In this case it's better if the framework does not take place (and namespace) in the central repository, even more it's better if you don't have to ask the user to install a framework to be able to run the app. In this aim you can embed the framework in the application bundle (in the "Contents/Frameworks/" folder of the bundle). Then you should set precisely the path to reach the framework (at compile time). ! -> Lets call this kind of framework a 'embeded framework' ! ! ! 2. The form libmysqlclient used: ! The same kind question arise about libmysqlclient, it exists in two forms: static library (archive), or dynamic lib (shared object). ! The dynamic lib is much better to use if the user had it setted personnaly (give coherence to all the applications using the client side of mysql) BUT it might forces the user to install one more thing. ! ! In the case the application might be installed by users who doe not to bother with mysql installation, it's much easier for the user to have the library staticly linked (one once for all by the developer) in the framework. ! ! ! -- Now the 3 flavours of the framework: ! 1. Target : SMySQL ! The framework is to be installed in one of the central repository. And because you're not afraid of this knid of installs, this one relies on the dynamic version of libmysqlclient. One of the big PLUS of this install is that you can use the framework even in "Foundation" type application (command line interface, launched in terminal). ! ! 2. Target : SMySQL_embeded ! Kind of a mix target (exists mainly for historic reasons). The framework is made to be embeded in the application (and not clutter the central repositories), but it relies on the dynamic verison of the library (interesting if you have to install this lib for other API, like PERL's). ! ! 3. Target : SMySQL_fully_embeded ! The framework is made to be embeded in the application bundle and DOES NOT rely on any external libraries (except the one provided as standard with Mac OS X). In this target the libmysqlclient is staticly linked in the framework. ! ! NB: Only 1. can be used from a "Foundation" application (like SMySQL_test). For GUI application the method recommended is 3. (from Apple recommandation). ! ! ! ++++++++++++++++++++++++++++++++ ! + Installation: ! ++++++++++++++++++++++++++++++++ ! ! If you want to install flavours 1 or 2 (targets SMySQL or SMySQL_embeded), you have to have a working version of libmysqlclient together with the corresponding header files. You can get some infos on how to install the libmysqlclient lib in the Documentation package from the web site (mysql-cocoa.sf.net). ! ! For flavour 1: ! in Terminal (after installation of libmysqlclient), cd to the source directory and issue the two commands: ! >cd SMySQL.pbproj ! >pbxbuild -target SMySQL -buildstyle Development install DSTROOT=/ ! ! For flavour 2: ! Once the client side of MySQL is installed, you just have to open the project in Project Builder, select the target (SMySQL_embeded), the buildstyle and click the Build button. ! ! For flavour 3: ! Just get the project in PB, select target (SMySQL_fully_embeded), build style, and press Build. ! ! In all the three case the html doc is generated if you have AutoDoc (http://www.misckit.com/press/press_autodoc_2.0b7.html) installed. It will be in the directory: ! SMySQL.framework/Resources/English.lproj/Documentation/ ! ! ! ++++++++++++++++++++++++++++++++ ! + Use: ! ++++++++++++++++++++++++++++++++ ! ! ! Still to come.... ! ! ! Serge Cohen; MySQL Cocoa project, 2002-01-06. Index: SMySQL.h =================================================================== RCS file: /cvsroot/mysql-cocoa/SMySQL/SMySQL.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** SMySQL.h 7 May 2002 18:43:58 -0000 1.2 --- SMySQL.h 25 Dec 2002 21:17:37 -0000 1.3 *************** *** 4,8 **** * * Created by serge cohen (ser...@m4...) on Sat Dec 08 2001. ! * Copyright (c) 2001 MySQL Cocoa project. * * This code is free software; you can redistribute it and/or modify it under --- 4,8 ---- * * Created by serge cohen (ser...@m4...) on Sat Dec 08 2001. ! * Copyright (c) 2001 Serge Cohen. * * This code is free software; you can redistribute it and/or modify it under *************** *** 21,30 **** * More info at <http://mysql-cocoa.sourceforge.net/> * */ #import <Foundation/Foundation.h> ! #import <SMySQL/SMySQLResult.h> ! #import <SMySQL/SMySQLConnection.h> #import "mysql.h" //#import <SMySQL/mysql.h> --- 21,37 ---- * More info at <http://mysql-cocoa.sourceforge.net/> * + * + * $Id$ + * $Author$ */ #import <Foundation/Foundation.h> ! #import <SMySQL/SMySQLConstants.h> ! #import <SMySQL/MCPNull.h> ! #import <SMySQL/MCPResult.h> ! #import <SMySQL/MCPConnection.h> ! #import <SMySQL/MCPResultPlus.h> ! #import <SMySQL/MCPFastQueries.h> #import "mysql.h" //#import <SMySQL/mysql.h> --- SMySQLConnection.h DELETED --- --- SMySQLConnection.m DELETED --- --- SMySQLResult.h DELETED --- |