Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rebranding 1 rebased #30

Merged
merged 16 commits into from
Oct 17, 2024
Merged
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
2 changes: 1 addition & 1 deletion platform/android/export/export_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1782,7 +1782,7 @@ String EditorExportPlatformAndroid::get_export_option_warning(const EditorExport
} else {
min_sdk_int = min_sdk_str.to_int();
if (min_sdk_int < OPENGL_MIN_SDK_VERSION) {
return vformat(TTR("\"Min SDK\" cannot be lower than %d, which is the version needed by the Godot library."), OPENGL_MIN_SDK_VERSION);
return vformat(TTR("\"Min SDK\" cannot be lower than %d, which is the version needed by the Blazium library."), OPENGL_MIN_SDK_VERSION);
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion platform/android/java/app/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
android:enabled="true"
tools:targetApi="29" />

<!-- Records the version of the Godot editor used for building -->
<!-- Records the version of the Blazium editor used for building -->
<meta-data
android:name="org.godotengine.editor.version"
android:value="${godotEditorVersion}" />
Expand Down
2 changes: 1 addition & 1 deletion platform/android/java/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ task copyAndRenameReleaseAab(type: Copy) {
*/
task validateJavaVersion {
if (JavaVersion.current() != versions.javaVersion) {
throw new GradleException("Invalid Java version ${JavaVersion.current()}. Version ${versions.javaVersion} is the required Java version for Godot gradle builds.")
throw new GradleException("Invalid Java version ${JavaVersion.current()}. Version ${versions.javaVersion} is the required Java version for Blazium gradle builds.")
}
}

Expand Down
4 changes: 2 additions & 2 deletions platform/android/java/app/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Godot gradle build settings.
# These properties apply when running a gradle build from the Godot editor.
# Blazium gradle build settings.
# These properties apply when running a gradle build from the Blazium editor.
# NOTE: This should be kept in sync with 'godot/platform/android/java/gradle.properties' except
# where otherwise specified.

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 @@ -152,7 +152,7 @@ task copyReleaseAARToBin(type: Copy) {
task zipGradleBuild(type: Zip) {
onlyIf { generateGodotTemplates.state.executed || generateDevTemplate.state.executed }
doFirst {
logger.lifecycle("Generating Godot gradle build template")
logger.lifecycle("Generating Blazium gradle build template")
}
from(fileTree(dir: 'app', excludes: ['**/build/**', '**/.gradle/**', '**/*.iml']), fileTree(dir: '.', includes: ['gradlew', 'gradlew.bat', 'gradle/**']))
include '**/*'
Expand Down
2 changes: 1 addition & 1 deletion platform/android/java/editor/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ android {

missingDimensionStrategy 'products', 'editor'
manifestPlaceholders += [
editorAppName: "Godot Editor 4",
editorAppName: "Blazium Editor 4",
editorBuildSuffix: ""
]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ open class GodotEditor : GodotActivity() {
for (runningProcess in runningProcesses) {
if (runningProcess.processName == processName) {
// Killing process directly
Log.v(TAG, "Killing Godot process ${runningProcess.processName}")
Log.v(TAG, "Killing Blazium process ${runningProcess.processName}")
Process.killProcess(runningProcess.pid)
return true
}
Expand Down
2 changes: 1 addition & 1 deletion platform/android/java/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ org.gradle.jvmargs=-Xmx4536m
org.gradle.warning.mode=all

# Disable resource optimizations for template release build.
# NOTE: This is turned on for Godot Editor's gradle builds in order to improve the release build.
# NOTE: This is turned on for Blazium Editor's gradle builds in order to improve the release build.
android.enableResourceOptimizations=false

# Fix gradle build errors when the build path contains non-ASCII characters
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -297,4 +297,4 @@ index 4babe476f..8d41a7690 100644
+ @SuppressLint("MissingPermission")
NetworkInfo activeInfo = mConnectivityManager
.getActiveNetworkInfo();
updateNetworkState(activeInfo);
updateNetworkState(activeInfo);
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,4 @@ import org.godotengine.godot.BuildConfig;
+ // -- GODOT end --
return outBuff;
}


2 changes: 1 addition & 1 deletion platform/android/java/lib/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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 Blazium 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
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@
import android.os.RemoteException;
import android.util.Log;

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


/**
Expand Down Expand Up @@ -121,7 +121,7 @@ private static class Stub implements IStub {
/**
* Target we publish for clients to send messages to IncomingHandler.
*/
// -- GODOT start --
// -- BLAZIUM start --
private final MessengerHandlerClient mMsgHandler = new MessengerHandlerClient(this);
final Messenger mMessenger = new Messenger(mMsgHandler);

Expand Down Expand Up @@ -160,7 +160,7 @@ private void handleMessage(Message msg) {
break;
}
}
// -- GODOT end --
// -- BLAZIUM end --

public Stub(IDownloaderClient itf, Class<?> downloaderService) {
mItf = itf;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@
import android.os.Messenger;
import android.os.RemoteException;

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


/**
Expand Down Expand Up @@ -111,7 +111,7 @@ public void onClientUpdated(Messenger clientMessenger) {

private static class Stub implements IStub {
private IDownloaderService mItf = null;
// -- GODOT start --
// -- BLAZIUM start --
private final MessengerHandlerServer mMsgHandler = new MessengerHandlerServer(this);
final Messenger mMessenger = new Messenger(mMsgHandler);

Expand Down Expand Up @@ -153,7 +153,7 @@ private void handleMessage(Message msg) {
break;
}
}
// -- GODOT end --
// -- BLAZIUM end --

public Stub(IDownloaderService itf) {
mItf = itf;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@
import android.os.SystemClock;
import android.util.Log;

// -- GODOT start --
// -- BLAZIUM start --
//import com.android.vending.expansion.downloader.R;
import org.godotengine.godot.R;
// -- GODOT end --
// -- BLAZIUM end --

import java.io.File;
import java.text.SimpleDateFormat;
Expand Down Expand Up @@ -152,14 +152,14 @@ static public String getDownloadProgressString(long overallProgress, long overal
}
return "";
}
// -- GODOT start --
// -- BLAZIUM start --
return String.format(Locale.ENGLISH, "%.2f",
(float) overallProgress / (1024.0f * 1024.0f))
+ "MB /" +
String.format(Locale.ENGLISH, "%.2f", (float) overallTotal /
(1024.0f * 1024.0f))
+ "MB";
// -- GODOT end --
// -- BLAZIUM end --
}

/**
Expand Down Expand Up @@ -192,9 +192,9 @@ public static String getDownloadProgressPercent(long overallProgress, long overa
}

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

public static String getTimeRemaining(long durationInMilliseconds) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@
import android.telephony.TelephonyManager;
import android.util.Log;

// -- GODOT start --
// -- BLAZIUM start --
import android.annotation.SuppressLint;
// -- GODOT end --
// -- BLAZIUM end --

/**
* Contains useful helper functions, typically tied to the application context.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@

package com.google.android.vending.expansion.downloader.impl;

// -- GODOT start --
// -- BLAZIUM start --
//import com.android.vending.expansion.downloader.R;
import org.godotengine.godot.R;
// -- GODOT end --
// -- BLAZIUM end --

import com.google.android.vending.expansion.downloader.DownloadProgressInfo;
import com.google.android.vending.expansion.downloader.DownloaderClientMarshaller;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,12 +149,12 @@ public void run() {

try {
PowerManager pm = (PowerManager) mContext.getSystemService(Context.POWER_SERVICE);
// -- GODOT start --
// -- BLAZIUM 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 --
// -- BLAZIUM end --

if (Constants.LOGV) {
Log.v(Constants.TAG, "initiating download for " + mInfo.mFileName);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@
import android.telephony.TelephonyManager;
import android.util.Log;

// -- GODOT start --
// -- BLAZIUM start --
import android.annotation.SuppressLint;
// -- GODOT end --
// -- BLAZIUM end --

import java.io.File;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ public PreferenceObfuscator(SharedPreferences sp, Obfuscator o) {
public void putString(String key, String value) {
if (mEditor == null) {
mEditor = mPreferences.edit();
// -- GODOT start --
// -- BLAZIUM start --
mEditor.apply();
// -- GODOT end --
// -- BLAZIUM end --
}
String obfuscatedValue = mObfuscator.obfuscate(value, key);
mEditor.putString(key, obfuscatedValue);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@
* @version 1.3
*/

// -- GODOT start --
// -- BLAZIUM start --
import org.godotengine.godot.BuildConfig;
// -- GODOT end --
// -- BLAZIUM end --

/**
* Base64 converter class. This code is not a full-blown MIME encoder;
Expand Down Expand Up @@ -345,11 +345,11 @@ public static byte[] encode(byte[] source, int off, int len, byte[] alphabet,
e += 4;
}

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

Expand Down
8 changes: 4 additions & 4 deletions platform/android/java/lib/src/org/godotengine/godot/Godot.kt
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ class Godot(private val context: Context) : SensorEventListener {
val window = activity.window
window.addFlags(WindowManager.LayoutParams.FLAG_TURN_SCREEN_ON)

Log.v(TAG, "Initializing Godot plugin registry")
Log.v(TAG, "Initializing Blazium plugin registry")
GodotPluginRegistry.initializePluginRegistry(this, primaryHost.getHostPlugins(this))
if (io == null) {
io = GodotIO(activity)
Expand Down Expand Up @@ -353,15 +353,15 @@ class Godot(private val context: Context) : SensorEventListener {
fileAccessHandler,
useApkExpansion,
)
Log.v(TAG, "Godot native layer initialization completed: $nativeLayerInitializeCompleted")
Log.v(TAG, "Blazium native layer initialization completed: $nativeLayerInitializeCompleted")
}

if (nativeLayerInitializeCompleted && !nativeLayerSetupCompleted) {
nativeLayerSetupCompleted = GodotLib.setup(commandLine.toTypedArray(), tts)
if (!nativeLayerSetupCompleted) {
throw IllegalStateException("Unable to setup the Godot engine! Aborting...")
throw IllegalStateException("Unable to setup the Blazium engine! Aborting...")
} else {
Log.v(TAG, "Godot native layer setup completed")
Log.v(TAG, "Blazium native layer setup completed")
}
}
} finally {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,12 @@
public class GodotDownloaderAlarmReceiver extends BroadcastReceiver {
@Override
public void onReceive(Context context, Intent intent) {
Log.d("GODOT", "Alarma recivida");
Log.d("BLAZIUM", "Alarma recivida");
try {
DownloaderClientMarshaller.startDownloadServiceIfRequired(context, intent, GodotDownloaderService.class);
} catch (NameNotFoundException e) {
e.printStackTrace();
Log.d("GODOT", "Exception: " + e.getClass().getName() + ":" + e.getMessage());
Log.d("BLAZIUM", "Exception: " + e.getClass().getName() + ":" + e.getMessage());
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public class GodotDownloaderService extends DownloaderService {
@Override
public String getPublicKey() {
SharedPreferences prefs = getApplicationContext().getSharedPreferences("app_data_keys", Context.MODE_PRIVATE);
Log.d("GODOT", "getting public key:" + prefs.getString("store_public_key", null));
Log.d("BLAZIUM", "getting public key:" + prefs.getString("store_public_key", null));
return prefs.getString("store_public_key", null);

//return BASE64_PUBLIC_KEY;
Expand All @@ -79,7 +79,7 @@ public byte[] getSALT() {
*/
@Override
public String getAlarmReceiverClassName() {
Log.d("GODOT", "getAlarmReceiverClassName()");
Log.d("BLAZIUM", "getAlarmReceiverClassName()");
return GodotDownloaderAlarmReceiver.class.getName();
}
}
Loading
Loading