Skip to content
This repository has been archived by the owner on May 17, 2020. It is now read-only.

Commit

Permalink
Fix upload when Linux isn't selected for export in dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
gohai committed Jun 4, 2016
1 parent bfb6319 commit bccccbb
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
4 changes: 2 additions & 2 deletions resources/build.properties
Original file line number Diff line number Diff line change
Expand Up @@ -134,12 +134,12 @@ source.repository=https://github.com/gohai/processing-uploadtopi.git
# This is used to compare different versions of the same Tool, and check if an
# update is available.

tool.version=6
tool.version=7


# The version as the user will see it.

tool.prettyVersion=1.0.5
tool.prettyVersion=1.0.6


# The min and max revision of Processing compatible with your Tool.
Expand Down
11 changes: 9 additions & 2 deletions src/gohai/uploadtopi/UploadToPiTool.java
Original file line number Diff line number Diff line change
Expand Up @@ -304,8 +304,15 @@ public void exportSketch() throws NoSuchMethodException, IllegalAccessException,
Mode mode = editor.getMode();
Sketch sketch = editor.getSketch();

Method javaModeMethod = mode.getClass().getMethod("handleExportApplication", sketch.getClass());
javaModeMethod.invoke(mode, sketch);
String oldSetting = Preferences.get("export.application.platform_linux");
Preferences.set("export.application.platform_linux", "true");

try {
Method javaModeMethod = mode.getClass().getMethod("handleExportApplication", sketch.getClass());
javaModeMethod.invoke(mode, sketch);
} finally {
Preferences.set("export.application.platform_linux", oldSetting);
}
}


Expand Down

0 comments on commit bccccbb

Please sign in to comment.