Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions platform/android/SCsub
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ env_thirdparty.disable_warnings()
thirdparty_obj = env_thirdparty.SharedObject("#thirdparty/misc/ifaddrs-android.cc")
android_objects.append(thirdparty_obj)

lib = env_android.add_shared_library("#bin/libgodot", [android_objects], SHLIBSUFFIX=env["SHLIBSUFFIX"])
lib = env_android.add_shared_library("#bin/libredot", [android_objects], SHLIBSUFFIX=env["SHLIBSUFFIX"])

# Needed to force rebuilding the platform files when the thirdparty code is updated.
env.Depends(lib, thirdparty_obj)
Expand Down Expand Up @@ -79,7 +79,7 @@ if lib_arch_dir != "":

out_dir = "#platform/android/java/lib/libs/" + lib_tools_dir + lib_type_dir + "/" + lib_arch_dir
env_android.Command(
out_dir + "/libgodot_android.so", "#bin/libgodot" + env["SHLIBSUFFIX"], Move("$TARGET", "$SOURCE")
out_dir + "/libredot_android.so", "#bin/libredot" + env["SHLIBSUFFIX"], Move("$TARGET", "$SOURCE")
)

stl_lib_path = (
Expand Down
1 change: 1 addition & 0 deletions platform/android/java/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/.metadata/
6 changes: 3 additions & 3 deletions platform/android/java/app/config.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ ext.getExportPackageName = { ->
String appId = project.hasProperty("export_package_name") ? project.property("export_package_name") : ""
// Check if the app id is valid, otherwise use the default.
if (appId == null || appId.isEmpty()) {
appId = "com.godot.game"
appId = "com.redot.game"
}
return appId
}
Expand Down Expand Up @@ -72,12 +72,12 @@ ext.getExportTargetSdkVersion = { ->
}

ext.getGodotRenderingMethod = { ->
String renderingMethod = project.hasProperty("godot_rendering_method") ? project.property("godot_rendering_method") : ""
String renderingMethod = project.hasProperty("redot_rendering_method") ? project.property("redot_rendering_method") : ""
return renderingMethod
}

ext.getGodotEditorVersion = { ->
String editorVersion = project.hasProperty("godot_editor_version") ? project.property("godot_editor_version") : ""
String editorVersion = project.hasProperty("redot_editor_version") ? project.property("redot_editor_version") : ""
if (editorVersion == null || editorVersion.isEmpty()) {
// Try the library version first
editorVersion = getGodotLibraryVersionName()
Expand Down
2 changes: 1 addition & 1 deletion platform/android/java/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ def generateBuildTasks(String flavor = "template", String edition = "standard",
buildTasks += tasks.create(name: copyAARTaskName, type: Copy) {
dependsOn ":lib:assembleTemplate${capitalizedTarget}"
from('lib/build/outputs/aar')
include("godot-lib.template_${targetSuffix}.aar")
include("redot-lib.template_${targetSuffix}.aar")
into("app/libs/${target}")
}
}
Expand Down
6 changes: 3 additions & 3 deletions platform/android/java/editor/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ ext {

// Return the keystore file used for signing the release build.
getGodotKeystoreFile = { ->
def keyStore = System.getenv("GODOT_ANDROID_SIGN_KEYSTORE")
def keyStore = System.getenv("REDOT_ANDROID_SIGN_KEYSTORE")
if (keyStore == null || keyStore.isEmpty()) {
return null
}
Expand All @@ -35,13 +35,13 @@ ext {

// Return the key alias used for signing the release build.
getGodotKeyAlias = { ->
def kAlias = System.getenv("GODOT_ANDROID_KEYSTORE_ALIAS")
def kAlias = System.getenv("REDOT_ANDROID_KEYSTORE_ALIAS")
return kAlias
}

// Return the password for the key used for signing the release build.
getGodotSigningPassword = { ->
def signingPassword = System.getenv("GODOT_ANDROID_SIGN_PASSWORD")
def signingPassword = System.getenv("REDOT_ANDROID_SIGN_PASSWORD")
return signingPassword
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
<application>

<activity
android:name=".GodotEditor"
android:name=".RedotEditor"
android:exported="true"
android:screenOrientation="landscape"
tools:node="merge"
Expand All @@ -56,7 +56,7 @@
</activity>

<activity
android:name=".GodotXRGame"
android:name=".RedotXRGame"
android:exported="false"
tools:node="merge">
<intent-filter>
Expand All @@ -81,8 +81,8 @@
manager and editor windows.
-->
<meta-data
android:name="org.godotengine.plugin.v2.GodotOpenXRMeta"
android:value="org.godotengine.openxr.vendors.meta.GodotOpenXRMeta"
android:name="org.redotengine.plugin.v2.GodotOpenXRMeta"
android:value="org.redotengine.openxr.vendors.meta.GodotOpenXRMeta"
tools:node="remove" />

<!-- Enable system splash screen -->
Expand Down
Binary file not shown.
6 changes: 3 additions & 3 deletions platform/android/java/lib/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
<!-- Records the version of the Godot library -->
<meta-data
android:name="org.redotengine.library.version"
android:value="${godotLibraryVersion}" />
android:value="${redotLibraryVersion}" />

<service android:name=".GodotDownloaderService" />
<service android:name=".RedotDownloaderService" />

<activity
android:name=".utils.ProcessPhoenix"
Expand All @@ -26,7 +26,7 @@
android:grantUriPermissions="true">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/godot_provider_paths" />
android:resource="@xml/redot_provider_paths" />
</provider>

</application>
Expand Down
6 changes: 3 additions & 3 deletions platform/android/java/lib/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ plugins {
}

ext {
PUBLISH_ARTIFACT_ID = 'godot'
PUBLISH_ARTIFACT_ID = 'redot'
}

apply from: "../scripts/publish-module.gradle"
Expand All @@ -26,7 +26,7 @@ android {
minSdkVersion versions.minSdk
targetSdkVersion versions.targetSdk

manifestPlaceholders = [godotLibraryVersion: getGodotLibraryVersionName()]
manifestPlaceholders = [redotLibraryVersion: getGodotLibraryVersionName()]
}

namespace = "org.redotengine.godot"
Expand Down Expand Up @@ -131,7 +131,7 @@ android {
outputSuffix = "${outputSuffix}.dev"
}
variant.outputs.all { output ->
output.outputFileName = "godot-lib.${outputSuffix}.aar"
output.outputFileName = "redot-lib.${outputSuffix}.aar"
}

// Find scons' executable path
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ index ad6ea0de6..452c7d148 100644
import android.os.RemoteException;
import android.util.Log;

+// -- GODOT start --
+// -- REDOT start --
+import java.lang.ref.WeakReference;
+// -- GODOT end --
+// -- REDOT end --


/**
Expand All @@ -17,7 +17,7 @@ index ad6ea0de6..452c7d148 100644
* Target we publish for clients to send messages to IncomingHandler.
*/
- final Messenger mMessenger = new Messenger(new Handler() {
+ // -- GODOT start --
+ // -- REDOT start --
+ private final MessengerHandlerClient mMsgHandler = new MessengerHandlerClient(this);
+ final Messenger mMessenger = new Messenger(mMsgHandler);
+
Expand Down Expand Up @@ -74,7 +74,7 @@ index ad6ea0de6..452c7d148 100644
+ break;
+ }
+ }
+ // -- GODOT end --
+ // -- REDOT end --

public Stub(IDownloaderClient itf, Class<?> downloaderService) {
mItf = itf;
Expand All @@ -86,9 +86,9 @@ index 979352299..3771d19c9 100644
import android.os.Messenger;
import android.os.RemoteException;

+// -- GODOT start --
+// -- REDOT start --
+import java.lang.ref.WeakReference;
+// -- GODOT end --
+// -- REDOT end --


/**
Expand All @@ -97,7 +97,7 @@ index 979352299..3771d19c9 100644
private static class Stub implements IStub {
private IDownloaderService mItf = null;
- final Messenger mMessenger = new Messenger(new Handler() {
+ // -- GODOT start --
+ // -- REDOT start --
+ private final MessengerHandlerServer mMsgHandler = new MessengerHandlerServer(this);
+ final Messenger mMessenger = new Messenger(mMsgHandler);
+
Expand Down Expand Up @@ -160,7 +160,7 @@ index 979352299..3771d19c9 100644
+ break;
+ }
+ }
+ // -- GODOT end --
+ // -- REDOT end --

public Stub(IDownloaderService itf) {
mItf = itf;
Expand All @@ -173,10 +173,10 @@ index e4b1b0f1c..36cd6aacf 100644
import android.util.Log;

-import com.android.vending.expansion.downloader.R;
+// -- GODOT start --
+// -- REDOT start --
+//import com.android.vending.expansion.downloader.R;
+import org.redotengine.godot.R;
+// -- GODOT end --
+// -- REDOT end --

import java.io.File;
import java.text.SimpleDateFormat;
Expand All @@ -185,15 +185,15 @@ index e4b1b0f1c..36cd6aacf 100644
return "";
}
- return String.format("%.2f",
+ // -- GODOT start --
+ // -- REDOT start --
+ return String.format(Locale.ENGLISH, "%.2f",
(float) overallProgress / (1024.0f * 1024.0f))
+ "MB /" +
- String.format("%.2f", (float) overallTotal /
+ String.format(Locale.ENGLISH, "%.2f", (float) overallTotal /
(1024.0f * 1024.0f))
+ "MB";
+ // -- GODOT end --
+ // -- REDOT end --
}

/**
Expand All @@ -202,9 +202,9 @@ index e4b1b0f1c..36cd6aacf 100644

public static String getSpeedString(float bytesPerMillisecond) {
- return String.format("%.2f", bytesPerMillisecond * 1000 / 1024);
+ // -- GODOT start --
+ // -- REDOT start --
+ return String.format(Locale.ENGLISH, "%.2f", bytesPerMillisecond * 1000 / 1024);
+ // -- GODOT end --
+ // -- REDOT end --
}

public static String getTimeRemaining(long durationInMilliseconds) {
Expand All @@ -216,9 +216,9 @@ index 12edd97ab..a0e1165cc 100644
import android.telephony.TelephonyManager;
import android.util.Log;

+// -- GODOT start --
+// -- REDOT start --
+import android.annotation.SuppressLint;
+// -- GODOT end --
+// -- REDOT end --
+
/**
* Contains useful helper functions, typically tied to the application context.
Expand Down Expand Up @@ -248,10 +248,10 @@ index f1536e80e..4b214b22d 100644
package com.google.android.vending.expansion.downloader.impl;

-import com.android.vending.expansion.downloader.R;
+// -- GODOT start --
+// -- REDOT start --
+//import com.android.vending.expansion.downloader.R;
+import org.redotengine.godot.R;
+// -- GODOT end --
+// -- REDOT end --
+
import com.google.android.vending.expansion.downloader.DownloadProgressInfo;
import com.google.android.vending.expansion.downloader.DownloaderClientMarshaller;
Expand All @@ -266,12 +266,12 @@ index b2e0e7af0..c114b8a64 100644
PowerManager pm = (PowerManager) mContext.getSystemService(Context.POWER_SERVICE);
- wakeLock = pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, Constants.TAG);
- wakeLock.acquire();
+ // -- GODOT start --
+ // -- REDOT start --
+ //wakeLock = pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, Constants.TAG);
+ //wakeLock.acquire();
+ wakeLock = pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, "org.godot.game:wakelock");
+ wakeLock.acquire(20 * 60 * 1000L /*20 minutes*/);
+ // -- GODOT end --
+ // -- REDOT end --

if (Constants.LOGV) {
Log.v(Constants.TAG, "initiating download for " + mInfo.mFileName);
Expand All @@ -283,9 +283,9 @@ index 4babe476f..8d41a7690 100644
import android.telephony.TelephonyManager;
import android.util.Log;

+// -- GODOT start --
+// -- REDOT start --
+import android.annotation.SuppressLint;
+// -- GODOT end --
+// -- REDOT end --
+
import java.io.File;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ index 7c42bfc28..feb579af0 100644
public void putString(String key, String value) {
if (mEditor == null) {
mEditor = mPreferences.edit();
+ // -- GODOT start --
+ // -- REDOT start --
+ mEditor.apply();
+ // -- GODOT end --
+ // -- REDOT end --
}
String obfuscatedValue = mObfuscator.obfuscate(value, key);
mEditor.putString(key, obfuscatedValue);
Expand All @@ -20,9 +20,9 @@ index a0d2779af..a8bf65f9c 100644
* @version 1.3
*/

+// -- GODOT start --
+// -- REDOT start --
import org.redotengine.godot.BuildConfig;
+// -- GODOT end --
+// -- REDOT end --
+
/**
* Base64 converter class. This code is not a full-blown MIME encoder;
Expand All @@ -32,11 +32,11 @@ import org.redotengine.godot.BuildConfig;
}

- assert (e == outBuff.length);
+ // -- GODOT start --
+ // -- REDOT start --
+ //assert (e == outBuff.length);
+ if (BuildConfig.DEBUG && e != outBuff.length)
+ throw new RuntimeException();
+ // -- GODOT end --
+ // -- REDOT end --
return outBuff;
}

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/godot_fragment_container"
android:id="@+id/redot_fragment_container"
android:layout_width="match_parent"
android:layout_height="match_parent" />
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
android:layout_alignParentStart="true"
android:layout_alignParentTop="true"
android:src="@android:drawable/stat_sys_download"
android:contentDescription="@string/godot_project_name_string" />
android:contentDescription="@string/redot_project_name_string" />

<TextView
android:id="@+id/progress_text"
Expand Down
4 changes: 2 additions & 2 deletions platform/android/java/lib/res/values/strings.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="godot_project_name_string">godot-project-name</string>
<string name="redot_project_name_string">redot-project-name</string>
<string name="text_paused_cellular">Would you like to enable downloading over cellular connections? Depending on your data plan, this may cost you money.</string>
<string name="text_paused_cellular_2">If you choose not to enable downloading over cellular connections, the download will automatically resume when wi-fi is available.</string>
<string name="text_button_resume_cellular">Resume download</string>
Expand All @@ -13,7 +13,7 @@
<string name="text_button_cancel">Cancel</string>
<string name="text_button_cancel_verify">Cancel Verification</string>
<string name="text_error_title">Error!</string>
<string name="error_engine_setup_message">Unable to setup the Godot Engine! Aborting…</string>
<string name="error_engine_setup_message">Unable to setup the Redot Engine! Aborting…</string>
<string name="error_missing_vulkan_requirements_message">Warning - this device does not meet the requirements for Vulkan support</string>

<!-- APK Expansion Strings -->
Expand Down
Loading
Loading