File:  [mozdev] / caminol10n / www / packaging.html
Revision 1.9: download - view: text, annotated - select for diffs - revision graph
Wed Jul 13 09:07:10 2005 UTC (12 years, 3 months ago) by marcello
Branches: MAIN
CVS tags: HEAD
Typos

		<h5 class="page-header">Packaging guidelines for Camino localizations</h5>
		<p><strong>Goals of this document</strong><br />
			- To provide easy to use instructions for the people involved in localizing Camino, who need to distribute autonomously their work or need to send it to who builds the multilanguage package<br />
			- To create standard rules to be followed when localizators build their packages<br />
			- To allow circulation of smaller packages among localizators, so that broadband shouldn't be a requirement in order to participate to the project</p>
		<p><strong>Pre-requisites</strong><br />
			- This document assumes that you have Apple's Developer Tools installed; if you don't have them, you wouldn't be able to work on the localization, anyway. Please see our <a href="/appleglot-how-to/index.html">AppleGlot How-To</a> for more information about getting started in the localization workflow<br />
			- You need to be comfortable with the terminal: no particular skills are needed, you just have to be able to type in easy commands and change your working directory with the cd command</p>
		<p><strong>Tools we use</strong><br />
			- A shell script that helps extracting the localization content from a localized application<br />
			- A <em>preflight</em> script that will be useful with the package (it checks wether the user selected folder actually contains the Camino application)<br />
			- A background image for your installer package to become good looking and <em>Camino-esque</em><br />
			+ You may download the 2 scripts and the background image, conveniently archived and organized in folders ready for packaging: <a href="http://downloads.mozdev.org/caminol10n/tools/Packaging_Camino_L10n.zip">download the archive</a><br />
			- PackageMaker (included with Apple's Developer Tools*)<br />
			- A file compression utility (the ZIP archiver available in OS X 10.3 and later will be our first choice)</p>
		<p><strong>Prepare for the packaging</strong><br />
			- Uncompress the archive you have downloaded; it will become a folder that will contain some  stuff needed for the packaging: inside that folder, you find a script <span class="filename">pkg_make.sh</span> and 2 subfolders: <span class="pathname">Content</span> and <span class="pathname">Resources</span><br />
			- Inside <span class="pathname">Resources</span> you find the <span class="filename">preflight</span> script and the background image<br />
			- Add to the <span class="pathname">Resources</span> folder 2 RTF files, named <span class="filename">Welcome.rtf</span> and <span class="filename">ReadMe.rtf</span><br />
			- <span class="filename">Welcome.rtf</span> is the first thing that the user will read when she launches the installer package: keep it short and just announce that the user is about to install a localization for Camino; the more you keep this text generic, the less you will have to update it when Camino is updated (for example, avoid to specify here the version number)<br />
			- <span class="filename">ReadMe.rtf</span> might contain a translation of the <span class="filename">Release Notes.rtf</span> file that comes with the original Camino distribution<br />
			- Copy the freshly localized version of the Camino full application to the folder we're working on (the one containing <span class="filename">pkg_make.sh</span>)</p>
		<p><strong>Extracting content</strong><br />
			- Run the <span class="filename">pkg_make.sh</span> script against the localized <span class="filename">Camino.app</span>: 1) open the Terminal application; 2) cd to the folder where you have <span class="filename">Camino.app</span> and the <span class="filename">pkg_make.sh</span> script; 3) type <code>sh pkg_make.sh</code><br />
			- Move, trash or rename the Camino application<br />
			- Now you should have a new subfolder in your working folder, named <span class="pathname">Camino_app</span>; check that it contains all the resources related to the language you are working on<br />
			- Rename the subfolder to <span class="pathname">Camino.app</span>; after answering positively to a dialog, the folder appears now with the icon of a generic application<br />
			- Put the Camino.app <em>extracted</em> from the localized package inside the <span class="pathname">Content</span> subfolder</p>
		<p><strong>Package making</strong></p>
		<div style="padding: 0.8em; border: solid 1px black; background-color: #edc;">
			<p>Instructions for Package Maker available with Mac OS <strong>10.3</strong> Developer Tools<br />
			- Launch PackageMaker (usually found in <span class="pathname">/Developer/Applications/Utilities/</span>)<br />
			- In the &quot;Description&quot; tab that pops up first, write a title for your package: feel free to use your language, if you wish<br />
			- In the &quot;Files&quot; tab, select the &quot;Content&quot; subfolder of your working folder and keep &quot;Compress Archive&quot; checked<br />
			- In the &quot;Resources&quot; tab, select the &quot;Resources&quot; subfolder of your working folder<br />
			- In the &quot;Info&quot; tab: Default Location: <span class="pathname">/Applications</span>; Post-Install Action: No Restart Required; Authorization Action: Root Authorization; Flags: check only &quot;Relocatable&quot; and leave others unchecked<br />
			- In the &quot;Version&quot; tab, write the information you wish: they're not vital for the package to work correctly<br />
			- Before proceeding, make sure you save the document, so that you won't have to re-enter information next time you build a package; we suggest that you save the document inside your working folder<br />
			- Select the <span class="menupath">File &gt; Create Package</span> menu item; choose a file name for your package and save it (as usual, we suggest to use your working folder as a container for all things packaging); the file name shouold follow this schema: <em>Camino-[version#]_[lang-code].pkg</em> (i.e. <span class="filename">Camino-0.8.4_it.pkg</span> or <span class="filename">Camino-0.9a1_zh-tw_zh-cn.pkg</span>)<br />
			- You should get a confirmation dialog about succesful package creation</p>
		</div>
		<div style="padding: 0.8em; border: solid 1px black; background-color: #cde;">
			<p>Instructions for Package Maker available with Mac OS <strong>10.4</strong> Developer Tools<br />
			- Launch PackageMaker (usually found in <span class="pathname">/Developer/Applications/Utilities/</span>)<br />
			- Choose &quot;Single Package Project&quot; and click OK<br />
			- In the Contents tab, Choose your package folder (the top folder, containing the pkg_make.sh script)<br />
			- In the Configuration tab, choose &quot;Root&quot; as authentication method, &quot;None&quot; as Post-Install Action, and check the checkbox titled &quot;Relocatable&quot; (leave all other checkboxes unchecked).<br />
			- In the Scripts tab, choose your Resources folder.<br />
			- In the &quot;Version&quot; tab, write the information you wish: they're not vital for the package to work correctly<br />
			- Choose &quot;Build...&quot; from the Project-menu</p>
		</div>
		<p>- Compress the package using the built-in OS X archiver or any other applications that creates ZIP files</p>
		<p>Now you're ready to upload your package or send it to the CaminoL10n project mantainers. The compressed archive should weight several hundreds of  KB, making it a better choice than distributing the full Camino application.</p>
		<!--p style="font-size: 85%; padding: 0.8em; border: solid 1px black; background-color: #cde;">*This how-to has been written with Dev. Tools available for OS X 10.3 in mind; if someone finds inconsistencies with the Dev. Tools that come with OS X 10.4, please notify us and we'll make the necessary corrections.</p-->

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>