forked from neobrain/citra
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/master'
- Loading branch information
Showing
505 changed files
with
147,966 additions
and
17,581 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,3 +31,5 @@ CMakeSettings.json | |
# Windows global filetypes | ||
Thumbs.db | ||
|
||
# Python files | ||
*.pyc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,3 +13,4 @@ TRAVIS_TAG | |
|
||
# citra specific flags | ||
ENABLE_COMPATIBILITY_REPORTING | ||
USE_DISCORD_PRESENCE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#!/bin/bash -ex | ||
mkdir -p "$HOME/.ccache" | ||
docker pull ubuntu:18.04 | ||
docker run --env-file .travis/common/travis-ci.env -v $(pwd):/citra -v "$HOME/.ccache":/root/.ccache ubuntu:18.04 /bin/bash -ex /citra/.travis/linux-frozen/docker.sh | ||
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/sh -ex | ||
|
||
docker pull citraemu/build-environments:linux-mingw |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
#!/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 .. -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 | ||
make -j4 | ||
|
||
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 | ||
|
||
pip3 install pefile | ||
python3 .travis/linux-mingw/scan_dll.py package/*.exe "package/" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
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() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
#!/bin/bash -ex | ||
mkdir -p "$HOME/.ccache" | ||
docker run --env-file .travis/common/travis-ci.env -v $(pwd):/citra -v "$HOME/.ccache":/root/.ccache ubuntu:18.04 /bin/bash -ex /citra/.travis/linux/docker.sh | ||
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
#!/bin/sh -ex | ||
|
||
docker pull ubuntu:18.04 | ||
docker pull citraemu/build-environments:linux-fresh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
#!/bin/bash -e | ||
|
||
docker run -e TRANSIFEX_API_TOKEN="${TRANSIFEX_API_TOKEN}" -v "$(pwd)":/citra alpine /bin/sh -e /citra/.travis/transifex/docker.sh | ||
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
#!/bin/bash -ex | ||
|
||
docker pull alpine:latest | ||
docker pull citraemu/build-environments:linux-transifex |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.