Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
midori:contribute [2013/06/15 19:36] – [Contribute other than touching code] kalikiana | midori:contribute [2015/08/30 21:05] – kalikiana | ||
---|---|---|---|
Line 10: | Line 10: | ||
//The code used to be hosted in git.xfce.org/ | //The code used to be hosted in git.xfce.org/ | ||
+ | |||
+ | Keep your copy updated: | ||
+ | |||
+ | <code bash>bzr merge --pull</ | ||
====== Join IRC chat rooms ====== | ====== Join IRC chat rooms ====== | ||
Join [[irc:// | Join [[irc:// | ||
+ | |||
+ | //Note: Midori also has a mirrored room in Slack ([[https:// | ||
+ | |||
====== Contribute other than touching code ====== | ====== Contribute other than touching code ====== | ||
Line 18: | Line 25: | ||
* [[https:// | * [[https:// | ||
* [[https:// | * [[https:// | ||
+ | * [[https:// | ||
+ | * Write [[http:// | ||
+ | |||
+ | ====== Documentation resources ====== | ||
+ | |||
+ | * [[https:// | ||
+ | * [[http:// | ||
+ | * [[http:// | ||
+ | |||
====== Build the code ====== | ====== Build the code ====== | ||
- | <code bash>./waf configure | + | <code bash>mkdir _build |
- | ./waf build | + | cd _build |
- | sudo ./waf install</ | + | cmake -DCMAKE_INSTALL_PREFIX=/usr .. |
+ | make | ||
+ | sudo make install | ||
+ | sudo gtk-update-icon-cache | ||
+ | </ | ||
+ | |||
+ | //Advanced Tip: Pass "-G Ninja" to cmake to use [[http:// | ||
+ | |||
+ | If using GTK+3 you'll want to add <code bash> | ||
+ | |||
+ | You can build Midori using another C Compiler for example Clang. Just | ||
+ | add -DCMAKE_C_COMPILER=/path/ | ||
+ | Then you can build following your normal procedure. Like this: | ||
+ | <code bash> | ||
+ | make</ | ||
Midori can be **run without being installed**. | Midori can be **run without being installed**. | ||
- | <code bash> | + | <code bash> |
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> | + | <code bash> |
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> | + | <code bash> |
Automated daily builds in Launchpad ([[https:// | Automated daily builds in Launchpad ([[https:// | ||
Line 41: | Line 71: | ||
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> | + | <code bash> |
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/ | + | <code bash>env G_DEBUG=all _build/ |
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/ | + | <code bash>env MIDORI_DEBUG=help _build/midori/midori</ |
+ | |||
+ | Whilst -g is convenient you may want to use proper gdb: | ||
+ | |||
+ | <code bash> | ||
+ | file _build/midori/midori | ||
+ | run | ||
+ | … | ||
+ | bt</ | ||
+ | |||
+ | On Windows you can open the folder where Midori is installed and double-click gdb.exe. A black command line window should appear. | ||
+ | |||
+ | <code bash> | ||
+ | run | ||
+ | … | ||
+ | bt</ | ||
+ | |||
+ | To verify a regression you might need to revert a particular change: | ||
+ | |||
+ | <code bash> | ||
+ | # Revert only r6304 | ||
+ | bzr merge . -r 6304..6303 | ||
+ | </ | ||
====== Coding style and quality ====== | ====== Coding style and quality ====== | ||
Line 107: | Line 159: | ||
Remember to keep your branch updated: | Remember to keep your branch updated: | ||
- | bzr pull | + | bzr merge --pull |
As a general rule of thumb, '' | As a general rule of thumb, '' | ||
Line 164: | Line 216: | ||
====== 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 Fedora and Ubuntu | + | * Required dependencies need to be available on the previous stable |
- | * Currently this is F17 (2012-05-29) and U 12.10 (2012-10-18) | + | * For reference [[http:// |
* 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' | + | When built with Granite (-DUSE_GRANITE=1 or --enable-granite) there' |
* Preferences uses a [[http:// | * Preferences uses a [[http:// | ||
* 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:// | * Edit Bookmark and Security Details use [[http:// | ||
- | * Browser uses **Granite.Widgets.DynamicNotebook** instead of Gtk.Notebook | + | |
====== Midori for Windows ====== | ====== Midori for Windows ====== | ||
- | ===== Dependencies | + | |
+ | ===== For Linux developers | ||
+ | ==== Dependencies | ||
Midori for Windows is compiled on a Linux host and MinGW stack. For the current build Fedora 18 packages are used. Packages needed are listed below: | Midori for Windows is compiled on a Linux host and MinGW stack. For the current build Fedora 18 packages are used. Packages needed are listed below: | ||
Line 186: | Line 247: | ||
For cross-compilation | For cross-compilation | ||
- | <code bash>yum install mingw{32, | + | <code bash>yum install mingw{32, |
Packages needed when assembling the archive | Packages needed when assembling the archive | ||
- | <code bash> yum install faenza-icon-theme p7zip mingw32-nsis</ | + | <code bash> yum install faenza-icon-theme p7zip mingw32-nsis |
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 |
- | ./ | + | cd _mingw32 |
+ | mingw32-cmake .. -DUSE_ZEITGEIST=0 | ||
make | make | ||
sudo make install</ | sudo make install</ | ||
Line 203: | Line 264: | ||
For 64-bit builds: | For 64-bit builds: | ||
<code bash> | <code bash> | ||
- | mingw64-env | + | mkdir _mingw64 |
- | ./ | + | cd _mingw64 |
+ | mingw64-cmake .. -DUSE_ZEITGEIST=0 | ||
make | make | ||
sudo make install</ | sudo make install</ | ||
Line 213: | Line 275: | ||
64-bit build: | 64-bit build: | ||
<code bash>env MINGW_PREFIX="/ | <code bash>env MINGW_PREFIX="/ | ||
- | |||
===== 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. | ||
One way around it is to virtualize Windows on a Linux host and mount your MinGW directories as a network drive or shared folder. | One way around it is to virtualize Windows on a Linux host and mount your MinGW directories as a network drive or shared folder. | ||
+ | |||
+ | ===== For Windows developers ===== | ||
+ | Rough list of prerequisites for building with MinGW on Windows | ||
+ | |||
+ | If in doubt whether to get 32 or 64 bit versions use 32 bit ones, they are more | ||
+ | universal and tend to be less broken. | ||
+ | |||
+ | |||
+ | ==== MinGW compiler ==== | ||
+ | Compiler should match the one that was used to build packages ideally. | ||
+ | |||
+ | * We will user *mingw64 rubenvb* release | ||
+ | * Lastest stable release is gcc 4.8.0 | ||
+ | |||
+ | [[http:// | ||
+ | %20Win64/ | ||
+ | |||
+ | [[http:// | ||
+ | %20Win64/ | ||
+ | win32_rubenvb.7z/ | ||
+ | |||
+ | |||
+ | ==== 7zip ==== | ||
+ | We will need 7zip to extract various archives | ||
+ | |||
+ | [[http:// | ||
+ | |||
+ | |||
+ | [[http:// | ||
+ | |||
+ | |||
+ | ==== Python3 (to extract rpms) ==== | ||
+ | We will need python3 to use download-mingw-rpm.py script. | ||
+ | If you don't plan to use it you can safely skip this step. | ||
+ | |||
+ | We get python3, whatever is the lastes stable release. | ||
+ | |||
+ | [[http:// | ||
+ | |||
+ | [[http:// | ||
+ | |||
+ | [[http:// | ||
+ | |||
+ | Install Python and be sure to check "addd python.exe to path" installer checkbox. | ||
+ | |||
+ | ==== download-mingw-rpm.py ==== | ||
+ | We get download-mingw-rpm.py script from github. It uses Python3 and should fetch and | ||
+ | unpack rpm files for us. | ||
+ | |||
+ | [[https:// | ||
+ | mingw-rpm.py|View Script]] | ||
+ | |||
+ | [[https:// | ||
+ | mingw-rpm.py|Download Script]] | ||
+ | |||
+ | Usage: | ||
+ | |||
+ | * Launch cmd.exe | ||
+ | * Navigate to folder where the script was saved | ||
+ | * Make sure that python can access 7z.exe | ||
+ | * Run command and wait, it should extract the packages into your current directory | ||
+ | |||
+ | <code bash> | ||
+ | |||
+ | [[http:// | ||
+ | /m/|Fedora 18 packages]] | ||
+ | |||
+ | The above URL for some reason does not work with the script. | ||
+ | |||
+ | ==== MSYS ==== | ||
+ | Msys contains shell and some small utilities | ||
+ | |||
+ | [[http:// | ||
+ | %20packages%20%28Win64%20hosted%29/ | ||
+ | |||
+ | |||
+ | ==== CMake ==== | ||
+ | [[http:// | ||
+ | [[http:// | ||
+ | |||
+ | When installing check the installer checkbox "add to path" | ||
+ | |||
+ | |||
+ | ==== Bazaar ==== | ||
+ | [[http:// | ||
+ | |||
+ | We will get 2.4 Stable Release (standalone) | ||
+ | |||
+ | [[http:// | ||
+ | |||
+ | When installing check the installer checkbox "add to path" | ||
+ | |||
+ | ==== Vala ==== | ||
+ | [[http:// | ||
+ | |||
+ | ==== Globbing it all together ==== | ||
+ | |||
+ | Extracted rpms msys and mingw packages should form uniform unix like folder. | ||
+ | You use msys.bat to launch a shell | ||
====== Jargon ====== | ====== Jargon ====== | ||
- | * freeze: | + | * 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 |