Skip to content
Snippets Groups Projects
Commit a724093c authored by Maxime Graulich's avatar Maxime Graulich
Browse files

Fixes for Android

parent 821b6700
No related branches found
No related tags found
No related merge requests found
...@@ -20,14 +20,14 @@ ...@@ -20,14 +20,14 @@
<action android:name="android.intent.action.MAIN" /> <action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" /> <category android:name="android.intent.category.LAUNCHER" />
</intent-filter> </intent-filter>
<intent-filter> <intent-filter>
<action android:name="android.intent.action.VIEW" /> <action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" /> <category android:name="android.intent.category.DEFAULT" />
<data android:scheme="file" android:host="*" android:pathPattern=".*\\.msh" android:mimeType="*/*" /> <data android:scheme="file" android:host="*" android:pathPattern=".*\\.msh" android:mimeType="*/*" />
<data android:scheme="file" android:host="*" android:pathPattern=".*\\.geo" android:mimeType="*/*" /> <data android:scheme="file" android:host="*" android:pathPattern=".*\\.geo" android:mimeType="*/*" />
<data android:scheme="file" android:host="*" android:pathPattern=".*\\.pro" android:mimeType="*/*" /> <data android:scheme="file" android:host="*" android:pathPattern=".*\\.pro" android:mimeType="*/*" />
</intent-filter> </intent-filter>
</activity> </activity>
</application> </application>
</manifest> </manifest>
\ No newline at end of file
...@@ -25,6 +25,7 @@ import android.app.ProgressDialog; ...@@ -25,6 +25,7 @@ import android.app.ProgressDialog;
import android.content.Context; import android.content.Context;
import android.content.DialogInterface; import android.content.DialogInterface;
import android.content.Intent;
import android.content.res.Configuration; import android.content.res.Configuration;
import android.content.res.XmlResourceParser; import android.content.res.XmlResourceParser;
import android.graphics.Color; import android.graphics.Color;
...@@ -94,7 +95,7 @@ public class MainActivity extends Activity { ...@@ -94,7 +95,7 @@ public class MainActivity extends Activity {
dialogBuilder = new AlertDialog.Builder(this); dialogBuilder = new AlertDialog.Builder(this);
Intent intent = getIntent(); Intent intent = getIntent();
gmsh = new Gmsh("", mainHandler); gmsh = new Gmsh("", mainHandler);
modelList = new Models(); modelList = new Models();
getModels(); getModels();
...@@ -107,7 +108,7 @@ public class MainActivity extends Activity { ...@@ -107,7 +108,7 @@ public class MainActivity extends Activity {
model = 0; model = 0;
String tmp = getFilesDir()+ "/" + modelList.getFile(model); String tmp = getFilesDir()+ "/" + modelList.getFile(model);
gmsh.load(tmp); gmsh.load(tmp);
} }
setContentView(layout); setContentView(layout);
} }
......
...@@ -4,12 +4,12 @@ cmake_minimum_required(VERSION 2.8 FATAL_ERROR) ...@@ -4,12 +4,12 @@ cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
set(DEFAULT ON CACHE INTERNAL "Default value for enabled-by-default options") set(DEFAULT ON CACHE INTERNAL "Default value for enabled-by-default options")
option(ENABLE_BUILD_ANDROID "Build library for Android NDK (ARMv7)" OFF)
if(APPLE) if(APPLE)
option(ENABLE_BUILD_IOS "Build library for iOS (ARM)" OFF) option(ENABLE_BUILD_IOS "Build library for iOS (ARM)" OFF)
option(ENABLE_BUILD_IOS_EMULATOR "Build library for iOS emulator (x86)" ON) option(ENABLE_BUILD_IOS_EMULATOR "Build library for iOS emulator (x86)" ON)
option(ENABLE_BUILD_ANDROID "Build library for Android NDK (ARMv7)" OFF)
else(APPLE) else(APPLE)
set(ENABLE_BUILD_ANDROID ON) option(ENABLE_BUILD_ANDROID "Build library for Android NDK (ARMv7)" ON)
endif(APPLE) endif(APPLE)
macro(set_config_option VARNAME STRING) macro(set_config_option VARNAME STRING)
......
...@@ -3,9 +3,11 @@ ...@@ -3,9 +3,11 @@
#include <string> #include <string>
#if defined(BUILD_IOS)
#include <Gmsh/PView.h> #include <Gmsh/PView.h>
#include <Gmsh/PViewOptions.h> #include <Gmsh/PViewOptions.h>
#include <Gmsh/Context.h> #include <Gmsh/Context.h>
#endif
int onelab_cb(const std::string); int onelab_cb(const std::string);
...@@ -50,4 +52,4 @@ public: ...@@ -50,4 +52,4 @@ public:
bool isShowedGeom(){return _showGeom;} bool isShowedGeom(){return _showGeom;}
}; };
#endif #endif
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment