wineandroid: Add suffix to lib directory and wine binary on 64-bit

André Hentschel nerv at dawncrow.de
Sun Aug 6 07:32:15 CDT 2017


This fixes at least arm64-v8a builds, where you have lib64/libwine.so and bin/wine64

Signed-off-by: André Hentschel <nerv at dawncrow.de>
---

This and "winebuild: Improved position independent code generation" enable Wine on ARM64 Android phones (e.g. most Android devices).
The check for 64 in the CPU_ABI can be discussed, but I think it's reliable and fast.

 dlls/wineandroid.drv/WineActivity.java | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/dlls/wineandroid.drv/WineActivity.java b/dlls/wineandroid.drv/WineActivity.java
index 5a99e07..a3cb4ae 100644
--- a/dlls/wineandroid.drv/WineActivity.java
+++ b/dlls/wineandroid.drv/WineActivity.java
@@ -59,6 +59,7 @@
     public native boolean wine_keyboard_event( int hwnd, int action, int keycode, int state );
 
     private final String LOGTAG = "wine";
+    private String suffix64 = "";
     private ProgressDialog progress_dialog;
 
     protected WineWindow desktop_window;
@@ -71,15 +72,18 @@ public void onCreate(Bundle savedInstanceState)
 
         requestWindowFeature( android.view.Window.FEATURE_NO_TITLE );
 
+        if (Build.CPU_ABI.contains("64"))
+            suffix64 = "64";
+
         new Thread( new Runnable() { public void run() { loadWine( null ); }} ).start();
     }
 
     private void loadWine( String cmdline )
     {
         File bindir = new File( getFilesDir(), Build.CPU_ABI + "/bin" );
-        File libdir = new File( getFilesDir(), Build.CPU_ABI + "/lib" );
+        File libdir = new File( getFilesDir(), Build.CPU_ABI + "/lib" + suffix64 );
         File prefix = new File( getFilesDir(), "prefix" );
-        File loader = new File( bindir, "wine" );
+        File loader = new File( bindir, "wine" + suffix64 );
         String locale = Locale.getDefault().getLanguage() + "_" +
             Locale.getDefault().getCountry() + ".UTF-8";
 
-- 
2.7.4




More information about the wine-patches mailing list