Compare commits
4 commits
b88b85446f
...
c399e89002
Author | SHA1 | Date | |
---|---|---|---|
c399e89002 | |||
35b6911f39 | |||
ae473739e5 | |||
1a13e79c3d |
7 changed files with 125 additions and 2 deletions
|
@ -59,7 +59,7 @@ android {
|
|||
defaultConfig {
|
||||
// TODO If this is ever modified, change application_id in strings.xml
|
||||
applicationId = "dev.eden.eden_emulator"
|
||||
minSdk = 28
|
||||
minSdk = 24
|
||||
targetSdk = 36
|
||||
versionName = getGitVersion()
|
||||
|
||||
|
|
BIN
src/android/app/src/main/res/drawable/ic_launcher.png
Normal file
BIN
src/android/app/src/main/res/drawable/ic_launcher.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 48 KiB |
|
@ -1,3 +1,6 @@
|
|||
# SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
# SPDX-FileCopyrightText: 2018 yuzu Emulator Project
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
|
@ -21,7 +24,7 @@ add_executable(tests
|
|||
|
||||
create_target_directory_groups(tests)
|
||||
|
||||
target_link_libraries(tests PRIVATE common core input_common)
|
||||
target_link_libraries(tests PRIVATE common core input_common video_core)
|
||||
target_link_libraries(tests PRIVATE ${PLATFORM_LIBRARIES} Catch2::Catch2WithMain Threads::Threads)
|
||||
|
||||
add_test(NAME tests COMMAND tests)
|
||||
|
|
|
@ -10,4 +10,12 @@
|
|||
#define VMA_STATIC_VULKAN_FUNCTIONS 0
|
||||
#define VMA_DYNAMIC_VULKAN_FUNCTIONS 1
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning( push )
|
||||
#pragma warning( disable : 4189 )
|
||||
#endif
|
||||
#include "vk_mem_alloc.h"
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning( pop )
|
||||
#endif
|
||||
|
|
86
tools/VectorDrawable2Svg.py
Normal file
86
tools/VectorDrawable2Svg.py
Normal file
|
@ -0,0 +1,86 @@
|
|||
#!/usr/bin/env python2
|
||||
"""
|
||||
VectorDrawable2Svg
|
||||
This script convert your VectorDrawable to a Svg
|
||||
Author: Alessandro Lucchet
|
||||
|
||||
Usage: drop one or more vector drawable onto this script to convert them to svg format
|
||||
"""
|
||||
|
||||
from xml.dom.minidom import *
|
||||
import sys
|
||||
|
||||
# extracts all paths inside vdContainer and add them into svgContainer
|
||||
def convertPaths(vdContainer,svgContainer,svgXml):
|
||||
vdPaths = vdContainer.getElementsByTagName('path')
|
||||
for vdPath in vdPaths:
|
||||
# only iterate in the first level
|
||||
if vdPath.parentNode == vdContainer:
|
||||
svgPath = svgXml.createElement('path')
|
||||
svgPath.attributes['d'] = vdPath.attributes['android:pathData'].value
|
||||
if vdPath.hasAttribute('android:fillColor'):
|
||||
svgPath.attributes['fill'] = vdPath.attributes['android:fillColor'].value
|
||||
else:
|
||||
svgPath.attributes['fill'] = 'none'
|
||||
if vdPath.hasAttribute('android:strokeLineJoin'):
|
||||
svgPath.attributes['stroke-linejoin'] = vdPath.attributes['android:strokeLineJoin'].value
|
||||
if vdPath.hasAttribute('android:strokeLineCap'):
|
||||
svgPath.attributes['stroke-linecap'] = vdPath.attributes['android:strokeLineCap'].value
|
||||
if vdPath.hasAttribute('android:strokeMiterLimit'):
|
||||
svgPath.attributes['stroke-miterlimit'] = vdPath.attributes['android:strokeMiterLimit'].value
|
||||
if vdPath.hasAttribute('android:strokeWidth'):
|
||||
svgPath.attributes['stroke-width'] = vdPath.attributes['android:strokeWidth'].value
|
||||
if vdPath.hasAttribute('android:strokeColor'):
|
||||
svgPath.attributes['stroke'] = vdPath.attributes['android:strokeColor'].value
|
||||
svgContainer.appendChild(svgPath);
|
||||
|
||||
# define the function which converts a vector drawable to a svg
|
||||
def convertVd(vdFilePath):
|
||||
|
||||
# create svg xml
|
||||
svgXml = Document()
|
||||
svgNode = svgXml.createElement('svg')
|
||||
svgXml.appendChild(svgNode);
|
||||
|
||||
# open vector drawable
|
||||
vdXml = parse(vdFilePath)
|
||||
vdNode = vdXml.getElementsByTagName('vector')[0]
|
||||
|
||||
# setup basic svg info
|
||||
svgNode.attributes['xmlns'] = 'http://www.w3.org/2000/svg'
|
||||
svgNode.attributes['width'] = vdNode.attributes['android:viewportWidth'].value
|
||||
svgNode.attributes['height'] = vdNode.attributes['android:viewportHeight'].value
|
||||
svgNode.attributes['viewBox'] = '0 0 {} {}'.format(vdNode.attributes['android:viewportWidth'].value, vdNode.attributes['android:viewportHeight'].value)
|
||||
|
||||
# iterate through all groups
|
||||
vdGroups = vdXml.getElementsByTagName('group')
|
||||
for vdGroup in vdGroups:
|
||||
|
||||
# create the group
|
||||
svgGroup = svgXml.createElement('g')
|
||||
|
||||
# setup attributes of the group
|
||||
if vdGroup.hasAttribute('android:translateX'):
|
||||
svgGroup.attributes['transform'] = 'translate({},{})'.format(vdGroup.attributes['android:translateX'].value,vdGroup.attributes['android:translateY'].value)
|
||||
|
||||
# iterate through all paths inside the group
|
||||
convertPaths(vdGroup,svgGroup,svgXml)
|
||||
|
||||
# append the group to the svg node
|
||||
svgNode.appendChild(svgGroup);
|
||||
|
||||
# iterate through all svg-level paths
|
||||
convertPaths(vdNode,svgNode,svgXml)
|
||||
|
||||
# write xml to file
|
||||
svgXml.writexml(open(vdFilePath + '.svg', 'w'),indent="",addindent=" ",newl='\n')
|
||||
|
||||
# script begin
|
||||
if len(sys.argv)>1:
|
||||
iterArgs = iter(sys.argv)
|
||||
next(iterArgs) #skip the first entry (it's the name of the script)
|
||||
for arg in iterArgs:
|
||||
convertVd(arg)
|
||||
else:
|
||||
print("You have to pass me something")
|
||||
sys.exit()
|
26
tools/generate-legacy-icons.sh
Executable file
26
tools/generate-legacy-icons.sh
Executable file
|
@ -0,0 +1,26 @@
|
|||
#!/bin/sh -e
|
||||
|
||||
# Generate SDK <26 icons for android
|
||||
# requires imagemagick, inkscape
|
||||
|
||||
ROOTDIR=$PWD
|
||||
|
||||
cd src/android/app/src/main
|
||||
|
||||
pushd res/drawable
|
||||
# convert vector to svg--needed to generate launcher png
|
||||
cp ic_yuzu_icon.xml tmp
|
||||
|
||||
python3 $ROOTDIR/tools/VectorDrawable2Svg.py tmp
|
||||
|
||||
inkscape -w 768 -h 768 tmp.svg -o ic_tmp.png
|
||||
magick ic_icon_bg_orig.png -resize 512x512 bg_tmp.png
|
||||
|
||||
magick bg_tmp.png -strip -type TrueColor -depth 8 -colorspace sRGB -color-matrix "1 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0" bg_tmp_rgb.png
|
||||
magick -verbose bg_tmp_rgb.png ic_tmp.png -gravity center -composite -colorspace sRGB ic_launcher.png
|
||||
echo
|
||||
|
||||
rm *tmp*
|
||||
popd
|
||||
|
||||
# Add legacy here when legacy gets merged
|
Loading…
Add table
Add a link
Reference in a new issue