Home | History | Annotate | Download | only in quick
      1 Windows
      2 =======
      3 
      4 Prerequisites
      5 -------------
      6 
      7 Make 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 
     34 Check out the source code
     35 -------------------------
     36 
     37 see https://skia.org/user/download
     38 
     39 Generate Visual Studio projects
     40 -------------------------------
     41 
     42 We use the open-source gyp tool to generate Visual Studio projects (and
     43 analogous build scripts on other platforms) from our multi-platform "gyp"
     44 files.
     45 
     46 You can generate the Visual Studio projects by running gyp_skia, as follows:
     47 
     48     cd %SKIA_CHECKOUT_DIR%
     49     python gyp_skia
     50 
     51 This will produce Visual Studio projects in the `%SKIA_CHECKOUT_DIR%\out` directory.
     52 
     53 Build and run tests from the command line
     54 -----------------------------------------
     55 
     56     ninja -C out\Debug dm
     57     out\Debug\dm
     58 
     59 Normally you should run tests in Debug mode (SK_DEBUG is defined, and debug
     60 symbols are included in the binary). If you would like to build the Release
     61 version instead:
     62 
     63     ninja -C out\Release dm
     64     out\Release\dm
     65 
     66 Build 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 
     77 Build 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.cpps SampleWindow::onHandleKey() and SampleWindow::onHandleChar() methods
     89 
     90 Build and run nanobench (performance testbench) from the command line
     91 ---------------------------------------------------------------------
     92 
     93 Since 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