wineandroid: Allow putting libraries in the native library directory.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Alexandre Julliard 2017-06-26 15:13:35 +02:00
parent 9065fd2597
commit 0a2aac8dca
2 changed files with 10 additions and 2 deletions

View File

@ -88,7 +88,7 @@ private void loadWine( String cmdline )
HashMap<String,String> env = new HashMap<String,String>();
env.put( "WINELOADER", loader.toString() );
env.put( "WINEPREFIX", prefix.toString() );
env.put( "LD_LIBRARY_PATH", libdir.toString() );
env.put( "LD_LIBRARY_PATH", libdir.toString() + ":" + getApplicationInfo().nativeLibraryDir );
env.put( "LC_ALL", locale );
env.put( "LANG", locale );
@ -111,7 +111,14 @@ private void loadWine( String cmdline )
createProgressDialog( 0, "Setting up the Windows environment..." );
System.load( libdir.toString() + "/libwine.so" );
try
{
System.loadLibrary( "wine" );
}
catch (java.lang.UnsatisfiedLinkError e)
{
System.load( libdir.toString() + "/libwine.so" );
}
prefix.mkdirs();
runWine( cmdline, env );

View File

@ -74,6 +74,7 @@ android
{
main.assets.srcDirs = [ "assets" ]
main.java.srcDirs = [ "@srcdir@" ]
main.jniLibs.srcDirs = [ "lib" ]
main.java.excludes = [ "build" ]
main.res.srcDirs = [ "res" ]
main.manifest.srcFile "@srcdir@/AndroidManifest.xml"