Open main menu

CDOT Wiki β

How-Tos

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.  
Step 2
A new page appears saying that the page could not be found. Click on create this page.  
Step 3
Enter anything into the text box and press save.  
     
B)
Step 1
On some page choose the edit option.  
Step 2
Create a link to the page you want to created. Ex.
[[test_page | test]]
 
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.  
Step 4
Click on the red link. A page appears with 'You've followed a link to a page that doesn't exist yet'.  
Step 5
Enter anything into the text box and press save.  
 


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