mirror of
https://github.com/skyline-emu/skyline.git
synced 2024-11-22 14:39:18 +01:00
Fix Logger Settings + Use Java 8 + Update Kotlin + Extract Native SOs
This commit is contained in:
parent
80302cf1ad
commit
2bbf526419
6
.github/workflows/ci.yml
vendored
6
.github/workflows/ci.yml
vendored
@ -30,8 +30,10 @@ jobs:
|
||||
restore-keys: |
|
||||
${{ runner.os }}-cxx-
|
||||
|
||||
- name: Setup Environment for Gradle
|
||||
run: chmod +x gradlew
|
||||
- name: Setup Environment for Gradle & Ninja Build
|
||||
run: |
|
||||
chmod +x gradlew
|
||||
sudo apt-get install -y ninja-build
|
||||
|
||||
- name: Android Lint
|
||||
run: ./gradlew --stacktrace lint
|
||||
|
@ -7,23 +7,8 @@
|
||||
<option name="FORMATTER_OFF_TAG" value="@fmt:off" />
|
||||
<option name="SOFT_MARGINS" value="80,140" />
|
||||
<JetCodeStyleSettings>
|
||||
<option name="PACKAGES_TO_USE_STAR_IMPORTS">
|
||||
<value>
|
||||
<package name="java.util" alias="false" withSubpackages="false" />
|
||||
<package name="kotlinx.android.synthetic" alias="false" withSubpackages="true" />
|
||||
<package name="io.ktor" alias="false" withSubpackages="true" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="PACKAGES_IMPORT_LAYOUT">
|
||||
<value>
|
||||
<package name="" alias="false" withSubpackages="true" />
|
||||
<package name="java" alias="false" withSubpackages="true" />
|
||||
<package name="javax" alias="false" withSubpackages="true" />
|
||||
<package name="kotlin" alias="false" withSubpackages="true" />
|
||||
<package name="" alias="true" withSubpackages="true" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="SPACE_BEFORE_TYPE_COLON" value="true" />
|
||||
<option name="CODE_STYLE_DEFAULTS" value="KOTLIN_OFFICIAL" />
|
||||
</JetCodeStyleSettings>
|
||||
<Objective-C>
|
||||
<option name="INDENT_VISIBILITY_KEYWORDS" value="2" />
|
||||
@ -234,6 +219,7 @@
|
||||
</arrangement>
|
||||
</codeStyleSettings>
|
||||
<codeStyleSettings language="kotlin">
|
||||
<option name="CODE_STYLE_DEFAULTS" value="KOTLIN_OFFICIAL" />
|
||||
<option name="RIGHT_MARGIN" value="999" />
|
||||
</codeStyleSettings>
|
||||
</code_scheme>
|
||||
|
@ -1,5 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ExternalStorageConfigurationManager" enabled="true" />
|
||||
<component name="JavadocGenerationManager">
|
||||
<option name="OUTPUT_DIRECTORY" value="$PROJECT_DIR$/../LightSwitchEXTRA/JDoc" />
|
||||
<option name="OPTION_SCOPE" value="private" />
|
||||
|
@ -1,12 +1,13 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="Controller Configuration" type="AndroidRunConfigurationType" factoryName="Android App" activateToolWindowBeforeRun="false">
|
||||
<module name="Skyline.app" />
|
||||
<module name="skyline.app" />
|
||||
<option name="DEPLOY" value="true" />
|
||||
<option name="DEPLOY_APK_FROM_BUNDLE" value="false" />
|
||||
<option name="DEPLOY_AS_INSTANT" value="false" />
|
||||
<option name="ARTIFACT_NAME" value="" />
|
||||
<option name="PM_INSTALL_OPTIONS" value="" />
|
||||
<option name="ALL_USERS" value="false" />
|
||||
<option name="ALWAYS_INSTALL_WITH_PM" value="false" />
|
||||
<option name="DYNAMIC_FEATURES_DISABLED_LIST" value="" />
|
||||
<option name="ACTIVITY_EXTRA_FLAGS" value="" />
|
||||
<option name="MODE" value="specific_activity" />
|
||||
|
@ -1,12 +1,13 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="Setting" type="AndroidRunConfigurationType" factoryName="Android App" activateToolWindowBeforeRun="false">
|
||||
<module name="Skyline.app" />
|
||||
<module name="skyline.app" />
|
||||
<option name="DEPLOY" value="true" />
|
||||
<option name="DEPLOY_APK_FROM_BUNDLE" value="false" />
|
||||
<option name="DEPLOY_AS_INSTANT" value="false" />
|
||||
<option name="ARTIFACT_NAME" value="" />
|
||||
<option name="PM_INSTALL_OPTIONS" value="" />
|
||||
<option name="ALL_USERS" value="false" />
|
||||
<option name="ALWAYS_INSTALL_WITH_PM" value="false" />
|
||||
<option name="DYNAMIC_FEATURES_DISABLED_LIST" value="" />
|
||||
<option name="ACTIVITY_EXTRA_FLAGS" value="" />
|
||||
<option name="MODE" value="specific_activity" />
|
||||
|
@ -7,7 +7,6 @@
|
||||
<mapping directory="$PROJECT_DIR$/app/libraries/lz4" vcs="Git" />
|
||||
<mapping directory="$PROJECT_DIR$/app/libraries/oboe" vcs="Git" />
|
||||
<mapping directory="$PROJECT_DIR$/app/libraries/pugixml" vcs="Git" />
|
||||
<mapping directory="$PROJECT_DIR$/app/libraries/tinyxml2" vcs="Git" />
|
||||
<mapping directory="$PROJECT_DIR$/app/libraries/vkhpp" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
@ -166,5 +166,6 @@ add_library(skyline SHARED
|
||||
${source_DIR}/skyline/services/ssl/ISslContext.cpp
|
||||
${source_DIR}/skyline/services/prepo/IPrepoService.cpp
|
||||
)
|
||||
# target_precompile_headers(skyline PRIVATE ${source_DIR}/skyline/common.h) # PCH will currently break Intellisense
|
||||
target_link_libraries(skyline vulkan android fmt lz4_static oboe mbedtls::mbedcrypto)
|
||||
target_compile_options(skyline PRIVATE -Wall -Wno-unknown-attributes -Wno-c++20-extensions -Wno-c++17-extensions -Wno-c99-designator -Wno-reorder -Wno-missing-braces -Wno-unused-variable -Wno-unused-private-field)
|
||||
|
@ -20,7 +20,7 @@ android {
|
||||
}
|
||||
|
||||
/* JVM Bytecode Options */
|
||||
def javaVersion = JavaVersion.VERSION_11
|
||||
def javaVersion = JavaVersion.VERSION_1_8
|
||||
compileOptions {
|
||||
sourceCompatibility = javaVersion
|
||||
targetCompatibility = javaVersion
|
||||
@ -83,8 +83,8 @@ dependencies {
|
||||
/* Google */
|
||||
implementation 'androidx.appcompat:appcompat:1.2.0'
|
||||
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
|
||||
implementation 'androidx.preference:preference:1.1.1'
|
||||
implementation 'com.google.android.material:material:1.3.0-rc01'
|
||||
implementation 'androidx.preference:preference-ktx:1.1.1'
|
||||
implementation 'com.google.android.material:material:1.3.0'
|
||||
implementation 'androidx.documentfile:documentfile:1.0.1'
|
||||
|
||||
/* Kotlin */
|
||||
|
@ -12,7 +12,7 @@
|
||||
<application
|
||||
android:name=".SkylineApplication"
|
||||
android:allowBackup="true"
|
||||
android:extractNativeLibs="false"
|
||||
android:extractNativeLibs="true"
|
||||
android:fullBackupContent="@xml/backup_descriptor"
|
||||
android:icon="@drawable/logo_skyline"
|
||||
android:isGame="true"
|
||||
|
@ -32,7 +32,7 @@ extern "C" JNIEXPORT void Java_emu_skyline_EmulationActivity_executeApplication(
|
||||
close(preferenceFd);
|
||||
|
||||
auto appFilesPath{env->GetStringUTFChars(appFilesPathJstring, nullptr)};
|
||||
auto logger{std::make_shared<skyline::Logger>(std::string(appFilesPath) + "skyline.log", static_cast<skyline::Logger::LogLevel>(settings->logLevel))};
|
||||
auto logger{std::make_shared<skyline::Logger>(std::string(appFilesPath) + "skyline.log", settings->logLevel)};
|
||||
|
||||
auto start{std::chrono::steady_clock::now()};
|
||||
|
||||
|
@ -18,7 +18,7 @@ namespace skyline {
|
||||
std::tuple preferences{
|
||||
PREF_ELEM("operation_mode", operationMode, element.attribute("value").as_bool()),
|
||||
PREF_ELEM("username_value", username, element.text().as_string()),
|
||||
PREF_ELEM("log_level", logLevel, element.attribute("value").as_int()),
|
||||
PREF_ELEM("log_level", logLevel, static_cast<Logger::LogLevel>(element.text().as_uint(static_cast<unsigned int>(Logger::LogLevel::Info)))),
|
||||
};
|
||||
|
||||
std::bitset<std::tuple_size_v<typeof(preferences)>> preferencesSet{}; // A bitfield to keep track of all the preferences we've set
|
||||
|
@ -11,7 +11,7 @@ namespace skyline {
|
||||
*/
|
||||
class Settings {
|
||||
public:
|
||||
int logLevel; //!< The minimum level that logs need to be for them to be printed
|
||||
Logger::LogLevel logLevel; //!< The minimum level that logs need to be for them to be printed
|
||||
bool operationMode; //!< If the emulated Switch should be handheld or docked
|
||||
std::string username; //!< The name set by the user to be supplied to the guest
|
||||
|
||||
|
@ -1,13 +1,13 @@
|
||||
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
||||
|
||||
buildscript {
|
||||
ext.kotlin_version = '1.4.21'
|
||||
ext.kotlin_version = '1.4.30'
|
||||
repositories {
|
||||
google()
|
||||
jcenter()
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:7.0.0-alpha04'
|
||||
classpath 'com.android.tools.build:gradle:4.1.2'
|
||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
||||
|
||||
// NOTE: Do not place your application dependencies here; they belong
|
||||
|
@ -19,3 +19,5 @@ org.gradle.daemon=true
|
||||
android.useAndroidX=true
|
||||
# Automatically convert third-party libraries to use AndroidX
|
||||
android.enableJetifier=true
|
||||
# Android NDK verbose build output
|
||||
android.native.buildOutput=verbose
|
||||
|
4
gradle/wrapper/gradle-wrapper.properties
vendored
4
gradle/wrapper/gradle-wrapper.properties
vendored
@ -1,6 +1,6 @@
|
||||
#Thu Jan 21 04:22:50 IST 2021
|
||||
#Mon Feb 08 07:42:45 GMT 2021
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0-milestone-1-bin.zip
|
||||
distributionPath=wrapper/dists
|
||||
zipStorePath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
|
Loading…
Reference in New Issue
Block a user