Xfce Wiki

Sub domains
 

Site Tools


Differences

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

Link to this comparison view

midori:contribute [2013/10/12 23:05]
kalikiana [Midori with(out) Granite]
midori:contribute [2014/11/08 19:04] (current)
gero-bare [Build the code]
Line 23: Line 23:
   * [[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]]   * [[https://​github.com/​eustasy/​midori-browser.org/​issues|Report website bugs]]
-  * Write [[tutorial|your own extension]] - granted that's code, too, but maybe a little easier than hacking the core.+  * 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 ======
  
Line 34: Line 41:
 //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).//​ //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</​code>​ to the cmake command line.+If using GTK+3 you'll want to add <code bash>​-DUSE_GTK3=1</​code>​ to the cmake command line. 
 + 
 +You can build Midori using another C Compiler for example Clang. Just 
 +add -DCMAKE_C_COMPILER=/​path/​to/​compiler to the cmake arguments. 
 +Then you can build following your normal procedure. Like this: 
 +<code bash>​cmake -DCMAKE_INSTALL_PREFIX=/​usr -DCMAKE_C_COMPILER=/​usr/​bin/​clang .. 
 +make</​code>​
  
 Midori can be **run without being installed**. Midori can be **run without being installed**.
Line 62: Line 75:
  
 <code bash>env MIDORI_DEBUG=help _build/​midori/​midori</​code>​ <code bash>env MIDORI_DEBUG=help _build/​midori/​midori</​code>​
 +
 +Whilst -g is convenient you may want to use proper gdb:
 +
 +<code bash>gdb
 +file _build/​midori/​midori
 +run
 +
 +bt</​code>​
 +
 +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>​file midori.exe
 +run
 +
 +bt</​code>​
  
 To verify a regression you might need to revert a particular change: To verify a regression you might need to revert a particular change:
Line 201: Line 229:
   * 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 ​=====+ 
 +===== 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 212: Line 242:
  
 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 229: Line 259:
 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 239: Line 270:
 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.
  
 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://​sourceforge.net/​projects/​mingw-w64/​files/​Toolchains%20targetting
 +%20Win64/​Personal%20Builds/​rubenvb/​gcc-4.8-release/​|Releases]]
 +
 +[[http://​sourceforge.net/​projects/​mingw-w64/​files/​Toolchains%20targetting
 +%20Win64/​Personal%20Builds/​rubenvb/​gcc-4.8-release/​x86_64-w64-mingw32-gcc-4.8.0-
 +win32_rubenvb.7z/​download|Download]]
 +
 +
 +==== 7zip ====
 +We will need 7zip to extract various archives
 +
 +[[http://​www.7-zip.org/​download.html|Homepage]]
 +
 +
 +[[http://​downloads.sourceforge.net/​sevenzip/​7z920.exe|32bit Installer]]
 +
 +
 +==== 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://​www.python.org/​download/​releases/​3.3.5|Releases]]
 +
 +[[http://​www.python.org/​downloads/​release/​python-335/​|Download]]
 +
 +[[http://​www.python.org/​ftp/​python/​3.3.5/​python-3.3.5.amd64.msi|Installer]]
 +
 +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://​github.com/​mkbosmans/​download-mingw-rpm/​blob/​master/​download-
 +mingw-rpm.py|View Script]]
 +
 +[[https://​github.com/​mkbosmans/​download-mingw-rpm/​raw/​master/​download-
 +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>​c:​\Python33\python.exe download-mingw-rpm.py -u http://​ftp.wsisiz.edu.pl/​pub/​linux/​fedora/​linux/​updates/​18/​i386/​ --deps mingw32-webkitgtk mingw32-glib-networking mingw32-gdb mingw32-gstreamer-plugins-good</​code>​
 +
 +[[http://​dl.fedoraproject.org/​pub/​fedora/​linux/​releases/​18/​Everything/​i386/​os/​Packages
 +/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://​sourceforge.net/​projects/​mingw-w64/​files/​External%20binary
 +%20packages%20%28Win64%20hosted%29/​MSYS%20%2832-bit%29/​MSYS-20111123.zip/​download|Download]]
 +
 +
 +==== CMake ====
 +[[http://​www.cmake.org/​cmake/​resources/​software.html|Homepage]]
 +[[http://​www.cmake.org/​files/​v2.8/​cmake-2.8.12.2-win32-x86.exe|Installer]]
 +
 +When installing check the installer checkbox "add to path"
 +
 +
 +==== Bazaar ====
 +[[http://​wiki.bazaar.canonical.com/​WindowsDownloads|Homepage]]
 +
 +We will get 2.4 Stable Release (standalone) ​
 +
 +[[http://​launchpad.net/​bzr/​2.4/​2.4.2/​+download/​bzr-2.4.2-1-setup.exe|Installer]]
 +
 +When installing check the installer checkbox "add to path"
 +
 +==== Vala ====
 +[[http://​ftp.gnome.org/​pub/​gnome/​sources/​vala/​0.20/​vala-0.20.0.tar.xz|Source]]
 +
 +==== 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 ======
midori/contribute.1381611905.txt.gz · Last modified: 2013/10/12 23:05 by kalikiana