File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed
Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -3818,6 +3818,7 @@ Error EditorExportPlatformAndroid::export_project_helper(const Ref<EditorExportP
38183818
38193819 // Let's zip-align (must be done before signing)
38203820
3821+ static const int PAGE_SIZE_KB = 16 * 1024 ;
38213822 static const int ZIP_ALIGNMENT = 4 ;
38223823
38233824 // If we're not signing the apk, then the next step should be the last.
@@ -3870,6 +3871,12 @@ Error EditorExportPlatformAndroid::export_project_helper(const Ref<EditorExportP
38703871 // Uncompressed file => Align
38713872 long new_offset = file_offset + bias;
38723873 padding = (ZIP_ALIGNMENT - (new_offset % ZIP_ALIGNMENT)) % ZIP_ALIGNMENT;
3874+ const char *ext = strrchr (fname, ' .' );
3875+ if (ext && strcmp (ext, " .so" ) == 0 ) {
3876+ padding = (PAGE_SIZE_KB - (new_offset % PAGE_SIZE_KB)) % PAGE_SIZE_KB;
3877+ } else {
3878+ padding = (ZIP_ALIGNMENT - (new_offset % ZIP_ALIGNMENT)) % ZIP_ALIGNMENT;
3879+ }
38733880 }
38743881
38753882 memset (extra + info.size_file_extra , 0 , padding);
You can’t perform that action at this time.
0 commit comments