Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
weihuoya committed Oct 18, 2019
1 parent 35690e3 commit 4abbad2
Show file tree
Hide file tree
Showing 368 changed files with 13,901 additions and 2,658 deletions.
12 changes: 5 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -209,11 +209,7 @@ if (ENABLE_FFMPEG)
endif()
endif()

if (ENABLE_FFMPEG_VIDEO_DUMPER)
find_package(FFmpeg REQUIRED COMPONENTS avcodec avformat avutil swscale swresample)
else()
find_package(FFmpeg REQUIRED COMPONENTS avcodec)
endif()
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).")
endif()
Expand Down Expand Up @@ -331,10 +327,12 @@ git_describe(GIT_DESC --always --long --dirty)
git_branch_name(GIT_BRANCH)
get_timestamp(BUILD_DATE)

enable_testing()
if(NOT ANDROID)
enable_testing()
add_subdirectory(dist/installer)
endif()
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
Expand Down
45 changes: 1 addition & 44 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,44 +1 @@
**BEFORE FILING AN ISSUE, READ THE RELEVANT SECTION IN THE [CONTRIBUTING](https://github.com/citra-emu/citra/wiki/Contributing#reporting-issues) FILE!!!**

Citra
==============
[![Travis CI Build Status](https://travis-ci.org/citra-emu/citra.svg?branch=master)](https://travis-ci.org/citra-emu/citra)
[![AppVeyor CI Build Status](https://ci.appveyor.com/api/projects/status/sdf1o4kh3g1e68m9?svg=true)](https://ci.appveyor.com/project/bunnei/citra)
[![Bitrise CI Build Status](https://app.bitrise.io/app/4ccd8e5720f0d13b/status.svg?token=H32TmbCwxb3OQ-M66KbAyw&branch=master)](https://app.bitrise.io/app/4ccd8e5720f0d13b)

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.

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](https://citra-emu.org/game).)

Citra is licensed under the GPLv2 (or any later version). Refer to the license.txt file included. Please read the [FAQ](https://citra-emu.org/wiki/faq/) before getting started with the project.

Check out our [website](https://citra-emu.org/)!

Need help? Check out our [asking for help](https://citra-emu.org/help/reference/asking/) guide.

For development discussion, please join us at #citra-dev on freenode.

### Development

Most of the development happens on GitHub. It's also where [our central repository](https://github.com/citra-emu/citra) is hosted.

If you want to contribute please take a look at the [Contributor's Guide](https://github.com/citra-emu/citra/wiki/Contributing) and [Developer Information](https://github.com/citra-emu/citra/wiki/Developer-Information). You should as well contact any of the developers in the forum in order to know about the current state of the emulator because the [TODO list](https://docs.google.com/document/d/1SWIop0uBI9IW8VGg97TAtoT_CHNoP42FzYmvG1F4QDA) isn't maintained anymore.

If you want to contribute to the user interface translation, please checkout [citra project on transifex](https://www.transifex.com/citra/citra). We centralize the translation work there, and periodically upstream translation.

### Building

* __Windows__: [Windows Build](https://github.com/citra-emu/citra/wiki/Building-For-Windows)
* __Linux__: [Linux Build](https://github.com/citra-emu/citra/wiki/Building-For-Linux)
* __macOS__: [macOS Build](https://github.com/citra-emu/citra/wiki/Building-for-macOS)


### Support
We happily accept monetary donations or donated games and hardware. Please see our [donations page](https://citra-emu.org/donate/) for more information on how you can contribute to Citra. Any donations received will go towards things like:
* 3DS consoles for developers to explore the hardware
* 3DS games for testing
* Any equipment required for homebrew
* Infrastructure setup
* Eventually 3D displays to get proper 3D output working

We also more than gladly accept used 3DS consoles, preferably ones with firmware 4.5 or lower! If you would like to give yours away, don't hesitate to join our IRC channel #citra on [Freenode](http://webchat.freenode.net/?channels=citra) and talk to neobrain or bunnei. Mind you, IRC is slow-paced, so it might be a while until people reply. If you're in a hurry you can just leave contact details in the channel or via private message and we'll get back to you.
Appreciate citra team's awesome work.
7 changes: 5 additions & 2 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,10 @@ add_subdirectory(video_core)
add_subdirectory(audio_core)
add_subdirectory(network)
add_subdirectory(input_common)
add_subdirectory(tests)

if(NOT ANDROID)
add_subdirectory(tests)
endif()

if (ENABLE_SDL2)
add_subdirectory(citra)
Expand All @@ -98,7 +101,7 @@ if (ENABLE_QT)
add_subdirectory(citra_qt)
endif()
if (ANDROID)
add_subdirectory(android/app/src/main/cpp)
add_subdirectory(android/jni)
else()
add_subdirectory(dedicated_room)
endif()
Expand Down
2 changes: 2 additions & 0 deletions src/android/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,5 @@
/build
/captures
.externalNativeBuild
app/release
app/.cxx
61 changes: 17 additions & 44 deletions src/android/app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
apply plugin: 'com.android.application'

android {
compileSdkVersion 26
buildToolsVersion '28.0.3'
compileSdkVersion 28

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
Expand All @@ -16,23 +15,19 @@ android {
}

defaultConfig {
applicationId "org.citra_emu"
minSdkVersion 21
targetSdkVersion 26

applicationId "org.citra.emu"
minSdkVersion 24
targetSdkVersion 28
versionCode(getBuildVersionCode())

versionName "${getVersion()}"
}

signingConfigs {
release {
if (project.hasProperty('keystore')) {
storeFile file(project.property('keystore'))
storePassword project.property('storepass')
keyAlias project.property('keyalias')
keyPassword project.property('keypass')
}
keyAlias 'dolphin-release-key'
keyPassword 'zhangwei'
storeFile file('D:/Android/android-sign-key/dolphin-release-key.jks')
storePassword 'zhangwei'
}
}

Expand All @@ -41,6 +36,9 @@ android {
// Signed by release key, allowing for upload to Play Store.
release {
signingConfig signingConfigs.release
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}

// Signed by debug key disallowing distribution on Play Store.
Expand All @@ -55,8 +53,8 @@ android {

externalNativeBuild {
cmake {
version getCmakeVersion()
path "../../../CMakeLists.txt"
version "3.10.2"
}
}

Expand All @@ -65,35 +63,26 @@ android {
cmake {
arguments "-DENABLE_QT=0", // Don't use QT
"-DENABLE_SDL2=0", // Don't use SDL
"-DENABLE_WEB_SERVICE=0", // Don't use web services
"-DANDROID_ARM_NEON=true", // cryptopp requires Neon to work
"-DENABLE_CUBEB=0",
"-DANDROID_STL=c++_shared"

"-DENABLE_CUBEB=1",
"-DANDROID_STL=c++_static",
"-DCMAKE_CXX_FLAGS_RELEASE=-Ofast"
abiFilters "arm64-v8a"

targets "citra-android"
}
}
}
}

ext {
androidSupportVersion = '26.1.0'
androidSupportVersion = '27.1.0'
}

dependencies {
implementation "com.android.support:support-v13:$androidSupportVersion"
implementation "com.android.support:cardview-v7:$androidSupportVersion"
implementation "com.android.support:recyclerview-v7:$androidSupportVersion"
implementation "com.android.support:design:$androidSupportVersion"

// Android TV UI libraries.
implementation "com.android.support:leanback-v17:$androidSupportVersion"

implementation 'com.android.support.constraint:constraint-layout:1.1.0'

testImplementation "com.android.support.test:runner:1.0.2"
androidTestImplementation "com.android.support.test:runner:1.0.1"
}

def getVersion() {
Expand Down Expand Up @@ -122,19 +111,3 @@ def getBuildVersionCode() {

return 0
}

def getCmakeVersion() {
try {
// Tokenized form of the output will be - ["cmake", "version", "M.m.p-rcx"], the version number
// will be at index 2
def version_string = 'cmake -version'.execute([], project.rootDir).text
.trim().tokenize()[2]

return version_string
}
catch(Exception e) {
logger.error('Cannot find Cmake, using default Cmake')
}

return null
}
3 changes: 3 additions & 0 deletions src/android/app/proguard-rules.pro
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,6 @@
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile

-keep class org.citra.emu.NativeLibrary { *; }
-keep class android.support.v7.app.** { *; }

This file was deleted.

58 changes: 48 additions & 10 deletions src/android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.citra_emu.citra">
<uses-feature
android:name="android.hardware.touchscreen"
android:required="false"/>
package="org.citra.emu">

<uses-feature
android:name="android.hardware.gamepad"
android:required="false"/>
<uses-feature android:name="android.hardware.touchscreen" android:required="false"/>
<uses-feature android:name="android.hardware.gamepad" android:required="false"/>

<uses-feature android:glEsVersion="0x00030001" />

<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>

<application
android:name="org.citra_emu.citra.CitraApplication"
android:name="org.citra.emu.CitraApplication"
android:label="Citra"
android:icon="@mipmap/ic_citra"
android:allowBackup="true"
Expand All @@ -23,7 +22,7 @@
android:banner="@mipmap/ic_citra">

<activity
android:name=".ui.main.MainActivity"
android:name=".ui.MainActivity"
android:theme="@style/CitraBase">

<!-- This intentfilter marks this Activity as the one that gets launched from Home screen. -->
Expand All @@ -34,6 +33,45 @@
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>

<activity
android:name=".ui.GameFilePickerActivity"
android:label="@string/app_name"
android:theme="@style/FilePickerTheme">
<intent-filter>
<action android:name="android.intent.action.GET_CONTENT" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>

<activity
android:name=".ui.EmulationActivity"
android:launchMode="singleTop"
android:theme="@style/CitraEmulationBase"/>

<activity
android:name=".settings.SettingsActivity"
android:launchMode="singleTop"
android:theme="@style/CitraSettingsBase"
android:label="@string/preferences_settings"/>

<activity
android:name=".ui.EditorActivity"
android:label="@string/app_name"
android:windowSoftInputMode="adjustUnspecified|stateHidden"
android:configChanges="orientation|keyboardHidden"
android:theme="@style/CitraBase"/>

<provider
android:name="android.support.v4.content.FileProvider"
android:authorities="${applicationId}.filesprovider"
android:exported="false"
android:grantUriPermissions="true">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/nnf_provider_paths" />
</provider>

</application>

</manifest>
Loading

0 comments on commit 4abbad2

Please sign in to comment.