Platform/GFX: Difference between revisions

3,922 bytes removed ,  4 September 2013
m
Link to Moz2D wiki
m (Link to Moz2D wiki)
Line 34: Line 34:


=== Testing, replaying, building Moz2D ===
=== Testing, replaying, building Moz2D ===
* Linux/Mac
''(Moved to [[Platform/GFX/Moz2D#Developing_Moz2D|Moz2D documentation]])''
** Cairo
*** Get libcairo2-dev (http://cairographics.org/download/)
*** Get qt4-sdk (http://qt-project.org/downloads) if you plan on using player2d
*** hg clone http://hg.mozilla.org/users/bschouten_mozilla.com/moz2d
*** On Mac, add the directory containing the cairo.pc file to your PKG_CONFIG_PATH (if it's not there already).
**** One location seen was /usr/X11/lib/pkgconfig
**** Another location seen was /opt/local/lib/pkgconfig
*** Compiler issues with Player2D target
**** Currently, you need to be building with clang in order for Player2D (Qt dependency) to build.
**** If you don't get qmake producing a Makefile, but instead get a xcodeproj file instead, you may need to create the Makefile yourself, using qmake options (details forthcoming) and run make manually.
*** Build/Useful targets:
**** release: make -f Makefile.standalone release MOZ2D_CAIRO=true
**** debug: make -f Makefile.standalone debug MOZ2D_CAIRO=true
**** check: make -f Makefile.standalone check MOZ2D_CAIRO=true
**** player2d: make -f Makefile.standalone player2d MOZ2D_CAIRO=true
** Skia
*** Get skia: svn checkout http://skia.googlecode.com/svn/trunk skia
*** Build skia with BUILDTYPE=Release: https://sites.google.com/site/skiadocs/user-documentation/quick-start-guides/linux
*** Get qt4-sdk (http://qt-project.org/downloads) if you plan on using player2d
*** hg clone http://hg.mozilla.org/users/bschouten_mozilla.com/moz2d
*** make -f Makefile.standalone clean release MOZ2D_SKIA=skia
**** If you didn't checkout skia under the moz2d src directory then set MOZ2D_SKIA to it's relative path
* Windows
** Dependencies:
*** [http://www.microsoft.com/visualstudio/eng/downloads VS2012], Express 2012 for Windows Desktop is fine
*** A default Cairo and Skia build in the cairo/skia directories in the parent directory of Moz2D if you plan to use skia/cairo
*** [http://qt-project.org/downloads QtSDK] if you plan on using player2d
**** Use the VS2012 32-bit version
**** You will need at least version 5.1.0 since earlier versions don't have a 32-bit binary for VS2012 and have a bug ([https://bugreports.qt-project.org/browse/QTBUG-30822 QTBUG-30822]) that cause Visual Studio to pick up the wrong Windows SDK headers when building in an environment with both VS2010 and VS2012 installed.
**** Older versions can be used if needed. Use one of the installers and select "Source Components" when installing. Then, from a VS2012 command prompt run:
***** <code>C:\Qt\Qt5.0.2\5.0.2\Src\qtbase> configure -opensource -confirm-license -static -debug-and-release -no-angle -no-opengl -nomake examples -nomake tests -platform win32-msvc2012</code>
***** <code>nmake</code>
***** (Requires [http://www.activestate.com/activeperl Perl])
** <code>hg clone http://hg.mozilla.org/users/bschouten_mozilla.com/moz2d</code>
** Open the <code>gfx2d.sln</code> visual studio solution
** Build the solution
*** Build the Debug configuration first since it generates the shader code
*** Don't build Release (Skia) without installing Skia / Cairo first
** For player2d, from a VS2012 command prompt:
*** Go to the <code>moz2d</code> repository clone, <code>cd c:\users\me\moz2d</code>
*** <code>mkdir player2d-build</code>
*** <code>cd player2d-build</code>
*** <code>\qt\Qt5.1.0\5.1.0\msvc2012\bin\qmake.exe ..\player2d\player2d.pro -tp vc -spec win32-msvc2012</code><br>(The final <code>-spec win32-msvc2012</code> might not be necessary, particularly if you only have one version of Visual Studio installed)
*** Open the generated <code>player2d.vcxproj</code> file from the <code>player2d-build</code> directory in VS2012.
*** Press F7 to build.
*** If you get an error about <code>surfaceview.h</code> not being found when referenced from <code>ui_sourcesurfaceview.h</code>, change the line that reads:<br><code>#include &lt;surfaceview.h&gt;</code><br>to<br><code>#include "surfaceview.h"</code>
*** Add the directory containing the QT DLLs to your path (e.g. C:\qt\Qt5.1.0\5.1.0\msvc2012\bin)
*** Run player2d


=== Documentation ===
=== Documentation ===
Confirmed users
166

edits