diff options
author | Mike Klein <mtklein@chromium.org> | 2016-11-04 12:32:07 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2016-11-04 21:05:45 +0000 |
commit | e33998aa26b27861463ec526f9c5dbb13607973b (patch) | |
tree | 27a31b0dbc5c455769e7db978efc27c51a157aa5 /site | |
parent | 61eedebe4ce61215a56ced832e0df73c2cb19447 (diff) |
Trim down quick start docs for a GN world.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4431
NOTRY=true
DOCS_PREVIEW= https://skia.org/?cl=4431
Change-Id: I2a10494158e7415ae655baf212a951afd87dcbde
Reviewed-on: https://skia-review.googlesource.com/4431
Reviewed-by: Heather Miller <hcm@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
Diffstat (limited to 'site')
-rw-r--r-- | site/user/METADATA | 2 | ||||
-rw-r--r-- | site/user/build.md (renamed from site/user/quick/gn.md) | 76 | ||||
-rw-r--r-- | site/user/download.md | 4 | ||||
-rw-r--r-- | site/user/quick/METADATA | 2 | ||||
-rw-r--r-- | site/user/quick/android.md | 213 | ||||
-rw-r--r-- | site/user/quick/desktop.md | 95 | ||||
-rw-r--r-- | site/user/quick/index.md | 13 | ||||
-rw-r--r-- | site/user/quick/ios.md | 5 | ||||
-rw-r--r-- | site/user/quick/linux.md | 88 | ||||
-rw-r--r-- | site/user/quick/macos.md | 91 | ||||
-rw-r--r-- | site/user/quick/windows.md | 142 |
11 files changed, 36 insertions, 695 deletions
diff --git a/site/user/METADATA b/site/user/METADATA index 1735b80124..6dd6513164 100644 --- a/site/user/METADATA +++ b/site/user/METADATA @@ -1,4 +1,4 @@ { "dirOrder": ["sample", "quick", "api", "special"], - "fileOrder": ["download"] + "fileOrder": ["download", "build"] } diff --git a/site/user/quick/gn.md b/site/user/build.md index e42975426a..4f1395253e 100644 --- a/site/user/quick/gn.md +++ b/site/user/build.md @@ -1,48 +1,42 @@ -GN -===== +How to build Skia +================= -[GN](https://chromium.googlesource.com/chromium/src/tools/gn/) -is a new meta-build system originally designed to replace GYP in Chromium. +Make sure you have first followed the [instructions to download +Skia](./download). -You can build Skia using GN in a limited number of configurations. We expect -that as that limited number rises, GN will become the preferred, and then only, -way to build Skia. +Skia uses [GN](https://chromium.googlesource.com/chromium/src/tools/gn/) to +configure its builds. -Supported Features ----------- - - * Linux, Mac, Android, Windows - * Software, GL, Vulkan rendering - * libskia.a, libskia.so - * DM, nanobench, a few other tools - * (Pretty much everything but iOS and some complicated tools.) +A few build configurations remain unported to GN, so you may see some `.gyp` +files laying around left over from when we used GYP. Don't bother looking at +them. Quickstart ---------- -Please check out Skia using the instructions in one of the other quick start -guides. We diverge where they'd first run some command with "gyp" in it. +After gclient sync, run `fetch-gn` to make sure you have GN. -<!--?prettify lang=sh?--> + gclient sync && python bin/fetch-gn - # After gclient sync, run fetch-gn to make sure you have GN. - gclient sync && bin/fetch-gn +Run GN to generate your build files. - # Run GN to generate your build files. gn gen out/Static --args='is_official_build=true' gn gen out/Shared --args='is_official_build=true is_component_build=true' - # GN allows fine-grained settings for developers and special situations. +GN allows fine-grained settings for developers and special situations. + gn gen out/Debug gn gen out/Release --args='is_debug=false' gn gen out/Clang --args='cc="clang" cxx="clang++"' gn gen out/Cached --args='cc_wrapper="ccache"' gn gen out/RTTI --args='extra_cflags_cc="-frtti"' - # To see all the current GN arguments, run +To see all the arguments available, you can run + gn args out/Debug --list - # Build +Having generated your build files, run Ninja to compile and link Skia. + ninja -C out/Static ninja -C out/Shared ninja -C out/Debug @@ -51,8 +45,6 @@ guides. We diverge where they'd first run some command with "gyp" in it. ninja -C out/Cached ninja -C out/RTTI -From here everything is pretty much business as usual. - Android ------- @@ -62,8 +54,6 @@ NDK](https://developer.android.com/ndk/index.html). If you do not have an NDK and have access to CIPD, you can use one of these commands to fetch the NDK our bots use: -<!--?prettify lang=sh?--> - python infra/bots/assets/android_ndk_linux/download.py -t /tmp/ndk python infra/bots/assets/android_ndk_darwin/download.py -t /tmp/ndk python infra/bots/assets/android_ndk_windows/download.py -t C:/ndk @@ -71,8 +61,6 @@ can use one of these commands to fetch the NDK our bots use: When generating your GN build files, pass the path to your `ndk` and your desired `target_cpu`: -<!--?prettify lang=sh?--> - gn gen out/arm --args='ndk="/tmp/ndk" target_cpu="arm"' gn gen out/arm64 --args='ndk="/tmp/ndk" target_cpu="arm64"' gn gen out/mips64el --args='ndk="/tmp/ndk" target_cpu="mips64el"' @@ -86,8 +74,6 @@ Tweaking `ndk_api` gives you access to newer Android features like Vulkan. To test on an Android device, push the binary and `resources` over, and run it as normal. You may find `bin/droid` convenient. -<!--?prettify lang=sh?--> - ninja -C out/arm64 adb push out/arm64/dm /data/local/tmp adb push resources /data/local/tmp @@ -101,14 +87,12 @@ Mac users may want to pass `--ide=xcode` to `gn gen` to generate an Xcode projec Windows ------- -Skia should build on Windows with Visual Studio 2015 Update 3. No other -version, older or newer, is supported. If you use Visual Studio, you may -want to pass `--ide=vs` to `gn gen` to generate `all.sln`. +Skia can build on Windows with Visual Studio 2015 Update 3. No older or newer +version is supported. If you use Visual Studio, you may want to pass +`--ide=vs` to `gn gen` to generate `all.sln`. The bots use a packaged toolchain, which you may be able to download like this: -<!--?prettify lang=sh?--> - python infra/bots/assets/win_toolchain/download.py -t C:/toolchain If you pass that downloaded path to GN via `windk`, you can build using that @@ -121,8 +105,6 @@ CMake We have added a GN-to-CMake translator mainly for use with IDEs that like CMake project descriptions. This is not meant for any purpose beyond development. -<!--?prettify lang=sh?--> - gn gen out/config --ide=json --json-ide-script=../../gn/gn_to_cmake.py Third-party Dependencies @@ -136,11 +118,11 @@ by a GN argument that looks something like `skia_use_foo` for appropriate Most of these third-party dependencies can also be satisfied by pre-built system libraries. If `skia_use_foo` is enabled, turn on `skia_use_system_foo` -to build and link Skia against the headers and libaries found on the normal -system paths. Remember, you can use `extra_cflags` and `extra_ldflags` to add -include or library paths if needed. - -By default Skia will attempt to build and embed its own copies of these -third-party libraries. This configuration is for development and testing only. -We do not recommend shipping Skia this way. Note however, this is the only -configuration of Skia that receives significant testing. +to build and link Skia against the headers and libaries found on the system +paths. You can use `extra_cflags` and `extra_ldflags` to add include or +library paths if needed. + +By default Skia will build and embed its own copies of these third-party +libraries. This configuration is for development only. We do not recommend +shipping Skia this way. However, this is the only configuration of Skia that +receives significant testing. diff --git a/site/user/download.md b/site/user/download.md index 5da01a2180..5bdc994476 100644 --- a/site/user/download.md +++ b/site/user/download.md @@ -30,9 +30,7 @@ Clone the Skia repository Getting started with Skia ------------------------- -Try out more things from the [desktop](./quick/desktop), -[Android](./quick/android), and [iOS](./quick/ios)-specific Skia -guides. +You probably now want to [build](./build) Skia. Changing and contributing to Skia --------------------------------- diff --git a/site/user/quick/METADATA b/site/user/quick/METADATA index 9333c3af46..0c2cb3463e 100644 --- a/site/user/quick/METADATA +++ b/site/user/quick/METADATA @@ -1,2 +1,2 @@ -{ "fileOrder": ["android", "ios", "desktop", "linux", "macos", "windows"] } +{ "fileOrder": ["ios"] } diff --git a/site/user/quick/android.md b/site/user/quick/android.md deleted file mode 100644 index 7dafa26f50..0000000000 --- a/site/user/quick/android.md +++ /dev/null @@ -1,213 +0,0 @@ -Android -======= - -Prerequisites -------------- - -_Currently we only support building Skia for Android on a Linux or Mac host! In addition, - we only use the Mac build for local development. All shipping variants are compiled on - Linux for performance reasons._ - -The following libraries/utilities are required in addition to those needed for a standard skia checkout: - - * The Android SDK: http://developer.android.com/sdk/ - -Check out the source code -------------------------- - -Follow the instructions [here](../download) for downloading the Skia source. - -Inside your Skia checkout, `platform_tools/android` contains the Android setup -scripts, Android specific dependencies, and the Android Viewer App. - -You may need to [install other dependencies](./linux#prerequisites): - - tools/install_dependencies.sh - -Setup the Android SDK ---------------------- - -To finish setting up the Android SDK you need to download use the SDK to -download the appropriate API level. To do this simply go to the directory -where you installed the SDK and run the following commands - - # You may want to add this export to your shell's .bash_profile or .profile - export ANDROID_SDK_ROOT=/path/to/android/sdk - - $ANDROID_SDK_ROOT/tools/android update sdk --no-ui --filter android-19 - $ANDROID_SDK_ROOT/tools/android update sdk --no-ui --filter android-23 - $ANDROID_SDK_ROOT/tools/android update sdk -a -u -t 8 - -From here you will need to type 'y' to approve the license agreement and that -is all. You will then have downloaded the SDK for API level 19 and 23(Android 4.4 -KitKat and Android 6.0 Marshmallow) which will be used to build the Skia Viewer app. -You can download as many other Android add-ons or APIs as you want, but you only -are required to have these two in order to complete the Skia build process. - -The last line in the script installs Android SDK Build-tools 22.0.1. -Alternatively you can download the above packages with Android Studio, by clicking -the Launch Standalone SDK Manager link in Tools > Android > SDK Manger. - -Setup Environment for Android ------------------------------ - -The Android build needs to set up some specific variables needed by both GYP -and Make. We make this setup easy for developers by encapsulating all the -details into a custom script that acts as a replacement for make. - -Syncing the Source ------------------------------ -We provide a utility to sync both our git repository as well as any third-party -dependencies. Simply run the command below: - -<!--?prettify lang=sh?--> - # Sync the source - ./bin/sync - -Custom Android Build Script ---------------------------- - -The android_ninja script is a wrapper for the ninja command (provided by -depot_tools) and is specifically designed to work with the Skia's build -system. To use the script you need to call it from Skia's trunk directory with -the -d option plus any of the options or arguments you would normally pass to -ninja (see descriptions of some of the other flags here). - - export ANDROID_SDK_ROOT=/path/to/android/sdk - export ANDROID_HOME=/path/to/android/sdk - export PATH=$PATH:/path/to/depot_tools - - cd skia - ./platform_tools/android/bin/android_ninja -d nexus_10 # or nexus_7, galaxy_nexus, etc... - -The -d option enables the build system to target the build to a specific -architecture such as MIPS (generic), x86 (generic) and ARM (generic and device -specific flavors for Nexus devices). This in turn allows Skia to take -advantage of specific device optimizations (e.g. NEON instructions). - -Faster rebuilds ---------------- - -You can use ccache to improve the speed of rebuilding: - - # You may want to add this export to your shell's .bash_profile or .profile - export ANDROID_MAKE_CCACHE=[ccache] - -Build and run executables on the device ---------------------------------------- - -The build system packages the Skia executables as shared libraries. As such, -in order to run any executable on the device you must install the library and -a launcher executable on your device. To assist in this process there is a -script called `android_run_skia` that is located in the -`platform_tools/android/bin` directory. - -Run correctness tests ---------------------- - -First build the app and then run it on an attached device: - - ./platform_tools/android/bin/android_ninja [-d device_id] dm - - # uploads dm binary and resources and runs dm on the attached device - ./platform_tools/android/bin/android_run_skia dm --resourcePath /data/local/tmp/skia/resources/ - -Run performance tests ---------------------- - -Since nanobench tests performance, it usually makes more sense to run it in -Release mode. - - BUILDTYPE=Release ./platform_tools/android/bin/android_ninja [-d device_id] nanobench - - # uploads and runs the nanobench binary on the attached device - ./platform_tools/android/bin/android_run_skia --release nanobench - -If you pass nanobench SKP files, it will benchmark them too. - - ./platform_tools/android/bin/[linux/mac]/adb push ../skp <dst> # <dst> is dir on device - -Finally to run the executable there are two approaches. The simplest of the -two run the app on the device like you would do for gm or tests, however this -approach will also produce the noisiest results. - - # <input> is file/dir on device - ./platform_tools/android/bin/android_run_skia --release nanobench --skps <input> - -Build and run Viewer App ------------------------ - -The Viewer App on Android provides a simple UI for viewing sample slides and gm images. - - BUILDTYPE=Debug ./platform_tools/android/bin/android_ninja -d $TARGET_DEVICE Viewer_APK - -Then, install the app onto the device: - - ./platform_tools/android/bin/android_install_app - -Finally to run the application you can either navigate to the Skia Viewer -application using the application launcher on your device or from the command -line. The command line option allows you to pass additional details to the -application (similar to other operating system) that specify where to find -skp files and other resources. For example: - - ./platform_tools/android/bin/android_launch_app --resourcePath /data/local/tmp/skia - -By default if no additional parameters are specified the app will also have the following -default parameters: - - --skps /data/local/tmp/skia - --jpgs /data/local/tmp/skia - - -Android Studio Support ------------------------ - -You can also build and run Viewer App (and some other experimental apps) using Android -Studio. To create the project either select "import project" from the quickstart -screen or use File -> Open. In both cases you'll need to select ./platform_tools/android/apps -as the root directory of your project. - -Finally to be able to build within Android studio it needs to know the path to -ninja so you will need to add a properties file and populate it with the path -to depot_tools. The syntax and location of that file is... - - # - # file location: ./platform_tools/android/apps/gradle.properties - # - depot_tools.dir=<path_to_depot_tools> - -That should be all the setup you need. You should now be able to build and deploy -Viewer App on ARM, Intel, and MIPS devices. - - -Build tools ------------ - -The Android platform does not support skdiff at this time. - -Clean up all generated files ----------------------------- - - make clean - -Debugging on Android --------------------- - -We support 2 modes of debugging on Android using GDB wrapper scripts. These -scripts start a gdbserver instance on the device and then enter an interactive -GDB client shell on your host. All necessary symbol files should -be pulled from the device and placed into a temporary folder (android_gdb_tmp). - -Note: The debugging scripts do not build the app - you'll have to do that first. - - # COMMAND LINE APPS - # include additional arguments in quotes (e.g. "dm --nopdf") - ./platform_tools/android/bin/android_gdb_native dm - - # VIEWER APP - # make sure you've installed the app on the device first - ./platform_tools/android/bin/android_gdb_app [-d device_id] - -When the gdb client is ready, insert a breakpoint, and continue to let the -program resume execution. diff --git a/site/user/quick/desktop.md b/site/user/quick/desktop.md deleted file mode 100644 index c3d6df0fbe..0000000000 --- a/site/user/quick/desktop.md +++ /dev/null @@ -1,95 +0,0 @@ -Desktop -======= - -Instructions to get started with Skia on desktop systems (Linux, Mac OS X, or Windows). - -1. [Download Skia](/user/download) - - <!--?prettify lang=sh?--> - - git clone 'https://chromium.googlesource.com/chromium/tools/depot_tools.git' - export PATH="${PWD}/depot_tools:${PATH}" - git clone 'https://skia.googlesource.com/skia.git' - cd skia - - (On Windows without git, swap steps 1 and 2) - -2. Install system-specific prerequisites. - - [Linux](/user/quick/linux) - - [Mac OS X](/user/quick/macos) - - [Windows](/user/quick/windows) - -3. Sync dependencies and config. Build. Run tests. - - <!--?prettify lang=sh?--> - - python bin/sync-and-gyp - ninja -C out/Debug - out/Debug/dm - -Gyp Options ------------ - -Skia relies on Gyp to generate build files. Read about -[specifying options for Gyp](/user/tips#gypdefines) to set the -compile-time settings, compiler (e.g. use clang instead of gcc), build systems, -and build directory. - -Run unit and correctness tests ------------------------------- - -[DM](../../dev/testing/testing) ("diamond master") is the Skia test app. - -<!--?prettify lang=sh?--> - - ninja -C out/Debug dm - out/Debug/dm - -Run Skia samples ----------------- - -[SampleApp](../sample/sampleapp) is the Skia sample program. - -<!--?prettify lang=sh?--> - - ninja -C out/Debug SampleApp - out/Debug/SampleApp - -Build non-debug binaries ------------------------- - -The usual mode you want for testing is Debug mode (`SK_DEBUG` is -defined, and debug symbols are included in the binary). If you -would like to build the Release mode: - -<!--?prettify lang=sh?--> - - ninja -C out/Release - -Performance tests ------------------ - -Build and run nanobench (performance tests). In this case, we will -build with the "Release" configuration, since we are running -performance tests. - -<!--?prettify lang=sh?--> - - ninja -C out/Release nanobench - out/Release/nanobench - out/Release/nanobench --skps .../path/to/*.skp - -<!-- TODO(mtklein): document nanobench --> - -Keeping up to date ------------------- - -<!--?prettify lang=sh?--> - - git fetch origin - git checkout origin/master - -Contribute to Skia ------------------- - -[How to use Git and Git-cl to contribute to Skia](/dev/contrib/submit). diff --git a/site/user/quick/index.md b/site/user/quick/index.md deleted file mode 100644 index 8c9e374d92..0000000000 --- a/site/user/quick/index.md +++ /dev/null @@ -1,13 +0,0 @@ -Quick Start Guides -================== - -System-specific guidelines: - -* [Android](/user/quick/android) - -* [iOS](/user/quick/ios) - -* [Desktop](/user/quick/desktop) - - [Linux](/user/quick/linux) - - [Mac OS X](/user/quick/macos) - - [Windows](/user/quick/windows) diff --git a/site/user/quick/ios.md b/site/user/quick/ios.md index 5c98b3b17e..e2c6fc89c8 100644 --- a/site/user/quick/ios.md +++ b/site/user/quick/ios.md @@ -1,6 +1,9 @@ iOS === +These instructions are historical and not explictly supported. There is +currently no explictly supported way to build Skia for iOS. + The following has been tested on MacOS Yosemite with Xcode version 6.3. Quickstart @@ -67,7 +70,7 @@ Alternatively, you can do: Build and run tests ------------------- -The 'dm' test program is wrapped in an app called iOSShell. The project for iOSShell is at out/gyp/iOSShell.xcodeproj. +The 'dm' test program is wrapped in an app called iOSShell. The project for iOSShell is at out/gyp/iOSShell.xcodeproj. Running this app with the flag '--dm' will run unit tests and golden master images. Other arguments to the standard 'dm' test program can also be passed in. diff --git a/site/user/quick/linux.md b/site/user/quick/linux.md deleted file mode 100644 index 9ecea3b488..0000000000 --- a/site/user/quick/linux.md +++ /dev/null @@ -1,88 +0,0 @@ -Linux -===== - -Quickstart ----------- - -<!--?prettify lang=sh?--> - - - # Install depot_tools (this provides ninja and git-cl). - git clone 'https://chromium.googlesource.com/chromium/tools/depot_tools.git' - export PATH="${PWD}/depot_tools:${PATH}" - - # Get Skia. - git clone 'https://skia.googlesource.com/skia' - cd skia - - # Install Dependencies (may require sudo). - tools/install_dependencies.sh - - # Sync, Config, and Build. - bin/sync-and-gyp - ninja -C out/Debug dm SampleApp - - # Run DM, the Skia test app. - out/Debug/dm - - # Run SampleApp. - out/Debug/SampleApp - - # Run nanobench, the Skia benchmarking tool. - ninja -C out/Release nanobench - out/Release/nanobench - - -<a name="prerequisites"></a>Prerequisites ------------------------------------------ - -On a Ubuntu 12.04 (Precise) or Ubuntu 14.04 (Trusty) system, you can run -`tools/install_dependencies.sh`, which will install the needed packages. On -Ubuntu 12.04, you will need to install the`ninja` build tool separately, which -comes with Chromium's `depot_tools`. - -To contribute changes back to Skia, you will need `git-cl`, which -comes with Chromium's `depot_tools`. - -(If you use another Linux distribution, please consider contributing back -instructions for installing the required packages — we can then incorporate -that knowledge into the `tools/install_dependencies.sh` tool.) - -Make sure the following have been installed: - -* [Chromium depot_tools](http://www.chromium.org/developers/how-tos/depottools) - -* A C++ compiler (typically GCC or Clang) **build-essential** or **clang-3.6** - -* Python 2.7.x: **python2.7-dev** - -* The FreeType and Fontconfig font engines: **libfreetype6-dev** and - **libfontconfig1-dev** - -* Mesa OpenGL utility library headers: **libglu1-mesa-dev** - -* Mesa headers: **mesa-common-dev** - -* GL, such as **freeglut3-dev** - -Check out the source code -------------------------- - -Follow the instructions [here](../download) for downloading the Skia source. - -Notes ------ - -1. On 32-bit Linux (when `uname -m` is *not* `x86_64`), you will have to - explicitly specify the architecture: - - <!--?prettify lang=sh?--> - - GYP_DEFINES='skia_arch_type=x86' python bin/sync-and-gyp -2. By default, many Linux systems use gcc by default. To use clang you will -need to [set the CC and CXX environment variables](/user/tips#gypdefines). - -Generate build files --------------------- - -See [this page for generating build files and run tests](desktop). diff --git a/site/user/quick/macos.md b/site/user/quick/macos.md deleted file mode 100644 index fd7c0944af..0000000000 --- a/site/user/quick/macos.md +++ /dev/null @@ -1,91 +0,0 @@ -Mac OS X -======== - -Quickstart ----------- - -First, install [XCode](https://developer.apple.com/xcode/). - -<!--?prettify lang=sh?--> - - # Install depot tools. - git clone 'https://chromium.googlesource.com/chromium/tools/depot_tools.git' - export PATH="${PWD}/depot_tools:${PATH}" - - # Get Skia. - git clone 'https://skia.googlesource.com/skia' - cd skia - - # Build. - bin/sync-and-gyp - ninja -C out/Debug - - # Run DM (the Skia test app) and SampleApp. - out/Debug/dm - out/Debug/SampleApp - -Prerequisites -------------- - -Make sure the following have been installed: - - * XCode (Apple's development environment): required - * publicly available at http://developer.apple.com/xcode/ - * add the optional Unix Tools to the install so you get the make command line tool. - * Chromium depot_tools: required to download the source and dependencies - * http://www.chromium.org/developers/how-tos/depottools - -Check out the source code -------------------------- - -Follow the instructions [here](../download) for downloading the Skia source. - -Generate XCode projects ------------------------ - -We use the open-source gyp tool to generate XCode projects (and analogous -build scripts on other platforms) from our multiplatform "gyp" files. - -Two Gyp generators are used on Mac OS: - -* `ninja` - Run ninja yourself, without XCode project files, - -* `xcode` - Generate a XCode project - -To choose which ones to use, set the `GYP_GENERATORS` environment -variable to a comma-delimited list of generators before running -sync-and-gyp. The default value for `GYP_GENERATORS` is -`ninja,xcode`. For example to enable - - - -Before building, make sure that gyp knows to create an XCode project or ninja -build files. If you leave GYP_GENERATORS undefined it will assume the -following default: - - GYP_GENERATORS="ninja,xcode" - -Or you can set it to `ninja` or `xcode` alone, if you like. - -You can then generate the Xcode projects and ninja build files by running: - - python bin/sync-and-gyp - -Build and run tests from the command line ------------------------------------------ - - ninja -C out/Debug dm - out/Debug/dm - - -Build and run SampleApp in the XCode IDE ----------------------------------------- - - * Run `sync-and-gyp` as described above. - * In the Finder, navigate to `$SKIA_INSTALLDIR/trunk/out/gyp` - * Double-click SampleApp.xcodeproj ; this will launch XCode and open the SampleApp project - * Click the “Build and Run” button in the top toolbar - * Once the build is complete, you should see a window with lots of shaded text examples. To move through the sample app, use the following keypresses: - * right- and left-arrow keys: cycle through different test pages - * 'D' key: cycle through rendering methods for each test page - * other keys are defined in SampleApp.cpp’s SampleWindow::onHandleKey() and SampleWindow::onHandleChar() methods diff --git a/site/user/quick/windows.md b/site/user/quick/windows.md deleted file mode 100644 index 1c37053ee7..0000000000 --- a/site/user/quick/windows.md +++ /dev/null @@ -1,142 +0,0 @@ -Windows -======= - -Prerequisites -------------- - -Make sure the following have been installed: - -* [Visual C++ 2015u2 or later, available for - free](https://www.visualstudio.com/downloads/download-visual-studio-vs) - -* [Chromium depot_tools](https://www.chromium.org/developers/how-tos/depottools) - -* Git - - Either use the mysygit installed by depot_tools - - Or [install git-for-windows - yourself](https://git-for-windows.github.io/). - -* Python 2.7.x (if you're not planning to use cygwin) - - available for free download at - [python.org](https://www.python.org/download/releases/) - - make sure the installer changes your %PATH% environment variable - to include the directory with the "python.exe" binary - -* Cygwin (**optional**, but useful if you want to use git) - - Download from https://www.cygwin.com/setup-x86.exe or - https://www.cygwin.com/setup-x86_64.exe - - Use any mirror you like; http://lug.mtu.edu works well - - Cygwin installs a minimum of options. Add these packages if they - aren't already selected: - + Devel git - + Devel subversion - + Editors vim - * to fix arrows in insert, copy - `/usr/share/vim/vim73/vimrc_example.vim` to `~/.vimrc` - + Net ca-certificates - + Python python - + Utils patch - + Utils util-linux - - Set the windows envionment variable CYGWIN to nodosfilewarning - -Check out the source code -------------------------- - -Follow the instructions [here](../download) for downloading the Skia source. - -Gyp Generators on Windows -------------------------- - -We use the open-source Gyp tool to generate Visual Studio projects (and -analogous build scripts on other platforms) from our multi-platform "gyp" -files. - -Three Gyp generators are used on Windows: - -* `ninja` - Run ninja yourself, without VisualStudio project files, - -* `msvs-ninja` - Develop from a fully-integrated Visual Studio. - Gyp generates Visual-Studio-compatible project files that still - ultimately build using ninja. This is the preferred and better maintained - way of using Visual Studio. - -* `msvs` - Use Visual Studio's own (slower) build system. This is not as well - maintained as msvs-ninja. The msvs and ninja output can clobber each other - so building from both the command line and Visual Studio can produce bad - states that can be fixed by deleting the out directory and rerunning - gyp_skia. - -To choose which ones to use, set the `GYP_GENERATORS` environment -variable to a comma-delimited list of generators before running -sync-and-gyp. The default value for `GYP_GENERATORS` is -`ninja,msvs-ninja`. For example to enable the `ninja` and `msvs` -generators: - -<a name="env"></a>Setting Enviroment Variables in Windows CMD.EXE ------------------------------------------------------------------ - - cd %SKIA_CHECKOUT_DIR% - SET "GYP_GENERATORS=ninja,msvs" - python bin/sync-and-gyp - SET "GYP_GENERATORS=" - -Build and run tests from the command line ------------------------------------------ - - ninja -C out/Debug dm - out\Debug\dm - -See [this page for running Skia tests on all desktop](./desktop) - -Build and run tests in the Visual Studio IDE --------------------------------------------- - -1. Generate the Visual Studio project files by running `sync-and-gyp` as - described above - -2. Open a File Explorer window pointing at the - `%SKIA_CHECKOUT_DIR%\out\gyp` directory - -3. Double-click on dm.sln to start Visual Studio and load the project - -4. 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. - -5. In the "Solution Explorer" window, right-click on the "dm" project - and select "Set as StartUp Project". - -6. 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. - -7. Once the build is complete, you should see console output from the - tests in the "Output" window at lower right. - -Build and run SampleApp in Visual Studio ----------------------------------------- - -1. Generate the Visual Studio project files by running `sync-and-gyp` - as described above - -2. Open a File Explorer window pointing at the - `%SKIA_INSTALLDIR%\trunk\out\gyp` directory - -3. Double-click on SampleApp.sln - -4. When Visual Studio starts, you may see an error dialog stating - that "One or more project s in the solution were not loaded - correctly"... but there's probably nothing to worry about. - -5. 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. - -6. Once the build is complete, you should see a window with various - example graphics. To move through the sample app, use the - following keypresses: - - right- and left-arrow key: cycle through different test pages - - 'D' key: cycle through rendering methods for each test page - - other keys are defined in SampleApp.cpp’s - SampleWindow::onHandleKey() and SampleWindow::onHandleChar() - methods |