Difference between revisions of "How-Tos"

From CDOT Wiki
Jump to: navigation, search
(Mozilla)
 
(21 intermediate revisions by 3 users not shown)
Line 3: Line 3:
  
 
==Wiki==
 
==Wiki==
===How to add a how-to===
+
{|style="background-color:LightYellow;width:100%;"
 +
|-
 +
|width="50" colspan="2"|
 +
|
 +
<hr style="height:5px;width:100%;background-color:SaddleBrown;">
 +
==='''Adding a how-to'''===
 +
<hr style="height:5px;width:15%;background-color:Peru;">
 +
<blockquote>
 
To add a how-to to this page add a heading under the correct category OR create a category if one doesn't exist.  There are currently no formatting or style rules.  The suggestion is to be clean and well laid out.  Look over the current how-to's to get a feel on how your tutorial should be laid out.  Thank you for the contribution.
 
To add a how-to to this page add a heading under the correct category OR create a category if one doesn't exist.  There are currently no formatting or style rules.  The suggestion is to be clean and well laid out.  Look over the current how-to's to get a feel on how your tutorial should be laid out.  Thank you for the contribution.
 +
</blockquote>
 +
<hr style="height:5px;width:100%;background-color:SaddleBrown;">
 +
==='''Creating a Wiki page'''===
 +
<hr style="height:5px;width:15%;background-color:Peru;">
 +
Here are two ways to create a wiki page:
 +
 +
{|style="background-color:PaleGoldenrod;width:90%;align:center;margin-left:auto;margin-right:auto;border-collapse:collapse;"
 +
|width="25" align="left" style="color:Darkred;"|'''A)'''
 +
|
 +
|
 +
|- style="height:40px"
 +
|
 +
|style="color:Darkred;"|'''Step 1'''
 +
|
 +
|-
 +
|
 +
|style="background-color:white;color:black;border:thin dashed black;"|Enter a title of a page into the search box on the left side and click on go.
 +
|align="center"|[[Image:How-tos-wiki-page-search.JPG]]
 +
|- style="height:40px"
 +
|
 +
|style="color:Darkred;"|'''Step 2'''
 +
|
 +
|-
 +
|
 +
|style="background-color:white;color:black;border:thin dashed black;"|A new page appears saying that the page could not be found. Click on create this page.
 +
|align="center"|[[Image:How-tos-wiki-page-create.JPG]]
 +
|- style="height:40px"
 +
|
 +
|style="color:Darkred;"|'''Step 3'''
 +
|
 +
|-
 +
|
 +
|style="background-color:white;color:black;border:thin dashed black;"|Enter anything into the text box and press save.
 +
|align="center"|[[Image:How-tos-wiki-page-save.JPG]]
 +
|-
 +
|&nbsp;
 +
|&nbsp;
 +
|&nbsp;
 +
|-
 +
|width="25" align="left" style="color:Darkred;"|'''B)'''
 +
|
 +
|
 +
|- style="height:40px"
 +
|
 +
|style="color:Darkred;"|'''Step 1'''
 +
|
 +
|- style="height:40px"
 +
|
 +
|style="background-color:white;color:black;border:thin dashed black;"|On some page choose the edit option.
 +
|align="center"|[[Image:How-tos-wiki-page-edit.JPG]]
 +
|- style="height:40px"
 +
|
 +
|style="color:Darkred;"|'''Step 2'''
 +
|
 +
|- style="height:40px"
 +
|
 +
|style="background-color:white;color:black;border:thin dashed black;"|Create a link to the page you want to created.  Ex.  <pre>[[test_page | test]]</pre>
 +
|align="center"|[[Image:How-tos-wiki-page-edit_link.JPG]]
 +
|- style="height:40px"
 +
|
 +
|style="color:Darkred;"|'''Step 3'''
 +
|
 +
|- style="height:40px"
 +
|
 +
|style="background-color:white;color:black;border:thin dashed black;"|Click on the Show Preview button.  The link now appears in red.  This indicates that the page the link is pointing to does not exist.
 +
|align="center"|[[Image:How-tos-wiki-page-save.JPG]]
 +
|- style="height:40px"
 +
|
 +
|style="color:Darkred;"|'''Step 4'''
 +
|
 +
|- style="height:40px"
 +
|
 +
|style="background-color:white;color:black;border:thin dashed black;"|Click on the red link.  A page appears with '<code>You've followed a link to a page that doesn't exist yet</code>'.
 +
|align="center"|[[Image:How-tos-wiki-page-doesnt_exist.JPG]]
 +
|- style="height:40px"
 +
|
 +
|style="color:Darkred;"|'''Step 5'''
 +
|
 +
|- style="height:40px"
 +
|
 +
|style="background-color:white;color:black;border:thin dashed black;"|Enter anything into the text box and press save.
 +
|align="center"|[[Image:How-tos-wiki-page-save.JPG]]
 +
|-
 +
|&nbsp;
 +
|
 +
|
 +
|}
 +
 +
 +
<!--
 +
{|style="padding:5px;background-color:LightYellow;border-collapse:collapse;"
 +
|-valign="top" align="center"
 +
|'''Option A'''
 +
|style="background-color:LightYellow;" width="30"|
 +
|'''Option B'''
 +
|-valign="top" style="background-color:PaleGoldenrod;"
 +
|<span style="color:DarkRed">Step 1</span>
 +
|style="background-color:LightYellow;"|
 +
|<span style="color:DarkRed">Step 1</span>
 +
|-valign="top"
 +
|Enter a title of a page into the search box on the left side and click on go.
 +
|style="background-color:LightYellow;"|
 +
|On some page choose the edit option.
 +
|-valign="middel" align="center" style="background-color:Peru;"
 +
|[[Image:How-tos-wiki-page-search.JPG]]
 +
|style="background-color:LightYellow;"|
 +
|[[Image:How-tos-wiki-page-edit.JPG]]
 +
|-
 +
|&nbsp;
 +
|style="background-color:LightYellow;"|
 +
|
 +
|-valign="top" style="background-color:PaleGoldenrod;"
 +
|<span style="color:DarkRed">Step 2</span>
 +
|style="background-color:LightYellow;"|
 +
|<span style="color:DarkRed">Step 2</span>
 +
|-valign="top"
 +
|A new page appears saying that the page could not be found. Click on create this page.
 +
|style="background-color:LightYellow;"|
 +
|Create a link to the page you want to created.  Ex.  <pre>[[test_page | test]]</pre>
 +
|-valign="middel" align="center" style="background-color:Peru;"
 +
|[[Image:How-tos-wiki-page-create.JPG]]
 +
|style="background-color:LightYellow;"|
 +
|[[Image:How-tos-wiki-page-edit_link.JPG]]
 +
|-
 +
|&nbsp;
 +
|style="background-color:LightYellow;"|
 +
|
 +
|-valign="top" style="background-color:PaleGoldenrod;"
 +
|<span style="color:DarkRed">Step 3</span>
 +
|style="background-color:LightYellow;"|
 +
|<span style="color:DarkRed">Step 3</span>
 +
|-valign="top"
 +
|Enter anything into the text box and press save.
 +
|style="background-color:LightYellow;"|
 +
|Click on the Show Preview button.  The link now appears in red.  This indicates that the page the link is pointing to does not exist.
 +
|-valign="middel" align="center" style="background-color:Peru;"
 +
|[[Image:How-tos-wiki-page-save.JPG]]
 +
|style="background-color:LightYellow;"|
 +
|[[Image:How-tos-wiki-page-save.JPG]]
 +
|-
 +
|&nbsp;
 +
|style="background-color:LightYellow;"|
 +
|
 +
|-valign="top" style="background-color:PaleGoldenrod;"
 +
|style="background-color:LightYellow;"|
 +
|style="background-color:LightYellow;"|
 +
|<span style="color:DarkRed">Step 4</span>
 +
|-valign="top"
 +
|style="background-color:LightYellow;"|
 +
|style="background-color:LightYellow;"|
 +
|Click on the red link.  A page appears with '<code>You've followed a link to a page that doesn't exist yet</code>'.
 +
|-valign="middel" align="center" style="background-color:Peru;"
 +
|style="background-color:LightYellow;"|
 +
|style="background-color:LightYellow;"|
 +
|[[Image:How-tos-wiki-page-doesnt_exist.JPG]]
 +
|-
 +
|style="background-color:LightYellow;"|&nbsp;
 +
|style="background-color:LightYellow;"|
 +
|style="background-color:LightYellow;"|
 +
|-valign="top" style="background-color:PaleGoldenrod;"
 +
|style="background-color:LightYellow;"|
 +
|style="background-color:LightYellow;"|
 +
|<span style="color:DarkRed">Step 5</span>
 +
|-valign="top"
 +
|style="background-color:LightYellow;"|
 +
|style="background-color:LightYellow;"|
 +
|Enter anything into the text box and press save.
 +
|-valign="middel" align="center" style="background-color:Peru;"
 +
|style="background-color:LightYellow;"|
 +
|style="background-color:LightYellow;"|
 +
|[[Image:How-tos-wiki-page-save.JPG]]
 +
|}
 +
-->
 +
<!-- end of Outer Steps Table -->
 +
 +
A new page has been created.
 +
 +
To create a page in a sub-directory. Change the link to testing/test_page.
 +
 +
|} <!-- End Wiki Section -->
 +
 
==Mozilla==
 
==Mozilla==
 
{|style="background-color:LightYellow;width:100%;"
 
{|style="background-color:LightYellow;width:100%;"
Line 22: Line 210:
 
<br/>
 
<br/>
 
<p>
 
<p>
For an overview on Automated testing with Mozilla can be found on the [https://developer.mozilla.org/en/Mozilla_automated_testing Mozilla Developer Center].
+
*For an overview on Automated testing with Mozilla can be found on the [https://developer.mozilla.org/en/Mozilla_automated_testing Mozilla Developer Center].
 +
*Presentation overview on automated testing by Ehsan Akhgari [http://ehsanakhgari.org/sites/default/files/talks/test-mozilla/index.html automated testing]
 +
 
 
</p>
 
</p>
 
<p>
 
<p>
A requirement for all test is to make sure that Firefox is compiled with tests enabled.<br/>
+
A '''requirement''' for all test is to make sure that Firefox is compiled with tests enabled.<br/>
 
Modify the .mozconfig file to include ''ac_add_options --enable-tests''<br/>
 
Modify the .mozconfig file to include ''ac_add_options --enable-tests''<br/>
 
Build Firefox from source.
 
Build Firefox from source.
Line 100: Line 290:
  
 
===Thunderbird===
 
===Thunderbird===
 +
 +
==Mercurial==
 +
 +
=====[http://blog.sidkalra.com/2008/10/applying-a-patch-to-a-repo-using-mercurial/ Applying a patch to a Repo]=====
 +
{|style="background-color:LightYellow;width:100%;padding:10px"
 +
<hr style="height:5px;width:15%;background-color:Peru;">
 +
<br/>
 +
{|style="background-color:PaleGoldenrod;width:90%;align:center;margin-left:auto;margin-right:auto;"
 +
|
 +
'''<span style="color:DarkRed">Step 1</span>'''
 +
<blockquote>
 +
<pre>Download the .patch or .diff file onto your machine</pre>
 +
</blockquote>
 +
 +
'''<span style="color:DarkRed">Step 2</span>'''
 +
<blockquote>
 +
<pre>Navigate to the repo that you want to install the patch to i.e. testRepo
 +
(I will using repo name for this example, substitute it with your repo name when you are trying to apply a patch yourself)</pre>
 +
</blockquote>
 +
 +
'''<span style="color:DarkRed">Step 3</span>'''
 +
<blockquote>
 +
<pre>Open testRepo\.hg\hgrc (the config file)</pre>
 +
</blockquote>
 +
 +
'''<span style="color:DarkRed">Step 4</span>'''
 +
<blockquote>
 +
<pre>Add the following to hgrc and save (This enables queues for hg so that we can use commands that we need, qimport and qpush)[extensions]
 +
hgext.mq =</pre>
 +
</blockquote>
 +
 +
'''<span style="color:DarkRed">Step 5</span>'''
 +
<blockquote>
 +
<pre>Now open up a command prompt and navigate to your repo directory</pre>
 +
</blockquote>
 +
 +
'''<span style="color:DarkRed">Step 6</span>'''
 +
<blockquote>
 +
<pre>Type in hg qimport <<full-path-of-patch-file>> and press enter</pre>
 +
</blockquote>
 +
 +
'''<span style="color:DarkRed">Step 7</span>'''
 +
<blockquote>
 +
<pre>The above command should create a patch folder within testRepo\.hg\patches\</pre>
 +
</blockquote>
 +
 +
'''<span style="color:DarkRed">Step 8</span>'''
 +
<blockquote>
 +
<pre>Next navigate to  testRepo\.hg\patches\</pre>
 +
</blockquote>
 +
 +
'''<span style="color:DarkRed">Step 9</span>'''
 +
<blockquote>
 +
<pre>Type in hg qpush <<patch-file-name>></pre>
 +
</blockquote>
 +
 +
'''<span style="color:DarkRed">Step 10</span>'''
 +
<blockquote>
 +
<pre>Done! The patch should have been applied (if you get an error such as “abort: local changes found,
 +
refresh first” then that means you have made changes to the original files and the patch won’t work)</pre>
 +
</blockquote>
 +
 +
|}
  
 
==Open Office==
 
==Open Office==
Line 105: Line 358:
 
==Linux==
 
==Linux==
 
===Fedora===
 
===Fedora===
 +
===Ubuntu===
 +
*Ubuntu: [http://www.ubuntu.com/ http://www.ubuntu.com/]
 +
*Ubuntu Forums: [http://ubuntuforums.org/ http://ubuntuforums.org]
 +
 +
===Songbird===
 +
====Linux Java How-to====
 +
For whatever reason, Songbird does not use the Java plugin if it is already installed for Firefox. 
 +
The following is a set of instructions to install and enable the Java Runtime Environment plugin for Songbird on Linux.
 +
=====Ubuntu=====
 +
* Download the java runtime environment binary:
 +
<blockquote>
 +
<pre>
 +
      1. Go to http://java.sun.com/javase/downloads/index.jsp
 +
 +
      2. Scroll down to "Java Runtime Environment (JRE) 6 Update 7"
 +
 +
      3. Click on DOWNLOAD
 +
 +
      4. Select PLATFORM of Linux
 +
 +
      5. Select LANGUAGE of Multi-language
 +
 +
      6. Check "I agree..."
 +
 +
      7. Click CONTINUE
 +
 +
      8. Click jre-6u7-linux-i586.bin link
 +
 +
      9. Save the file
 +
</pre>
 +
</blockquote>
 +
* Once the download completes, move the file to your HOME directory.
 +
* Click Applications > Accessories > Terminal
 +
* Install the JRE binary:
 +
<blockquote>
 +
<pre>
 +
    1. sudo chmod a+x ./jre-6u7-linux-i586.bin
 +
 +
    2. sudo ./jre-6u7-linux-i586.bin
 +
</pre>
 +
</blockquote>
 +
* Once the installation completes, create a shortcut for your Mozilla Plugins:
 +
<blockquote>
 +
<pre>
 +
    1. sudo mkdir /home/<username>/.mozilla/plugins
 +
    2. sudo ln -s /home/<username>/jre1.6.0_07/i386/ns7/libjavaplugin_oji.so /home/<username>/.mozilla/plugins/libjavaplugin_oji.so
 +
</pre>
 +
</blockquote>
 +
* Start Songbird
 +
* Open a new tab
 +
* Type about:plugins into the URL bar and press ENTER<br />'''You should see a Java Plugin listed'''
 +
* Go to http://firenes.zaldo.com.ar/emulador.php?rom=Mario%20Bros%20(JU)<br />'''The applet should load momentarily'''
 +
 +
=====Fedora=====
 +
* Download the java runtime environment binary:
 +
<blockquote>
 +
<pre>
 +
      1. Go to http://java.sun.com/javase/downloads/index.jsp
 +
 +
      2. Scroll down to "Java Runtime Environment (JRE) 6 Update 7"
 +
 +
      3. Click on DOWNLOAD
 +
 +
      4. Select PLATFORM of Linux
 +
 +
      5. Select LANGUAGE of Multi-language
 +
 +
      6. Check "I agree..."
 +
 +
      7. Click CONTINUE
 +
 +
      8. Click jre-6u7-linux-i586.bin link
 +
 +
      9. Save the file
 +
</pre>
 +
</blockquote>
 +
* Once the download completes, move the file to your HOME directory.
 +
* Click Applications > System Tools > Terminal
 +
* Install the JRE binary:
 +
<blockquote>
 +
<pre>
 +
    1. su
 +
 +
    2. ENTER YOUR PASSWORD
 +
 +
    3. chmod a+x ./jre-6u7-linux-i586.bin
 +
 +
    4. ./jre-6u7-linux-i586.bin
 +
</pre>
 +
</blockquote>
 +
* Once the installation completes, create a shortcut for your Mozilla Plugins:
 +
<blockquote>
 +
<pre>
 +
      1. mkdir /home/<username>/.mozilla/plugins
 +
      2. ln -s /home/<username>/jdk1.6.0_07/jre/plugin/i386/ns7/libjavaplugin_oji.so /home/<username>/.mozilla/plugins/libjavaplugin_oji.so
 +
</pre>
 +
</blockquote>
 +
* Start Songbird
 +
* Open a new tab
 +
* Type about:plugins into the URL bar and press ENTER<br />'''You should see a Java Plugin listed'''
 +
* Go to http://firenes.zaldo.com.ar/emulador.php?rom=Mario%20Bros%20(JU)<br />'''The applet should load momentarily'''
 +
 +
[[Category:Mozilla for beginners]]

Latest revision as of 10:41, 5 December 2008

Welcome

Welcome to the Seneca How-To page. You'll find How-To's for all things Open Source related.

Wiki


Adding a how-to


To add a how-to to this page add a heading under the correct category OR create a category if one doesn't exist. There are currently no formatting or style rules. The suggestion is to be clean and well laid out. Look over the current how-to's to get a feel on how your tutorial should be laid out. Thank you for the contribution.


Creating a Wiki page


Here are two ways to create a wiki page:

A)
Step 1
Enter a title of a page into the search box on the left side and click on go. How-tos-wiki-page-search.JPG
Step 2
A new page appears saying that the page could not be found. Click on create this page. How-tos-wiki-page-create.JPG
Step 3
Enter anything into the text box and press save. How-tos-wiki-page-save.JPG
     
B)
Step 1
On some page choose the edit option. How-tos-wiki-page-edit.JPG
Step 2
Create a link to the page you want to created. Ex.
[[test_page | test]]
How-tos-wiki-page-edit link.JPG
Step 3
Click on the Show Preview button. The link now appears in red. This indicates that the page the link is pointing to does not exist. How-tos-wiki-page-save.JPG
Step 4
Click on the red link. A page appears with 'You've followed a link to a page that doesn't exist yet'. How-tos-wiki-page-doesnt exist.JPG
Step 5
Enter anything into the text box and press save. How-tos-wiki-page-save.JPG
 


A new page has been created.

To create a page in a sub-directory. Change the link to testing/test_page.

Mozilla

Firefox

 

Automated Tests



A requirement for all test is to make sure that Firefox is compiled with tests enabled.
Modify the .mozconfig file to include ac_add_options --enable-tests
Build Firefox from source.


Mochitests


Run all Mochitests
A)

Step 1

cd $(OBJDIR)/_tests/testing/mochitest

Step 2

python runtests.py

B)

Step 1

cd $(OBJDIR)

Step 2

make -C $(OBJDIR) mochitest

Specific Mochitests can be run by the following:

Step 1

cd $(OBJDIR)/_tests/testing/mochitest

Step 2

python runtests.py --test-path=content/base/test/test_CrossSiteXHR.html

There are more options that are available for running Mochitests.


XPCShell


Step 1

cd path/to/source/
make check

How to make xpcshell tests.


Reftests


Step 1

cd path/to/source/
path/to/dist/bin/firefox -no-remote -reftest layout/reftests/reftest.list

Here is a readme on reftests.

Thunderbird

Mercurial

Applying a patch to a Repo


Step 1

Download the .patch or .diff file onto your machine

Step 2

Navigate to the repo that you want to install the patch to i.e. testRepo 
(I will using repo name for this example, substitute it with your repo name when you are trying to apply a patch yourself)

Step 3

Open testRepo\.hg\hgrc (the config file)

Step 4

Add the following to hgrc and save (This enables queues for hg so that we can use commands that we need, qimport and qpush)[extensions]
hgext.mq =

Step 5

Now open up a command prompt and navigate to your repo directory

Step 6

Type in hg qimport <<full-path-of-patch-file>> and press enter

Step 7

The above command should create a patch folder within testRepo\.hg\patches\

Step 8

Next navigate to  testRepo\.hg\patches\

Step 9

Type in hg qpush <<patch-file-name>>

Step 10

Done! The patch should have been applied (if you get an error such as “abort: local changes found, 
refresh first” then that means you have made changes to the original files and the patch won’t work)

Open Office

Eclipse

Linux

Fedora

Ubuntu

Songbird

Linux Java How-to

For whatever reason, Songbird does not use the Java plugin if it is already installed for Firefox. The following is a set of instructions to install and enable the Java Runtime Environment plugin for Songbird on Linux.

Ubuntu
  • Download the java runtime environment binary:
      1. Go to http://java.sun.com/javase/downloads/index.jsp

      2. Scroll down to "Java Runtime Environment (JRE) 6 Update 7"

      3. Click on DOWNLOAD

      4. Select PLATFORM of Linux

      5. Select LANGUAGE of Multi-language

      6. Check "I agree..."

      7. Click CONTINUE

      8. Click jre-6u7-linux-i586.bin link

      9. Save the file
  • Once the download completes, move the file to your HOME directory.
  • Click Applications > Accessories > Terminal
  • Install the JRE binary:
     1. sudo chmod a+x ./jre-6u7-linux-i586.bin

     2. sudo ./jre-6u7-linux-i586.bin
  • Once the installation completes, create a shortcut for your Mozilla Plugins:
     1. sudo mkdir /home/<username>/.mozilla/plugins
     2. sudo ln -s /home/<username>/jre1.6.0_07/i386/ns7/libjavaplugin_oji.so /home/<username>/.mozilla/plugins/libjavaplugin_oji.so
Fedora
  • Download the java runtime environment binary:
      1. Go to http://java.sun.com/javase/downloads/index.jsp

      2. Scroll down to "Java Runtime Environment (JRE) 6 Update 7"

      3. Click on DOWNLOAD

      4. Select PLATFORM of Linux

      5. Select LANGUAGE of Multi-language

      6. Check "I agree..."

      7. Click CONTINUE

      8. Click jre-6u7-linux-i586.bin link

      9. Save the file
  • Once the download completes, move the file to your HOME directory.
  • Click Applications > System Tools > Terminal
  • Install the JRE binary:
     1. su

     2. ENTER YOUR PASSWORD

     3. chmod a+x ./jre-6u7-linux-i586.bin

     4. ./jre-6u7-linux-i586.bin
  • Once the installation completes, create a shortcut for your Mozilla Plugins:
      1. mkdir /home/<username>/.mozilla/plugins
      2. ln -s /home/<username>/jdk1.6.0_07/jre/plugin/i386/ns7/libjavaplugin_oji.so /home/<username>/.mozilla/plugins/libjavaplugin_oji.so