Browse Source
[android] Fix nightly build download URLs (#3487 )
It should work now, I hope.
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3487
Reviewed-by: crueter <crueter@eden-emu.dev>
Reviewed-by: Maufeat <sahyno1996@gmail.com>
Co-authored-by: PavelBARABANOV <pavelbarabanov94@gmail.com>
Co-committed-by: PavelBARABANOV <pavelbarabanov94@gmail.com>
pull/3492/head
PavelBARABANOV
2 weeks ago
committed by
crueter
No known key found for this signature in database
GPG Key ID: 425ACD2D4830EBC6
2 changed files with
3 additions and
3 deletions
src/android/app/src/main/java/org/yuzu/yuzu_emu/ui/main/MainActivity.kt
src/android/app/src/main/jni/native.cpp
@ -200,8 +200,7 @@ class MainActivity : AppCompatActivity(), ThemeProvider {
var artifact = tag
// Nightly builds have a slightly different format
if ( NativeLibrary . isNightlyBuild ( ) ) {
val splitTag = tag . split ( '.' )
artifact = splitTag . subList ( 1 , splitTag . size - 1 ) . joinToString ( " . " )
artifact = tag . substringAfter ( '.' , tag )
}
downloadAndInstallUpdate ( tag , artifact )
}
@ -1776,7 +1776,7 @@ JNIEXPORT jstring JNICALL Java_org_yuzu_yuzu_1emu_NativeLibrary_getUpdateApkUrl(
# endif
}
const std : : string apk_filename = fmt : : format ( " Eden-Android-{}-{}.apk " , version _str, variant ) ;
const std : : string apk_filename = fmt : : format ( " Eden-Android-{}-{}.apk " , artifact _str, variant ) ;
const std : : string url = fmt : : format ( " {}/{}/releases/download/{}/{} " ,
std : : string { Common : : g_build_auto_update_website } ,
std : : string { Common : : g_build_auto_update_repo } ,
@ -1784,6 +1784,7 @@ JNIEXPORT jstring JNICALL Java_org_yuzu_yuzu_1emu_NativeLibrary_getUpdateApkUrl(
apk_filename ) ;
env - > ReleaseStringUTFChars ( tag , version_str ) ;
env - > ReleaseStringUTFChars ( artifact , artifact_str ) ;
env - > ReleaseStringUTFChars ( packageId , package_id_str ) ;
return env - > NewStringUTF ( url . c_str ( ) ) ;
}