create default paths on android
This commit is contained in:
@@ -286,6 +286,7 @@ JNIEXPORT void JNICALL Java_com_omixlab_panopainter_MainActivity_pickExternalCal
|
||||
LOG("data_path %s", file_path.c_str());
|
||||
App::I.data_path = file_path;
|
||||
App::I.work_path = file_path;
|
||||
App::I.rec_path = file_path + "/frames";
|
||||
}
|
||||
JNIEXPORT void JNICALL Java_com_omixlab_panopainter_MainActivity_contentRectChanged(JNIEnv *end, jobject,
|
||||
jint wnd_w, jint wnd_h, jint rect_left, jint rect_top, jint rect_right, jint rect_bottom)
|
||||
|
||||
@@ -64,6 +64,42 @@ public class MainActivity extends NativeActivity {
|
||||
else
|
||||
Log.v("PanoPainterJava", "create path failed");
|
||||
|
||||
}
|
||||
File frames = new File(pano_dir.getAbsolutePath(), "frames");
|
||||
if (!frames.exists())
|
||||
{
|
||||
if (frames.mkdirs())
|
||||
Log.v("PanoPainterJava", "create path " + frames.getAbsolutePath());
|
||||
else
|
||||
Log.v("PanoPainterJava", "create path failed: " + frames.getAbsolutePath());
|
||||
|
||||
}
|
||||
File brushes = new File(pano_dir.getAbsolutePath(), "brushes");
|
||||
if (!brushes.exists())
|
||||
{
|
||||
if (brushes.mkdirs())
|
||||
Log.v("PanoPainterJava", "create path " + brushes.getAbsolutePath());
|
||||
else
|
||||
Log.v("PanoPainterJava", "create path failed: " + brushes.getAbsolutePath());
|
||||
|
||||
}
|
||||
File brush_thumbs = new File(brushes.getAbsolutePath(), "thumbs");
|
||||
if (!brush_thumbs.exists())
|
||||
{
|
||||
if (brush_thumbs.mkdirs())
|
||||
Log.v("PanoPainterJava", "create path " + brush_thumbs.getAbsolutePath());
|
||||
else
|
||||
Log.v("PanoPainterJava", "create path failed: " + brush_thumbs.getAbsolutePath());
|
||||
|
||||
}
|
||||
File settings = new File(pano_dir.getAbsolutePath(), "settings");
|
||||
if (!settings.exists())
|
||||
{
|
||||
if (settings.mkdirs())
|
||||
Log.v("PanoPainterJava", "create path " + settings.getAbsolutePath());
|
||||
else
|
||||
Log.v("PanoPainterJava", "create path failed: " + settings.getAbsolutePath());
|
||||
|
||||
}
|
||||
pickExternalCallback(pano_dir.getAbsolutePath());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user