From: <ope...@li...> - 2002-07-09 00:59:52
|
Update of /cvsroot/openposs/Documents In directory usw-pr-cvs1:/tmp/cvs-serv21294 Added Files: OPRFC006.txt Log Message: Initial creation --- NEW FILE: OPRFC006.txt --- Filename: OPRFC006.txt Author : Chris W. Shaffer <chr...@be...> Date : July 05, 2002 Purpose : This doucment will establish and describe the standard packageing format all OpenPOSS modules. Status : Open for discussion. Contents ~~~~~~~~ i - Prelude 1 - Purpose of Packaging Format 2 - 'module_Install.php' 2.1 - Description Of Tasks To Be Performed 3 - moduleName.pkg.php File Generalization i - Prelude ~~~~~~~~~~~ This doucment will establish and describe the standard packageing format all OpenPOSS modules. It will be a work inprogress throughout the development cycle of the project, however will be made into a standard each time a new release is made available to the public. 1 - Purpose of Packaging Format ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The purpose of establishing a packaging format is to make the installation of 'modules' easier on the end user. By creating a "one-file standard", the end user no longer needs to adjust thier directory structure to add a module, limiting the opportunity for mistakes or misunderstandings due to poor documentation. 2 - 'module_Install.php' ~~~~~~~~~~~~~~~~~~~~~~~~ 'module_Install.php' will be the script file located in the directory './Server/admin' that will install the target module. 2.1 - Description Of Tasks To Be Performed ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1. Display 'File Upload form'. -the user will 'Browse' to the package file. -Package file will be uploaded to temp directory 2. Processing of Package file -Extract package info -Name -Version -Number of files -Create module directory -Extract database info -Tables -Inital Data -Execute SQL statements -Extract Directory Names -Create directories in new Module directory -Extract file info -File name(includeing path releative to module directory) -File content -Create files -Write file content for all files -Extract admin file -File contents -Create Admin file -Write admin file contents 3. Add entry to openPOS.modules table 4. Redirect user to 'Module Administration' Page so user can activate module. 3 - moduleName.pkg.php File Generalization ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The following will serve as a guide for all module builders. -The directory name in the 'modules' directory will be created from the ModuleName. -db tables will be created from the TableName directive. -all SQL statements will be executed by the parser -Directories must be relative to the Module's directory -Filenames must contain path relative to the Module's directory -------------Package Template------------- //Package wide information// <@ PackageHeader @> <@ ModuleName:[ModuleName] @> <@ ModuleVer:[ModuleVersion] @> <@ NumberOfFiles:[##] @> </@ PackageHeader @> <@ Database @> <@ Table1 @> <@ TableName:[TableName] @> | | | db table sturcture and/or | insert data | properly formatted SQL Statments | </@ Table1 @> <@ Table2 @> <@ TableName:[TableName] @> | | | db table sturcture and/or | insert data | properly formatted SQL Statments | </@ Table2 @> . . . </@ Database @> <@ Directories @> ./path ./path/to ./path/to/be/ ./path/to/be/created ./path/to/be/or ./path/to/be/or/not ./path/to/be/or/not/to ./path/to/be/or/not/to/be . . . </@ Directories @> <@ Files @> <@ File1 @> <@ FileName:[./path/FileName] @> | | | file | contents | | </@ File1 @> <@ File2 @> <@ FileName:[./path/to/FileName] @> | | | file | contents | | </@ File2 @> . . . </@ Files @> <@ AdminFile @> | | | file | contents | | </@ AdminFile @> |