├── .gitignore ├── CONTRIBUTING.md ├── LICENSE ├── README.md ├── app ├── .gitignore ├── build.gradle └── src │ ├── main │ ├── AndroidManifest.xml │ ├── java │ │ └── systems │ │ │ └── altimit │ │ │ └── rpgmakermv │ │ │ ├── Player.java │ │ │ └── WebPlayerActivity.java │ └── res │ │ ├── mipmap-anydpi-v26 │ │ ├── app_icon.xml │ │ └── app_icon_round.xml │ │ ├── mipmap-hdpi │ │ ├── app_icon.png │ │ ├── app_icon_round.png │ │ └── icon_foreground.png │ │ ├── mipmap-mdpi │ │ ├── app_icon.png │ │ ├── app_icon_round.png │ │ └── icon_foreground.png │ │ ├── mipmap-xhdpi │ │ ├── app_icon.png │ │ ├── app_icon_round.png │ │ └── icon_foreground.png │ │ ├── mipmap-xxhdpi │ │ ├── app_icon.png │ │ ├── app_icon_round.png │ │ └── icon_foreground.png │ │ ├── mipmap-xxxhdpi │ │ ├── app_icon.png │ │ ├── app_icon_round.png │ │ └── icon_foreground.png │ │ ├── values │ │ ├── values.xml │ │ └── values_internal.xml │ │ └── xml │ │ └── app_backup.xml │ ├── webview │ └── java │ │ └── systems │ │ └── altimit │ │ └── rpgmakermv │ │ ├── PlayerHelper.java │ │ └── WebPlayerView.java │ └── zz_crosswalk │ └── java │ └── systems │ └── altimit │ └── rpgmakermv │ ├── PlayerHelper.java │ └── XWalkPlayerView.java ├── build.gradle ├── gradle.properties ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat └── settings.gradle /.gitignore: -------------------------------------------------------------------------------- 1 | 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 4 | 5 | ### Android ### 6 | # Built application files 7 | *.apk 8 | *.ap_ 9 | *.aab 10 | 11 | # Files for the ART/Dalvik VM 12 | *.dex 13 | 14 | # Java class files 15 | *.class 16 | 17 | # Generated files 18 | bin/ 19 | gen/ 20 | out/ 21 | 22 | # Gradle files 23 | .gradle/ 24 | build/ 25 | 26 | # Local configuration file (sdk path, etc) 27 | local.properties 28 | 29 | # Proguard folder generated by Eclipse 30 | proguard/ 31 | 32 | # Log Files 33 | *.log 34 | 35 | # Android Studio Navigation editor temp files 36 | .navigation/ 37 | 38 | # Android Studio captures folder 39 | captures/ 40 | 41 | # IntelliJ 42 | *.iml 43 | .idea/workspace.xml 44 | .idea/tasks.xml 45 | .idea/gradle.xml 46 | .idea/assetWizardSettings.xml 47 | .idea/dictionaries 48 | .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 55 | 56 | # External native build folder generated in Android Studio 2.2 and later 57 | .externalNativeBuild 58 | 59 | # Google Services (e.g. APIs or Firebase) 60 | google-services.json 61 | 62 | # Freeline 63 | freeline.py 64 | freeline/ 65 | freeline_project_description.json 66 | 67 | # fastlane 68 | fastlane/report.xml 69 | fastlane/Preview.html 70 | fastlane/screenshots 71 | fastlane/test_output 72 | fastlane/readme.md 73 | 74 | ### Android Patch ### 75 | gen-external-apklibs 76 | 77 | ### AndroidStudio ### 78 | # Covers files to be ignored for android development using Android Studio. 79 | 80 | # Built application files 81 | 82 | # Files for the ART/Dalvik VM 83 | 84 | # Java class files 85 | 86 | # Generated files 87 | 88 | # Gradle files 89 | .gradle 90 | 91 | # Signing files 92 | .signing/ 93 | 94 | # Local configuration file (sdk path, etc) 95 | 96 | # Proguard folder generated by Eclipse 97 | 98 | # Log Files 99 | 100 | # Android Studio 101 | /*/build/ 102 | /*/local.properties 103 | /*/out 104 | /*/*/build 105 | /*/*/production 106 | *.ipr 107 | *~ 108 | *.swp 109 | 110 | # Android Patch 111 | 112 | # External native build folder generated in Android Studio 2.2 and later 113 | 114 | # NDK 115 | obj/ 116 | 117 | # IntelliJ IDEA 118 | *.iws 119 | /out/ 120 | 121 | # User-specific configurations 122 | .idea/caches/ 123 | .idea/libraries/ 124 | .idea/shelf/ 125 | .idea/.name 126 | .idea/compiler.xml 127 | .idea/copyright/profiles_settings.xml 128 | .idea/encodings.xml 129 | .idea/misc.xml 130 | .idea/modules.xml 131 | .idea/scopes/scope_settings.xml 132 | .idea/vcs.xml 133 | .idea/jsLibraryMappings.xml 134 | .idea/datasources.xml 135 | .idea/dataSources.ids 136 | .idea/sqlDataSources.xml 137 | .idea/dynamic.xml 138 | .idea/uiDesigner.xml 139 | 140 | # OS-specific files 141 | .DS_Store 142 | .DS_Store? 143 | ._* 144 | .Spotlight-V100 145 | .Trashes 146 | ehthumbs.db 147 | Thumbs.db 148 | 149 | # Legacy Eclipse project files 150 | .classpath 151 | .project 152 | .cproject 153 | .settings/ 154 | 155 | # Mobile Tools for Java (J2ME) 156 | .mtj.tmp/ 157 | 158 | # Package Files # 159 | *.war 160 | *.ear 161 | 162 | # virtual machine crash logs (Reference: http://www.java.com/en/download/help/error_hotspot.xml) 163 | hs_err_pid* 164 | 165 | ## Plugin-specific files: 166 | 167 | # mpeltonen/sbt-idea plugin 168 | .idea_modules/ 169 | 170 | # JIRA plugin 171 | atlassian-ide-plugin.xml 172 | 173 | # Mongo Explorer plugin 174 | .idea/mongoSettings.xml 175 | 176 | # Crashlytics plugin (for Android Studio and IntelliJ) 177 | com_crashlytics_export_strings.xml 178 | crashlytics.properties 179 | crashlytics-build.properties 180 | fabric.properties 181 | 182 | ### AndroidStudio Patch ### 183 | 184 | !/gradle/wrapper/gradle-wrapper.jar 185 | 186 | ### Intellij+all ### 187 | # Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm 188 | # Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 189 | 190 | # User-specific stuff 191 | .idea/**/workspace.xml 192 | .idea/**/tasks.xml 193 | .idea/**/usage.statistics.xml 194 | .idea/**/dictionaries 195 | .idea/**/shelf 196 | 197 | # Generated files 198 | .idea/**/contentModel.xml 199 | 200 | # Sensitive or high-churn files 201 | .idea/**/dataSources/ 202 | .idea/**/dataSources.ids 203 | .idea/**/dataSources.local.xml 204 | .idea/**/sqlDataSources.xml 205 | .idea/**/dynamic.xml 206 | .idea/**/uiDesigner.xml 207 | .idea/**/dbnavigator.xml 208 | 209 | # Gradle 210 | .idea/**/gradle.xml 211 | .idea/**/libraries 212 | 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 | 221 | # CMake 222 | cmake-build-*/ 223 | 224 | # Mongo Explorer plugin 225 | .idea/**/mongoSettings.xml 226 | 227 | # File-based project format 228 | 229 | # IntelliJ 230 | 231 | # mpeltonen/sbt-idea plugin 232 | 233 | # JIRA plugin 234 | 235 | # Cursive Clojure plugin 236 | .idea/replstate.xml 237 | 238 | # Crashlytics plugin (for Android Studio and IntelliJ) 239 | 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 | 246 | ### Intellij+all Patch ### 247 | # Ignores the whole .idea folder and all .iml files 248 | # See https://github.com/joeblau/gitignore.io/issues/186 and https://github.com/joeblau/gitignore.io/issues/360 249 | 250 | .idea/ 251 | 252 | # Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-249601023 253 | 254 | modules.xml 255 | 256 | ### Java ### 257 | # Compiled class file 258 | 259 | # Log file 260 | 261 | # BlueJ files 262 | *.ctxt 263 | 264 | # Mobile Tools for Java (J2ME) 265 | 266 | # Package Files # 267 | *.jar 268 | *.nar 269 | *.zip 270 | *.tar.gz 271 | *.rar 272 | 273 | # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml 274 | 275 | ### JetBrains+all ### 276 | # Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm 277 | # Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 278 | 279 | # User-specific stuff 280 | 281 | # Generated files 282 | 283 | # Sensitive or high-churn files 284 | 285 | # Gradle 286 | 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 294 | 295 | # CMake 296 | 297 | # Mongo Explorer plugin 298 | 299 | # File-based project format 300 | 301 | # IntelliJ 302 | 303 | # mpeltonen/sbt-idea plugin 304 | 305 | # JIRA plugin 306 | 307 | # Cursive Clojure plugin 308 | 309 | # Crashlytics plugin (for Android Studio and IntelliJ) 310 | 311 | # Editor-based Rest Client 312 | 313 | # Android studio 3.1+ serialized cache file 314 | 315 | ### JetBrains+all Patch ### 316 | # Ignores the whole .idea folder and all .iml files 317 | # See https://github.com/joeblau/gitignore.io/issues/186 and https://github.com/joeblau/gitignore.io/issues/360 318 | 319 | 320 | # Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-249601023 321 | 322 | 323 | ### Linux ### 324 | 325 | # temporary files which can be created if a process still has a handle open of a deleted file 326 | .fuse_hidden* 327 | 328 | # KDE directory preferences 329 | .directory 330 | 331 | # Linux trash folder which might appear on any partition or disk 332 | .Trash-* 333 | 334 | # .nfs files are created when an open file is removed but is still being accessed 335 | .nfs* 336 | 337 | ### macOS ### 338 | # General 339 | .AppleDouble 340 | .LSOverride 341 | 342 | # Icon must end with two \r 343 | Icon 344 | 345 | # Thumbnails 346 | 347 | # Files that might appear in the root of a volume 348 | .DocumentRevisions-V100 349 | .fseventsd 350 | .TemporaryItems 351 | .VolumeIcon.icns 352 | .com.apple.timemachine.donotpresent 353 | 354 | # Directories potentially created on remote AFP share 355 | .AppleDB 356 | .AppleDesktop 357 | Network Trash Folder 358 | Temporary Items 359 | .apdisk 360 | 361 | ### Windows ### 362 | # Windows thumbnail cache files 363 | ehthumbs_vista.db 364 | 365 | # Dump file 366 | *.stackdump 367 | 368 | # Folder config file 369 | [Dd]esktop.ini 370 | 371 | # Recycle Bin used on file shares 372 | $RECYCLE.BIN/ 373 | 374 | # Windows Installer files 375 | *.cab 376 | *.msi 377 | *.msix 378 | *.msm 379 | *.msp 380 | 381 | # Windows shortcuts 382 | *.lnk 383 | 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 -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | ## Copyright 2 | 3 | Copyright is held under the name "Altimit Community Contributors". Altimit Community Contributors includes Altimit Systems LTD and all accepted Pull requests to the **AltimitSystems/mv-android-client/master** branch. 4 | 5 | ## Pull requests 6 | 7 | To make the review process simple and to help with understanding the nature of your changes please adhere to the following guidelines: 8 | 9 | - Work on the latest possible state of the **AltimitSystems/mv-android-client/master** branch. 10 | - Create a branch dedicated to your change and named appropriately. 11 | - Keep compatibility with the target version of Android that the master branch uses. 12 | - Keep bug fixes and features as separate branches. 13 | - Explain changes in detail and be prepared to answer questions and further concerns. 14 | 15 | ## Coding style 16 | 17 | Coding style is based on the [Google Java Style Guide](https://google.github.io/styleguide/javaguide.html) with modifications. 18 | 19 | - Parameter names (class member variables) must be prefixed with the Latin small letter **m** (U+006D). 20 | - Usage of finalize is permissible for the case of singleton destruction. -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "{}" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright {yyyy} {name of copyright owner} 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ![Game.apk](app/src/main/res/mipmap-xxxhdpi/app_icon.png) 2 | [![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=H55F9KTF8JWBS) 3 | 4 | ## What is the MV Android Client 5 | 6 | The MV Android Client is a runtime client for the [Android™ operating system](https://www.android.com) intended to play games created with the [RPG Maker MV](http://www.rpgmakerweb.com) game development tool-kit. 7 | 8 | This client can be used to deploy your game as an Android APK package for distribution. 9 | 10 | ## How to get MV Android Client 11 | 12 | The latest (master branch) of the client can be downloaded via this URL: 13 | https://github.com/AltimitSystems/mv-android-client/zipball/master 14 | 15 | ## Tutorial & Usage Support 16 | 17 | A tutorial is hosted at HBGames.org at the following URL: 18 | [hbgames.org/forums/viewtopic.php?f=48&t=79391](http://www.hbgames.org/forums/viewtopic.php?f=48&t=79391) 19 | 20 | Usage support is provided with this tutorial. 21 | 22 | You are free to provide a translation of this tutorial with the condition that you link back to this repository and the original English translation hosted at HBGames.org. 23 | 24 | ## Bugs, issues and enhancements 25 | 26 | Please create reports for bugs related to the project at [GitHub issues](https://github.com/AltimitSystems/mv-android-client/issues) 27 | Suggestions and other forms of feedback and concerns can either be posted as a GitHub issue or in the HBGames.org tutorial thread. 28 | 29 | ## License 30 | 31 | The MV Android Client is under the [Apache License 2.0](https://github.com/AltimitSystems/mv-android-client/blob/master/LICENSE). 32 | 33 | ## Contributing 34 | 35 | Please read the [contributing guide](https://github.com/AltimitSystems/mv-android-client/blob/master/CONTRIBUTING.md) and send pull requests to [https://github.com/AltimitSystems/mv-android-client](https://github.com/AltimitSystems/mv-android-client). 36 | -------------------------------------------------------------------------------- /app/.gitignore: -------------------------------------------------------------------------------- 1 | 2 | ### MV Android Client ### 3 | # MV Project path 4 | /src/main/assets/ 5 | 6 | # Build folder 7 | /build 8 | -------------------------------------------------------------------------------- /app/build.gradle: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017-2019 Altimit Community Contributors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or imp 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | apply plugin: 'com.android.application' 18 | 19 | android { 20 | 21 | /** 22 | * Advanced Configuration 23 | */ 24 | def BACK_BUTTON_QUITS = true // Use back button to quit the app? 25 | 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 | 29 | // Android 9+ "Q" API 29 30 | def ANDROID_SDK_TARGET = 29 31 | 32 | defaultConfig { 33 | 34 | /** 35 | * Project Identification 36 | */ 37 | applicationId "id.application.rpgmakermv" // Change this to your applicationId. 38 | versionCode 1 // Set this to a higher number for game updates. 39 | versionName "1.0" // This is the version that the player sees. 40 | 41 | compileSdkVersion ANDROID_SDK_TARGET 42 | targetSdkVersion ANDROID_SDK_TARGET 43 | } 44 | 45 | buildTypes { 46 | buildTypes.each { buildType -> 47 | buildType.buildConfigField "boolean", "BACK_BUTTON_QUITS", String.valueOf(BACK_BUTTON_QUITS) 48 | buildType.buildConfigField "boolean", "SHOW_FPS", String.valueOf(SHOW_FPS) 49 | buildType.buildConfigField "boolean", "FORCE_CANVAS", String.valueOf(FORCE_CANVAS) 50 | buildType.buildConfigField "boolean", "FORCE_NO_AUDIO", String.valueOf(FORCE_NO_AUDIO) 51 | } 52 | } 53 | 54 | flavorDimensions "mv_android_client" 55 | 56 | productFlavors { 57 | webview { 58 | dimension "mv_android_client" 59 | minSdkVersion 14 60 | 61 | buildConfigField "boolean", "BOOTSTRAP_INTERFACE", "true" 62 | } 63 | 64 | // WARNING: As of February 2017 Crosswalk is no longer maintained https://crosswalk-project.org/blog/crosswalk-final-release.html 65 | zz_crosswalk { 66 | dimension "mv_android_client" 67 | minSdkVersion 16 68 | 69 | buildConfigField "boolean", "BOOTSTRAP_INTERFACE", "true" 70 | } 71 | } 72 | } 73 | 74 | dependencies { 75 | implementation fileTree(include: ['*.jar'], dir: 'libs') 76 | implementation 'androidx.appcompat:appcompat:1.0.2' 77 | 78 | zz_crosswalkImplementation 'org.xwalk:xwalk_core_library:23.53.589.4' 79 | } -------------------------------------------------------------------------------- /app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 19 | 20 | 27 | 28 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 45 | 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /app/src/main/java/systems/altimit/rpgmakermv/Player.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017-2019 Altimit Community Contributors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or imp 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package systems.altimit.rpgmakermv; 18 | 19 | import android.content.Context; 20 | import android.view.View; 21 | 22 | /** 23 | * Created by felixjones on 12/05/2017. 24 | */ 25 | public interface Player { 26 | 27 | void setKeepScreenOn(); 28 | View getView(); 29 | void loadUrl(String url); 30 | void addJavascriptInterface(Object object, String name); 31 | Context getContext(); 32 | void loadData(String data); 33 | void evaluateJavascript(String script); 34 | void post(Runnable runnable); 35 | void removeJavascriptInterface(String name); 36 | void pauseTimers(); 37 | void onHide(); 38 | void resumeTimers(); 39 | void onShow(); 40 | void onDestroy(); 41 | 42 | } -------------------------------------------------------------------------------- /app/src/main/java/systems/altimit/rpgmakermv/WebPlayerActivity.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017-2019 Altimit Community Contributors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or imp 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package systems.altimit.rpgmakermv; 18 | 19 | import android.annotation.SuppressLint; 20 | import android.app.Activity; 21 | import android.content.Context; 22 | import android.content.DialogInterface; 23 | import android.net.Uri; 24 | import android.os.Build; 25 | import android.os.Bundle; 26 | import androidx.appcompat.app.AlertDialog; 27 | import android.util.Base64; 28 | import android.view.View; 29 | 30 | import java.io.File; 31 | import java.nio.charset.Charset; 32 | 33 | /** 34 | * Created by felixjones on 28/04/2017. 35 | */ 36 | public class WebPlayerActivity extends Activity { 37 | 38 | private static final String TOUCH_INPUT_ON_CANCEL = "TouchInput._onCancel();"; 39 | 40 | private Player mPlayer; 41 | private AlertDialog mQuitDialog; 42 | private int mSystemUiVisibility; 43 | 44 | @SuppressLint("ObsoleteSdkInt") 45 | @Override 46 | protected void onCreate(Bundle savedInstanceState) { 47 | super.onCreate(savedInstanceState); 48 | if (BuildConfig.BACK_BUTTON_QUITS) { 49 | createQuitDialog(); 50 | } 51 | 52 | mSystemUiVisibility = View.SYSTEM_UI_FLAG_HIDE_NAVIGATION; 53 | 54 | if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) { 55 | mSystemUiVisibility |= View.SYSTEM_UI_FLAG_FULLSCREEN; 56 | mSystemUiVisibility |= View.SYSTEM_UI_FLAG_LAYOUT_STABLE; 57 | mSystemUiVisibility |= View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION; 58 | mSystemUiVisibility |= View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN; 59 | 60 | if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) { 61 | mSystemUiVisibility |= View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY; 62 | } 63 | } 64 | 65 | mPlayer = PlayerHelper.create(this); 66 | 67 | mPlayer.setKeepScreenOn(); 68 | 69 | setContentView(mPlayer.getView()); 70 | 71 | if (!addBootstrapInterface(mPlayer)) { 72 | Uri.Builder projectURIBuilder = Uri.fromFile(new File(getString(R.string.mv_project_index))).buildUpon(); 73 | Bootstrapper.appendQuery(projectURIBuilder, getString(R.string.query_noaudio)); 74 | if (BuildConfig.SHOW_FPS) { 75 | Bootstrapper.appendQuery(projectURIBuilder, getString(R.string.query_showfps)); 76 | } 77 | mPlayer.loadUrl(projectURIBuilder.build().toString()); 78 | } 79 | } 80 | 81 | @Override 82 | public void onBackPressed() { 83 | if (BuildConfig.BACK_BUTTON_QUITS) { 84 | if (mQuitDialog != null) { 85 | mQuitDialog.show(); 86 | } else { 87 | super.onBackPressed(); 88 | } 89 | } else { 90 | mPlayer.evaluateJavascript(TOUCH_INPUT_ON_CANCEL); 91 | } 92 | } 93 | 94 | @Override 95 | protected void onStart() { 96 | super.onStart(); 97 | } 98 | 99 | @Override 100 | protected void onStop() { 101 | super.onStop(); 102 | } 103 | 104 | @Override 105 | protected void onPause() { 106 | mPlayer.pauseTimers(); 107 | mPlayer.onHide(); 108 | 109 | super.onPause(); 110 | } 111 | 112 | @Override 113 | protected void onResume() { 114 | super.onResume(); 115 | getWindow().getDecorView().setSystemUiVisibility(mSystemUiVisibility); 116 | if (mPlayer != null) { 117 | mPlayer.resumeTimers(); 118 | mPlayer.onShow(); 119 | } 120 | } 121 | 122 | @Override 123 | protected void onDestroy() { 124 | super.onDestroy(); 125 | mPlayer.onDestroy(); 126 | } 127 | 128 | @Override 129 | protected void onRestart() { 130 | super.onRestart(); 131 | } 132 | 133 | private void createQuitDialog() { 134 | String appName = getString(R.string.app_name); 135 | String[] quitLines = getResources().getStringArray(R.array.quit_message); 136 | StringBuilder quitMessage = new StringBuilder(); 137 | for (int ii = 0; ii < quitLines.length; ii++) { 138 | quitMessage.append(quitLines[ii].replace("$1", appName)); 139 | if (ii < quitLines.length - 1) { 140 | quitMessage.append("\n"); 141 | } 142 | } 143 | 144 | if (quitMessage.length() > 0) { 145 | mQuitDialog = new AlertDialog.Builder(this) 146 | .setPositiveButton("Cancel", new DialogInterface.OnClickListener() { 147 | @Override 148 | public void onClick(DialogInterface dialog, int which) { 149 | dialog.dismiss(); 150 | } 151 | }) 152 | .setOnDismissListener(new DialogInterface.OnDismissListener() { 153 | @Override 154 | public void onDismiss(DialogInterface dialog) { 155 | getWindow().getDecorView().setSystemUiVisibility(mSystemUiVisibility); 156 | } 157 | }) 158 | .setNegativeButton("Quit", new DialogInterface.OnClickListener() { 159 | @Override 160 | public void onClick(DialogInterface dialog, int which) { 161 | WebPlayerActivity.super.onBackPressed(); 162 | } 163 | }) 164 | .setMessage(quitMessage.toString()) 165 | .create(); 166 | } 167 | } 168 | 169 | @SuppressLint("ObsoleteSdkInt") 170 | private static boolean addBootstrapInterface(Player player) { 171 | if (BuildConfig.BOOTSTRAP_INTERFACE && Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) { 172 | new Bootstrapper(player); 173 | return true; 174 | } 175 | return false; 176 | } 177 | 178 | /** 179 | * 180 | */ 181 | private static final class Bootstrapper extends PlayerHelper.Interface implements Runnable { 182 | 183 | private static Uri.Builder appendQuery(Uri.Builder builder, String query) { 184 | Uri current = builder.build(); 185 | String oldQuery = current.getEncodedQuery(); 186 | if (oldQuery != null && oldQuery.length() > 0) { 187 | query = oldQuery + "&" + query; 188 | } 189 | return builder.encodedQuery(query); 190 | } 191 | 192 | private static final String INTERFACE = "boot"; 193 | private static final String PREPARE_FUNC = "prepare( webgl(), webaudio(), false )"; 194 | 195 | private Player mPlayer; 196 | private Uri.Builder mURIBuilder; 197 | 198 | private Bootstrapper(Player player) { 199 | Context context = player.getContext(); 200 | player.addJavascriptInterface(this, Bootstrapper.INTERFACE); 201 | 202 | mPlayer = player; 203 | mURIBuilder = Uri.fromFile(new File(context.getString(R.string.mv_project_index))).buildUpon(); 204 | mPlayer.loadData(context.getString(R.string.webview_default_page)); 205 | } 206 | 207 | @Override 208 | protected void onStart() { 209 | Context context = mPlayer.getContext(); 210 | final String code = new String(Base64.decode(context.getString(R.string.webview_detection_source), Base64.DEFAULT), Charset.forName("UTF-8")) + INTERFACE + "." + PREPARE_FUNC + ";"; 211 | mPlayer.post(new Runnable() { 212 | @Override 213 | public void run() { 214 | mPlayer.evaluateJavascript(code); 215 | } 216 | }); 217 | } 218 | 219 | @Override 220 | protected void onPrepare(boolean webgl, boolean webaudio, boolean showfps) { 221 | Context context = mPlayer.getContext(); 222 | if (webgl && !BuildConfig.FORCE_CANVAS) { 223 | mURIBuilder = appendQuery(mURIBuilder, context.getString(R.string.query_webgl)); 224 | } else { 225 | mURIBuilder = appendQuery(mURIBuilder, context.getString(R.string.query_canvas)); 226 | } 227 | if (!webaudio || BuildConfig.FORCE_NO_AUDIO) { 228 | mURIBuilder = appendQuery(mURIBuilder, context.getString(R.string.query_noaudio)); 229 | } 230 | if (showfps || BuildConfig.SHOW_FPS) { 231 | mURIBuilder = appendQuery(mURIBuilder, context.getString(R.string.query_showfps)); 232 | } 233 | mPlayer.post(this); 234 | } 235 | 236 | @Override 237 | public void run() { 238 | mPlayer.removeJavascriptInterface(INTERFACE); 239 | mPlayer.loadUrl(mURIBuilder.build().toString()); 240 | } 241 | 242 | } 243 | 244 | } -------------------------------------------------------------------------------- /app/src/main/res/mipmap-anydpi-v26/app_icon.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-anydpi-v26/app_icon_round.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/app_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AltimitSystems/mv-android-client/6b33d6fe70288de4492525cd0fbcac8b4f3e8bf1/app/src/main/res/mipmap-hdpi/app_icon.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/app_icon_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AltimitSystems/mv-android-client/6b33d6fe70288de4492525cd0fbcac8b4f3e8bf1/app/src/main/res/mipmap-hdpi/app_icon_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/icon_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AltimitSystems/mv-android-client/6b33d6fe70288de4492525cd0fbcac8b4f3e8bf1/app/src/main/res/mipmap-hdpi/icon_foreground.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/app_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AltimitSystems/mv-android-client/6b33d6fe70288de4492525cd0fbcac8b4f3e8bf1/app/src/main/res/mipmap-mdpi/app_icon.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/app_icon_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AltimitSystems/mv-android-client/6b33d6fe70288de4492525cd0fbcac8b4f3e8bf1/app/src/main/res/mipmap-mdpi/app_icon_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/icon_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AltimitSystems/mv-android-client/6b33d6fe70288de4492525cd0fbcac8b4f3e8bf1/app/src/main/res/mipmap-mdpi/icon_foreground.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/app_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AltimitSystems/mv-android-client/6b33d6fe70288de4492525cd0fbcac8b4f3e8bf1/app/src/main/res/mipmap-xhdpi/app_icon.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/app_icon_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AltimitSystems/mv-android-client/6b33d6fe70288de4492525cd0fbcac8b4f3e8bf1/app/src/main/res/mipmap-xhdpi/app_icon_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/icon_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AltimitSystems/mv-android-client/6b33d6fe70288de4492525cd0fbcac8b4f3e8bf1/app/src/main/res/mipmap-xhdpi/icon_foreground.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/app_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AltimitSystems/mv-android-client/6b33d6fe70288de4492525cd0fbcac8b4f3e8bf1/app/src/main/res/mipmap-xxhdpi/app_icon.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/app_icon_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AltimitSystems/mv-android-client/6b33d6fe70288de4492525cd0fbcac8b4f3e8bf1/app/src/main/res/mipmap-xxhdpi/app_icon_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/icon_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AltimitSystems/mv-android-client/6b33d6fe70288de4492525cd0fbcac8b4f3e8bf1/app/src/main/res/mipmap-xxhdpi/icon_foreground.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/app_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AltimitSystems/mv-android-client/6b33d6fe70288de4492525cd0fbcac8b4f3e8bf1/app/src/main/res/mipmap-xxxhdpi/app_icon.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/app_icon_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AltimitSystems/mv-android-client/6b33d6fe70288de4492525cd0fbcac8b4f3e8bf1/app/src/main/res/mipmap-xxxhdpi/app_icon_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/icon_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AltimitSystems/mv-android-client/6b33d6fe70288de4492525cd0fbcac8b4f3e8bf1/app/src/main/res/mipmap-xxxhdpi/icon_foreground.png -------------------------------------------------------------------------------- /app/src/main/res/values/values.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | 20 | #424242 21 | #212121 22 | #009688 23 | 24 | 25 | #FFF 26 | 27 | 28 | RPG Maker MV 29 | 30 | 31 | https 32 | altimit.systems 33 | 34 | 35 | 36 | 37 | Do you wish to quit $1? 38 | Any unsaved progress will be lost. 39 | 40 | 41 | -------------------------------------------------------------------------------- /app/src/main/res/values/values_internal.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | //android_asset/www/index.html 20 | 21 | webgl 22 | canvas 23 | noaudio 24 | showfps 25 | 26 | 27 | dmFyIHdlYmdsPWZ1bmN0aW9uKCl7dHJ5e3ZhciBlPWRvY3VtZW50LmNyZWF0ZUVsZW1lbnQoImNhbnZhcyIpO3JldHVy 28 | biEoIWUuZ2V0Q29udGV4dCgid2ViZ2wiKSYmIWUuZ2V0Q29udGV4dCgiZXhwZXJpbWVudGFsLXdlYmdsIikpfWNhdGNo 29 | KGUpe3JldHVybiBjb25zb2xlLmxvZyhlKSwhMX19LHdlYmF1ZGlvPWZ1bmN0aW9uKCl7dHJ5e3ZhciBlPW51bGw7cmV0 30 | dXJuInVuZGVmaW5lZCIhPXR5cGVvZiBBdWRpb0NvbnRleHQ/ZT1uZXcgQXVkaW9Db250ZXh0OiJ1bmRlZmluZWQiIT10 31 | eXBlb2Ygd2Via2l0QXVkaW9Db250ZXh0JiYoZT1uZXcgd2Via2l0QXVkaW9Db250ZXh0KSwhIWV9Y2F0Y2goZSl7cmV0 32 | dXJuIGNvbnNvbGUubG9nKGUpLCExfX07 33 | 34 | 35 | 36 | PCFET0NUWVBFIGh0bWw+CjxodG1sPgo8aGVhZD4KPG1ldGEgY2hhcnNldD1VVEYtOD4KPHN0eWxlPmJvZHl7YmFja2dy 37 | b3VuZC1jb2xvcjpibGFja30jY29weXJpZ2h0e3Bvc2l0aW9uOmZpeGVkO2JvdHRvbTowO3JpZ2h0OjA7Y29sb3I6d2hp 38 | dGU7Zm9udC1mYW1pbHk6Q29uc29sYXMsTW9uYWNvLEx1Y2lkYSBDb25zb2xlLExpYmVyYXRpb24gTW9ubyxEZWphVnUg 39 | U2FucyBNb25vLEJpdHN0cmVhbSBWZXJhIFNhbnMgTW9ubyxDb3VyaWVyIE5ldyxtb25vc3BhY2V9PC9zdHlsZT4KPC9o 40 | ZWFkPgo8Ym9keSBvbmxvYWQ9Ym9vdC5zdGFydCgpPgo8ZGl2IGlkPWNvcHlyaWdodD4mIzE2OTsgJiM5MjM7TFRJTUlU 41 | IENPTU1VTklUWSBDT05UUklCVVRPUlM8L2Rpdj4KPC9ib2R5Pgo8L2h0bWw+ 42 | 43 | 44 | 49 | 50 | -------------------------------------------------------------------------------- /app/src/main/res/xml/app_backup.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /app/src/webview/java/systems/altimit/rpgmakermv/PlayerHelper.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017-2019 Altimit Community Contributors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or imp 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package systems.altimit.rpgmakermv; 18 | 19 | import android.content.Context; 20 | import android.webkit.JavascriptInterface; 21 | 22 | /** 23 | * Created by felixjones on 12/05/2017. 24 | */ 25 | public class PlayerHelper { 26 | 27 | public static Player create(Context context) { 28 | return new WebPlayerView(context).getPlayer(); 29 | } 30 | 31 | /** 32 | * 33 | */ 34 | public static abstract class Interface { 35 | 36 | protected abstract void onStart(); 37 | protected abstract void onPrepare(boolean webgl, boolean webaudio, boolean showfps); 38 | 39 | @JavascriptInterface 40 | public void start() { 41 | onStart(); 42 | } 43 | 44 | @JavascriptInterface 45 | public void prepare(boolean webgl, boolean webaudio, boolean showfps) { 46 | onPrepare(webgl, webaudio, showfps); 47 | } 48 | 49 | } 50 | 51 | } -------------------------------------------------------------------------------- /app/src/webview/java/systems/altimit/rpgmakermv/WebPlayerView.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017-2019 Altimit Community Contributors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or imp 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package systems.altimit.rpgmakermv; 18 | 19 | import android.annotation.SuppressLint; 20 | import android.annotation.TargetApi; 21 | import android.content.Context; 22 | import android.content.Intent; 23 | import android.graphics.Bitmap; 24 | import android.graphics.Color; 25 | import android.net.Uri; 26 | import android.os.Build; 27 | import android.os.Message; 28 | import android.util.AttributeSet; 29 | import android.view.View; 30 | import android.webkit.ConsoleMessage; 31 | import android.webkit.WebChromeClient; 32 | import android.webkit.WebResourceError; 33 | import android.webkit.WebResourceRequest; 34 | import android.webkit.WebSettings; 35 | import android.webkit.WebView; 36 | import android.webkit.WebViewClient; 37 | 38 | /** 39 | * Created by felixjones on 28/04/2017. 40 | */ 41 | public class WebPlayerView extends WebView { 42 | 43 | private WebPlayer mPlayer; 44 | 45 | public WebPlayerView(Context context) { 46 | super(context); 47 | init(context); 48 | } 49 | 50 | public WebPlayerView(Context context, AttributeSet attrs) { 51 | super(context, attrs); 52 | init(context); 53 | } 54 | 55 | public WebPlayerView(Context context, AttributeSet attrs, int defStyleAttr) { 56 | super(context, attrs, defStyleAttr); 57 | init(context); 58 | } 59 | 60 | @TargetApi(Build.VERSION_CODES.LOLLIPOP) 61 | public WebPlayerView(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) { 62 | super(context, attrs, defStyleAttr, defStyleRes); 63 | init(context); 64 | } 65 | 66 | private void init(Context context) { 67 | mPlayer = new WebPlayer(this); 68 | 69 | setBackgroundColor(Color.BLACK); 70 | 71 | enableJavascript(); 72 | 73 | WebSettings webSettings = getSettings(); 74 | webSettings.setAllowContentAccess(true); 75 | webSettings.setAllowFileAccess(true); 76 | webSettings.setAppCacheEnabled(true); 77 | webSettings.setDatabaseEnabled(true); 78 | webSettings.setDatabasePath(context.getDir("database", Context.MODE_PRIVATE).getPath()); 79 | webSettings.setDomStorageEnabled(true); 80 | webSettings.setLoadsImagesAutomatically(true); 81 | webSettings.setSupportMultipleWindows(true); 82 | 83 | if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) { 84 | webSettings.setAllowFileAccessFromFileURLs(true); 85 | webSettings.setAllowUniversalAccessFromFileURLs(true); 86 | 87 | if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) { 88 | webSettings.setMediaPlaybackRequiresUserGesture(false); 89 | } 90 | } 91 | 92 | if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN_MR2) { 93 | webSettings.setRenderPriority(WebSettings.RenderPriority.HIGH); 94 | } 95 | 96 | setWebChromeClient(new ChromeClient()); 97 | setWebViewClient(new ViewClient()); 98 | } 99 | 100 | @SuppressLint("SetJavaScriptEnabled") 101 | private void enableJavascript() { 102 | WebSettings webSettings = getSettings(); 103 | webSettings.setJavaScriptCanOpenWindowsAutomatically(true); 104 | webSettings.setJavaScriptEnabled(true); 105 | } 106 | 107 | @Override 108 | public boolean overScrollBy(int deltaX, int deltaY, int scrollX, int scrollY, int scrollRangeX, int scrollRangeY, int maxOverScrollX, int maxOverScrollY, boolean isTouchEvent) { 109 | return false; 110 | } 111 | 112 | @Override 113 | public void scrollTo(int x, int y) {} 114 | 115 | @Override 116 | public void computeScroll() {} 117 | 118 | public Player getPlayer() { 119 | return mPlayer; 120 | } 121 | 122 | /** 123 | * 124 | */ 125 | private class ChromeClient extends WebChromeClient { 126 | 127 | @Override 128 | public boolean onConsoleMessage(ConsoleMessage consoleMessage){ 129 | if ("Scripts may close only the windows that were opened by it.".equals(consoleMessage.message())) { 130 | if (mPlayer.getContext() instanceof WebPlayerActivity) { 131 | ((WebPlayerActivity) mPlayer.getContext()).finish(); 132 | } 133 | } 134 | return super.onConsoleMessage(consoleMessage); 135 | } 136 | 137 | @Override 138 | public boolean onCreateWindow(WebView view, boolean isDialog, boolean isUserGesture, Message resultMsg) { 139 | WebView dumbWV = new WebView(view.getContext()); 140 | dumbWV.setWebViewClient(new WebViewClient() { 141 | @Override 142 | public void onPageStarted(WebView view, String url, Bitmap favicon) { 143 | Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(url)); 144 | view.getContext().startActivity(browserIntent); 145 | } 146 | }); 147 | ((WebView.WebViewTransport) resultMsg.obj).setWebView(dumbWV); 148 | resultMsg.sendToTarget(); 149 | return true; 150 | } 151 | 152 | } 153 | 154 | /** 155 | * 156 | */ 157 | private class ViewClient extends WebViewClient { 158 | 159 | @Override 160 | @TargetApi(Build.VERSION_CODES.M) 161 | public void onReceivedError(WebView view, WebResourceRequest request, WebResourceError error) { 162 | super.onReceivedError(view, request, error); 163 | view.setBackgroundColor(Color.WHITE); 164 | } 165 | 166 | @SuppressWarnings("deprecation") 167 | public void onReceivedError(WebView view, int errorCode, String description, String failingUrl) { 168 | super.onReceivedError(view, errorCode, description, failingUrl); 169 | view.setBackgroundColor(Color.WHITE); 170 | } 171 | 172 | } 173 | 174 | /** 175 | * 176 | */ 177 | private static final class WebPlayer implements Player { 178 | 179 | private WebPlayerView mWebView; 180 | 181 | private WebPlayer(WebPlayerView webView) { 182 | mWebView = webView; 183 | } 184 | 185 | @Override 186 | public void setKeepScreenOn() { 187 | mWebView.setKeepScreenOn(true); 188 | } 189 | 190 | @Override 191 | public View getView() { 192 | return mWebView; 193 | } 194 | 195 | @Override 196 | public void loadUrl(String url) { 197 | mWebView.loadUrl(url); 198 | } 199 | 200 | @Override 201 | @SuppressLint({"JavascriptInterface", "AddJavascriptInterface"}) 202 | public void addJavascriptInterface(Object object, String name) { 203 | mWebView.addJavascriptInterface(object, name); 204 | } 205 | 206 | @Override 207 | public Context getContext() { 208 | return mWebView.getContext(); 209 | } 210 | 211 | @Override 212 | public void loadData(String data) { 213 | mWebView.loadData(data, "text/html", "base64"); 214 | } 215 | 216 | @Override 217 | public void evaluateJavascript(String script) { 218 | if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) { 219 | mWebView.evaluateJavascript(script, null); 220 | } else { 221 | mWebView.loadUrl("javascript:" + script); 222 | } 223 | } 224 | 225 | @Override 226 | public void post(Runnable runnable) { 227 | mWebView.post(runnable); 228 | } 229 | 230 | @Override 231 | public void removeJavascriptInterface(String name) { 232 | mWebView.removeJavascriptInterface(name); 233 | } 234 | 235 | @Override 236 | public void pauseTimers() { 237 | mWebView.pauseTimers(); 238 | } 239 | 240 | @Override 241 | public void onHide() { 242 | mWebView.onPause(); 243 | } 244 | 245 | @Override 246 | public void resumeTimers() { 247 | mWebView.resumeTimers(); 248 | } 249 | 250 | @Override 251 | public void onShow() { 252 | mWebView.onResume(); 253 | } 254 | 255 | @Override 256 | public void onDestroy() { 257 | mWebView.destroy(); 258 | } 259 | 260 | } 261 | 262 | } 263 | -------------------------------------------------------------------------------- /app/src/zz_crosswalk/java/systems/altimit/rpgmakermv/PlayerHelper.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017-2019 Altimit Community Contributors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or imp 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package systems.altimit.rpgmakermv; 18 | 19 | import android.content.Context; 20 | 21 | import org.xwalk.core.JavascriptInterface; 22 | 23 | /** 24 | * Created by felixjones on 12/05/2017. 25 | */ 26 | public class PlayerHelper { 27 | 28 | public static Player create(Context context) { 29 | return new XWalkPlayerView(context).getPlayer(); 30 | } 31 | 32 | /** 33 | * 34 | */ 35 | public static abstract class Interface { 36 | 37 | protected abstract void onStart(); 38 | protected abstract void onPrepare(boolean webgl, boolean webaudio, boolean showfps); 39 | 40 | @JavascriptInterface 41 | public void start() { 42 | onStart(); 43 | } 44 | 45 | @JavascriptInterface 46 | public void prepare(boolean webgl, boolean webaudio, boolean showfps) { 47 | onPrepare(webgl, webaudio, showfps); 48 | } 49 | 50 | } 51 | 52 | } -------------------------------------------------------------------------------- /app/src/zz_crosswalk/java/systems/altimit/rpgmakermv/XWalkPlayerView.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017-2019 Altimit Community Contributors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or imp 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package systems.altimit.rpgmakermv; 18 | 19 | import android.annotation.SuppressLint; 20 | import android.app.Activity; 21 | import android.content.Context; 22 | import android.content.Intent; 23 | import android.graphics.Color; 24 | import android.net.Uri; 25 | import android.util.AttributeSet; 26 | import android.view.KeyEvent; 27 | import android.view.View; 28 | import android.view.ViewGroup; 29 | import android.webkit.ValueCallback; 30 | 31 | import org.xwalk.core.XWalkResourceClient; 32 | import org.xwalk.core.XWalkSettings; 33 | import org.xwalk.core.XWalkUIClient; 34 | import org.xwalk.core.XWalkView; 35 | 36 | /** 37 | * Created by felixjones on 12/05/2017. 38 | */ 39 | public class XWalkPlayerView extends XWalkView { 40 | 41 | private XWalkPlayer mPlayer; 42 | 43 | public XWalkPlayerView(Context context) { 44 | super(context); 45 | init(context); 46 | } 47 | 48 | public XWalkPlayerView(Context context, AttributeSet attrs) { 49 | super(context, attrs); 50 | init(context); 51 | } 52 | 53 | private void init(final Context context) { 54 | mPlayer = new XWalkPlayer(this); 55 | 56 | setBackgroundColor(Color.BLACK); 57 | 58 | enableJavascript(); 59 | 60 | XWalkSettings webSettings = getSettings(); 61 | webSettings.setAllowContentAccess(true); 62 | webSettings.setAllowFileAccess(true); 63 | webSettings.setAllowFileAccessFromFileURLs(true); 64 | webSettings.setAllowUniversalAccessFromFileURLs(true); 65 | webSettings.setDatabaseEnabled(true); 66 | webSettings.setDomStorageEnabled(true); 67 | webSettings.setLoadsImagesAutomatically(true); 68 | webSettings.setMediaPlaybackRequiresUserGesture(false); 69 | webSettings.setSupportMultipleWindows(true); 70 | 71 | setResourceClient(new ResourceClient(this)); 72 | setUIClient(new UIClient(this)); 73 | } 74 | 75 | @Override 76 | public boolean dispatchKeyEvent(KeyEvent event) { 77 | if (event.getKeyCode() == KeyEvent.KEYCODE_BACK) { 78 | ((Activity) getContext()).onBackPressed(); 79 | return true; 80 | } 81 | return super.dispatchKeyEvent(event); 82 | } 83 | 84 | @SuppressLint("SetJavaScriptEnabled") 85 | private void enableJavascript() { 86 | XWalkSettings webSettings = getSettings(); 87 | webSettings.setJavaScriptCanOpenWindowsAutomatically(true); 88 | webSettings.setJavaScriptEnabled(true); 89 | } 90 | 91 | @Override 92 | public boolean overScrollBy(int deltaX, int deltaY, int scrollX, int scrollY, int scrollRangeX, int scrollRangeY, int maxOverScrollX, int maxOverScrollY, boolean isTouchEvent) { 93 | return false; 94 | } 95 | 96 | @Override 97 | public void scrollTo(int x, int y) {} 98 | 99 | @Override 100 | public void computeScroll() {} 101 | 102 | public Player getPlayer() { 103 | return mPlayer; 104 | } 105 | 106 | /** 107 | * 108 | */ 109 | private class UIClient extends XWalkUIClient { 110 | 111 | private UIClient(XWalkView view) { 112 | super(view); 113 | } 114 | 115 | public boolean onCreateWindowRequested(XWalkView view, XWalkUIClient.InitiateBy initiator, ValueCallback callback) { 116 | final XWalkView dumbWV = new XWalkView(view.getContext()); 117 | dumbWV.setVisibility(View.INVISIBLE); 118 | view.addView(dumbWV); 119 | dumbWV.setResourceClient(new XWalkResourceClient (dumbWV) { 120 | @Override 121 | public void onLoadStarted(XWalkView view, String url) { 122 | ((ViewGroup) dumbWV.getParent()).removeView(view); 123 | Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(url)); 124 | view.getContext().startActivity(browserIntent); 125 | } 126 | }); 127 | callback.onReceiveValue(dumbWV); 128 | return true; 129 | } 130 | 131 | } 132 | 133 | /** 134 | * 135 | */ 136 | private class ResourceClient extends XWalkResourceClient { 137 | 138 | private ResourceClient(XWalkView view) { 139 | super(view); 140 | } 141 | 142 | } 143 | 144 | /** 145 | * 146 | */ 147 | private static final class XWalkPlayer implements Player { 148 | 149 | private XWalkView mXWalkView; 150 | 151 | private XWalkPlayer(XWalkView xWalkView) { 152 | mXWalkView = xWalkView; 153 | } 154 | 155 | @Override 156 | public void setKeepScreenOn() { 157 | mXWalkView.setKeepScreenOn(true); 158 | } 159 | 160 | @Override 161 | public View getView() { 162 | return mXWalkView; 163 | } 164 | 165 | @Override 166 | public void loadUrl(String url) { 167 | mXWalkView.loadUrl(url); 168 | } 169 | 170 | @Override 171 | public void addJavascriptInterface(Object object, String name) { 172 | mXWalkView.addJavascriptInterface(object, name); 173 | } 174 | 175 | @Override 176 | public Context getContext() { 177 | return mXWalkView.getContext(); 178 | } 179 | 180 | @Override 181 | public void loadData(String data) { 182 | mXWalkView.loadData(data, "text/html", "base64"); 183 | } 184 | 185 | @Override 186 | public void evaluateJavascript(String script) { 187 | mXWalkView.evaluateJavascript(script, null); 188 | } 189 | 190 | @Override 191 | public void post(Runnable runnable) { 192 | mXWalkView.post(runnable); 193 | } 194 | 195 | @Override 196 | public void removeJavascriptInterface(String name) { 197 | mXWalkView.removeJavascriptInterface(name); 198 | } 199 | 200 | @Override 201 | public void pauseTimers() { 202 | mXWalkView.pauseTimers(); 203 | } 204 | 205 | @Override 206 | public void onHide() { 207 | mXWalkView.onHide(); 208 | } 209 | 210 | @Override 211 | public void resumeTimers() { 212 | mXWalkView.resumeTimers(); 213 | } 214 | 215 | @Override 216 | public void onShow() { 217 | mXWalkView.onShow(); 218 | } 219 | 220 | @Override 221 | public void onDestroy() { 222 | mXWalkView.onDestroy(); 223 | } 224 | 225 | } 226 | 227 | } -------------------------------------------------------------------------------- /build.gradle: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017-2019 Altimit Community Contributors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or imp 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | buildscript { 18 | repositories { 19 | google() 20 | jcenter() 21 | } 22 | dependencies { 23 | classpath 'com.android.tools.build:gradle:3.4.2' 24 | } 25 | } 26 | 27 | allprojects { 28 | repositories { 29 | google() 30 | jcenter() 31 | 32 | maven { 33 | url 'https://download.01.org/crosswalk/releases/crosswalk/android/maven2' 34 | } 35 | } 36 | } 37 | 38 | task clean(type: Delete) { 39 | delete rootProject.buildDir 40 | } -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | android.enableJetifier=true 2 | android.useAndroidX=true 3 | org.gradle.jvmargs=-Xmx1536m -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AltimitSystems/mv-android-client/6b33d6fe70288de4492525cd0fbcac8b4f3e8bf1/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Tue Jul 09 12:09:06 BST 2019 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-5.1.1-all.zip 7 | -------------------------------------------------------------------------------- /gradlew: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | ############################################################################## 4 | ## 5 | ## Gradle start up script for UN*X 6 | ## 7 | ############################################################################## 8 | 9 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 10 | DEFAULT_JVM_OPTS="" 11 | 12 | APP_NAME="Gradle" 13 | APP_BASE_NAME=`basename "$0"` 14 | 15 | # Use the maximum available, or set MAX_FD != -1 to use that value. 16 | MAX_FD="maximum" 17 | 18 | warn ( ) { 19 | echo "$*" 20 | } 21 | 22 | die ( ) { 23 | echo 24 | echo "$*" 25 | echo 26 | exit 1 27 | } 28 | 29 | # OS specific support (must be 'true' or 'false'). 30 | cygwin=false 31 | msys=false 32 | darwin=false 33 | case "`uname`" in 34 | CYGWIN* ) 35 | cygwin=true 36 | ;; 37 | Darwin* ) 38 | darwin=true 39 | ;; 40 | MINGW* ) 41 | msys=true 42 | ;; 43 | esac 44 | 45 | # Attempt to set APP_HOME 46 | # Resolve links: $0 may be a link 47 | PRG="$0" 48 | # Need this for relative symlinks. 49 | while [ -h "$PRG" ] ; do 50 | ls=`ls -ld "$PRG"` 51 | link=`expr "$ls" : '.*-> \(.*\)$'` 52 | if expr "$link" : '/.*' > /dev/null; then 53 | PRG="$link" 54 | else 55 | PRG=`dirname "$PRG"`"/$link" 56 | fi 57 | done 58 | SAVED="`pwd`" 59 | cd "`dirname \"$PRG\"`/" >/dev/null 60 | APP_HOME="`pwd -P`" 61 | cd "$SAVED" >/dev/null 62 | 63 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar 64 | 65 | # Determine the Java command to use to start the JVM. 66 | if [ -n "$JAVA_HOME" ] ; then 67 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then 68 | # IBM's JDK on AIX uses strange locations for the executables 69 | JAVACMD="$JAVA_HOME/jre/sh/java" 70 | else 71 | JAVACMD="$JAVA_HOME/bin/java" 72 | fi 73 | if [ ! -x "$JAVACMD" ] ; then 74 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME 75 | 76 | Please set the JAVA_HOME variable in your environment to match the 77 | location of your Java installation." 78 | fi 79 | else 80 | JAVACMD="java" 81 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 82 | 83 | Please set the JAVA_HOME variable in your environment to match the 84 | location of your Java installation." 85 | fi 86 | 87 | # Increase the maximum file descriptors if we can. 88 | if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then 89 | MAX_FD_LIMIT=`ulimit -H -n` 90 | if [ $? -eq 0 ] ; then 91 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then 92 | MAX_FD="$MAX_FD_LIMIT" 93 | fi 94 | ulimit -n $MAX_FD 95 | if [ $? -ne 0 ] ; then 96 | warn "Could not set maximum file descriptor limit: $MAX_FD" 97 | fi 98 | else 99 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" 100 | fi 101 | fi 102 | 103 | # For Darwin, add options to specify how the application appears in the dock 104 | if $darwin; then 105 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" 106 | fi 107 | 108 | # For Cygwin, switch paths to Windows format before running java 109 | if $cygwin ; then 110 | APP_HOME=`cygpath --path --mixed "$APP_HOME"` 111 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` 112 | JAVACMD=`cygpath --unix "$JAVACMD"` 113 | 114 | # We build the pattern for arguments to be converted via cygpath 115 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` 116 | SEP="" 117 | for dir in $ROOTDIRSRAW ; do 118 | ROOTDIRS="$ROOTDIRS$SEP$dir" 119 | SEP="|" 120 | done 121 | OURCYGPATTERN="(^($ROOTDIRS))" 122 | # Add a user-defined pattern to the cygpath arguments 123 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then 124 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" 125 | fi 126 | # Now convert the arguments - kludge to limit ourselves to /bin/sh 127 | i=0 128 | for arg in "$@" ; do 129 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` 130 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option 131 | 132 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition 133 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` 134 | else 135 | eval `echo args$i`="\"$arg\"" 136 | fi 137 | i=$((i+1)) 138 | done 139 | case $i in 140 | (0) set -- ;; 141 | (1) set -- "$args0" ;; 142 | (2) set -- "$args0" "$args1" ;; 143 | (3) set -- "$args0" "$args1" "$args2" ;; 144 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;; 145 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; 146 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; 147 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; 148 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; 149 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; 150 | esac 151 | fi 152 | 153 | # Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules 154 | function splitJvmOpts() { 155 | JVM_OPTS=("$@") 156 | } 157 | eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS 158 | JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" 159 | 160 | exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" 161 | -------------------------------------------------------------------------------- /gradlew.bat: -------------------------------------------------------------------------------- 1 | @if "%DEBUG%" == "" @echo off 2 | @rem ########################################################################## 3 | @rem 4 | @rem Gradle startup script for Windows 5 | @rem 6 | @rem ########################################################################## 7 | 8 | @rem Set local scope for the variables with windows NT shell 9 | if "%OS%"=="Windows_NT" setlocal 10 | 11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 12 | set DEFAULT_JVM_OPTS= 13 | 14 | set DIRNAME=%~dp0 15 | if "%DIRNAME%" == "" set DIRNAME=. 16 | set APP_BASE_NAME=%~n0 17 | set APP_HOME=%DIRNAME% 18 | 19 | @rem Find java.exe 20 | if defined JAVA_HOME goto findJavaFromJavaHome 21 | 22 | set JAVA_EXE=java.exe 23 | %JAVA_EXE% -version >NUL 2>&1 24 | if "%ERRORLEVEL%" == "0" goto init 25 | 26 | echo. 27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 28 | echo. 29 | echo Please set the JAVA_HOME variable in your environment to match the 30 | echo location of your Java installation. 31 | 32 | goto fail 33 | 34 | :findJavaFromJavaHome 35 | set JAVA_HOME=%JAVA_HOME:"=% 36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 37 | 38 | if exist "%JAVA_EXE%" goto init 39 | 40 | echo. 41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 42 | echo. 43 | echo Please set the JAVA_HOME variable in your environment to match the 44 | echo location of your Java installation. 45 | 46 | goto fail 47 | 48 | :init 49 | @rem Get command-line arguments, handling Windowz variants 50 | 51 | if not "%OS%" == "Windows_NT" goto win9xME_args 52 | if "%@eval[2+2]" == "4" goto 4NT_args 53 | 54 | :win9xME_args 55 | @rem Slurp the command line arguments. 56 | set CMD_LINE_ARGS= 57 | set _SKIP=2 58 | 59 | :win9xME_args_slurp 60 | if "x%~1" == "x" goto execute 61 | 62 | set CMD_LINE_ARGS=%* 63 | goto execute 64 | 65 | :4NT_args 66 | @rem Get arguments from the 4NT Shell from JP Software 67 | set CMD_LINE_ARGS=%$ 68 | 69 | :execute 70 | @rem Setup the command line 71 | 72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 73 | 74 | @rem Execute Gradle 75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% 76 | 77 | :end 78 | @rem End local scope for the variables with windows NT shell 79 | if "%ERRORLEVEL%"=="0" goto mainEnd 80 | 81 | :fail 82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 83 | rem the _cmd.exe /c_ return code! 84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 85 | exit /b 1 86 | 87 | :mainEnd 88 | if "%OS%"=="Windows_NT" endlocal 89 | 90 | :omega 91 | -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' --------------------------------------------------------------------------------