diff --git a/.gitignore b/.gitignore index 5610680..d2691da 100644 --- a/.gitignore +++ b/.gitignore @@ -257,6 +257,7 @@ paket-files/ *.sln.iml /docs/env /docs/output +/docs/build /Installer/OCAT.Documentation.wxs *.wixpdb *.wixobj diff --git a/COPYING b/COPYING new file mode 100644 index 0000000..db062a1 --- /dev/null +++ b/COPYING @@ -0,0 +1 @@ +See docs/license.rst for license information. \ No newline at end of file diff --git a/Installer/Installer.wixproj b/Installer/Installer.wixproj index 2a5ce86..b827659 100644 --- a/Installer/Installer.wixproj +++ b/Installer/Installer.wixproj @@ -22,15 +22,18 @@ obj\$(Configuration)\ - OCATInstaller.BinaryDir=$(SolutionDir)x64\$(Configuration);OCATInstaller.DocumentationDir=$(SolutionDir)docs\output + OCATInstaller.BinaryDir=$(SolutionDir)x64\$(Configuration) False - + + $(WixExtDir)\WixUtilExtension.dll + WixUtilExtension + $(WixExtDir)\WixUIExtension.dll WixUIExtension @@ -48,12 +51,11 @@ - "%25WIX%25\bin\heat.exe" dir "$(SolutionDir)x64\$(ConfigurationName)" -var var.OCATInstaller.BinaryDir -dr INSTALLFOLDER -ag -cg OCATBinaries -scom -sreg -sfrag -srd -o "$(SolutionDir)Installer\OCAT.Binaries.wxs" -t "$(SolutionDir)Installer\filter.xslt" -"%25WIX%25\bin\heat.exe" dir "$(SolutionDir)docs\output" -var var.OCATInstaller.DocumentationDir -dr DOCFOLDER -ag -cg OCATDocumentation -scom -sreg -sfrag -srd -o "$(SolutionDir)Installer\OCAT.Documentation.wxs" + ICE57 - ICE57 - + "%25WIX%25\bin\heat.exe" dir "$(SolutionDir)x64\$(ConfigurationName)" -var var.OCATInstaller.BinaryDir -dr INSTALLFOLDER -ag -cg OCATBinaries -scom -sreg -sfrag -srd -o "$(SolutionDir)Installer\OCAT.Binaries.wxs" -t "$(SolutionDir)Installer\filter.xslt" + - + \ No newline at end of file diff --git a/Installer/Product.wxs b/Installer/Product.wxs index 7e10a88..186a490 100644 --- a/Installer/Product.wxs +++ b/Installer/Product.wxs @@ -1,5 +1,5 @@ - + @@ -9,7 +9,6 @@ - @@ -32,10 +31,9 @@ Description="Open Capture and Analytics Tool" Target="[INSTALLFOLDER]\OCAT.exe" WorkingDirectory="INSTALLFOLDER"/> - + diff --git a/README.md b/README.md index 1a7e9f7..9d155ed 100644 --- a/README.md +++ b/README.md @@ -4,27 +4,4 @@ The Open Capture and Analytics Tool (OCAT) provides an FPS overlay and performan ## Downloads -For downloads, look into the releases section: https://github.com/GPUOpen-Tools/OCAT/releases - - -## Setup - -This setup requires: -- [Visual Studio 2015](https://www.visualstudio.com) or [Visual Studio 2017](https://www.visualstudio.com) -- [Vulkan SDK](https://vulkan.lunarg.com/) -- [Python 3.6](https://www.python.org/downloads/release/python-360/) -- [.Net 4.5](https://www.microsoft.com/de-de/download/details.aspx?id=30653) - -Open Powershell in an appropriate directory and perform the following steps: - -``` -git clone https://github.com/GPUOpen-Tools/OCAT -cd .\OCAT\ -.\pre-build.ps1 -.\build.ps1 -``` - -The pre-build script pulls the MinHook submodule and downloads the redistributable files. -It also builds the documentation. You can use the Visual Studio solution OCAT.sln afterwards. -The build script performs the necessary steps to create the installer. -After a successful build you can find the artifact in OCAT-Installer\bin\Release\OCAT.exe. \ No newline at end of file +For downloads, look into the releases section: https://github.com/GPUOpen-Tools/OCAT/releases \ No newline at end of file diff --git a/appveyor.yml b/appveyor.yml index df70ba1..9a55611 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -30,13 +30,6 @@ notifications: incoming_webhook: secure: reZgP+MAKCYu9pDcH573P1Ecs9AZxzb+VqQVXNl10D/2RHG+SlxWI5LGN8HYP2AwoU+mfPb8TU0I8ZXaOvGKGu6ulW91E+qvPwlhZm3vIeI= -before_build: - # Switch from python 2.7 to 3.6 as required for build.bat - - ps: $Env:Path = $Env:Path -replace "C:\\Python27", "C:\Python36" - - cd docs - - call build.bat - - cd .. - build_script: # Choose the correct toolset depending on the Visual Studio in use. - ps: if( ($Env:APPVEYOR_BUILD_WORKER_IMAGE) -eq "Visual Studio 2015") { $Env:PLATFORM_TOOLSET="v140" } diff --git a/docs/README.md b/docs/README.md deleted file mode 100644 index e92d674..0000000 --- a/docs/README.md +++ /dev/null @@ -1,57 +0,0 @@ ---- -title: Readme ---- - -# OCAT - -## Usage -To run the program start __OCAT__ - -### Recording options: -* __Recording Hotkey:__ hotkey used for starting and stopping of recording. To change -a hotkey click the Recording Hotkey button and press the new hotkey. The default hotkey is __F11__. -* __Recording Time Period in Seconds:__ time period after which a started recording is stopped. If this value is zero the recording will stop only through hotkey or if the recorded process stops. - -### Capture options: -* __Capture All Applications:__ enables capturing of all applications after Start was pressed. Notice: For UWP applications, there will be no overlay, but the recording will still work when pressing the hotkey. -* __Capture Single Application:__ allows to capture a single application. Once the application and the command line parameters have been selected, press Start to run it. - * __Select target executable:__ Open Executable to select a file that should be started for recording. It is possible to start a UWP app but the gameoverlay will not react to key input. The recording will work correctly. - * __Commandline Arguments:__ Additional command line arguments to start the executable with. - -### General options: -* __Simple recording:__ appends the application name, date and time, average fps, average ms per frame and the 99th percentile ms per frame to the `perf_summary.csv` file -* __Save detailed recordings:__ saves detailed information for one process in a -`perf_< process name >_< date and time >.csv`. -* __Record performance for all processes:__ If this is enabled pressing the recording hotkey will record all processes and create a file for each process. If this is disabled only the process of the active window is recorded when the hotkey is pressed (this is, the process which is currently in focus). - -### Start Recording: -Recording starts after the hotkey button is pressed and ends with another hotkey press or if the recording time is reached. If a recording is in progress this will be displayed above the program version in the OCAT configuration. - -If no recording is in progress the hotkey for starting a recording is shown. -* If __Capture All Applications__ is selected a recording can be started by pressing the hotkey. If changes are made the recording has to be stopped and restarted with the new options. -* If __Capture Single Application__ is selected capturing can only be started after a target executable was selected. -* Which processes are recorded depends on the __Record Foreground Window__ option. - -### Recordings: -Recordings are saved in the `Documents\OCAT\Recordings` folder. Depending on the __General options__ a detailed `.csv` file is created for each recording. A summary for each recording can be found in the `perf_summary.csv` file if __Simple recording__ is enabled. - -An empty recording file can be caused by disabling the __Record performance for all processes__ option and focusing a different process when pressing the recording hotkey. - -### Blacklist -Applications can be exluded from capturing through blacklisting based on the executable name. The blacklist can be found in `Documents\OCAT\Config`. All processes on the black list are not recorded. On the first run, OCAT will generate the blacklist. Each line must contain one executable name. - -### Logs -Logs are saved in `Documents\OCAT\Config`. The logs include: -* `PresentMonLog` containing information about the capturing and start of processes -* `GlobalHook32Log` and `GlobalHook64Log` information about the state of the global hook processes -* `gameoverlayLog` information about all injected dlls with the format < gameoverlay(32|64) > < injected process id > < log message > - -### Notes - -* __Capturing STEAM:__ If Steam is already running __Capture All Applications__ has to be used for the overlay to work. -* __Disable overlay:__ The overlay can be disabled by setting a global environment variable with name __OCAT_OVERLAY_ENABLED__ and value __0__. Global environment variables can be set in System->Advanced system settings->Environment Variables. - -### Known Issues - -* Windows 7: PresentMon is not creating recordings. -* UWP: Global hooking for overlay is not working. diff --git a/docs/build.md b/docs/build.md deleted file mode 100644 index f09067f..0000000 --- a/docs/build.md +++ /dev/null @@ -1,21 +0,0 @@ ---- -title: How to build OCAT ---- - -# Build - -## Application - -1. Build __Benchmarking-Tool.sln__ -2. Platform __x64__ and __x86__ for a 64bit build. The x86 build creates only the projects that are needed as x86 for a complete x64 build. This includes the gameoverlay and the DLLInjector -3. Make sure the Target Platform Version is __10.0.14393.0__ and the Platform Toolset __Visual Studio 2015 (v140)__ -4. Select the __Frontend__ project as Startup Project - -To set the version, run `python PresentMon\setVersion.py 0.0.0` inside Benchmarking-Tool - -## Installer - -For building the installer, the [WiX Toolset](https://wix.codeplex.com/releases/view/624906) must be installed. - -1. Build `Installer` -2. Build `Install-Bundle` diff --git a/docs/build.bat b/docs/build.ps1 similarity index 66% rename from docs/build.bat rename to docs/build.ps1 index 97e81f1..56e75b7 100644 --- a/docs/build.bat +++ b/docs/build.ps1 @@ -1,5 +1,5 @@ python -m venv env -call env/scripts/activate.bat +.\env\scripts\activate.ps1 python -m pip install --upgrade pip pip -q install -r requirements.txt -python docgen.py \ No newline at end of file +.\make.bat html \ No newline at end of file diff --git a/docs/docgen.py b/docs/docgen.py deleted file mode 100644 index 3578572..0000000 --- a/docs/docgen.py +++ /dev/null @@ -1,39 +0,0 @@ -import CommonMark as cm -from jinja2 import Template -import glob -import os -import shutil -from yaml import load - -def PrepareDocument (document): - lines = document.split ('\n') - - header = [] - lastHeaderLine = -1 - if lines [0] == '---': - for i, line in enumerate (lines): - if i == 0: - continue - if line == '---': - lastHeaderLine = i - break - else: - header.append (line) - - return load ('\n'.join (header)), '\n'.join (lines [lastHeaderLine+1:]) - -if __name__=='__main__': - pageTemplate = Template (open ('template.html', 'r').read ()) - - shutil.rmtree ('output', ignore_errors=True) - os.mkdir ('output') - - for file in glob.glob ('*.md'): - header, document = PrepareDocument (open (file, 'r').read ()) - if header is None: - header = {} - content = cm.commonmark (document) - open ('output/' + os.path.splitext (file)[0] + '.html', 'w').write (pageTemplate.render (content = content, **header)) - - shutil.copy ('style.css', 'output/style.css') - shutil.copy ('../LICENSE.txt', 'output/LICENSE.txt') \ No newline at end of file diff --git a/docs/make.bat b/docs/make.bat new file mode 100644 index 0000000..9edf06b --- /dev/null +++ b/docs/make.bat @@ -0,0 +1,36 @@ +@ECHO OFF + +pushd %~dp0 + +REM Command file for Sphinx documentation + +if "%SPHINXBUILD%" == "" ( + set SPHINXBUILD=sphinx-build +) +set SOURCEDIR=source +set BUILDDIR=build +set SPHINXPROJ=OCAT + +if "%1" == "" goto help + +%SPHINXBUILD% >NUL 2>NUL +if errorlevel 9009 ( + echo. + echo.The 'sphinx-build' command was not found. Make sure you have Sphinx + echo.installed, then set the SPHINXBUILD environment variable to point + echo.to the full path of the 'sphinx-build' executable. Alternatively you + echo.may add the Sphinx directory to PATH. + echo. + echo.If you don't have Sphinx installed, grab it from + echo.http://sphinx-doc.org/ + exit /b 1 +) + +%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% +goto end + +:help +%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% + +:end +popd diff --git a/docs/requirements.txt b/docs/requirements.txt index 1a2ce32..dd9f69d 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,3 +1 @@ -jinja2 -commonmark -pyyaml \ No newline at end of file +sphinx>=1.6 \ No newline at end of file diff --git a/docs/source/build.rst b/docs/source/build.rst new file mode 100644 index 0000000..4db2ff9 --- /dev/null +++ b/docs/source/build.rst @@ -0,0 +1,26 @@ +Building OCAT +============= + +Prerequisites +------------- + +- `Visual Studio 2017 `_ +- `Vulkan SDK `_ +- `Python 3.6 `_ +- `.NET 4.5 `_ + +Build +----- + +Open Powershell in an appropriate directory and perform the following steps: + +.. code-block:: PowerShell + + git clone https://github.com/GPUOpen-Tools/OCAT + cd .\OCAT\ + .\pre-build.ps1 + .\build.ps1 + +The pre-build script pulls the MinHook submodule and downloads the redistributable files. +It also builds the documentation. You can use the Visual Studio solution ``OCAT.sln`` afterwards. The build script performs the necessary steps to create the installer. +After a successful build you can find the artifact in ``OCAT-Installer\bin\Release\OCAT.exe``. \ No newline at end of file diff --git a/CHANGELOG.md b/docs/source/changelog.rst similarity index 74% rename from CHANGELOG.md rename to docs/source/changelog.rst index a0d2b3e..b903860 100644 --- a/CHANGELOG.md +++ b/docs/source/changelog.rst @@ -1,21 +1,30 @@ -# OCAT Change Log +Changelog +========= + +1.0.1 - 2017-05-23 +------------------ + +Added +^^^^^ -## [1.0.1] - 2017-05-23 -### Added - Continuous integration via AppVeyor - Redesigned logging and debug system - Improved documentation on building OCAT from source - Proper marking of error codes - Changelogs for GitHub releases! -### Changed +Changed +^^^^^^^ + - Blacklisted UplayWebCore and UbisoftGameLauncher - Blacklisted Firefox - Blacklisted RadeonSettings - Improved DXGI swapchain handling - Recording hotkey is now F12 -### Fixed +Fixed +^^^^^ + - Windows 10 Creators Update incompatibility via a PresentMon fix - Prey on Windows incompatibility - Doom and The Talos Principle (both Vulkan) incompatibility \ No newline at end of file diff --git a/docs/source/conf.py b/docs/source/conf.py new file mode 100644 index 0000000..68b2fc6 --- /dev/null +++ b/docs/source/conf.py @@ -0,0 +1,282 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- + +import sys +import os + +# If extensions (or modules to document with autodoc) are in another directory, +# add these directories to sys.path here. If the directory is relative to the +# documentation root, use os.path.abspath to make it absolute, like shown here. +#sys.path.insert(0, os.path.abspath('.')) + +# -- General configuration ------------------------------------------------ + +# If your documentation needs a minimal Sphinx version, state it here. +#needs_sphinx = '1.0' + +# Add any Sphinx extension module names here, as strings. They can be +# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom +# ones. +extensions = [] + +# Add any paths that contain templates here, relative to this directory. +templates_path = ['_templates'] + +# The suffix(es) of source filenames. +# You can specify multiple suffix as a list of string: +# source_suffix = ['.rst', '.md'] +source_suffix = '.rst' + +# The encoding of source files. +#source_encoding = 'utf-8-sig' + +# The master toctree document. +master_doc = 'index' + +# General information about the project. +project = 'OCAT' +copyright = '2016-17, AMD' +author = 'AMD' + +# The version info for the project you're documenting, acts as replacement for +# |version| and |release|, also used in various other places throughout the +# built documents. +# +# The short X.Y version. +version = '' +# The full version, including alpha/beta/rc tags. +release = '' + +# The language for content autogenerated by Sphinx. Refer to documentation +# for a list of supported languages. +# +# This is also used if you do content translation via gettext catalogs. +# Usually you set "language" from the command line for these cases. +language = None + +# There are two options for replacing |today|: either, you set today to some +# non-false value, then it is used: +#today = '' +# Else, today_fmt is used as the format for a strftime call. +#today_fmt = '%B %d, %Y' + +# List of patterns, relative to source directory, that match files and +# directories to ignore when looking for source files. +# This patterns also effect to html_static_path and html_extra_path +exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store'] + +# The reST default role (used for this markup: `text`) to use for all +# documents. +#default_role = None + +# If true, '()' will be appended to :func: etc. cross-reference text. +#add_function_parentheses = True + +# If true, the current module name will be prepended to all description +# unit titles (such as .. function::). +#add_module_names = True + +# If true, sectionauthor and moduleauthor directives will be shown in the +# output. They are ignored by default. +#show_authors = False + +# The name of the Pygments (syntax highlighting) style to use. +pygments_style = 'sphinx' + +# A list of ignored prefixes for module index sorting. +#modindex_common_prefix = [] + +# If true, keep warnings as "system message" paragraphs in the built documents. +#keep_warnings = False + +# If true, `todo` and `todoList` produce output, else they produce nothing. +todo_include_todos = False + + +# -- Options for HTML output ---------------------------------------------- + +# The theme to use for HTML and HTML Help pages. See the documentation for +# a list of builtin themes. +html_theme = 'alabaster' + +# Theme options are theme-specific and customize the look and feel of a theme +# further. For a list of options available for each theme, see the +# documentation. +#html_theme_options = {} + +# Add any paths that contain custom themes here, relative to this directory. +#html_theme_path = [] + +# The name for this set of Sphinx documents. +# " v documentation" by default. +html_title = 'OCAT documentation' + +# A shorter title for the navigation bar. Default is the same as html_title. +#html_short_title = None + +# The name of an image file (relative to this directory) to place at the top +# of the sidebar. +#html_logo = None + +# The name of an image file (relative to this directory) to use as a favicon of +# the docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 +# pixels large. +#html_favicon = None + +# Add any paths that contain custom static files (such as style sheets) here, +# relative to this directory. They are copied after the builtin static files, +# so a file named "default.css" will overwrite the builtin "default.css". +#html_static_path = ['_static'] + +# Add any extra paths that contain custom files (such as robots.txt or +# .htaccess) here, relative to this directory. These files are copied +# directly to the root of the documentation. +#html_extra_path = [] + +# If not None, a 'Last updated on:' timestamp is inserted at every page +# bottom, using the given strftime format. +# The empty string is equivalent to '%b %d, %Y'. +#html_last_updated_fmt = None + +# If true, SmartyPants will be used to convert quotes and dashes to +# typographically correct entities. +#html_use_smartypants = True + +# Custom sidebar templates, maps document names to template names. +#html_sidebars = {} + +# Additional templates that should be rendered to pages, maps page names to +# template names. +#html_additional_pages = {} + +# If false, no module index is generated. +#html_domain_indices = True + +# If false, no index is generated. +#html_use_index = True + +# If true, the index is split into individual pages for each letter. +#html_split_index = False + +# If true, links to the reST sources are added to the pages. +#html_show_sourcelink = True + +# If true, "Created using Sphinx" is shown in the HTML footer. Default is True. +#html_show_sphinx = True + +# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. +#html_show_copyright = True + +# If true, an OpenSearch description file will be output, and all pages will +# contain a tag referring to it. The value of this option must be the +# base URL from which the finished HTML is served. +#html_use_opensearch = '' + +# This is the file name suffix for HTML files (e.g. ".xhtml"). +#html_file_suffix = None + +# Language to be used for generating the HTML full-text search index. +# Sphinx supports the following languages: +# 'da', 'de', 'en', 'es', 'fi', 'fr', 'h', 'it', 'ja' +# 'nl', 'no', 'pt', 'ro', 'r', 'sv', 'tr', 'zh' +#html_search_language = 'en' + +# A dictionary with options for the search language support, empty by default. +# 'ja' uses this config value. +# 'zh' user can custom change `jieba` dictionary path. +#html_search_options = {'type': 'default'} + +# The name of a javascript file (relative to the configuration directory) that +# implements a search results scorer. If empty, the default will be used. +#html_search_scorer = 'scorer.js' + +# Output file base name for HTML help builder. +htmlhelp_basename = 'OCAT' + +# -- Options for LaTeX output --------------------------------------------- + +latex_elements = { +# The paper size ('letterpaper' or 'a4paper'). +#'papersize': 'letterpaper', + +# The font size ('10pt', '11pt' or '12pt'). +#'pointsize': '10pt', + +# Additional stuff for the LaTeX preamble. +#'preamble': '', + +# Latex figure (float) alignment +#'figure_align': 'htbp', +} + +# Grouping the document tree into LaTeX files. List of tuples +# (source start file, target name, title, +# author, documentclass [howto, manual, or own class]). +latex_documents = [ + (master_doc, 'OCAT.tex', 'OCAT Documentation', + 'AMD', 'manual'), +] + +# The name of an image file (relative to this directory) to place at the top of +# the title page. +#latex_logo = None + +# For "manual" documents, if this is true, then toplevel headings are parts, +# not chapters. +#latex_use_parts = False + +# If true, show page references after internal links. +#latex_show_pagerefs = False + +# If true, show URL addresses after external links. +#latex_show_urls = False + +# Documents to append as an appendix to all manuals. +#latex_appendices = [] + +# If false, no module index is generated. +#latex_domain_indices = True + + +# -- Options for manual page output --------------------------------------- + +# One entry per manual page. List of tuples +# (source start file, name, description, authors, manual section). +man_pages = [ + (master_doc, 'ocat', 'OCAT Documentation', + [author], 1) +] + +# If true, show URL addresses after external links. +#man_show_urls = False + + +# -- Options for Texinfo output ------------------------------------------- + +# Grouping the document tree into Texinfo files. List of tuples +# (source start file, target name, title, author, +# dir menu entry, description, category) +texinfo_documents = [ + (master_doc, 'OCAT', 'OCAT Documentation', + author, 'OCAT', 'One line description of project.', + 'Miscellaneous'), +] + +# Documents to append as an appendix to all manuals. +#texinfo_appendices = [] + +# If false, no module index is generated. +#texinfo_domain_indices = True + +# How to display URL addresses: 'footnote', 'no', or 'inline'. +#texinfo_show_urls = 'footnote' + +# If true, do not generate a @detailmenu in the "Top" node's menu. +#texinfo_no_detailmenu = False + +# custom theme based on sphinx_rtd_theme + +html_context = { + 'show_source': False, + 'html_show_sourcelink': False, +} diff --git a/docs/source/index.rst b/docs/source/index.rst new file mode 100644 index 0000000..bf4e68d --- /dev/null +++ b/docs/source/index.rst @@ -0,0 +1,12 @@ +OCAT +==== + +Overview +-------- + +.. toctree:: + + usage + changelog + build + license \ No newline at end of file diff --git a/LICENSE.txt b/docs/source/license.rst similarity index 70% rename from LICENSE.txt rename to docs/source/license.rst index d88ca57..1c7478b 100644 --- a/LICENSE.txt +++ b/docs/source/license.rst @@ -1,4 +1,8 @@ +Licenses +======== + MIT License +----------- Copyright (c) 2016 Advanced Micro Devices, Inc. All rights reserved. @@ -20,9 +24,9 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -================================================================================ -Parts of gameoverlay -================================================================================ +gameoverlay +----------- + Copyright 2016 Patrick Mours. All rights reserved. https://github.com/crosire/gameoverlay @@ -37,7 +41,7 @@ are permitted provided that the following conditions are met: this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY COPYRIGHT HOLDER ``AS IS'' AND ANY EXPRESS OR +THIS SOFTWARE IS PROVIDED BY COPYRIGHT HOLDER "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, @@ -48,9 +52,10 @@ WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -================================================================================ -Minhook https://github.com/TsudaKageyu/minhook -================================================================================ +Minhook +------- + +https://github.com/TsudaKageyu/minhook MinHook - The Minimalistic API Hooking Library for x64/x86 Copyright (C) 2009-2016 Tsuda Kageyu. @@ -78,10 +83,11 @@ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -================================================================================ -Portions of this software are Copyright (c) 2008-2009, Vyacheslav Patkov. -================================================================================ Hacker Disassembler Engine 32 C +------------------------------- + +Portions of this software are Copyright (c) 2008-2009, Vyacheslav Patkov. + Copyright (c) 2008-2009, Vyacheslav Patkov. All rights reserved. @@ -107,8 +113,9 @@ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -------------------------------------------------------------------------------- Hacker Disassembler Engine 64 C +------------------------------- + Copyright (c) 2008-2009, Vyacheslav Patkov. All rights reserved. @@ -134,9 +141,11 @@ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -================================================================================ -PresentMon https://github.com/GameTechDev/PresentMon -================================================================================ +PresentMon +---------- + +https://github.com/GameTechDev/PresentMon + Copyright 2017 Intel Corporation Permission is hereby granted, free of charge, to any person obtaining a copy of @@ -157,10 +166,11 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +RenderDoc +--------- + +https://github.com/baldurk/renderdoc -================================================================================ -RenderDoc https://github.com/baldurk/renderdoc -================================================================================ The MIT License (MIT) Copyright (c) 2015-2017 Baldur Karlsson @@ -187,9 +197,8 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - WiX -=== +--- Source code from WiX is used under the Microsoft Reciprocal License. @@ -204,23 +213,23 @@ Microsoft Reciprocal License (MS-RL) This license governs use of the accompanying software. If you use the software, you accept this license. If you do not accept the license, do not use the software. -1. Definitions + 1. Definitions -The terms "reproduce," "reproduction," "derivative works," and "distribution" have the same meaning here as under U.S. copyright law. -A "contribution" is the original software, or any additions or changes to the software. -A "contributor" is any person that distributes its contribution under this license. -"Licensed patents" are a contributor's patent claims that read directly on its contribution. + The terms "reproduce," "reproduction," "derivative works," and "distribution" have the same meaning here as under U.S. copyright law. + A "contribution" is the original software, or any additions or changes to the software. + A "contributor" is any person that distributes its contribution under this license. + "Licensed patents" are a contributor's patent claims that read directly on its contribution. -2. Grant of Rights + 2. Grant of Rights -(A) Copyright Grant- Subject to the terms of this license, including the license conditions and limitations in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free copyright license to reproduce its contribution, prepare derivative works of its contribution, and distribute its contribution or any derivative works that you create. -(B) Patent Grant- Subject to the terms of this license, including the license conditions and limitations in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free license under its licensed patents to make, have made, use, sell, offer for sale, import, and/or otherwise dispose of its contribution in the software or derivative works of the contribution in the software. + (A) Copyright Grant- Subject to the terms of this license, including the license conditions and limitations in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free copyright license to reproduce its contribution, prepare derivative works of its contribution, and distribute its contribution or any derivative works that you create. + (B) Patent Grant- Subject to the terms of this license, including the license conditions and limitations in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free license under its licensed patents to make, have made, use, sell, offer for sale, import, and/or otherwise dispose of its contribution in the software or derivative works of the contribution in the software. -3. Conditions and Limitations + 3. Conditions and Limitations -(A) Reciprocal Grants- For any file you distribute that contains code from the software (in source code or binary format), you must provide recipients the source code to that file along with a copy of this license, which license will govern that file. You may license other files that are entirely your own work and do not contain code from the software under any terms you choose. -(B) No Trademark License- This license does not grant you rights to use any contributors' name, logo, or trademarks. -(C) If you bring a patent claim against any contributor over patents that you claim are infringed by the software, your patent license from such contributor to the software ends automatically. -(D) If you distribute any portion of the software, you must retain all copyright, patent, trademark, and attribution notices that are present in the software. -(E) If you distribute any portion of the software in source code form, you may do so only under this license by including a complete copy of this license with your distribution. If you distribute any portion of the software in compiled or object code form, you may only do so under a license that complies with this license. -(F) The software is licensed "as-is." You bear the risk of using it. The contributors give no express warranties, guarantees or conditions. You may have additional consumer rights under your local laws which this license cannot change. To the extent permitted under your local laws, the contributors exclude the implied warranties of merchantability, fitness for a particular purpose and non-infringement. + (A) Reciprocal Grants- For any file you distribute that contains code from the software (in source code or binary format), you must provide recipients the source code to that file along with a copy of this license, which license will govern that file. You may license other files that are entirely your own work and do not contain code from the software under any terms you choose. + (B) No Trademark License- This license does not grant you rights to use any contributors' name, logo, or trademarks. + (C) If you bring a patent claim against any contributor over patents that you claim are infringed by the software, your patent license from such contributor to the software ends automatically. + (D) If you distribute any portion of the software, you must retain all copyright, patent, trademark, and attribution notices that are present in the software. + (E) If you distribute any portion of the software in source code form, you may do so only under this license by including a complete copy of this license with your distribution. If you distribute any portion of the software in compiled or object code form, you may only do so under a license that complies with this license. + (F) The software is licensed "as-is." You bear the risk of using it. The contributors give no express warranties, guarantees or conditions. You may have additional consumer rights under your local laws which this license cannot change. To the extent permitted under your local laws, the contributors exclude the implied warranties of merchantability, fitness for a particular purpose and non-infringement. diff --git a/docs/source/usage.rst b/docs/source/usage.rst new file mode 100644 index 0000000..6a9ac63 --- /dev/null +++ b/docs/source/usage.rst @@ -0,0 +1,71 @@ +Usage +===== + +To run the program start :program:`OCAT`. + +Recording options +----------------- + +* :guilabel:`Recording Hotkey` hotkey used for starting and stopping of recording. To change a hotkey click the Recording Hotkey button and press the new hotkey. The default hotkey is :kbd:`F11`. +* :guilabel:`Recording Time Period in Seconds` time period after which a started recording is stopped. If this value is zero the recording will stop only through hotkey or if the recorded process stops. + + +Capture options +--------------- + +* :guilabel:`Capture All Applications` enables capturing of all applications after Start was pressed. Notice: For UWP applications, there will be no overlay, but the recording will still work when pressing the hotkey. +* :guilabel:`Capture Single Application` allows to capture a single application. Once the application and the command line parameters have been selected, press Start to run it. + + * :guilabel:`Select target executable` Open Executable to select a file that should be started for recording. It is possible to start a UWP app but the gameoverlay will not react to key input. The recording will work correctly. + * :guilabel:`Commandline Arguments` Additional command line arguments to start the executable with. + +General options +--------------- + +* :guilabel:`Simple recording` appends the application name, date and time, average fps, average ms per frame and the 99th percentile ms per frame to the ``perf_summary.csv`` file +* :guilabel:`Save detailed recordings` saves detailed information for one process in a ``perf_< process name >_< date and time >.csv``. +* :guilabel:`Record performance for all processes` If this is enabled pressing the recording hotkey will record all processes and create a file for each process. If this is disabled only the process of the active window is recorded when the hotkey is pressed (this is, the process which is currently in focus). + +Start Recording +--------------- + +Recording starts after the hotkey button is pressed and ends with another hotkey press or if the recording time is reached. If a recording is in progress this will be displayed above the program version in the OCAT configuration. + +If no recording is in progress the hotkey for starting a recording is shown. + +* If :guilabel:`Capture All Applications` is selected a recording can be started by pressing the hotkey. If changes are made the recording has to be stopped and restarted with the new options. +* If :guilabel:`Capture Single Application` is selected capturing can only be started after a target executable was selected. +* Which processes are recorded depends on the :guilabel:`Record Foreground Window` option. + +Recordings +---------- + +Recordings are saved in the ``Documents\OCAT\Recordings`` folder. Depending on the :guilabel:`General options` a detailed ``.csv`` file is created for each recording. A summary for each recording can be found in the ``perf_summary.csv`` file if :guilabel:`Simple recording` is enabled. + +An empty recording file can be caused by disabling the :guilabel:`Record performance for all processes` option and focusing a different process when pressing the recording hotkey. + +Blacklist +--------- + +Applications can be excluded from capturing through blacklisting based on the executable name. The blacklist can be found in ``Documents\OCAT\Config``. All processes on the black list are not recorded. On the first run, OCAT will generate the blacklist. Each line must contain one executable name. + +Logs +---- + +Logs are saved in ``Documents\OCAT\Config``. The logs include: + +* ``PresentMonLog`` containing information about the capturing and start of processes +* ``GlobalHook32Log`` and ``GlobalHook64Log`` information about the state of the global hook processes +* ``gameoverlayLog`` information about all injected dlls with the format < gameoverlay(32|64) > < injected process id > < log message > + +Notes +----- + +* :guilabel:`Capturing STEAM` If Steam is already running :guilabel:`Capture All Applications` has to be used for the overlay to work. +* :guilabel:`Disable overlay` The overlay can be disabled by setting a global environment variable with name ``OCAT_OVERLAY_ENABLED`` and value ``0``. Global environment variables can be set in System->Advanced system settings->Environment Variables. + +Known Issues +------------ + +* Windows 7: PresentMon is not creating recordings. +* UWP: Global hooking for overlay is not working. diff --git a/docs/style.css b/docs/style.css deleted file mode 100644 index 11b35f9..0000000 --- a/docs/style.css +++ /dev/null @@ -1,18 +0,0 @@ -body { - font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; - font-size: 16px; - line-height: 1.5; -} - -h1 { - border-bottom: 1px solid #AAA; -} - -h2 { - border-bottom: 1px solid #DDD; -} - -.container { - max-width: 800px; - margin: auto; -} \ No newline at end of file diff --git a/docs/template.html b/docs/template.html deleted file mode 100644 index 3767ba3..0000000 --- a/docs/template.html +++ /dev/null @@ -1,11 +0,0 @@ - - - {{ title }} - - - -
- {{ content }} -
- - \ No newline at end of file