mirror of
https://github.com/processing/processing4.git
synced 2026-02-03 21:59:20 +01:00
moving functions
This commit is contained in:
@@ -143,7 +143,7 @@ class AndroidBuild extends JavaBuild {
|
||||
File androidFolder = new File(sketch.getFolder(), "android");
|
||||
if (androidFolder.exists()) {
|
||||
// Date mod = new Date(androidFolder.lastModified());
|
||||
String stamp = AndroidEditor.getDateStamp(androidFolder.lastModified());
|
||||
String stamp = AndroidMode.getDateStamp(androidFolder.lastModified());
|
||||
File dest = new File(sketch.getFolder(), "android." + stamp);
|
||||
boolean result = androidFolder.renameTo(dest);
|
||||
if (!result) {
|
||||
|
||||
@@ -25,8 +25,6 @@ import java.awt.event.ActionEvent;
|
||||
import java.awt.event.ActionListener;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.ExecutionException;
|
||||
@@ -288,17 +286,6 @@ public class AndroidEditor extends JavaEditor implements DeviceListener {
|
||||
// }
|
||||
|
||||
|
||||
static final SimpleDateFormat dateFormat = new SimpleDateFormat("yyMMdd.HHmm");
|
||||
|
||||
static public String getDateStamp() {
|
||||
return dateFormat.format(new Date());
|
||||
}
|
||||
|
||||
static public String getDateStamp(long stamp) {
|
||||
return dateFormat.format(new Date(stamp));
|
||||
}
|
||||
|
||||
|
||||
// if user asks for 480x320, 320x480, 854x480 etc, then launch like that
|
||||
// though would need to query the emulator to see if it can do that
|
||||
|
||||
|
||||
@@ -22,6 +22,8 @@
|
||||
package processing.mode.android;
|
||||
|
||||
import java.io.File;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
|
||||
import processing.app.*;
|
||||
import processing.mode.java.JavaMode;
|
||||
@@ -48,6 +50,9 @@ public class AndroidMode extends JavaMode {
|
||||
}
|
||||
|
||||
|
||||
// . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
|
||||
|
||||
|
||||
protected File getCoreZipLocation() {
|
||||
if (coreZipLocation == null) {
|
||||
// for debugging only, check to see if this is an svn checkout
|
||||
@@ -68,4 +73,24 @@ public class AndroidMode extends JavaMode {
|
||||
}
|
||||
return coreZipLocation;
|
||||
}
|
||||
|
||||
|
||||
// . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
|
||||
|
||||
|
||||
static final SimpleDateFormat dateFormat = new SimpleDateFormat("yyMMdd.HHmm");
|
||||
|
||||
|
||||
static public String getDateStamp() {
|
||||
return dateFormat.format(new Date());
|
||||
}
|
||||
|
||||
|
||||
static public String getDateStamp(long stamp) {
|
||||
return dateFormat.format(new Date(stamp));
|
||||
}
|
||||
|
||||
|
||||
// . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
|
||||
|
||||
}
|
||||
@@ -234,7 +234,7 @@ public class Manifest {
|
||||
|
||||
// remove the old manifest file, rename it with date stamp
|
||||
long lastModified = manifestFile.lastModified();
|
||||
String stamp = AndroidEditor.getDateStamp(lastModified);
|
||||
String stamp = AndroidMode.getDateStamp(lastModified);
|
||||
File dest = new File(sketch.getFolder(), MANIFEST_XML + "." + stamp);
|
||||
boolean moved = manifestFile.renameTo(dest);
|
||||
if (!moved) {
|
||||
|
||||
Reference in New Issue
Block a user