Skip to content

Commit b482e8b

Browse files
committed
Removed Gecko test. Added support for window.open events. Added targetSdkVersion. Added easy options to force canvas and noaudio.
1 parent cb85165 commit b482e8b

File tree

10 files changed

+187
-266
lines changed

10 files changed

+187
-266
lines changed

.gitignore

Lines changed: 108 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11

2-
# Created by https://www.gitignore.io/api/android,androidstudio,java,intellij+all,jetbrains+all,linux,macos,windows
2+
# Created by https://www.gitignore.io/api/java,linux,macos,gradle,windows,android,intellij+all,jetbrains+all,androidstudio
3+
# Edit at https://www.gitignore.io/?templates=java,linux,macos,gradle,windows,android,intellij+all,jetbrains+all,androidstudio
34

45
### Android ###
56
# Built application files
67
*.apk
78
*.ap_
9+
*.aab
810

911
# Files for the ART/Dalvik VM
1012
*.dex
@@ -36,22 +38,39 @@ proguard/
3638
# Android Studio captures folder
3739
captures/
3840

39-
# Intellij
41+
# IntelliJ
4042
*.iml
4143
.idea/workspace.xml
4244
.idea/tasks.xml
4345
.idea/gradle.xml
46+
.idea/assetWizardSettings.xml
4447
.idea/dictionaries
4548
.idea/libraries
49+
.idea/caches
50+
51+
# Keystore files
52+
# Uncomment the following lines if you do not want to check your keystore files in.
53+
#*.jks
54+
#*.keystore
4655

4756
# External native build folder generated in Android Studio 2.2 and later
4857
.externalNativeBuild
4958

59+
# Google Services (e.g. APIs or Firebase)
60+
google-services.json
61+
5062
# Freeline
5163
freeline.py
5264
freeline/
5365
freeline_project_description.json
5466

67+
# fastlane
68+
fastlane/report.xml
69+
fastlane/Preview.html
70+
fastlane/screenshots
71+
fastlane/test_output
72+
fastlane/readme.md
73+
5574
### Android Patch ###
5675
gen-external-apklibs
5776

@@ -100,7 +119,9 @@ obj/
100119
/out/
101120

102121
# User-specific configurations
122+
.idea/caches/
103123
.idea/libraries/
124+
.idea/shelf/
104125
.idea/.name
105126
.idea/compiler.xml
106127
.idea/copyright/profiles_settings.xml
@@ -128,6 +149,8 @@ Thumbs.db
128149
# Legacy Eclipse project files
129150
.classpath
130151
.project
152+
.cproject
153+
.settings/
131154

132155
# Mobile Tools for Java (J2ME)
133156
.mtj.tmp/
@@ -161,35 +184,47 @@ fabric.properties
161184
!/gradle/wrapper/gradle-wrapper.jar
162185

163186
### Intellij+all ###
164-
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm
187+
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm
165188
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
166189

167-
# User-specific stuff:
190+
# User-specific stuff
168191
.idea/**/workspace.xml
169192
.idea/**/tasks.xml
193+
.idea/**/usage.statistics.xml
194+
.idea/**/dictionaries
195+
.idea/**/shelf
170196

171-
# Sensitive or high-churn files:
197+
# Generated files
198+
.idea/**/contentModel.xml
199+
200+
# Sensitive or high-churn files
172201
.idea/**/dataSources/
173202
.idea/**/dataSources.ids
174-
.idea/**/dataSources.xml
175203
.idea/**/dataSources.local.xml
176204
.idea/**/sqlDataSources.xml
177205
.idea/**/dynamic.xml
178206
.idea/**/uiDesigner.xml
207+
.idea/**/dbnavigator.xml
179208

180-
# Gradle:
209+
# Gradle
181210
.idea/**/gradle.xml
182211
.idea/**/libraries
183212

213+
# Gradle and Maven with auto-import
214+
# When using Gradle or Maven with auto-import, you should exclude module files,
215+
# since they will be recreated, and may cause churn. Uncomment if using
216+
# auto-import.
217+
# .idea/modules.xml
218+
# .idea/*.iml
219+
# .idea/modules
220+
184221
# CMake
185-
cmake-build-debug/
222+
cmake-build-*/
186223

187-
# Mongo Explorer plugin:
224+
# Mongo Explorer plugin
188225
.idea/**/mongoSettings.xml
189226

190-
## File-based project format:
191-
192-
## Plugin-specific files:
227+
# File-based project format
193228

194229
# IntelliJ
195230

@@ -202,12 +237,22 @@ cmake-build-debug/
202237

203238
# Crashlytics plugin (for Android Studio and IntelliJ)
204239

240+
# Editor-based Rest Client
241+
.idea/httpRequests
242+
243+
# Android studio 3.1+ serialized cache file
244+
.idea/caches/build_file_checksums.ser
245+
205246
### Intellij+all Patch ###
206-
# Ignores the whole idea folder
247+
# Ignores the whole .idea folder and all .iml files
207248
# See https://github.com/joeblau/gitignore.io/issues/186 and https://github.com/joeblau/gitignore.io/issues/360
208249

209250
.idea/
210251

252+
# Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-249601023
253+
254+
modules.xml
255+
211256
### Java ###
212257
# Compiled class file
213258

@@ -220,29 +265,38 @@ cmake-build-debug/
220265

221266
# Package Files #
222267
*.jar
268+
*.nar
223269
*.zip
224270
*.tar.gz
225271
*.rar
226272

227273
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
228274

229275
### JetBrains+all ###
230-
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm
276+
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm
231277
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
232278

233-
# User-specific stuff:
279+
# User-specific stuff
234280

235-
# Sensitive or high-churn files:
281+
# Generated files
236282

237-
# Gradle:
283+
# Sensitive or high-churn files
238284

239-
# CMake
285+
# Gradle
240286

241-
# Mongo Explorer plugin:
287+
# Gradle and Maven with auto-import
288+
# When using Gradle or Maven with auto-import, you should exclude module files,
289+
# since they will be recreated, and may cause churn. Uncomment if using
290+
# auto-import.
291+
# .idea/modules.xml
292+
# .idea/*.iml
293+
# .idea/modules
242294

243-
## File-based project format:
295+
# CMake
244296

245-
## Plugin-specific files:
297+
# Mongo Explorer plugin
298+
299+
# File-based project format
246300

247301
# IntelliJ
248302

@@ -254,11 +308,18 @@ cmake-build-debug/
254308

255309
# Crashlytics plugin (for Android Studio and IntelliJ)
256310

311+
# Editor-based Rest Client
312+
313+
# Android studio 3.1+ serialized cache file
314+
257315
### JetBrains+all Patch ###
258-
# Ignores the whole idea folder
316+
# Ignores the whole .idea folder and all .iml files
259317
# See https://github.com/joeblau/gitignore.io/issues/186 and https://github.com/joeblau/gitignore.io/issues/360
260318

261319

320+
# Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-249601023
321+
322+
262323
### Linux ###
263324

264325
# temporary files which can be created if a process still has a handle open of a deleted file
@@ -274,7 +335,7 @@ cmake-build-debug/
274335
.nfs*
275336

276337
### macOS ###
277-
*.DS_Store
338+
# General
278339
.AppleDouble
279340
.LSOverride
280341

@@ -301,19 +362,41 @@ Temporary Items
301362
# Windows thumbnail cache files
302363
ehthumbs_vista.db
303364

365+
# Dump file
366+
*.stackdump
367+
304368
# Folder config file
305-
Desktop.ini
369+
[Dd]esktop.ini
306370

307371
# Recycle Bin used on file shares
308372
$RECYCLE.BIN/
309373

310374
# Windows Installer files
311375
*.cab
312376
*.msi
377+
*.msix
313378
*.msm
314379
*.msp
315380

316381
# Windows shortcuts
317382
*.lnk
318383

319-
# End of https://www.gitignore.io/api/android,androidstudio,java,intellij+all,jetbrains+all,linux,macos,windows
384+
### Gradle ###
385+
/build/
386+
387+
# Ignore Gradle GUI config
388+
gradle-app.setting
389+
390+
# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)
391+
!gradle-wrapper.jar
392+
393+
# Cache of project
394+
.gradletasknamecache
395+
396+
# # Work around https://youtrack.jetbrains.com/issue/IDEA-116898
397+
# gradle/wrapper/gradle-wrapper.properties
398+
399+
### Gradle Patch ###
400+
**/build/
401+
402+
# End of https://www.gitignore.io/api/java,linux,macos,gradle,windows,android,intellij+all,jetbrains+all,androidstudio

app/build.gradle

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,11 @@ android {
2323
*/
2424
def BACK_BUTTON_QUITS = true // Use back button to quit the app?
2525
def SHOW_FPS = false // Display the FPS monitor?
26+
def FORCE_CANVAS = false // Disables fast WebGL rendering when available
27+
def FORCE_NO_AUDIO = false // Disables WebAudio
28+
def ANDROID_SDK = 28 // Android 9 "Pie" API 28
2629

27-
compileSdkVersion 28
30+
compileSdkVersion ANDROID_SDK
2831

2932
defaultConfig {
3033

@@ -34,12 +37,16 @@ android {
3437
applicationId "id.application.rpgmakermv" // Change this to your applicationId.
3538
versionCode 1 // Set this to a higher number for game updates.
3639
versionName "1.0" // This is the version that the player sees.
40+
41+
targetSdkVersion ANDROID_SDK
3742
}
3843

3944
buildTypes {
4045
buildTypes.each { buildType ->
4146
buildType.buildConfigField "boolean", "BACK_BUTTON_QUITS", String.valueOf(BACK_BUTTON_QUITS)
4247
buildType.buildConfigField "boolean", "SHOW_FPS", String.valueOf(SHOW_FPS)
48+
buildType.buildConfigField "boolean", "FORCE_CANVAS", String.valueOf(FORCE_CANVAS)
49+
buildType.buildConfigField "boolean", "FORCE_NO_AUDIO", String.valueOf(FORCE_NO_AUDIO)
4350
}
4451
}
4552

@@ -53,14 +60,6 @@ android {
5360
buildConfigField "boolean", "BOOTSTRAP_INTERFACE", "true"
5461
}
5562

56-
// WARNING: Gecko engine is currently not functional
57-
zz_geckoalpha {
58-
dimension "mv_android_client"
59-
minSdkVersion 26
60-
61-
buildConfigField "boolean", "BOOTSTRAP_INTERFACE", "false"
62-
}
63-
6463
// WARNING: As of February 2017 Crosswalk is no longer maintained https://crosswalk-project.org/blog/crosswalk-final-release.html
6564
zz_crosswalk {
6665
dimension "mv_android_client"
@@ -82,7 +81,5 @@ dependencies {
8281

8382
implementation 'com.android.support:appcompat-v7:28.0.0'
8483

85-
zz_geckoalphaImplementation 'org.mozilla.geckoview:geckoview-beta-armeabi-v7a:+'
86-
8784
zz_crosswalkImplementation 'org.xwalk:xwalk_core_library:23.53.589.4'
8885
}

app/src/main/java/systems/altimit/rpgmakermv/WebPlayerActivity.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -219,10 +219,12 @@ public void run() {
219219
@Override
220220
protected void onPrepare(boolean webgl, boolean webaudio, boolean showfps) {
221221
Context context = mPlayer.getContext();
222-
if (webgl) {
222+
if (webgl && !BuildConfig.FORCE_CANVAS) {
223223
mURIBuilder = appendQuery(mURIBuilder, context.getString(R.string.query_webgl));
224+
} else {
225+
mURIBuilder = appendQuery(mURIBuilder, context.getString(R.string.query_canvas));
224226
}
225-
if (!webaudio) {
227+
if (!webaudio || BuildConfig.FORCE_NO_AUDIO) {
226228
mURIBuilder = appendQuery(mURIBuilder, context.getString(R.string.query_noaudio));
227229
}
228230
if (showfps || BuildConfig.SHOW_FPS) {

app/src/main/res/values/values_internal.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
<string name="mv_project_index">//android_asset/www/index.html</string>
2020

2121
<string name="query_webgl">webgl</string>
22+
<string name="query_canvas">canvas</string>
2223
<string name="query_noaudio">noaudio</string>
2324
<string name="query_showfps">showfps</string>
2425

0 commit comments

Comments
 (0)