Buscar

citra-master

Esta é uma pré-visualização de arquivo. Entre para ver o arquivo original

citra-master/.appveyor/FindDependencies.ps1
# Set-up Visual Studio Command Prompt environment for PowerShell
pushd "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\Tools\"
cmd /c "VsDevCmd.bat -arch=x64 & set" | foreach {
 if ($_ -match "=") {
 $v = $_.split("="); Set-Item -Force -Path "ENV:\$($v[0])" -Value "$($v[1])"
 }
}
popd
function Which ($search_path, $name) {
 ($search_path).Split(";") | Get-ChildItem -Filter $name | Select -First 1 -Exp FullName
}
function GetDeps ($search_path, $binary) {
 ((dumpbin /dependents $binary).Where({ $_ -match "dependencies:"}, "SkipUntil") | Select-String "[^ ]*\.dll").Matches | foreach {
 Which $search_path $_.Value
 }
}
function RecursivelyGetDeps ($search_path, $binary) {
 $final_deps = @()
 $deps_to_process = GetDeps $search_path $binary
 while ($deps_to_process.Count -gt 0) {
 $current, $deps_to_process = $deps_to_process
 if ($final_deps -contains $current) { continue }
 # Is this a system dll file?
 # We use the same algorithm that cmake uses to determine this.
 if ($current -match "$([regex]::Escape($env:SystemRoot))\\sys") { continue }
 if ($current -match "$([regex]::Escape($env:WinDir))\\sys") { continue }
 if ($current -match "\\msvc[^\\]+dll") { continue }
 if ($current -match "\\api-ms-win-[^\\]+dll") { continue }
 $final_deps += $current
 $new_deps = GetDeps $search_path $current
 $deps_to_process += ($new_deps | ?{-not ($final_deps -contains $_)})
 }
 return $final_deps
}
citra-master/.appveyor/ProcessPdb.ps1
# Generate pdb files for mingw
if ($env:BUILD_TYPE -eq 'mingw') {
 Invoke-WebRequest -Uri https://raw.githubusercontent.com/citra-emu/ext-windows-bin/master/cv2pdb/cv2pdb.exe -OutFile cv2pdb.exe
 foreach ($exe in Get-ChildItem "$RELEASE_DIST" -Recurse -Filter "citra*.exe") {
 .\cv2pdb $exe.FullName
 }
}
# Specify source locations in pdb via srcsrv.ini
$srcsrv = "SRCSRV: ini ------------------------------------------------`r`n"
$srcsrv += "VERSION=2`r`n"
$srcsrv += "VERCTRL=http`r`n"
$srcsrv += "SRCSRV: variables ------------------------------------------`r`n"
$srcsrv += "SRCSRVTRG=https://raw.githubusercontent.com/%var2%/%var3%/%var4%`r`n"
$srcsrv += "SRCSRV: source files ---------------------------------------`r`n"
foreach ($repo in @{
 "citra-emu/citra" = ""
 "citra-emu/ext-boost" = "externals/boost"
 "citra-emu/ext-soundtouch" = "externals/soundtouch"
 "fmtlib/fmt" = "externals/fmt"
 "herumi/xbyak" = "externals/xbyak"
 "lsalzman/enet" = "externals/enet"
 "MerryMage/dynarmic" = "externals/dynarmic"
 "neobrain/nihstro" = "externals/nihstro"
}.GetEnumerator()) {
 pushd
 cd $repo.Value
 $rev = git rev-parse HEAD
 $files = git ls-tree --name-only --full-tree -r HEAD
 foreach ($file in $files) {
 $srcsrv += "$(pwd)\$($file -replace '/','\')*$($repo.Name)*$rev*$file`r`n"
 }
 popd
}
$srcsrv += "SRCSRV: end ------------------------------------------------`r`n"
Set-Content -Path srcsrv.ini -Value $srcsrv
foreach ($pdb in Get-ChildItem "$RELEASE_DIST" -Recurse -Filter "*.pdb") {
 & "C:\Program Files (x86)\Windows Kits\10\Debuggers\x64\srcsrv\pdbstr.exe" -w -i:srcsrv.ini -p:$pdb.FullName -s:srcsrv
}
citra-master/.gitattributes
dist/languages/* linguist-vendored
dist/qt_themes/* linguist-vendored
externals/* linguist-vendored
*.h linguist-language=cpp
citra-master/.github/ISSUE_TEMPLATE.md
<!---
Please read the FAQ:
https://citra-emu.org/wiki/faq/
THIS IS NOT A SUPPORT FORUM, FOR SUPPORT GO TO:
https://community.citra-emu.org/
If the FAQ does not answer your question, please go to:
https://community.citra-emu.org/
====================================================
When submitting an issue, please check the following:
- You have read the above.
- You have provided the version (commit hash) of Citra you are using.
- You have provided sufficient detail for the issue to be reproduced.
- You have provided system specs (if relevant).
- Please also provide:
 - For any issues, a log file
 - For crashes, a backtrace.
 - For graphical issues, comparison screenshots with real hardware.
 - For emulation inaccuracies, a test-case (if able).
--->
citra-master/.gitignore
# Build directory
[Bb]uild/
doc-build/
# Generated source files
src/common/scm_rev.cpp
.travis.descriptor.json
# Project/editor files
*.swp
.idea/
.vs/
.vscode/
CMakeLists.txt.user*
# *nix related
# Common convention for backup or temporary files
*~
# Visual Studio CMake settings
CMakeSettings.json
# OSX global filetypes
# Created by Finder or Spotlight in directories for various OS functionality (indexing, etc)
.DS_Store
.AppleDouble
.LSOverride
.Spotlight-V100
.Trashes
# Windows global filetypes
Thumbs.db
# Python files
*.pyc
# Flatpak generated files
.flatpak-builder/
repo/
citra-master/.gitmodules
[submodule "boost"]
 path = externals/boost
 url = https://github.com/citra-emu/ext-boost.git
[submodule "nihstro"]
 path = externals/nihstro
 url = https://github.com/neobrain/nihstro.git
[submodule "soundtouch"]
 path = externals/soundtouch
 url = https://github.com/citra-emu/ext-soundtouch.git
[submodule "catch"]
 path = externals/catch
 url = https://github.com/philsquared/Catch.git
[submodule "dynarmic"]
 path = externals/dynarmic
 url = https://github.com/MerryMage/dynarmic.git
[submodule "xbyak"]
 path = externals/xbyak
 url = https://github.com/herumi/xbyak.git
[submodule "cryptopp"]
 path = externals/cryptopp/cryptopp
 url = https://github.com/weidai11/cryptopp.git
[submodule "fmt"]
 path = externals/fmt
 url = https://github.com/fmtlib/fmt.git
[submodule "enet"]
 path = externals/enet
 url = https://github.com/lsalzman/enet.git
[submodule "inih"]
 path = externals/inih/inih
 url = https://github.com/benhoyt/inih.git
[submodule "libressl"]
 path = externals/libressl
 url = https://github.com/citra-emu/ext-libressl-portable.git
[submodule "cubeb"]
 path = externals/cubeb
 url = https://github.com/kinetiknz/cubeb.git
[submodule "discord-rpc"]
 path = externals/discord-rpc
 url = https://github.com/discordapp/discord-rpc.git
[submodule "cpp-jwt"]
 path = externals/cpp-jwt
 url = https://github.com/arun11299/cpp-jwt.git
[submodule "teakra"]
 path = externals/teakra
 url = https://github.com/wwylele/teakra.git
citra-master/.travis.yml
language: cpp
matrix:
 include:
 - os: linux
 env: NAME="clang-format"
 sudo: required
 dist: trusty
 services: docker
 install: "./.travis/clang-format/deps.sh"
 script: "./.travis/clang-format/build.sh"
 - os: linux
 env: NAME="linux build"
 sudo: required
 dist: trusty
 services: docker
 addons:
 apt:
 packages:
 - p7zip-full
 install: "./.travis/linux/deps.sh"
 script: "./.travis/linux/build.sh"
 after_success: "./.travis/linux/upload.sh"
 cache: ccache
 - if: repo = citra-emu/citra AND branch = master AND type = push
 os: linux
 env: NAME="transifex push"
 sudo: required
 dist: trusty
 services: docker
 install: "./.travis/transifex/deps.sh"
 script: "./.travis/transifex/build.sh"
 - os: osx
 env: NAME="macos build"
 sudo: false
 osx_image: xcode10
 install: "./.travis/macos/deps.sh"
 script: "./.travis/macos/build.sh"
 after_success: "./.travis/macos/upload.sh"
 cache: ccache
 - os: linux
 env: NAME="linux build (frozen versions of dependencies)"
 sudo: required
 dist: trusty
 services: docker
 cache: ccache
 script: "./.travis/linux-frozen/build.sh"
 - os: linux
 env: NAME="MinGW build"
 sudo: required
 dist: trusty
 services: docker
 addons:
 apt:
 packages:
 - p7zip-full
 install: "./.travis/linux-mingw/deps.sh"
 script: "./.travis/linux-mingw/build.sh"
 after_success:
"./.travis/linux-mingw/upload.sh"
 cache: ccache
 - if: repo =~ ^.*\/(citra-canary|citra-nightly)$ AND tag IS present
 git:
 depth: false
 os: linux
 env: NAME="flatpak build"
 sudo: required
 dist: trusty
 services: docker
 cache: ccache
 install: "./.travis/linux-flatpak/deps.sh"
 script: "./.travis/linux-flatpak/build.sh"
 after_script: "./.travis/linux-flatpak/finish.sh"
deploy:
 provider: releases
 api_key:
 secure: Mck15DIWaJdxDiS3aYVlM9N3G6y8VKUI1rnwII7/iolfm1s94U+tgvbheZDmT7SSbFyaGaYO/E8HrV/uZR9Vvs7ev20sHsTN1u60OTWfDIIyHs9SqjhcGbtq95m9/dMFschOYqTOR+gAs5BsxjuoeAotHdhpQEwvkO2oo5oR0zhGy45gjFnVvtcxT/IfpZBIpVgcK3aLb9zT6ekcJbSiPmEB15iLq3xXd0nFUNtEZdX3D6Veye4n5jB6n72qN8JVoKvPZAwaC2K0pZxpcGJaXDchLsw1q+4eCvdz6UJfUemeQ/uMAmjfeQ3wrzYGXe3nCM3WmX5wosCsB0mw4zYatzl3si6CZ1W+0GkV4Rwlx03dfp7v3EeFhTsXYCaXqhwuLZnWOLUik8t9vaSoFUx4nUIRwfO9kAMUJQSpLuHNO2nT01s3GxvqxzczuLQ9he5nGSi0RRodUzDwek1qUp6I4uV3gRHKz4B07YIc1i2fK88NLXjyQ0uLVZ+7Oq1+kgDp6+N7vvXXZ5qZ17tdaysSbKEE0Y8zsoXw7Rk1tPN19vrCS+TSpomNMyQyne1k+I5iZ/qkxPTLAS5qI6Utc2dL3GJdxWRAEfGNO9AIX3GV/jmmKfdcvwGsCYP8hxqs5vLYfgacw3D8NLf1941lQUwavC17jm9EV9g5G3Pn1Cp516E=
 file_glob: true
 file: "artifacts/*"
 skip_cleanup: true
 on:
 tags: true
notifications:
 webhooks:
 urls:
 - https://api.citra-emu.org/code/travis/notify
citra-master/.travis/clang-format/build.sh
#!/bin/bash -ex
mkdir -p "$HOME/.ccache"
docker run --env-file .travis/common/travis-ci.env -v $(pwd):/citra -v "$HOME/.ccache":/root/.ccache citraemu/build-environments:linux-clang-format /bin/bash -ex /citra/.travis/clang-format/docker.sh
citra-master/.travis/clang-format/deps.sh
#!/bin/sh -ex
docker pull citraemu/build-environments:linux-clang-format
citra-master/.travis/clang-format/docker.sh
#!/bin/bash -ex
# Run clang-format
cd /citra
./.travis/clang-format/script.sh
citra-master/.travis/clang-format/script.sh
#!/bin/bash -ex
if grep -nrI '\s$' src *.yml *.txt *.md Doxyfile .gitignore .gitmodules .travis* dist/*.desktop \
 dist/*.svg dist/*.xml; then
 echo Trailing whitespace found, aborting
 exit 1
fi
# Default clang-format points to default 3.5 version one
CLANG_FORMAT=clang-format-6.0
$CLANG_FORMAT --version
if [ "$TRAVIS_EVENT_TYPE" = "pull_request" ]; then
 # Get list of every file modified in this pull request
 files_to_lint="$(git diff --name-only --diff-filter=ACMRTUXB $TRAVIS_COMMIT_RANGE | grep '^src/[^.]*[.]\(cpp\|h\)$' || true)"
else
 # Check everything for branch pushes
 files_to_lint="$(find src/ -name '*.cpp' -or -name '*.h')"
fi
# Turn off tracing for this because it's too verbose
set +x
for f in $files_to_lint; do
 d=$(diff -u "$f" <($CLANG_FORMAT "$f") || true)
 if ! [ -z "$d" ]; then
 echo "!!! $f not compliant to coding style, here is the fix:"
 echo "$d"
 fail=1
 fi
done
set -x
if [ "$fail" = 1 ]; then
 exit 1
fi
citra-master/.travis/common/post-upload.sh
#!/bin/bash -ex
# Copy documentation
cp license.txt "$REV_NAME"
cp README.md "$REV_NAME"
# Copy cross-platform scripting support
cp -r dist/scripting "$REV_NAME"
tar $COMPRESSION_FLAGS "$ARCHIVE_NAME" "$REV_NAME"
# Find out what release we are building
if [ -z $TRAVIS_TAG ]; then
 RELEASE_NAME=head
else
 RELEASE_NAME=$(echo $TRAVIS_TAG | cut -d- -f1)
 if [ "$NAME" = "MinGW build" ]; then
 RELEASE_NAME="${RELEASE_NAME}-mingw"
 fi
fi
mv "$REV_NAME" $RELEASE_NAME
7z a "$REV_NAME.7z" $RELEASE_NAME
# move the compiled archive into the artifacts directory to be uploaded by travis releases
mv "$ARCHIVE_NAME" artifacts/
mv "$REV_NAME.7z" artifacts/
citra-master/.travis/common/pre-upload.sh
#!/bin/bash -ex
GITDATE="`git show -s --date=short --format='%ad' | sed 's/-//g'`"
GITREV="`git show -s --format='%h'`"
mkdir -p artifacts
citra-master/.travis/common/travis-ci.env
# List of environment variables to be shared with Docker containers
CI
TRAVIS
CONTINUOUS_INTEGRATION
TRAVIS_BRANCH
TRAVIS_BUILD_ID
TRAVIS_BUILD_NUMBER
TRAVIS_COMMIT
TRAVIS_COMMIT_RANGE
TRAVIS_EVENT_TYPE
TRAVIS_JOB_ID
TRAVIS_JOB_NUMBER
TRAVIS_REPO_SLUG
TRAVIS_TAG
# citra specific flags
ENABLE_COMPATIBILITY_REPORTING
USE_DISCORD_PRESENCE
citra-master/.travis/linux-flatpak/build.sh
#!/bin/bash -ex
mkdir -p "$HOME/.ccache"
# Configure docker and call the script that generates application data and build scripts
docker run --env-file .travis/common/travis-ci.env --env-file .travis/linux-flatpak/travis-ci-flatpak.env -v $(pwd):/citra -v "$HOME/.ccache":/root/.ccache -v "$HOME/.ssh":/root/.ssh --privileged citraemu/build-environments:linux-flatpak /bin/bash -ex /citra/.travis/linux-flatpak/generate-data.sh
citra-master/.travis/linux-flatpak/deps.sh
#!/bin/sh -ex
# Download the docker image that contains flatpak build dependencies
docker pull citraemu/build-environments:linux-flatpak
citra-master/.travis/linux-flatpak/docker.sh
#!/bin/bash -ex
# Converts "citra-emu/citra-nightly" to "citra-nightly"
REPO_NAME=$(echo $TRAVIS_REPO_SLUG | cut -d'/' -f 2)
CITRA_SRC_DIR="/citra"
BUILD_DIR="$CITRA_SRC_DIR/build"
REPO_DIR="$CITRA_SRC_DIR/repo"
STATE_DIR="$CITRA_SRC_DIR/.flatpak-builder"
KEYS_ARCHIVE="/tmp/keys.tar"
SSH_DIR="/upload"
SSH_KEY="/tmp/ssh.key"
GPG_KEY="/tmp/gpg.key"
# Extract keys
openssl aes-256-cbc -K $FLATPAK_ENC_K -iv $FLATPAK_ENC_IV -in "$CITRA_SRC_DIR/keys.tar.enc" -out "$KEYS_ARCHIVE" -d
tar -C /tmp -xvf $KEYS_ARCHIVE
# Configure SSH keys
eval "$(ssh-agent -s)"
chmod -R 600 "$HOME/.ssh"
chown -R root "$HOME/.ssh"
chmod 600 "$SSH_KEY"
ssh-add "$SSH_KEY"
echo "[$FLATPAK_SSH_HOSTNAME]:$FLATPAK_SSH_PORT,[$(dig +short $FLATPAK_SSH_HOSTNAME)]:$FLATPAK_SSH_PORT $FLATPAK_SSH_PUBLIC_KEY" > ~/.ssh/known_hosts
# Configure GPG keys
gpg2 --import "$GPG_KEY"
# Mount our flatpak repository
mkdir -p "$REPO_DIR"
sshfs "$FLATPAK_SSH_USER@$FLATPAK_SSH_HOSTNAME:$SSH_DIR" "$REPO_DIR" -C -p "$FLATPAK_SSH_PORT" -o IdentityFile="$SSH_KEY"
# Build the citra flatpak
flatpak-builder -v --jobs=4 --ccache --force-clean --state-dir="$STATE_DIR" --gpg-sign="$FLATPAK_GPG_PUBLIC_KEY" --repo="$REPO_DIR" "$BUILD_DIR" "/tmp/org.citra.$REPO_NAME.json"
flatpak build-update-repo "$REPO_DIR" -v --generate-static-deltas --gpg-sign="$FLATPAK_GPG_PUBLIC_KEY"
citra-master/.travis/linux-flatpak/finish.sh
#!/bin/bash -ex
CITRA_SRC_DIR="/citra"
REPO_DIR="$CITRA_SRC_DIR/repo"
# When the script finishes, unmount the repository and delete sensitive files,
# regardless of whether the build passes or fails
umount "$REPO_DIR"
rm -rf "$REPO_DIR" "/tmp/*"
citra-master/.travis/linux-flatpak/generate-data.sh
#!/bin/bash -ex
# This script generates the appdata.xml and org.citra.$REPO_NAME.json files
# needed to define application metadata and build citra depending on what version
# of citra we're building (nightly or canary)
# Converts "citra-emu/citra-nightly" to "citra-nightly"
REPO_NAME=$(echo $TRAVIS_REPO_SLUG | cut -d'/' -f 2)
# Converts "citra-nightly" to "Citra Nightly"
REPO_NAME_FRIENDLY=$(echo $REPO_NAME | sed -e 's/-/ /g' -e 's/\b\(.\)/\u\1/g')
# Generate the correct appdata.xml for the version of Citra we're building
cat > /tmp/appdata.xml <<EOF
<?xml version="1.0" encoding="UTF-8"?>
<application>
 <id type="desktop">org.citra.$REPO_NAME.desktop</id>
 <name>$REPO_NAME_FRIENDLY</name>
 <summary>Nintendo 3DS emulator</summary>
 <metadata_license>CC0-1.0</metadata_license>
 <project_license>GPL-2.0</project_license>
 <description>
 <p>Citra is an experimental open-source Nintendo 3DS emulator/debugger written in C++. It is written with portability in mind, with builds actively maintained for Windows, Linux and macOS.</p>
 <p>Citra emulates a subset of 3DS hardware and therefore is useful for running/debugging homebrew applications, and it is also able to run many commercial games! Some of these do not run at a playable state, but we are working every day to advance the project forward. (Playable here means compatibility of at least "Okay" on our game compatibility list.)</p>
</description>
 <url type="homepage">https://citra-emu.org/</url>
 <url type="donation">https://citra-emu.org/donate/</url>
 <url type="bugtracker">https://github.com/citra-emu/citra/issues</url>
 <url type="faq">https://citra-emu.org/wiki/faq/</url>
 <url type="help">https://citra-emu.org/wiki/home/</url>
 <screenshot>https://raw.githubusercontent.com/citra-emu/citra-web/master/site/static/images/screenshots/01-Super%20Mario%203D%20Land.jpg</screenshot>
 <screenshot>https://raw.githubusercontent.com/citra-emu/citra-web/master/site/static/images/screenshots/02-Mario%20Kart%207.jpg</screenshot>
 <screenshot>https://raw.githubusercontent.com/citra-emu/citra-web/master/site/static/images/screenshots/28-The%20Legend%20of%20Zelda%20Ocarina%20of%20Time%203D.jpg</screenshot>
 <screenshot>https://raw.githubusercontent.com/citra-emu/citra-web/master/site/static/images/screenshots/35-Pok%C3%A9mon%20ORAS.png</screenshot>
 <categories>
 <category>Games</category>
 <category>Emulator</category>
 </categories>
</application>
EOF
# Generate the citra flatpak manifest, appending certain variables depending on
# whether we're building nightly or canary.
cat > /tmp/org.citra.$REPO_NAME.json <<EOF
{
 "app-id": "org.citra.$REPO_NAME",
 "runtime": "org.kde.Platform",
 "runtime-version": "5.12",
 "sdk": "org.kde.Sdk",
 "command": "citra-qt",
 "rename-desktop-file": "citra.desktop",
 "rename-icon": "citra",
 "rename-appdata-file": "org.citra.$REPO_NAME.appdata.xml",
 "build-options": {
 "build-args": [
 "--share=network"
 ],
 "env": {
 "CI": "$CI",
 "TRAVIS": "$TRAVIS",
 "CONTINUOUS_INTEGRATION": "$CONTINUOUS_INTEGRATION",
 "TRAVIS_BRANCH": "$TRAVIS_BRANCH",
 "TRAVIS_BUILD_ID": "$TRAVIS_BUILD_ID",
 "TRAVIS_BUILD_NUMBER": "$TRAVIS_BUILD_NUMBER",
 "TRAVIS_COMMIT": "$TRAVIS_COMMIT",
 "TRAVIS_JOB_ID": "$TRAVIS_JOB_ID",
 "TRAVIS_JOB_NUMBER": "$TRAVIS_JOB_NUMBER",
 "TRAVIS_REPO_SLUG": "$TRAVIS_REPO_SLUG",
 "TRAVIS_TAG": "$TRAVIS_TAG"
 }
 },
 "finish-args": [
 "--device=all",
 "--socket=x11",
 "--socket=pulseaudio",
 "--share=network",
 "--share=ipc",
 "--filesystem=xdg-config/citra-emu:create",
 "--filesystem=xdg-data/citra-emu:create",
 "--filesystem=host:ro"
 ],
 "modules": [
 {
 "name": "citra",
 "buildsystem": "cmake-ninja",
 "builddir": true,
 "config-opts": [
 "-DCMAKE_BUILD_TYPE=Release",
 "-DENABLE_QT_TRANSLATION=ON",
 "-DCITRA_ENABLE_COMPATIBILITY_REPORTING=ON",
 "-DENABLE_COMPATIBILITY_LIST_DOWNLOAD=ON"
 ],
 "cleanup": [
 "/bin/citra",
 "/share/man",
 "/share/pixmaps"
 ],
 "post-install": [
 "install -Dm644 ../appdata.xml /app/share/appdata/org.citra.$REPO_NAME.appdata.xml",
 "desktop-file-install --dir=/app/share/applications ../dist/citra.desktop",
 "sed -i 's/Name=Citra/Name=$REPO_NAME_FRIENDLY/g' /app/share/applications/citra.desktop",
 "echo 'StartupWMClass=citra-qt' >> /app/share/applications/citra.desktop",
 "install -Dm644 ../dist/citra.svg /app/share/icons/hicolor/scalable/apps/citra.svg",
 "install -Dm644 ../dist/icon.png /app/share/icons/hicolor/512x512/apps/citra.png",
 "mv /app/share/mime/packages/citra.xml /app/share/mime/packages/org.citra.$REPO_NAME.xml",
 "sed 's/citra/org.citra.citra-nightly/g' -i /app/share/mime/packages/org.citra.$REPO_NAME.xml"
 ],
 "sources": [
 {
 "type": "git",
 "url": "https://github.com/citra-emu/$REPO_NAME.git",
 "branch": "$TRAVIS_BRANCH",
 "disable-shallow-clone": true
 },
 {
 "type": "file",
 "path": "/tmp/appdata.xml"
 }
 ]
 }
 ]
}
EOF
# Call the script to build citra
/bin/bash -ex /citra/.travis/linux-flatpak/docker.sh
citra-master/.travis/linux-flatpak/travis-ci-flatpak.env
# Flatpak specific environment variables
FLATPAK_ENC_IV
FLATPAK_ENC_K
FLATPAK_GPG_PUBLIC_KEY
FLATPAK_SSH_HOSTNAME
FLATPAK_SSH_LOCATION
FLATPAK_SSH_PORT
FLATPAK_SSH_PUBLIC_KEY
FLATPAK_SSH_USER
citra-master/.travis/linux-frozen/build.sh
#!/bin/bash -ex
mkdir -p "$HOME/.ccache"
docker pull citraemu/build-environments:linux-frozen
docker run --env-file .travis/common/travis-ci.env -v $(pwd):/citra -v "$HOME/.ccache":/root/.ccache citraemu/build-environments:linux-frozen /bin/bash -ex /citra/.travis/linux-frozen/docker.sh
citra-master/.travis/linux-frozen/docker.sh
#!/bin/bash -ex
cd /citra
mkdir build && cd build
cmake .. -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=/usr/lib/ccache/gcc -DCMAKE_CXX_COMPILER=/usr/lib/ccache/g++ -DCITRA_ENABLE_COMPATIBILITY_REPORTING=${ENABLE_COMPATIBILITY_REPORTING:-"OFF"} -DENABLE_COMPATIBILITY_LIST_DOWNLOAD=ON -DUSE_DISCORD_PRESENCE=ON
ninja
ctest -VV -C Release
citra-master/.travis/linux-frozen/install_package.py
#!/usr/bin/python
import sys
import re
import subprocess
from launchpadlib.launchpad import Launchpad
if sys.version_info[0] > 2:
 xrange = range
cachedir = '/.launchpadlib/cache/'
launchpad = Launchpad.login_anonymously(
 'grab build info', 'production', cachedir, version='devel')
processed_packages = []
deb_file_list = []
def get_url(pkg, distro):
 build_ref = launchpad.archives.getByReference(reference='ubuntu').getPublishedBinaries(
 binary_name=pkg[0], distro_arch_series='https://api.launchpad.net/devel/ubuntu/' + distro + '/amd64', version=pkg[1], exact_match=True, order_by_date=True).entries[0]
 build_link = build_ref['build_link']
 deb_name = '{}_{}_{}.deb'.format(pkg[0], pkg[1], 'amd64' if build_ref['architecture_specific'] else 'all')
 deb_link = build_link + '/+files/' + deb_name
 return [deb_link, deb_name]
def list_dependencies(deb_file):
 t = subprocess.check_output(
 ['bash', '-c', '(dpkg -I {} | grep -oP "^ Depends\: \K.*$") || true'.format(deb_file)])
 deps = [i.strip() for i in t.split(',')]
 equals_re = re.compile(r'^(.*) \(= (.*)\)$')
 return [equals_re.sub(r'\1=\2', i).split('=') for i in filter(equals_re.match, deps)]
def get_package(pkg, distro):
 if pkg in processed_packages:
 return
 print('Getting {}...'.format(pkg[0]))
 url = get_url(pkg, distro)
 subprocess.check_call(['wget', '--quiet', url[0], '-O', url[1]])
 for dep in list_dependencies(url[1]):
 get_package(dep, distro)
 processed_packages.append(pkg)
 deb_file_list.append('./' + url[1])
for i in xrange(1, len(sys.argv), 3):
 get_package([sys.argv[i], sys.argv[i + 1]], sys.argv[i + 2])
subprocess.check_call(
 ['apt-get', 'install', '-y', '--force-yes'] + deb_file_list)
citra-master/.travis/linux-mingw/build.sh
#!/bin/bash -ex
mkdir "$HOME/.ccache" || true
docker run --env-file .travis/common/travis-ci.env -v $(pwd):/citra -v "$HOME/.ccache":/root/.ccache citraemu/build-environments:linux-mingw /bin/bash -ex /citra/.travis/linux-mingw/docker.sh
citra-master/.travis/linux-mingw/deps.sh
#!/bin/sh -ex
docker pull citraemu/build-environments:linux-mingw
citra-master/.travis/linux-mingw/docker.sh
#!/bin/bash -ex
cd /citra
# override Travis CI unreasonable ccache size
echo 'max_size = 3.0G' > "$HOME/.ccache/ccache.conf"
mkdir build && cd build
cmake .. -G Ninja -DCMAKE_TOOLCHAIN_FILE="$(pwd)/../CMakeModules/MinGWCross.cmake" -DUSE_CCACHE=ON -DCMAKE_BUILD_TYPE=Release -DENABLE_QT_TRANSLATION=ON -DCITRA_ENABLE_COMPATIBILITY_REPORTING=${ENABLE_COMPATIBILITY_REPORTING:-"OFF"} -DENABLE_COMPATIBILITY_LIST_DOWNLOAD=ON -DUSE_DISCORD_PRESENCE=ON -DENABLE_MF=ON
ninja
echo "Tests skipped"
#ctest -VV -C Release
ccache -s
echo 'Prepare binaries...'
cd ..
mkdir package
QT_PLATFORM_DLL_PATH='/usr/x86_64-w64-mingw32/lib/qt5/plugins/platforms/'
find build/ -name "citra*.exe" -exec cp {} 'package' \;
# copy Qt plugins
mkdir package/platforms
cp "${QT_PLATFORM_DLL_PATH}/qwindows.dll" package/platforms/
cp -rv "${QT_PLATFORM_DLL_PATH}/../mediaservice/" package/
cp -rv "${QT_PLATFORM_DLL_PATH}/../imageformats/" package/
rm -f package/mediaservice/*d.dll
for i in package/*.exe; do
 # we need to process pdb here, however, cv2pdb
 # does not work here, so we just simply strip all the debug symbols
 x86_64-w64-mingw32-strip "${i}"
done
python3 .travis/linux-mingw/scan_dll.py package/*.exe package/imageformats/*.dll "package/"
citra-master/.travis/linux-mingw/scan_dll.py
import pefile
import sys
import re
import os
import queue
import shutil
# constant definitions
KNOWN_SYS_DLLS = ['WINMM.DLL', 'MSVCRT.DLL', 'VERSION.DLL', 'MPR.DLL',
 'DWMAPI.DLL', 'UXTHEME.DLL', 'DNSAPI.DLL', 'IPHLPAPI.DLL']
# below is for Ubuntu 18.04 with specified PPA enabled, if you are using
# other distro or different repositories, change the following accordingly
DLL_PATH = [
 '/usr/x86_64-w64-mingw32/bin/',
 '/usr/x86_64-w64-mingw32/lib/',
 '/usr/lib/gcc/x86_64-w64-mingw32/7.3-posix/'
]
missing = []
def parse_imports(file_name):
 results = []
 pe = pefile.PE(file_name, fast_load=True)
 pe.parse_data_directories()
 for entry in pe.DIRECTORY_ENTRY_IMPORT:
 current = entry.dll.decode()
 current_u = current.upper() # b/c Windows is often case insensitive
 # here we filter out system dlls
 # dll w/ names like *32.dll are likely to be system dlls
 if current_u.upper() not in KNOWN_SYS_DLLS and not re.match(string=current_u, pattern=r'.*32\.DLL'):
 results.append(current)
 return results
def parse_imports_recursive(file_name, path_list=[]):
 q = queue.Queue() # create a FIFO queue
 # file_name can be a string or a list for the convience
 if isinstance(file_name, str):
 q.put(file_name)
 elif isinstance(file_name, list):
 for i in file_name:
 q.put(i)
 full_list = []
 while q.qsize():
 current = q.get_nowait()
 print('> %s' % current)
 deps = parse_imports(current)
 # if this dll does not have any import, ignore it
 if not deps:
 continue
 for dep in deps:
 # the dependency already included in the list, skip
 if dep in full_list:
 continue
 # find the requested dll in the provided paths
 full_path = find_dll(dep)
 if not full_path:
 missing.append(dep)
 continue
 full_list.append(dep)
 q.put(full_path)
 path_list.append(full_path)
 return full_list
def find_dll(name):
 for path in DLL_PATH:
 for root, _, files in os.walk(path):
 for f in files:
 if name.lower() == f.lower():
 return os.path.join(root, f)
def deploy(name, dst, dry_run=False):
 dlls_path = []
 parse_imports_recursive(name, dlls_path)
 for dll_entry in dlls_path:
 if not dry_run:
 shutil.copy(dll_entry, dst)
 else:
 print('[Dry-Run] Copy %s to %s' % (dll_entry, dst))
 print('Deploy completed.')
 return dlls_path
def main():
 if len(sys.argv) < 3:
 print('Usage: %s [files to examine ...] [target deploy directory]')
 return 1
 to_deploy = sys.argv[1:-1]
 tgt_dir = sys.argv[-1]
 if not os.path.isdir(tgt_dir):
 print('%s is not a directory.' % tgt_dir)
 return 1
 print('Scanning dependencies...')
 deploy(to_deploy, tgt_dir)
 if missing:
 print('Following DLLs are not found: %s' % ('\n'.join(missing)))
 return 0
if __name__ == '__main__':
 main()
citra-master/.travis/linux-mingw/upload.sh
#!/bin/bash -ex
. .travis/common/pre-upload.sh
REV_NAME="citra-windows-mingw-${GITDATE}-${GITREV}"
ARCHIVE_NAME="${REV_NAME}.tar.gz"
COMPRESSION_FLAGS="-czvf"
mkdir "$REV_NAME"
# get around the permission issues
cp -r package/* "$REV_NAME"
. .travis/common/post-upload.sh
citra-master/.travis/linux/build.sh
#!/bin/bash -ex
mkdir -p "$HOME/.ccache"
docker run --env-file .travis/common/travis-ci.env -v $(pwd):/citra -v "$HOME/.ccache":/root/.ccache citraemu/build-environments:linux-fresh /bin/bash -ex /citra/.travis/linux/docker.sh
citra-master/.travis/linux/deps.sh
#!/bin/sh -ex
docker pull citraemu/build-environments:linux-fresh
citra-master/.travis/linux/docker.sh
#!/bin/bash -ex
cd /citra
mkdir build && cd build
cmake .. -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=/usr/lib/ccache/gcc -DCMAKE_CXX_COMPILER=/usr/lib/ccache/g++ -DENABLE_QT_TRANSLATION=ON -DCITRA_ENABLE_COMPATIBILITY_REPORTING=${ENABLE_COMPATIBILITY_REPORTING:-"OFF"} -DENABLE_COMPATIBILITY_LIST_DOWNLOAD=ON -DUSE_DISCORD_PRESENCE=ON
ninja
ctest -VV -C Release
citra-master/.travis/linux/upload.sh
#!/bin/bash -ex
. .travis/common/pre-upload.sh
REV_NAME="citra-linux-${GITDATE}-${GITREV}"
ARCHIVE_NAME="${REV_NAME}.tar.xz"
COMPRESSION_FLAGS="-cJvf"
mkdir "$REV_NAME"
cp build/bin/citra "$REV_NAME"
cp build/bin/citra-room "$REV_NAME"
cp build/bin/citra-qt "$REV_NAME"
# We need icons on Linux for .desktop entries
mkdir "$REV_NAME/dist"
cp dist/icon.png "$REV_NAME/dist/citra.png"
. .travis/common/post-upload.sh
citra-master/.travis/macos/build.sh
#!/bin/bash -ex
set -o pipefail
export MACOSX_DEPLOYMENT_TARGET=10.13
export Qt5_DIR=$(brew --prefix)/opt/qt5
export PATH="/usr/local/opt/ccache/libexec:$PATH"
# TODO: Build using ninja instead of make
mkdir build && cd build
cmake .. -DCMAKE_OSX_ARCHITECTURES="x86_64;x86_64h" -DCMAKE_BUILD_TYPE=Release -DENABLE_QT_TRANSLATION=ON -DCITRA_ENABLE_COMPATIBILITY_REPORTING=${ENABLE_COMPATIBILITY_REPORTING:-"OFF"} -DENABLE_COMPATIBILITY_LIST_DOWNLOAD=ON -DUSE_DISCORD_PRESENCE=ON -DENABLE_FFMPEG=ON
make -j4
ctest -VV -C Release
citra-master/.travis/macos/deps.sh
#!/bin/sh -ex
brew update
brew install qt5 sdl2 p7zip ccache ffmpeg
pip3 install macpack
citra-master/.travis/macos/upload.sh
#!/bin/bash -ex
. .travis/common/pre-upload.sh
REV_NAME="citra-osx-${GITDATE}-${GITREV}"
ARCHIVE_NAME="${REV_NAME}.tar.gz"
COMPRESSION_FLAGS="-czvf"
mkdir "$REV_NAME"
cp build/bin/citra "$REV_NAME"
cp -r build/bin/citra-qt.app "$REV_NAME"
cp build/bin/citra-room "$REV_NAME"
# move libs into folder for deployment
macpack "${REV_NAME}/citra-qt.app/Contents/MacOS/citra-qt" -d "../Frameworks"
# move qt frameworks into app bundle for deployment
$(brew --prefix)/opt/qt5/bin/macdeployqt "${REV_NAME}/citra-qt.app" -executable="${REV_NAME}/citra-qt.app/Contents/MacOS/citra-qt"
# move libs into folder for deployment
macpack "${REV_NAME}/citra" -d "libs"
# Make the launching script executable
chmod +x ${REV_NAME}/citra-qt.app/Contents/MacOS/citra-qt
# Verify loader instructions
find "$REV_NAME" -exec otool -L {} \;
. .travis/common/post-upload.sh
citra-master/.travis/transifex/build.sh
#!/bin/bash -e
docker run -e TRANSIFEX_API_TOKEN="${TRANSIFEX_API_TOKEN}" -v "$(pwd)":/citra citraemu/build-environments:linux-transifex /bin/sh -e /citra/.travis/transifex/docker.sh
citra-master/.travis/transifex/deps.sh
#!/bin/bash -ex
docker pull citraemu/build-environments:linux-transifex
citra-master/.travis/transifex/docker.sh
#!/bin/bash -e
# Setup RC file for tx
echo $'[https://www.transifex.com]\nhostname = https://www.transifex.com\nusername = api\npassword = '"$TRANSIFEX_API_TOKEN"$'\n' > ~/.transifexrc
set -x
cat << 'EOF' > /usr/bin/tx
#!/usr/bin/python3
# -*- coding: utf-8 -*-
import re
import sys
from txclib.cmdline import main
if __name__ == '__main__':
 sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
 sys.exit(main())
EOF
echo -e "\e[1m\e[33mBuild tools information:\e[0m"
cmake
--version
gcc -v
tx --version
cd /citra
mkdir build && cd build
cmake .. -DENABLE_QT_TRANSLATION=ON -DGENERATE_QT_TRANSLATION=ON -DCMAKE_BUILD_TYPE=Release -DENABLE_SDL2=OFF
make translation
cd ..
cd dist/languages
tx push -s
citra-master/CMakeLists.txt
# CMake 3.8 required for 17 to be a valid value for CXX_STANDARD
cmake_minimum_required(VERSION 3.8)
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules")
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/externals/cmake-modules")
include(DownloadExternals)
include(CMakeDependentOption)
project(citra)
# Set bundled sdl2/qt as dependent options.
# OFF by default, but if ENABLE_SDL2 and MSVC are true then ON
option(ENABLE_SDL2 "Enable the SDL2 frontend" ON)
CMAKE_DEPENDENT_OPTION(CITRA_USE_BUNDLED_SDL2 "Download bundled SDL2 binaries" ON "ENABLE_SDL2;MSVC" OFF)
option(ENABLE_QT "Enable the Qt frontend" ON)
option(ENABLE_QT_TRANSLATION "Enable translations for the Qt frontend" OFF)
CMAKE_DEPENDENT_OPTION(CITRA_USE_BUNDLED_QT "Download bundled Qt binaries" ON "ENABLE_QT;MSVC" OFF)
option(ENABLE_WEB_SERVICE "Enable web services (telemetry, etc.)" ON)
option(ENABLE_CUBEB "Enables the cubeb audio backend" ON)
option(ENABLE_FFMPEG "Enable FFmpeg decoder/encoder" OFF)
option(USE_DISCORD_PRESENCE "Enables Discord Rich Presence" OFF)
CMAKE_DEPENDENT_OPTION(ENABLE_MF "Use Media Foundation decoder" ON "WIN32;NOT ENABLE_FFMPEG" OFF)
if(NOT EXISTS ${PROJECT_SOURCE_DIR}/.git/hooks/pre-commit)
 message(STATUS "Copying pre-commit hook")
 file(COPY hooks/pre-commit
 DESTINATION ${PROJECT_SOURCE_DIR}/.git/hooks)
endif()
# Sanity check : Check that all submodules are present
# =======================================================================
function(check_submodules_present)
 file(READ "${PROJECT_SOURCE_DIR}/.gitmodules" gitmodules)
 string(REGEX MATCHALL "path *= *[^ \t\r\n]*" gitmodules ${gitmodules})
 foreach(module ${gitmodules})
 string(REGEX REPLACE "path *= *" "" module ${module})
 if (NOT EXISTS "${PROJECT_SOURCE_DIR}/${module}/.git")
 message(SEND_ERROR "Git submodule ${module} not found."
 "Please run: git submodule update --init --recursive")
 endif()
 endforeach()
endfunction()
check_submodules_present()
configure_file(${PROJECT_SOURCE_DIR}/dist/compatibility_list/compatibility_list.qrc
 ${PROJECT_BINARY_DIR}/dist/compatibility_list/compatibility_list.qrc
 COPYONLY)
if (ENABLE_COMPATIBILITY_LIST_DOWNLOAD AND NOT EXISTS ${PROJECT_BINARY_DIR}/dist/compatibility_list/compatibility_list.json)
 message(STATUS "Downloading compatibility list for citra...")
 file(DOWNLOAD
 https://api.citra-emu.org/gamedb/
 "${PROJECT_BINARY_DIR}/dist/compatibility_list/compatibility_list.json" SHOW_PROGRESS)
endif()
if (NOT EXISTS ${PROJECT_BINARY_DIR}/dist/compatibility_list/compatibility_list.json)
 file(WRITE ${PROJECT_BINARY_DIR}/dist/compatibility_list/compatibility_list.json "")
endif()
# Detect current compilation architecture and create standard definitions
# =======================================================================
include(CheckSymbolExists)
function(detect_architecture symbol arch)
 if (NOT DEFINED ARCHITECTURE)
 set(CMAKE_REQUIRED_QUIET 1)
 check_symbol_exists("${symbol}" "" ARCHITECTURE_${arch})
 unset(CMAKE_REQUIRED_QUIET)
 # The output variable needs to be unique across invocations otherwise
 # CMake's crazy scope rules will keep it defined
 if (ARCHITECTURE_${arch})
 set(ARCHITECTURE "${arch}" PARENT_SCOPE)
 set(ARCHITECTURE_${arch} 1 PARENT_SCOPE)
 add_definitions(-DARCHITECTURE_${arch}=1)
 endif()
 endif()
endfunction()
if (NOT ENABLE_GENERIC)
 if (MSVC)
 detect_architecture("_M_AMD64" x86_64)
 detect_architecture("_M_IX86" x86)
 detect_architecture("_M_ARM" ARM)
 detect_architecture("_M_ARM64" ARM64)
 else()
 detect_architecture("__x86_64__" x86_64)
 detect_architecture("__i386__" x86)
 detect_architecture("__arm__" ARM)
 detect_architecture("__aarch64__" ARM64)
 endif()
endif()
if (NOT DEFINED ARCHITECTURE)
 set(ARCHITECTURE "GENERIC")
 set(ARCHITECTURE_GENERIC 1)
 add_definitions(-DARCHITECTURE_GENERIC=1)
endif()
message(STATUS "Target architecture: ${ARCHITECTURE}")
# Configure compilation flags
# ===========================
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
# set up output paths for executable binaries
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin)
if (NOT MSVC)
 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-attributes")
 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
 if (MINGW)
 add_definitions(-DMINGW_HAS_SECURE_API)
 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -gdwarf")
 if (MINGW_STATIC_BUILD)
 add_definitions(-DQT_STATICPLUGIN)
 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -static")
 set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static")
 endif()
 endif()
else()
 # Silence "deprecation" warnings
 add_definitions(/D_CRT_SECURE_NO_WARNINGS /D_CRT_NONSTDC_NO_DEPRECATE /D_SCL_SECURE_NO_WARNINGS)
 # Avoid windows.h junk
 add_definitions(/DNOMINMAX)
 # Avoid windows.h from including some usually unused libs like winsocks.h, since this might cause some redefinition errors.
 add_definitions(/DWIN32_LEAN_AND_MEAN)
 set(CMAKE_CONFIGURATION_TYPES Debug Release CACHE STRING "" FORCE)
 # Tweak optimization settings
 # As far as I can tell, there's no way to override the CMake defaults while leaving user
 # changes intact, so we'll just clobber everything and say sorry.
 message(STATUS "Cache compiler flags ignored, please edit CMakeLists.txt to change the flags.")
 # /W3 - Level 3 warnings
 # /MP - Multi-threaded compilation
 # /Zi - Output debugging information
 # /Zo - enhanced debug info for optimized builds
 # /permissive- - enables stricter C++ standards conformance checks
 set(CMAKE_C_FLAGS "/W3 /MP /Zi /Zo /permissive-" CACHE STRING "" FORCE)
 # /EHsc - C++-only exception handling semantics
 # /std:c++latest - Latest available C++ standard
 # /Zc:throwingNew - let codegen assume `operator new` will never return null
 # /Zc:inline - let codegen omit inline functions in object files
 set(CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS} /EHsc /std:c++latest /Zc:throwingNew,inline" CACHE STRING "" FORCE)
 # /MDd - Multi-threaded Debug Runtime DLL
 set(CMAKE_C_FLAGS_DEBUG "/Od /MDd" CACHE STRING "" FORCE)
 set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG}" CACHE STRING "" FORCE)
 # /O2 - Optimization level 2
 # /GS- - No stack buffer overflow checks
 # /MD - Multi-threaded runtime DLL
 set(CMAKE_C_FLAGS_RELEASE "/O2 /GS- /MD" CACHE STRING "" FORCE)
 set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE}" CACHE STRING "" FORCE)
 set(CMAKE_EXE_LINKER_FLAGS_DEBUG "/DEBUG /MANIFEST:NO" CACHE STRING "" FORCE)
 set(CMAKE_EXE_LINKER_FLAGS_RELEASE "/DEBUG /MANIFEST:NO /INCREMENTAL:NO /OPT:REF,ICF" CACHE STRING "" FORCE)
endif()
# Set file offset size to 64 bits.
#
# On modern Unixes, this is typically already the case. The lone exception is
# glibc, which may default to 32 bits. glibc allows this to be configured
# by setting _FILE_OFFSET_BITS.
if(CMAKE_SYSTEM_NAME STREQUAL "Linux" OR MINGW)
 add_definitions(-D_FILE_OFFSET_BITS=64)
endif()
add_definitions(-DSINGLETHREADED)
# CMake seems to only define _DEBUG on Windows
set_property(DIRECTORY APPEND PROPERTY
 COMPILE_DEFINITIONS $<$<CONFIG:Debug>:_DEBUG> $<$<NOT:$<CONFIG:Debug>>:NDEBUG>)
# System imported libraries
# ======================
find_package(Boost 1.66.0 QUIET)
if (NOT Boost_FOUND)
 message(STATUS "Boost 1.66.0 or newer not found, falling back to externals")
 set(BOOST_ROOT "${PROJECT_SOURCE_DIR}/externals/boost")
 set(Boost_INCLUDE_DIR
"${CMAKE_SOURCE_DIR}/externals/boost")
 set(Boost_NO_SYSTEM_PATHS OFF)
 find_package(Boost QUIET REQUIRED)
endif()
# Prefer the -pthread flag on Linux.
set(THREADS_PREFER_PTHREAD_FLAG ON)
find_package(Threads REQUIRED)
if (ENABLE_SDL2)
 if (CITRA_USE_BUNDLED_SDL2)
 # Detect toolchain and platform
 if ((MSVC_VERSION GREATER_EQUAL 1910 AND MSVC_VERSION LESS 1920) AND ARCHITECTURE_x86_64)
 set(SDL2_VER "SDL2-2.0.8")
 else()
 message(FATAL_ERROR "No bundled SDL2 binaries for your toolchain. Disable CITRA_USE_BUNDLED_SDL2 and provide your own.")
 endif()
 if (DEFINED SDL2_VER)
 download_bundled_external("sdl2/" ${SDL2_VER} SDL2_PREFIX)
 endif()
 set(SDL2_FOUND YES)
 set(SDL2_INCLUDE_DIR "${SDL2_PREFIX}/include" CACHE PATH "Path to SDL2 headers")
 set(SDL2_LIBRARY "${SDL2_PREFIX}/lib/x64/SDL2.lib" CACHE PATH "Path to SDL2 library")
 set(SDL2_DLL_DIR "${SDL2_PREFIX}/lib/x64/" CACHE PATH "Path to SDL2.dll")
 else()
 find_package(SDL2 REQUIRED)
 endif()
 if (SDL2_FOUND)
 # TODO(yuriks): Make FindSDL2.cmake export an IMPORTED library instead
 add_library(SDL2 INTERFACE)
 target_link_libraries(SDL2 INTERFACE "${SDL2_LIBRARY}")
 target_include_directories(SDL2 INTERFACE "${SDL2_INCLUDE_DIR}")
 endif()
else()
 set(SDL2_FOUND NO)
endif()
if (ENABLE_QT)
 if (CITRA_USE_BUNDLED_QT)
 if ((MSVC_VERSION GREATER_EQUAL 1910 AND MSVC_VERSION LESS 1920) AND ARCHITECTURE_x86_64)
 set(QT_VER qt-5.10.0-msvc2017_64)
 else()
 message(FATAL_ERROR "No bundled Qt binaries for your toolchain. Disable CITRA_USE_BUNDLED_QT and provide your own.")
 endif()
 if (DEFINED QT_VER)
 download_bundled_external("qt/" ${QT_VER} QT_PREFIX)
 endif()
 set(QT_PREFIX_HINT HINTS "${QT_PREFIX}")
 else()
 # Passing an empty HINTS seems to cause default system paths to get ignored in CMake 2.8 so
 # make sure to not pass anything if we don't have one.
 set(QT_PREFIX_HINT)
 endif()
 find_package(Qt5 REQUIRED COMPONENTS Widgets OpenGL Multimedia ${QT_PREFIX_HINT})
 if (ENABLE_QT_TRANSLATION)
 find_package(Qt5 REQUIRED COMPONENTS LinguistTools ${QT_PREFIX_HINT})
 endif()
endif()
if (ENABLE_FFMPEG)
 if (CITRA_USE_BUNDLED_FFMPEG)
 if ((MSVC_VERSION GREATER_EQUAL 1910 AND MSVC_VERSION LESS 1920) AND ARCHITECTURE_x86_64)
 set(FFmpeg_VER "ffmpeg-4.0.2-msvc")
 else()
 message(FATAL_ERROR "No bundled FFmpeg binaries for your toolchain. Disable CITRA_USE_BUNDLED_FFMPEG and provide your own.")
 endif()
 if (DEFINED FFmpeg_VER)
 download_bundled_external("ffmpeg/" ${FFmpeg_VER} FFmpeg_PREFIX)
 set(FFMPEG_DIR "${FFmpeg_PREFIX}/../")
 set(FFMPEG_FOUND YES)
 endif()
 else()
 find_package(FFmpeg REQUIRED COMPONENTS avcodec)
 if ("${FFmpeg_avcodec_VERSION}" VERSION_LESS "57.48.101")
 message(FATAL_ERROR "Found version for libavcodec is too low. The required version is at least 57.48.101 (included in FFmpeg 3.1 and later).")
 else()
 set(FFMPEG_FOUND YES)
 endif()
 endif()
else()
 set(FFMPEG_FOUND NO)
endif()
# Platform-specific library requirements
# ======================================
IF (APPLE)
 find_library(COCOA_LIBRARY Cocoa) # Umbrella framework for everything GUI-related
 set(PLATFORM_LIBRARIES ${COCOA_LIBRARY} ${IOKIT_LIBRARY} ${COREVIDEO_LIBRARY})
 if (CMAKE_CXX_COMPILER_ID STREQUAL Clang)
 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++")
 set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -stdlib=libc++")
 endif()
ELSEIF (WIN32)
 # WSAPoll and SHGetKnownFolderPath (AppData/Roaming) didn't exist before WinNT 6.x (Vista)
 add_definitions(-D_WIN32_WINNT=0x0600 -DWINVER=0x0600)
 set(PLATFORM_LIBRARIES winmm ws2_32)
 IF (MINGW)
 # PSAPI is the Process Status API
 set(PLATFORM_LIBRARIES ${PLATFORM_LIBRARIES} psapi imm32 version)
 ENDIF (MINGW)
ELSEIF (CMAKE_SYSTEM_NAME MATCHES "^(Linux|kFreeBSD|GNU|SunOS)$")
 set(PLATFORM_LIBRARIES rt)
ENDIF (APPLE)
# Setup a custom clang-format target (if clang-format can be found) that will run
# against all the src files. This should be used before making a pull request.
# =======================================================================
set(CLANG_FORMAT_POSTFIX "-6.0")
find_program(CLANG_FORMAT
 NAMES clang-format${CLANG_FORMAT_POSTFIX}
 clang-format
 PATHS ${PROJECT_BINARY_DIR}/externals)
# if find_program doesn't find it, try to download from externals
if (NOT CLANG_FORMAT)
 if (WIN32)
 message(STATUS "Clang format not found! Downloading...")
 set(CLANG_FORMAT "${PROJECT_BINARY_DIR}/externals/clang-format${CLANG_FORMAT_POSTFIX}.exe")
 file(DOWNLOAD
 https://github.com/yuzu-emu/ext-windows-bin/raw/master/clang-format${CLANG_FORMAT_POSTFIX}.exe
 "${CLANG_FORMAT}" SHOW_PROGRESS
 STATUS DOWNLOAD_SUCCESS)
 if (NOT DOWNLOAD_SUCCESS EQUAL 0)
 message(WARNING "Could not download clang format! Disabling the clang format target")
 file(REMOVE ${CLANG_FORMAT})
 unset(CLANG_FORMAT)
 endif()
 else()
 message(WARNING "Clang format not found! Disabling the clang format target")
 endif()
endif()
if (CLANG_FORMAT)
 set(SRCS ${PROJECT_SOURCE_DIR}/src)
 set(CCOMMENT "Running clang format against all the .h and .cpp files in src/")
 if (WIN32)
 add_custom_target(clang-format
 COMMAND powershell.exe -Command "Get-ChildItem '${SRCS}/*' -Include *.cpp,*.h -Recurse | Foreach {&'${CLANG_FORMAT}' -i $_.fullname}"
 COMMENT ${CCOMMENT})
 elseif(MINGW)
 add_custom_target(clang-format
 COMMAND find `cygpath -u ${SRCS}` -iname *.h -o -iname *.cpp | xargs `cygpath -u ${CLANG_FORMAT}` -i
 COMMENT ${CCOMMENT})
 else()
 add_custom_target(clang-format
 COMMAND find ${SRCS} -iname *.h -o -iname *.cpp | xargs ${CLANG_FORMAT} -i
 COMMENT ${CCOMMENT})
 endif()
 unset(SRCS)
 unset(CCOMMENT)
endif()
# Include source code
# ===================
# This function should be passed a list of all files in a target. It will automatically generate
# file groups following the directory hierarchy, so that the layout of the files in IDEs matches the
# one in the filesystem.
function(create_target_directory_groups target_name)
 # Place any files that aren't in the source list in a separate group so that they don't get in
 # the way.
 source_group("Other Files" REGULAR_EXPRESSION ".")
 get_target_property(target_sources "${target_name}" SOURCES)
 foreach(file_name IN LISTS target_sources)
 get_filename_component(dir_name "${file_name}" PATH)
 # Group names use '\' as a separator even though the entire rest of CMake uses '/'...
 string(REPLACE "/" "\\" group_name "${dir_name}")
 source_group("${group_name}" FILES "${file_name}")
 endforeach()
endfunction()
# Gets a UTC timstamp and sets the provided variable to it
function(get_timestamp _var)
 string(TIMESTAMP timestamp UTC)
 set(${_var} "${timestamp}" PARENT_SCOPE)
endfunction()
# Prevent boost from linking against libs when building
add_definitions(-DBOOST_ERROR_CODE_HEADER_ONLY
 -DBOOST_SYSTEM_NO_LIB
 -DBOOST_DATE_TIME_NO_LIB
 -DBOOST_REGEX_NO_LIB
)
# generate git/build information
include(GetGitRevisionDescription)
get_git_head_revision(GIT_REF_SPEC GIT_REV)
git_describe(GIT_DESC --always --long --dirty)
git_branch_name(GIT_BRANCH)
get_timestamp(BUILD_DATE)
enable_testing()
add_subdirectory(externals)
add_subdirectory(src)
add_subdirectory(dist/installer)
# Set citra-qt project or citra project as default StartUp Project in Visual Studio depending on whether QT is enabled or not
if(ENABLE_QT)
set_property(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT citra-qt)
else()
 set_property(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT citra)
endif()
# Installation instructions
# =========================
# Install freedesktop.org metadata files, following those specifications:
# http://standards.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html
# http://standards.freedesktop.org/icon-theme-spec/icon-theme-spec-latest.html
# http://standards.freedesktop.org/shared-mime-info-spec/shared-mime-info-spec-latest.html
if(ENABLE_QT AND UNIX AND NOT APPLE)
 install(FILES "${PROJECT_SOURCE_DIR}/dist/citra.desktop"
 DESTINATION "${CMAKE_INSTALL_PREFIX}/share/applications")
 install(FILES "${PROJECT_SOURCE_DIR}/dist/citra.svg"
 DESTINATION "${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/scalable/apps")
 install(FILES "${PROJECT_SOURCE_DIR}/dist/citra.xml"
 DESTINATION "${CMAKE_INSTALL_PREFIX}/share/mime/packages")
endif()
if(UNIX)
 if(ENABLE_SDL2)
 install(FILES "${PROJECT_SOURCE_DIR}/dist/citra.6"
 DESTINATION "${CMAKE_INSTALL_PREFIX}/share/man/man6")
 endif()
 if (ENABLE_QT)
 install(FILES "${PROJECT_SOURCE_DIR}/dist/citra-qt.6"
 DESTINATION "${CMAKE_INSTALL_PREFIX}/share/man/man6")
 endif()
endif()
citra-master/CMakeModules/AndroidNdkModules.cmake
# Copyright (c) 2014, Pavel Rojtberg
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
#
# 2. Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
#
# 3. Neither the name of the copyright holder nor the names of its
# contributors may be used to endorse or promote products derived from this
# software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "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 THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 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.
macro(android_ndk_import_module_cpufeatures)
 if(ANDROID)
 include_directories(${ANDROID_NDK}/sources/android/cpufeatures)
 add_library(cpufeatures ${ANDROID_NDK}/sources/android/cpufeatures/cpu-features.c)
 target_link_libraries(cpufeatures dl)
 endif()
endmacro()
macro(android_ndk_import_module_native_app_glue)
 if(ANDROID)
 include_directories(${ANDROID_NDK}/sources/android/native_app_glue)
 add_library(native_app_glue ${ANDROID_NDK}/sources/android/native_app_glue/android_native_app_glue.c)
 target_link_libraries(native_app_glue log)
 endif()
endmacro()
macro(android_ndk_import_module_ndk_helper)
 if(ANDROID)
 android_ndk_import_module_cpufeatures()
 android_ndk_import_module_native_app_glue()
 include_directories(${ANDROID_NDK}/sources/android/ndk_helper)
 file(GLOB _NDK_HELPER_SRCS ${ANDROID_NDK}/sources/android/ndk_helper/*.cpp ${ANDROID_NDK}/sources/android/ndk_helper/gl3stub.c)
 add_library(ndk_helper ${_NDK_HELPER_SRCS})
 target_link_libraries(ndk_helper log android EGL GLESv2 cpufeatures native_app_glue)
 unset(_NDK_HELPER_SRCS)
 endif()
endmacro()
citra-master/CMakeModules/BuildInstaller.cmake
# To use this as a script, make sure you pass in the variables SRC_DIR BUILD_DIR and TARGET_FILE
if(WIN32)
 set(PLATFORM "windows")
elseif(APPLE)
 set(PLATFORM "mac")
elseif(UNIX)
 set(PLATFORM "linux")
else()
 message(FATAL_ERROR "Cannot build installer for this unsupported platform")
endif()
set(DIST_DIR "${BUILD_DIR}/dist")
set(ARCHIVE "${PLATFORM}.7z")
file(MAKE_DIRECTORY ${BUILD_DIR})
file(MAKE_DIRECTORY ${DIST_DIR})
file(DOWNLOAD https://github.com/citra-emu/ext-windows-bin/raw/master/qtifw/${ARCHIVE}
 "${BUILD_DIR}/${ARCHIVE}" SHOW_PROGRESS)
execute_process(COMMAND ${CMAKE_COMMAND} -E tar xf "${BUILD_DIR}/${ARCHIVE}"
 WORKING_DIRECTORY "${BUILD_DIR}/")
set(TARGET_NAME "citra-setup-${PLATFORM}")
set(CONFIG_FILE "${SRC_DIR}/config/config_${PLATFORM}.xml")
set(INSTALLER_BASE "${BUILD_DIR}/installerbase_${PLATFORM}")
set(BINARY_CREATOR "${BUILD_DIR}/binarycreator_${PLATFORM}")
set(PACKAGES_DIR "${BUILD_DIR}/packages")
file(MAKE_DIRECTORY ${PACKAGES_DIR})
if (UNIX OR APPLE)
 execute_process(COMMAND chmod 744 ${BINARY_CREATOR})
endif()
execute_process(COMMAND ${BINARY_CREATOR} -t ${INSTALLER_BASE} -n -c ${CONFIG_FILE} -p ${PACKAGES_DIR} ${TARGET_FILE})
if (APPLE)
 execute_process(COMMAND chmod 744 ${TARGET_FILE}.app/Contents/MacOS/${TARGET_NAME})
endif()
citra-master/CMakeModules/CopyCitraQt5Deps.cmake
function(copy_citra_Qt5_deps target_dir)
 include(WindowsCopyFiles)
 set(DLL_DEST "${CMAKE_BINARY_DIR}/bin/$<CONFIG>/")
 set(Qt5_DLL_DIR "${Qt5_DIR}/../../../bin")
 set(Qt5_PLATFORMS_DIR "${Qt5_DIR}/../../../plugins/platforms/")
 set(Qt5_MEDIASERVICE_DIR "${Qt5_DIR}/../../../plugins/mediaservice/")
 set(Qt5_STYLES_DIR "${Qt5_DIR}/../../../plugins/styles/")
 set(Qt5_IMAGEFORMATS_DIR "${Qt5_DIR}/../../../plugins/imageformats/")
 set(PLATFORMS ${DLL_DEST}platforms/)
 set(MEDIASERVICE ${DLL_DEST}mediaservice/)
 set(STYLES ${DLL_DEST}styles/)
 set(IMAGEFORMATS ${DLL_DEST}imageformats/)
 windows_copy_files(${target_dir} ${Qt5_DLL_DIR} ${DLL_DEST}
 icudt*.dll
 icuin*.dll
 icuuc*.dll
 Qt5Core$<$<CONFIG:Debug>:d>.*
 Qt5Gui$<$<CONFIG:Debug>:d>.*
 Qt5OpenGL$<$<CONFIG:Debug>:d>.*
 Qt5Widgets$<$<CONFIG:Debug>:d>.*
 Qt5Multimedia$<$<CONFIG:Debug>:d>.*
 Qt5Network$<$<CONFIG:Debug>:d>.*
 )
 windows_copy_files(citra-qt ${Qt5_PLATFORMS_DIR} ${PLATFORMS} qwindows$<$<CONFIG:Debug>:d>.*)
 windows_copy_files(citra-qt ${Qt5_MEDIASERVICE_DIR} ${MEDIASERVICE}
 dsengine$<$<CONFIG:Debug>:d>.*
 wmfengine$<$<CONFIG:Debug>:d>.*
 )
 windows_copy_files(citra-qt ${Qt5_STYLES_DIR} ${STYLES} qwindowsvistastyle$<$<CONFIG:Debug>:d>.*)
 windows_copy_files(${target_dir} ${Qt5_IMAGEFORMATS_DIR} ${IMAGEFORMATS}
 qgif$<$<CONFIG:Debug>:d>.dll
 qicns$<$<CONFIG:Debug>:d>.dll
 qico$<$<CONFIG:Debug>:d>.dll
 qjpeg$<$<CONFIG:Debug>:d>.dll
 qsvg$<$<CONFIG:Debug>:d>.dll
 qtga$<$<CONFIG:Debug>:d>.dll
 qtiff$<$<CONFIG:Debug>:d>.dll
 qwbmp$<$<CONFIG:Debug>:d>.dll
 qwebp$<$<CONFIG:Debug>:d>.dll
 )
endfunction(copy_citra_Qt5_deps)
citra-master/CMakeModules/CopyCitraSDLDeps.cmake
function(copy_citra_SDL_deps target_dir)
 include(WindowsCopyFiles)
 set(DLL_DEST "${CMAKE_BINARY_DIR}/bin/$<CONFIG>/")
 windows_copy_files(${target_dir} ${SDL2_DLL_DIR} ${DLL_DEST} SDL2.dll)
endfunction(copy_citra_SDL_deps)
citra-master/CMakeModules/DownloadExternals.cmake
# This function downloads a binary library package from our external repo.
# Params:
# remote_path: path to the file to download, relative to the remote repository root
# prefix_var: name of a variable which will be set with the path to the extracted contents
function(download_bundled_external remote_path lib_name prefix_var)
set(prefix "${CMAKE_BINARY_DIR}/externals/${lib_name}")
if (NOT EXISTS "${prefix}")
 message(STATUS "Downloading binaries for ${lib_name}...")
 file(DOWNLOAD
 https://github.com/citra-emu/ext-windows-bin/raw/master/${remote_path}${lib_name}.7z
 "${CMAKE_BINARY_DIR}/externals/${lib_name}.7z" SHOW_PROGRESS)
 execute_process(COMMAND ${CMAKE_COMMAND} -E tar xf "${CMAKE_BINARY_DIR}/externals/${lib_name}.7z"
 WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/externals")
endif()
message(STATUS "Using bundled binaries at ${prefix}")
set(${prefix_var} "${prefix}" PARENT_SCOPE)
endfunction()
citra-master/CMakeModules/MinGWCross.cmake
SET(MINGW_PREFIX /usr/x86_64-w64-mingw32/)
SET(CMAKE_SYSTEM_NAME Windows)
SET(CMAKE_SYSTEM_PROCESSOR x86_64)
# Actually a hack, w/o this will cause some strange errors
SET(CMAKE_HOST_WIN32 TRUE)
SET(CMAKE_FIND_ROOT_PATH ${MINGW_PREFIX})
SET(SDL2_PATH ${MINGW_PREFIX})
SET(MINGW_TOOL_PREFIX ${CMAKE_SYSTEM_PROCESSOR}-w64-mingw32-)
# Specify the cross compiler
SET(CMAKE_C_COMPILER ${MINGW_TOOL_PREFIX}gcc-posix)
SET(CMAKE_CXX_COMPILER ${MINGW_TOOL_PREFIX}g++-posix)
SET(CMAKE_RC_COMPILER ${MINGW_TOOL_PREFIX}windres)
# Mingw tools
SET(STRIP ${MINGW_TOOL_PREFIX}strip)
SET(WINDRES ${MINGW_TOOL_PREFIX}windres)
SET(ENV{PKG_CONFIG} ${MINGW_TOOL_PREFIX}pkg-config)
# ccache wrapper
OPTION(USE_CCACHE "Use ccache for compilation" OFF)
IF(USE_CCACHE)
 FIND_PROGRAM(CCACHE ccache)
 IF (CCACHE)
 MESSAGE(STATUS "Using ccache found in PATH")
 SET_PROPERTY(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ${CCACHE})
 SET_PROPERTY(GLOBAL PROPERTY RULE_LAUNCH_LINK ${CCACHE})
 ELSE(CCACHE)
 MESSAGE(WARNING "USE_CCACHE enabled, but no ccache found")
 ENDIF(CCACHE)
ENDIF(USE_CCACHE)
# Search for programs in the build host directories
SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
# Echo modified cmake vars to screen for debugging purposes
IF(NOT DEFINED ENV{MINGW_DEBUG_INFO})
	MESSAGE("")
	MESSAGE("Custom cmake vars: (blank = system default)")
	MESSAGE("-----------------------------------------")
	MESSAGE("* CMAKE_C_COMPILER : ${CMAKE_C_COMPILER}")
	MESSAGE("* CMAKE_CXX_COMPILER : ${CMAKE_CXX_COMPILER}")
	MESSAGE("* CMAKE_RC_COMPILER : ${CMAKE_RC_COMPILER}")
	MESSAGE("* WINDRES : ${WINDRES}")
	MESSAGE("* ENV{PKG_CONFIG} : $ENV{PKG_CONFIG}")
	MESSAGE("* STRIP : ${STRIP}")
 MESSAGE("* USE_CCACHE : ${USE_CCACHE}")
	MESSAGE("")
	# So that the debug info only appears once
	SET(ENV{MINGW_DEBUG_INFO} SHOWN)
ENDIF()
citra-master/CONTRIBUTING.md
**The Contributor's Guide has moved to [the wiki](https://github.com/citra-emu/citra/wiki/Contributing).**
citra-master/Doxyfile
# Doxyfile 1.8.8
# This file describes the settings to be used by the documentation system
# doxygen (www.doxygen.org) for a project.
#
# All text after a double hash (##) is considered a comment and is placed in
# front of the TAG it is preceding.
#
# All text after a single hash (#) is considered a comment and will be ignored.
# The format is:
# TAG = value [value, ...]
# For lists, items can also be appended using:
# TAG += value [value, ...]
# Values that contain spaces should be placed between quotes (\" \").
#---------------------------------------------------------------------------
# Project related configuration options
#---------------------------------------------------------------------------
# This tag specifies the encoding used for all characters in the config file
# that follow. The default is UTF-8 which is also the encoding used for all text
# before the first occurrence of this tag. Doxygen uses libiconv (or the iconv
# built into libc) for the transcoding. See http://www.gnu.org/software/libiconv
# for the list of possible encodings.
# The default value is: UTF-8.
DOXYFILE_ENCODING = UTF-8
# The PROJECT_NAME tag is a single word (or a sequence of words surrounded by
# double-quotes, unless you are using Doxywizard) that should identify the
# project for which the documentation is generated. This name is used in the
# title of most generated pages and in a few other places.
# The default value is: My Project.
PROJECT_NAME = Citra
# The PROJECT_NUMBER tag can be used to enter a project or revision number. This
# could be handy for archiving the generated documentation or if some version
# control system is used.
PROJECT_NUMBER =
# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a
# quick idea about the purpose of the project. Keep the description short.
PROJECT_BRIEF = "Nintendo 3DS emulator/debugger"
# With the PROJECT_LOGO tag one can specify an logo or icon that is included in
# the documentation. The maximum height of the logo should not exceed 55 pixels
# and the maximum width should not exceed 200 pixels. Doxygen will copy the logo
# to the output directory.
PROJECT_LOGO = dist/doc-icon.png
# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path
# into which the generated documentation will be written. If a relative path is
# entered, it will be relative to the location where doxygen was started. If
# left blank the current directory will be used.
OUTPUT_DIRECTORY = doc-build/
# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create 4096 sub-
# directories (in 2 levels) under the output directory of each output format and
# will distribute the generated files over these directories. Enabling this
# option can be useful when feeding doxygen a huge amount of source files, where
# putting all generated files in the same directory would otherwise causes
# performance problems for the file system.
# The default value is: NO.
CREATE_SUBDIRS = NO
# If the ALLOW_UNICODE_NAMES tag is set to YES, doxygen will allow non-ASCII
# characters to appear in the names of generated files. If set to NO, non-ASCII
# characters will be escaped, for example _xE3_x81_x84 will be used for Unicode
# U+3044.
# The default value is: NO.
ALLOW_UNICODE_NAMES = NO
# The OUTPUT_LANGUAGE tag is used to specify the language in which all
# documentation generated by doxygen is written. Doxygen will use this
# information to generate all constant output in the proper language.
# Possible values are: Afrikaans, Arabic, Armenian, Brazilian, Catalan, Chinese,
# Chinese-Traditional, Croatian, Czech, Danish, Dutch, English (United States),
# Esperanto, Farsi (Persian), Finnish, French, German, Greek, Hungarian,
# Indonesian, Italian, Japanese, Japanese-en (Japanese with English messages),
# Korean, Korean-en (Korean with English messages), Latvian, Lithuanian,
# Macedonian, Norwegian, Persian (Farsi), Polish, Portuguese, Romanian, Russian,
# Serbian, Serbian-Cyrillic, Slovak, Slovene, Spanish, Swedish, Turkish,
# Ukrainian and Vietnamese.
# The default value is: English.
OUTPUT_LANGUAGE = English
# If the BRIEF_MEMBER_DESC tag is set to YES doxygen will include brief member
# descriptions after the members that are listed in the file and class
# documentation (similar to Javadoc). Set to NO to disable this.
# The default value is: YES.
BRIEF_MEMBER_DESC = YES
# If the REPEAT_BRIEF tag is set to YES doxygen will prepend the brief
# description of a member or function before the detailed description
#
# Note: If both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the
# brief descriptions will be completely suppressed.
# The default value is: YES.
REPEAT_BRIEF = YES
# This tag implements a quasi-intelligent brief description abbreviator that is
# used to form the text in various listings. Each string in this list, if found
# as the leading text of the brief description, will be
stripped from the text
# and the result, after processing the whole list, is used as the annotated
# text. Otherwise, the brief description is used as-is. If left blank, the
# following values are used ($name is automatically replaced with the name of
# the entity):The $name class, The $name widget, The $name file, is, provides,
# specifies, contains, represents, a, an and the.
ABBREVIATE_BRIEF = "The $name class" \
 "The $name widget" \
 "The $name file" \
 is \
 provides \
 specifies \
 contains \
 represents \
 a \
 an \
 the
# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then
# doxygen will generate a detailed section even if there is only a brief
# description.
# The default value is: NO.
ALWAYS_DETAILED_SEC = NO
# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all
# inherited members of a class in the documentation of that class as if those
# members were ordinary class members. Constructors, destructors and assignment
# operators of the base classes will not be shown.
# The default value is: NO.
INLINE_INHERITED_MEMB = NO
# If the FULL_PATH_NAMES tag is set to YES doxygen will prepend the full path
# before files name in the file list and in the header files. If set to NO the
# shortest path that makes the file name unique will be used
# The default value is: YES.
FULL_PATH_NAMES = YES
# The STRIP_FROM_PATH tag can be used to strip a user-defined part of the path.
# Stripping is only done if one of the specified strings matches the left-hand
# part of the path. The tag can be used to show relative paths in the file list.
# If left blank the directory from which doxygen is run is used as the path to
# strip.
#
# Note that you can specify absolute paths here, but also relative paths, which
# will be relative from the directory where doxygen is started.
# This tag requires that the tag FULL_PATH_NAMES is set to YES.
STRIP_FROM_PATH =
# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the
# path mentioned in the documentation of a class, which tells the reader which
# header file to include in order to use a class. If left blank only the name of
# the header file containing the class definition is used. Otherwise one should
# specify the list of include paths that are normally passed to the compiler
# using the -I flag.
STRIP_FROM_INC_PATH =
# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but
# less readable) file names. This can be useful is your file systems doesn't
# support long names like on DOS, Mac, or CD-ROM.
# The default value is: NO.
SHORT_NAMES = NO
# If the JAVADOC_AUTOBRIEF tag is set to YES then doxygen will interpret the
# first line (until the first dot) of a Javadoc-style comment as the brief
# description. If set to NO, the Javadoc-style will behave just like regular Qt-
# style comments (thus requiring an explicit @brief command for a brief
# description.)
# The default value is: NO.
JAVADOC_AUTOBRIEF = YES
# If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first
# line (until the first dot) of a Qt-style comment as the brief description. If
# set to NO, the Qt-style will behave just like regular Qt-style comments (thus
# requiring an explicit \brief command for a brief description.)
# The default value is: NO.
QT_AUTOBRIEF = NO
# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make doxygen treat a
# multi-line C++ special comment block (i.e. a block of //! or /// comments) as
# a brief description. This used to be the default behavior. The new default is
# to treat a multi-line C++ comment block as a detailed description. Set this
# tag to YES if you prefer the old behavior instead.
#
# Note that setting this tag to YES also means that rational rose comments are
# not recognized any more.
# The default value is: NO.
MULTILINE_CPP_IS_BRIEF = YES
# If the INHERIT_DOCS tag is set to YES then an undocumented member inherits the
# documentation from any documented member that it re-implements.
# The default value is: YES.
INHERIT_DOCS = YES
# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce a
# new page for each member. If set to NO, the documentation of a member will be
# part of the file/class/namespace that contains it.
# The default value is: NO.
SEPARATE_MEMBER_PAGES = NO
# The TAB_SIZE tag can be used to set the number of spaces in a tab. Doxygen
# uses this value to replace tabs by spaces in code fragments.
# Minimum value: 1, maximum value: 16, default value: 4.
TAB_SIZE = 4
# This tag can be used to specify a number of aliases that act as commands in
# the documentation. An alias has the form:
# name=value
# For example adding
# "sideeffect=@par Side Effects:\n"
# will allow you to put the command \sideeffect (or @sideeffect) in the
# documentation, which will result in a user-defined paragraph with heading
# "Side Effects:". You can put \n's in the value part of an alias to insert
# newlines.
ALIASES =
# This tag can be used to specify a number of word-keyword mappings (TCL only).
# A mapping has the form "name=value". For example adding "class=itcl::class"
# will allow you to use the command class in the itcl::class meaning.
TCL_SUBST =
# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources
# only. Doxygen will then generate output that is more tailored for C. For
# instance, some of the names that are used will be different. The list of all
# members will be omitted, etc.
# The default value is: NO.
OPTIMIZE_OUTPUT_FOR_C = NO
# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java or
# Python sources only. Doxygen will then generate output that is more tailored
# for that language. For instance, namespaces will be presented as packages,
# qualified scopes will look different, etc.
# The default value is: NO.
OPTIMIZE_OUTPUT_JAVA = NO
# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran
# sources. Doxygen will then generate output that is tailored for Fortran.
# The default value is: NO.
OPTIMIZE_FOR_FORTRAN = NO
# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL
# sources. Doxygen will then generate output that is tailored for VHDL.
# The default value is: NO.
OPTIMIZE_OUTPUT_VHDL = NO
# Doxygen selects the parser to use depending on the extension of the files it
# parses. With this tag you can assign which parser to use for a given
# extension. Doxygen has a built-in mapping, but you can override or extend it
# using this tag. The format is ext=language, where ext is a file extension, and
# language is one of the parsers supported by doxygen: IDL, Java, Javascript,
# C#, C, C++, D, PHP, Objective-C, Python, Fortran (fixed format Fortran:
# FortranFixed, free formatted Fortran: FortranFree, unknown formatted Fortran:
# Fortran. In the later case the parser tries to guess whether the code is fixed
# or free formatted code, this is the default for Fortran type files), VHDL. For
# instance to make doxygen treat .inc files as Fortran files (default is PHP),
# and .f files as C (default is Fortran), use: inc=Fortran f=C.
#
# Note For files without extension you can use no_extension as a placeholder.
#
# Note that for custom extensions you also need to set FILE_PATTERNS otherwise
# the files are not read by doxygen.
EXTENSION_MAPPING =
# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments
# according to the Markdown format, which allows for more readable
# documentation. See http://daringfireball.net/projects/markdown/ for details.
# The output of markdown processing is further processed by doxygen, so you can
# mix doxygen,
HTML, and XML commands with Markdown formatting. Disable only in
# case of backward compatibilities issues.
# The default value is: YES.
MARKDOWN_SUPPORT = YES
# When enabled doxygen tries to link words that correspond to documented
# classes, or namespaces to their corresponding documentation. Such a link can
# be prevented in individual cases by by putting a % sign in front of the word
# or globally by setting AUTOLINK_SUPPORT to NO.
# The default value is: YES.
AUTOLINK_SUPPORT = YES
# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want
# to include (a tag file for) the STL sources as input, then you should set this
# tag to YES in order to let doxygen match functions declarations and
# definitions whose arguments contain STL classes (e.g. func(std::string);
# versus func(std::string) {}). This also make the inheritance and collaboration
# diagrams that involve STL classes more complete and accurate.
# The default value is: NO.
BUILTIN_STL_SUPPORT = NO
# If you use Microsoft's C++/CLI language, you should set this option to YES to
# enable parsing support.
# The default value is: NO.
CPP_CLI_SUPPORT = NO
# Set the SIP_SUPPORT tag to YES if your project consists of sip (see:
# http://www.riverbankcomputing.co.uk/software/sip/intro) sources only. Doxygen
# will parse them like normal C++ but will assume all classes use public instead
# of private inheritance when no explicit protection keyword is present.
# The default value is: NO.
SIP_SUPPORT = NO
# For Microsoft's IDL there are propget and propput attributes to indicate
# getter and setter methods for a property. Setting this option to YES will make
# doxygen to replace the get and set methods by a property in the documentation.
# This will only work if the methods are indeed getting or setting a simple
# type. If this is not the case, or you want to show the methods anyway, you
# should set this option to NO.
# The default value is: YES.
IDL_PROPERTY_SUPPORT = NO
# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC
# tag is set to YES, then doxygen will reuse the documentation of the first
# member in the group (if any) for the other members of the group. By default
# all members of a group must be documented explicitly.
# The default value is: NO.
DISTRIBUTE_GROUP_DOC = NO
# Set the SUBGROUPING tag to YES to allow class member groups of the same type
# (for instance a group of public functions) to be put as a subgroup of that
# type (e.g. under the Public Functions section). Set it to NO to prevent
# subgrouping. Alternatively, this can be done per class using the
# \nosubgrouping command.
# The default value is: YES.
SUBGROUPING = YES
# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and unions
# are shown inside the group in which they are included (e.g. using \ingroup)
# instead of on a separate page (for HTML and Man pages) or section (for LaTeX
# and RTF).
#
# Note that this feature does not work in combination with
# SEPARATE_MEMBER_PAGES.
# The default value is: NO.
INLINE_GROUPED_CLASSES = NO
# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and unions
# with only public data fields or simple typedef fields will be shown inline in
# the documentation of the scope in which they are defined (i.e. file,
# namespace, or group documentation), provided this scope is documented. If set
# to NO, structs, classes, and unions are shown on a separate page (for HTML and
# Man pages) or section (for LaTeX and RTF).
# The default value is: NO.
INLINE_SIMPLE_STRUCTS = YES
# When TYPEDEF_HIDES_STRUCT tag is enabled, a typedef of a struct, union, or
# enum is documented as struct, union, or enum with the name of the typedef. So
# typedef struct TypeS {} TypeT, will appear in the documentation as a struct
# with name TypeT. When disabled the typedef will appear as a member of a file,
# namespace, or class. And the struct will be named TypeS. This can typically be
# useful for C code in case the coding convention dictates that all compound
# types are typedef'ed and only the typedef is referenced, never the tag name.
# The default value is: NO.
TYPEDEF_HIDES_STRUCT = NO
# The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This
# cache is used to resolve symbols given their name and scope. Since this can be
# an expensive process and often the same symbol appears multiple times in the
# code, doxygen keeps a cache of pre-resolved symbols. If the cache is too small
# doxygen will become slower. If the cache is too large, memory is wasted. The
# cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range
# is 0..9, the default is 0, corresponding to a cache size of 2^16=65536
# symbols. At the end of a run doxygen will report the cache usage and suggest
# the optimal cache size from a speed point of view.
# Minimum value: 0, maximum value: 9, default value: 0.
LOOKUP_CACHE_SIZE = 0
#---------------------------------------------------------------------------
# Build related configuration options
#---------------------------------------------------------------------------
# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in
# documentation are documented, even if no documentation was available. Private
# class members and static file members will be hidden unless the
# EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES.
# Note: This will also disable the warnings about undocumented members that are
# normally produced when WARNINGS is set to YES.
# The default value is: NO.
EXTRACT_ALL = YES
# If the EXTRACT_PRIVATE tag is set to YES all private members of a class will
# be included in the documentation.
# The default value is: NO.
EXTRACT_PRIVATE = YES
# If the EXTRACT_PACKAGE tag is set to YES all members with package or internal
# scope will be included in the documentation.
# The default value is: NO.
EXTRACT_PACKAGE = NO
# If the EXTRACT_STATIC tag is set to YES all static members of a file will be
# included in the documentation.
# The default value is: NO.
EXTRACT_STATIC = YES
# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) defined
# locally in source files will be included in the documentation. If set to NO
# only classes defined in header files are included. Does not have any effect
# for Java sources.
# The default value is: YES.
EXTRACT_LOCAL_CLASSES = YES
# This flag is only useful for Objective-C code. When set to YES local methods,
# which are defined in the implementation section but not in the interface are
# included in the documentation. If set to NO only methods in the interface are
# included.
# The default value is: NO.
EXTRACT_LOCAL_METHODS = NO
# If this flag is set to YES, the members of anonymous namespaces will be
# extracted and appear in the documentation as a namespace called
# 'anonymous_namespace{file}', where file will be replaced with the base name of
# the file that contains the anonymous namespace. By default anonymous namespace
# are hidden.
# The default value is: NO.
EXTRACT_ANON_NSPACES = NO
# If the HIDE_UNDOC_MEMBERS tag is set to YES, doxygen will hide all
# undocumented members inside documented classes or files. If set to NO these
# members will be included in the various overviews, but no documentation
# section is generated. This option has no effect if EXTRACT_ALL is enabled.
# The default value is: NO.
HIDE_UNDOC_MEMBERS = NO
# If the HIDE_UNDOC_CLASSES tag is set to YES, doxygen will hide all
# undocumented classes that are normally visible in the class hierarchy. If set
# to NO these classes will be included in the various overviews. This option has
# no effect if EXTRACT_ALL is enabled.
# The default value is: NO.
HIDE_UNDOC_CLASSES = NO
# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend
# (class|struct|union) declarations. If set to NO these declarations

Teste o Premium para desbloquear

Aproveite todos os benefícios por 3 dias sem pagar! 😉
Já tem cadastro?

Continue navegando