generate more specific warnings

This commit is contained in:
qimiko committed 2024-01-27 03:13:37 -07:00
1 parent 9a87716635
commit fd83daa776
4 files changed
+22 -8

No files matched your search

@@ -65,8 +65,12 @@ class GeometryDashActivity : AppCompatActivity(), Cocos2dxHelper.Cocos2dxHelperL
val gdPackageInfo = packageManager.getPackageInfo(Constants.PACKAGE_NAME, 0)
val abiMismatch = LaunchUtils.detectAbiMismatch(this, gdPackageInfo, e)
val errorMessage = if (abiMismatch) getString(R.string.load_failed_abi_error_description) else
getString(R.string.load_failed_link_error_description)
val is64bit = LaunchUtils.is64bit
val errorMessage = when {
abiMismatch && is64bit -> getString(R.string.load_failed_abi_error_need_32bit_description)
abiMismatch -> getString(R.string.load_failed_abi_error_need_64bit_description)
else -> getString(R.string.load_failed_link_error_description)
}
returnToMain(
getString(R.string.load_failed_link_error),
@@ -252,9 +252,14 @@ fun UpdateWarning() {
Text(stringResource(R.string.launcher_unsupported_version_title))
},
text = {
val message = if (gdVersionCode >= Constants.SUPPORTED_VERSION_CODE) {
R.string.launcher_unsupported_version_description
} else {
R.string.launcher_outdated_version_description
}
Text(stringResource(
R.string.launcher_unsupported_version_description,
gdVersionString, Constants.SUPPORTED_VERSION_STRING
message, gdVersionString, Constants.SUPPORTED_VERSION_STRING
))
},
confirmButton = {
@@ -89,8 +89,9 @@ object LaunchUtils {
@Suppress("DEPRECATION")
val applicationArchitecture: String = Build.CPU_ABI
val platformName: String = if (applicationArchitecture == "arm64-v8a")
"android64" else "android32"
val is64bit = applicationArchitecture == "arm64-v8a"
val platformName: String = if (is64bit) "android64" else "android32"
val geodeFilename: String = "Geode.$platformName.so"
+6 -2
View File
@@ -22,8 +22,11 @@
<string name="launcher_warning_icon_alt">warning</string>
<string name="launcher_error_icon_alt">error</string>
<string name="launcher_unsupported_version_title">Unsupported version</string>
<string name="launcher_outdated_version_description">
The current version of Geometry Dash is not compatible with the version supported by the launcher (%2$s). You must update Geometry Dash to fix this.\nLaunch will continue, but crashes may occur!
</string>
<string name="launcher_unsupported_version_description">
The current version of Geometry Dash is not compatible with the version supported by the launcher (%2$s). A launcher update is required to fix this.\nLaunch will continue, but crashes may occur!
The current version of Geometry Dash is not compatible with the version supported by the launcher. A launcher update is required to fix this.\nLaunch will continue, but crashes may occur!
</string>
<string name="launcher_update_available">A new launcher update is available!</string>
<string name="launcher_update_dismiss">Dismiss</string>
@@ -44,7 +47,8 @@
<!-- GeometryDashActivity strings -->
<string name="load_failed_link_error">Failed to link libraries</string>
<string name="load_failed_link_error_description">Game libraries could not be found. This may occur if the architecture of the launcher and Geometry Dash do not match, or from a system bug.\nCheck application logs for more details.</string>
<string name="load_failed_abi_error_description">The architecture of the launcher and Geometry Dash do not match. Please reinstall Geometry Dash from the Play Store or use the \"android32\" version of the launcher to resolve this issue.\nCheck application logs for more details.</string>
<string name="load_failed_abi_error_need_64bit_description">The architecture of the launcher and Geometry Dash do not match. Please reinstall Geometry Dash from the Play Store or use the 64-bit version of the launcher to resolve this issue.\nCheck application logs for more details.</string>
<string name="load_failed_abi_error_need_32bit_description">The architecture of the launcher and Geometry Dash do not match. Please reinstall Geometry Dash from the Play Store or use the 32-bit version of the launcher to resolve this issue.\nCheck application logs for more details.</string>
<string name="load_failed_generic_error">Load failed</string>
<string name="load_failed_generic_error_description">Uncaught error during game load: `%1$s`.\nCheck application logs for more details. Please report this issue!</string>
<string name="message_box_cancel">Cancel</string>