mirror of
https://github.com/arduino/Arduino.git
synced 2025-03-14 11:29:26 +01:00
Fixed bug that sometimes uploaded old code versions. Now showing "compiling..." and "burning bootloader" messages. Up'ed version to 0005.
This commit is contained in:
parent
f636b93381
commit
b8923cfeee
@ -53,7 +53,7 @@ import com.ice.jni.registry.*;
|
|||||||
*/
|
*/
|
||||||
public class Base {
|
public class Base {
|
||||||
static final int VERSION = 3;
|
static final int VERSION = 3;
|
||||||
static final String VERSION_NAME = "0004 Alpha";
|
static final String VERSION_NAME = "0005 Alpha";
|
||||||
|
|
||||||
// platform IDs for PApplet.platform
|
// platform IDs for PApplet.platform
|
||||||
|
|
||||||
|
@ -1269,7 +1269,7 @@ public class Editor extends JFrame
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
public void handleRun(boolean present) {
|
public void handleRun(final boolean present) {
|
||||||
doClose();
|
doClose();
|
||||||
running = true;
|
running = true;
|
||||||
buttons.activate(EditorButtons.RUN);
|
buttons.activate(EditorButtons.RUN);
|
||||||
@ -1299,25 +1299,28 @@ public class Editor extends JFrame
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
SwingUtilities.invokeLater(new Runnable() {
|
||||||
if (!sketch.handleRun(new Target(
|
public void run() {
|
||||||
System.getProperty("user.dir") + File.separator + "lib" +
|
try {
|
||||||
File.separator + "targets", Preferences.get("build.target"))))
|
if (!sketch.handleRun(new Target(
|
||||||
return;
|
System.getProperty("user.dir") + File.separator + "lib" +
|
||||||
|
File.separator + "targets", Preferences.get("build.target"))))
|
||||||
|
return;
|
||||||
|
|
||||||
|
//runtime = new Runner(sketch, Editor.this);
|
||||||
|
//runtime.start(appletLocation);
|
||||||
|
watcher = new RunButtonWatcher();
|
||||||
|
message("Done compiling.");
|
||||||
|
if(watcher != null) watcher.stop();
|
||||||
|
|
||||||
|
} catch (RunnerException e) {
|
||||||
|
message("Error compiling...");
|
||||||
|
error(e);
|
||||||
|
|
||||||
//runtime = new Runner(sketch, Editor.this);
|
} catch (Exception e) {
|
||||||
//runtime.start(appletLocation);
|
e.printStackTrace();
|
||||||
watcher = new RunButtonWatcher();
|
}
|
||||||
message("Done compiling.");
|
}});
|
||||||
if(watcher != null) watcher.stop();
|
|
||||||
|
|
||||||
} catch (RunnerException e) {
|
|
||||||
message("Error compiling...");
|
|
||||||
error(e);
|
|
||||||
|
|
||||||
} catch (Exception e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
|
|
||||||
// this doesn't seem to help much or at all
|
// this doesn't seem to help much or at all
|
||||||
/*
|
/*
|
||||||
@ -1961,34 +1964,37 @@ public class Editor extends JFrame
|
|||||||
System.exit(0);
|
System.exit(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void handleBurnBootloader(boolean parallel) {
|
protected void handleBurnBootloader(final boolean parallel) {
|
||||||
if(debugging)
|
if(debugging)
|
||||||
doStop();
|
doStop();
|
||||||
console.clear();
|
console.clear();
|
||||||
//String what = sketch.isLibrary() ? "Applet" : "Library";
|
//String what = sketch.isLibrary() ? "Applet" : "Library";
|
||||||
//message("Exporting " + what + "...");
|
//message("Exporting " + what + "...");
|
||||||
message("Burning bootloader to I/O Board...");
|
message("Burning bootloader to I/O Board (this may take a minute)...");
|
||||||
try {
|
SwingUtilities.invokeLater(new Runnable() {
|
||||||
//boolean success = sketch.isLibrary() ?
|
public void run() {
|
||||||
//sketch.exportLibrary() : sketch.exportApplet();
|
try {
|
||||||
Uploader uploader = new Uploader();
|
//boolean success = sketch.isLibrary() ?
|
||||||
boolean success = parallel ?
|
//sketch.exportLibrary() : sketch.exportApplet();
|
||||||
uploader.burnBootloaderParallel() :
|
Uploader uploader = new Uploader();
|
||||||
uploader.burnBootloaderAVRISP();
|
boolean success = parallel ?
|
||||||
|
uploader.burnBootloaderParallel() :
|
||||||
if (success) {
|
uploader.burnBootloaderAVRISP();
|
||||||
message("Done burning bootloader.");
|
|
||||||
} else {
|
if (success) {
|
||||||
// error message will already be visible
|
message("Done burning bootloader.");
|
||||||
}
|
} else {
|
||||||
} catch (RunnerException e) {
|
// error message will already be visible
|
||||||
message("Error while burning bootloader.");
|
}
|
||||||
//e.printStackTrace();
|
} catch (RunnerException e) {
|
||||||
error(e);
|
message("Error while burning bootloader.");
|
||||||
} catch (Exception e) {
|
//e.printStackTrace();
|
||||||
e.printStackTrace();
|
error(e);
|
||||||
}
|
} catch (Exception e) {
|
||||||
buttons.clear();
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
buttons.clear();
|
||||||
|
}});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void highlightLine(int lnum) {
|
public void highlightLine(int lnum) {
|
||||||
|
@ -1736,6 +1736,8 @@ public class Sketch {
|
|||||||
// make sure the user didn't hide the sketch folder
|
// make sure the user didn't hide the sketch folder
|
||||||
ensureExistence();
|
ensureExistence();
|
||||||
|
|
||||||
|
current.program = editor.getText();
|
||||||
|
|
||||||
zipFileContents = new Hashtable();
|
zipFileContents = new Hashtable();
|
||||||
|
|
||||||
// nuke the old applet folder because it can cause trouble
|
// nuke the old applet folder because it can cause trouble
|
||||||
|
Loading…
x
Reference in New Issue
Block a user