Hello Juergen,
Sure, here's an example manifest file that I sent out. Let me break down each part:
Code:
<?php
// created: 2005-08-30 16:00:00
$manifest = array (
'acceptable_sugar_versions' =>
array (
'exact_matches' =>
array (
),
'regex_matches' =>
array (
0 => '3\.5\.1[a-z]?'
),
),
'acceptable_sugar_flavors' =>
array (
0 => 'OS',
1 => 'PRO',
2 => 'ENT',
),
'name' => 'pt_br language pack',
'description' => 'pt_br language pack',
'author' => '',
'published_date' => '2005-09-29 22:50:00',
'version' => '3.5.1',
'type' => 'langpack',
'icon' => '',
'is_uninstallable' => TRUE,
'copy_files' =>
array (
'from_dir' => 'pt_br_351',
'to_dir' => '',
'force_copy' =>
array (
),
),
);
?> acceptable_sugar_versions is an array that contains two other arrays:
exact_matches contains exact version matches, i.e. "3.5.0a"
regex_matches contains regular expression matches, i.e. "3.5.[0-1][a-z]?" (which would match 3.5.x, basically)
The package can only be installed on versions that match one of the patterns (or exact matches) above.
acceptable_sugar_flavors is an array that contains which "Sugar Editions" that package can be installed on (Open Source and/or Professional and/or Enterprise).
name is the name of the package.
description is the description of the package, displayed during installation.
author contains the author's name
published_date is the date the package was released
version is the version of the package itself
type defines the type of package: module, patch, theme, or langpack
icon allows you to specify a relative path in the package that contains an icon for the package (i.e. ./pt_br_351/icon.gif)
is_uninstallable allows you to specify whether or not the package can be uninstalled through the Upgrade Wizard
copy_files is an array that controls which files are copied from the package during installation. In this particular case, the contents of ./pt_br_351/ in the ZIP file will be copied to the main Sugar directory (demarked by "" in the 'to_dir' directive). This particular language pack's structure looks like:
Code:
| manifest.php
\---pt_br_351
+---include
| \---language
| pt_br.lang.php
|
\---modules
+---<module directories here> manifest.php and a directory named 'pt_br_351' exist at the top level. Two directories, 'include' and 'modules' exist under 'pt_br_351.'
There are a few more directives that can be used in manifest files, but I'll get into those later. We're going to be updating a document on SugarForge soon that details the manifest file in full.
Bookmarks