Xfce Wiki

Sub domains
 

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
midori:contribute [2013/06/24 17:01] – [Committing code] kalikianamidori:contribute [2014/02/27 20:06] – [Contribute other than touching code] kalikiana
Line 22: Line 22:
   * [[https://www.bountysource.com/#trackers/130181-midori|Add a bounty]] for a feature or bug you'd like to support   * [[https://www.bountysource.com/#trackers/130181-midori|Add a bounty]] for a feature or bug you'd like to support
   * [[https://translations.launchpad.net/midori/trunk/+pots/trunk|Translate to your own language]]   * [[https://translations.launchpad.net/midori/trunk/+pots/trunk|Translate to your own language]]
 +  * [[https://github.com/eustasy/midori-browser.org/issues|Report website bugs]]
 +  * Write [[http://wiki.xfce.org/midori/tutorial|your own extension]] - granted that's code, too, but maybe a little easier than hacking the core.
 +
 +====== Documentation resources ======
 +
 +  * [[https://wiki.gnome.org/Projects/Vala/Tutorial|Vala Tutorial]]
 +  * [[http://midori-browser.org/docs/api/vala/midori/|Midori Vala Docs]]
 +  * [[http://midori-browser.org/docs/api/c/html/|Midori C Docs]]
 +
 ====== Build the code ====== ====== Build the code ======
  
-<code bash>./waf configure --prefix=/usr +<code bash>mkdir _build 
-./waf build +cd _build 
-sudo ./waf install</code>+cmake -DCMAKE_INSTALL_PREFIX=/usr .. 
 +make 
 +sudo make install</code> 
 + 
 +//Advanced Tip: Pass "-G Ninja" to cmake to use [[http://martine.github.io/ninja/|Ninja]] instead of make (usually packaged as ninja or ninja-build)./
 + 
 +If using GTK+3 you'll want to add <code bash>-DUSE_GTK3=1</code> to the cmake command line.
  
 Midori can be **run without being installed**. Midori can be **run without being installed**.
  
-<code bash>_build/default/midori/midori</code>+<code bash>_build/midori/midori</code>
  
 You can use a **temporary folder for testing** without affecting normal settings You can use a **temporary folder for testing** without affecting normal settings
  
-<code bash>_build/default/midori/midori -c /tmp/midoridev</code>+<code bash>_build/midori/midori -c /tmp/midoridev</code>
  
 You'll want to **unit test** the code if you're testing a new version or contributed your own changes: You'll want to **unit test** the code if you're testing a new version or contributed your own changes:
  
-<code bash>xvfb-run ./waf check</code>+<code bash>xvfb-run make check</code>
  
 Automated daily builds in Launchpad ([[https://launchpad.net/~elementary-os/+archive/daily|ppa:elementary-os/daily]] and [[https://launchpad.net/~midori/+archive/midori-dev|ppa:midori/midori-dev]]) run these tests as well. Automated daily builds in Launchpad ([[https://launchpad.net/~elementary-os/+archive/daily|ppa:elementary-os/daily]] and [[https://launchpad.net/~midori/+archive/midori-dev|ppa:midori/midori-dev]]) run these tests as well.
Line 45: Line 60:
 Testing an installed release may reveal crashers or memory corruption which require investigating from a local build and obtaining a stacktrace (backtrace, crash log). Testing an installed release may reveal crashers or memory corruption which require investigating from a local build and obtaining a stacktrace (backtrace, crash log).
  
-<code bash>_build/default/midori/midori -g [OPTIONAL ARGUMENTS]</code>+<code bash>_build/midori/midori -g [OPTIONAL ARGUMENTS]</code>
  
 If the problem is a warning, not a crash GLib has a handy feature If the problem is a warning, not a crash GLib has a handy feature
  
-<code bash>env G_DEBUG=all _build/default/midori/midori -g</code>+<code bash>env G_DEBUG=all _build/midori/midori -g</code>
  
 For more specific debugging output, depending on the feature in question you may use For more specific debugging output, depending on the feature in question you may use
  
-<code bash>env MIDORI_DEBUG=help _build/default/midori/midori</code>+<code bash>env MIDORI_DEBUG=help _build/midori/midori</code> 
 + 
 +To verify a regression you might need to revert a particular change: 
 + 
 +<code bash> 
 +# Revert only r6304 
 +bzr merge . -r 6304..6303 
 +</code>
 ====== Coding style and quality ====== ====== Coding style and quality ======
  
Line 168: Line 190:
  
 ====== Backwards compatibility ====== ====== Backwards compatibility ======
-As of Midori 0.5.4 the forumula will be+As of Midori 0.5.4 the formula is
-  * Required dependencies need to be available on the previous stable [[https://admin.fedoraproject.org/pkgdb/acls/list/?searchwords=*webkit*|Fedora]] and [[http://packages.ubuntu.com/|Ubuntu]] +  * Required dependencies need to be available on the previous stable [[https://apps.fedoraproject.org/packages/s/webkit|Fedora]] and [[http://packages.ubuntu.com/search?suite=quantal&keywords=webkit&searchon=names|Ubuntu]] 
-  * Currently this is F17 (2012-05-29) and U 12.10 (2012-10-18)+  * For reference [[http://openports.se/www/webkit|OpenBSD]]
   * Windows XP through 8 are to date ABI compatible, all dependencies are included   * Windows XP through 8 are to date ABI compatible, all dependencies are included
 +
 +^ package ^ F17 (2012-05-29) ^ U 12.10 (2012-10-18) ^
 +| glib2 | 2.32.4 | 2.34.0 |
 +| vala | 0.16.1 | 0.16 |
 +| gtk3 | 3.4.4 | 3.6.0 |
 +| gtk2 | 2.24.13 | 2.24.13 |
 +| soup | 2.38.1 | 2.40 |
 +| webkit | 1.8.3-1.fc17 | 1.10.0-0ubuntu1 |
 ====== Midori with(out) Granite ====== ====== Midori with(out) Granite ======
-When built with Granite (--enable-granite) there're a few key differences:+When built with Granite (-DUSE_GRANITE=1 or --enable-granite) there're a few key differences:
   * Preferences uses a [[http://valadoc.elementaryos.org/Granite/Granite.Widgets.StaticNotebook.html|Granite.Widgets.StaticNotebook]]   * Preferences uses a [[http://valadoc.elementaryos.org/Granite/Granite.Widgets.StaticNotebook.html|Granite.Widgets.StaticNotebook]]
   * URL completion styling is slightly different   * URL completion styling is slightly different
   * Clear Private Data uses **Granite.Widgets.LightWindow**   * Clear Private Data uses **Granite.Widgets.LightWindow**
   * Edit Bookmark and Security Details use [[http://valadoc.elementaryos.org/Granite/Granite.Widgets.PopOver.html|Granite.Widgets.PopOver]] instead of Gtk.Window   * Edit Bookmark and Security Details use [[http://valadoc.elementaryos.org/Granite/Granite.Widgets.PopOver.html|Granite.Widgets.PopOver]] instead of Gtk.Window
-  * Browser uses **Granite.Widgets.DynamicNotebook** instead of Gtk.Notebook 
 ====== Midori for Windows ====== ====== Midori for Windows ======
 ===== Dependencies ===== ===== Dependencies =====
Line 189: Line 218:
  
 For cross-compilation For cross-compilation
-<code bash>yum install mingw{32,64}-webkitgtk3 mingw{32,64}-glib-networking mingw{32,64}-gdb</code>+<code bash>yum install mingw{32,64}-webkitgtk3 mingw{32,64}-glib-networking mingw{32,64}-gdb mingw{32,64}-gstreamer-plugins-good</code>
  
 Packages needed when assembling the archive Packages needed when assembling the archive
-<code bash> yum install faenza-icon-theme p7zip mingw32-nsis</code>+<code bash> yum install faenza-icon-theme p7zip mingw32-nsis greybird-gtk3-theme</code>
  
 Installing those should get you the packages needed to successfully build and develop Midori for Win32. Installing those should get you the packages needed to successfully build and develop Midori for Win32.
- 
 ===== Building ===== ===== Building =====
 For 32-bit builds: For 32-bit builds:
 <code bash> <code bash>
-mingw32-env +mkdir _mingw32 
-./configure --enable-gtk3 --prefix=/usr/i686-w64-mingw32/sys-root/mingw/+cd _mingw32 
 +mingw32-cmake .. -DUSE_ZEITGEIST=0 -DUSE_GTK3=1 -DCMAKE_INSTALL_PREFIX=/usr/i686-w64-mingw32/sys-root/mingw -DCMAKE_VERBOSE_MAKEFILE=0
 make make
 sudo make install</code> sudo make install</code>
Line 206: Line 235:
 For 64-bit builds: For 64-bit builds:
 <code bash> <code bash>
-mingw64-env +mkdir _mingw64 
-./configure --enable-gtk3 --prefix=/usr/x86_64-w64-mingw32/sys-root/mingw/+cd _mingw64 
 +mingw64-cmake .. -DUSE_ZEITGEIST=0 -DUSE_GTK3=1 -DCMAKE_INSTALL_PREFIX=/usr/x86_64-w64-mingw32/sys-root/mingw -DCMAKE_VERBOSE_MAKEFILE=0
 make make
 sudo make install</code> sudo make install</code>
Line 216: Line 246:
 64-bit build: 64-bit build:
 <code bash>env MINGW_PREFIX="/usr/x86_64-w64-mingw32/sys-root/mingw/" ./win32/makedist/makedist.midori x64</code> <code bash>env MINGW_PREFIX="/usr/x86_64-w64-mingw32/sys-root/mingw/" ./win32/makedist/makedist.midori x64</code>
- 
 ===== Testing ===== ===== Testing =====
 For testing your changes unfortuantely a real system is needed because Midori and WebKitGTK+ don't work properly under Wine. Even if it works some problems are not visible when using Wine, but are present when running under a real Windows system and vice versa. For testing your changes unfortuantely a real system is needed because Midori and WebKitGTK+ don't work properly under Wine. Even if it works some problems are not visible when using Wine, but are present when running under a real Windows system and vice versa.
Line 223: Line 252:
  
 ====== Jargon ====== ====== Jargon ======
-    * freeze: the 4th week of 4 week release cycle, bug fixes only+    * freeze: a period of bug fixes only eg. 4/2 cycle means 4 weeks of features and 2 weeks to focus on resolving existing problems
     * MR: merge request, a branch proposed for review     * MR: merge request, a branch proposed for review
     * ninja: an internal tab, usually empty label, used for taking screenshots     * ninja: an internal tab, usually empty label, used for taking screenshots
     * fortress: user of an ancient release like 0.4.3 as found on Raspberry Pie, Debian, Ubuntu     * fortress: user of an ancient release like 0.4.3 as found on Raspberry Pie, Debian, Ubuntu
     * katze, sokoke, tabby: API names and coincidentally cat breeds     * katze, sokoke, tabby: API names and coincidentally cat breeds