• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1Windows
2=======
3
4Prerequisites
5-------------
6
7Make sure the following have been installed:
8
9  * Visual C++ 2013 Express or later, available for free
10    * http://www.visualstudio.com/downloads/download-visual-studio-vs#d-express-windows-8
11
12  * Chromium depot_tools
13    * http://www.chromium.org/developers/how-tos/depottools
14  * git
15    * Either use the mysygit installed by depot_tools
16    * Or install msys git: http://msysgit.github.io/ yourself
17  * Python 2.7.x (if you're not planning to use cygwin)
18    * available for free download at http://www.python.org/download/releases/
19    * make sure the installer changes your %PATH% environment variable to include the directory with the "python.exe" binary
20  * Cygwin (optional, but useful if you want to use git)
21    * Download from  http://cygwin.org/setup.exe
22    * use any mirror you like; http://lug.mtu.edu works well
23    * Cygwin installs a minimum of options. Add these packages if they aren't already selected:
24      * Devel git
25      * Devel subversion
26      * Editors vim
27        * to fix arrows in insert, copy /usr/share/vim/vim73/vimrc_example.vim to ~/.vimrc
28      * Net ca-certificates
29      * Python python
30      * Utils patch
31      * Utils util-linux
32    * set the windows envionment variable CYGWIN to nodosfilewarning
33
34Check out the source code
35-------------------------
36
37see https://skia.org/user/download
38
39Generate Visual Studio projects
40-------------------------------
41
42We use the open-source gyp tool to generate Visual Studio projects (and
43analogous build scripts on other platforms) from our multi-platform "gyp"
44files.
45
46You can generate the Visual Studio projects by running gyp_skia, as follows:
47
48    cd %SKIA_CHECKOUT_DIR%
49    python gyp_skia
50
51This will produce Visual Studio projects in the `%SKIA_CHECKOUT_DIR%\out` directory.
52
53Build and run tests from the command line
54-----------------------------------------
55
56    ninja -C out\Debug dm
57    out\Debug\dm
58
59Normally you should run tests in Debug mode (SK_DEBUG is defined, and debug
60symbols are included in the binary). If you would like to build the Release
61version instead:
62
63    ninja -C out\Release dm
64    out\Release\dm
65
66Build and run tests in the Visual Studio IDE
67--------------------------------------------
68
69  * Generate the Visual Studio project files by running gyp_skia as described above
70  * Open a File Explorer window pointing at the %SKIA_CHECKOUT_DIR%\out\gyp directory
71  * Double-click on dm.sln to start Visual Studio and load the project
72  * When Visual Studio starts, you may see an error dialog stating that "One or more projects in the solution were not loaded correctly"... but there's probably nothing to worry about.
73  * In the "Solution Explorer" window, right-click on the "dm" project and select "Set as StartUp Project".
74  * In the "Debug" menu, click on "Start Debugging" (or just press F5). If you get a dialog saying that the project is out of date, click on "Yes" to rebuild it.
75  * Once the build is complete, you should see console output from the tests in the "Output" window at lower right.
76
77Build and run SampleApp in Visual Studio
78----------------------------------------
79
80  * Generate the Visual Studio project files by running gyp_skia as described above
81  * Open a File Explorer window pointing at the %SKIA_INSTALLDIR%\trunk\out\gyp directory
82  * Double-click on SampleApp.sln
83  * When Visual Studio starts, you may see an error dialog stating that "One or more projects in the solution were not loaded correctly"... but there's probably nothing to worry about.
84  * In the "Debug" menu, click on "Start Debugging" (or just press F5). If you get a dialog saying that the project is out of date, click on "Yes" to rebuild it.
85  * Once the build is complete, you should see a window with various example graphics. To move through the sample app, use the following keypresses:
86    * right-arrow key: cycle through different test pages
87    * left-arrow key: cycle through rendering methods for each test page
88    * other keys are defined in SampleApp.cpp’s SampleWindow::onHandleKey() and SampleWindow::onHandleChar() methods
89
90Build and run nanobench (performance testbench) from the command line
91---------------------------------------------------------------------
92
93Since nanobench tests performance, it usually makes more sense to run it in Release mode.
94
95    ninja -C out\Release nanobench
96    out\Release\nanobench
97