Skip to content

Got rid on JNA #3194

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 21, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .classpath
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
<classpathentry kind="lib" path="app/lib/antlr.jar"/>
<classpathentry kind="lib" path="app/lib/apple.jar"/>
<classpathentry kind="lib" path="app/lib/ecj.jar"/>
<classpathentry kind="lib" path="app/lib/jna.jar"/>
<classpathentry kind="lib" path="app/test-lib/junit-4.11.jar"/>
<classpathentry kind="lib" path="app/test-lib/fest-assert-1.2.jar"/>
<classpathentry kind="lib" path="app/test-lib/fest-reflect-1.2.jar"/>
Expand Down
1 change: 0 additions & 1 deletion app/.classpath
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
<classpathentry kind="src" path="test"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="lib" path="lib/antlr.jar"/>
<classpathentry kind="lib" path="lib/jna.jar"/>
<classpathentry kind="lib" path="lib/ecj.jar"/>
<classpathentry kind="lib" path="lib/apple.jar"/>
<classpathentry kind="lib" path="lib/bcpg-jdk15on-152.jar"/>
Expand Down
1 change: 0 additions & 1 deletion app/.classpath_macosx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
<classpathentry combineaccessrules="false" kind="src" path="/serial"/>
<classpathentry combineaccessrules="false" kind="src" path="/video"/>
<classpathentry kind="lib" path="lib/antlr.jar"/>
<classpathentry kind="lib" path="lib/jna.jar"/>
<classpathentry kind="lib" path="lib/ecj.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>
21 changes: 0 additions & 21 deletions app/.classpath_vista

This file was deleted.

1 change: 0 additions & 1 deletion app/lib/jna.LICENSE.LGPL-2.1.txt

This file was deleted.

Binary file removed app/lib/jna.jar
Binary file not shown.
22 changes: 0 additions & 22 deletions app/run-linux.launch

This file was deleted.

7 changes: 0 additions & 7 deletions app/src/cc/arduino/view/preferences/Preferences.form
Original file line number Diff line number Diff line change
Expand Up @@ -617,13 +617,6 @@
</Property>
</Properties>
</Component>
<Component class="javax.swing.JCheckBox" name="autoAssociateBox">
<Properties>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.form.RADConnectionPropertyEditor">
<Connection code="_(&quot;Automatically associate .ino files with Arduino&quot;)" type="code"/>
</Property>
</Properties>
</Component>
<Component class="javax.swing.JCheckBox" name="saveVerifyUploadBox">
<Properties>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.form.RADConnectionPropertyEditor">
Expand Down
19 changes: 0 additions & 19 deletions app/src/cc/arduino/view/preferences/Preferences.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
import processing.app.I18n;
import processing.app.PreferencesData;
import processing.app.helpers.FileUtils;
import processing.app.helpers.OSUtils;
import processing.app.legacy.PApplet;

import javax.swing.*;
Expand Down Expand Up @@ -198,11 +197,6 @@ public void actionPerformed(ActionEvent e) {
}
});

if (!OSUtils.isWindows() || base.getPortableFolder() != null) {
autoAssociateBox.setEnabled(false);
autoAssociateBox.getParent().remove(autoAssociateBox);
}

showPrerefencesData();
}

Expand Down Expand Up @@ -256,7 +250,6 @@ private void initComponents() {
externalEditorBox = new javax.swing.JCheckBox();
checkUpdatesBox = new javax.swing.JCheckBox();
updateExtensionBox = new javax.swing.JCheckBox();
autoAssociateBox = new javax.swing.JCheckBox();
saveVerifyUploadBox = new javax.swing.JCheckBox();

setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
Expand Down Expand Up @@ -445,9 +438,6 @@ public void actionPerformed(java.awt.event.ActionEvent evt) {
updateExtensionBox.setText(_("Update sketch files to new extension on save (.pde -> .ino)"));
checkboxesContainer.add(updateExtensionBox);

autoAssociateBox.setText(_("Automatically associate .ino files with Arduino"));
checkboxesContainer.add(autoAssociateBox);

saveVerifyUploadBox.setText(_("Save when verifying or uploading"));
checkboxesContainer.add(saveVerifyUploadBox);

Expand Down Expand Up @@ -610,7 +600,6 @@ private void okButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRS

// Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JTextField additionalBoardsManagerField;
private javax.swing.JCheckBox autoAssociateBox;
private javax.swing.JCheckBox checkUpdatesBox;
private javax.swing.JComboBox comboLanguage;
private javax.swing.JComboBox comboWarnings;
Expand Down Expand Up @@ -683,10 +672,6 @@ private void savePreferencesData() {

PreferencesData.setBoolean("editor.update_extension", updateExtensionBox.isSelected());

if (autoAssociateBox != null) {
PreferencesData.setBoolean("platform.auto_file_type_associations", autoAssociateBox.isSelected());
}

PreferencesData.setBoolean("editor.save_on_verify", saveVerifyUploadBox.isSelected());

PreferencesData.set("proxy.http.server", proxyHTTPServer.getText());
Expand Down Expand Up @@ -744,10 +729,6 @@ private void showPrerefencesData() {

updateExtensionBox.setSelected(PreferencesData.get("editor.update_extension") == null || PreferencesData.getBoolean("editor.update_extension"));

if (autoAssociateBox != null) {
autoAssociateBox.setSelected(PreferencesData.getBoolean("platform.auto_file_type_associations"));
}

saveVerifyUploadBox.setSelected(PreferencesData.getBoolean("editor.save_on_verify"));

proxyHTTPServer.setText(PreferencesData.get("proxy.http.server"));
Expand Down
4 changes: 2 additions & 2 deletions app/src/processing/app/Base.java
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,8 @@ static public void guardedMain(String args[]) throws Exception {

initPlatform();

getPlatform().init();

BaseNoGui.initPortableFolder();

BaseNoGui.initParameters(args);
Expand Down Expand Up @@ -284,8 +286,6 @@ static public File absoluteFile(String path) {
}

public Base(String[] args) throws Exception {
getPlatform().init();

String sketchbookPath = BaseNoGui.getSketchbookPath();

// If no path is set, get the default sketchbook folder for this platform
Expand Down
29 changes: 29 additions & 0 deletions app/test/processing/app/windows/RegQueryParserTest.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
package processing.app.windows;

import org.junit.Test;

import static org.junit.Assert.assertEquals;

public class RegQueryParserTest {

@Test
public void testRegQueryParser() throws Exception {
String output = "! REG.EXE VERSION 3.0\n" +
"\n" +
"HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders\n" +
"\n" +
" Local AppData REG_SZ C:\\Documents and Settings\\username\\My Documents";

String folderPath = new RegQueryParser(output).getValueOfKey();
assertEquals("C:\\Documents and Settings\\username\\My Documents", folderPath);
}

@Test
public void testRegQueryParser2() throws Exception {
String output = "HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders\n" +
" Local AppData REG_SZ C:\\Users\\username\\AppData\\Local";

String folderPath = new RegQueryParser(output).getValueOfKey();
assertEquals("C:\\Users\\username\\AppData\\Local", folderPath);
}
}
1 change: 0 additions & 1 deletion arduino-core/.classpath
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="lib" path="lib/jna.jar"/>
<classpathentry kind="lib" path="lib/apple.jar"/>
<classpathentry kind="lib" path="lib/commons-logging-1.0.4.jar"/>
<classpathentry kind="lib" path="lib/jmdns-3.4.1.jar"/>
Expand Down
1 change: 0 additions & 1 deletion arduino-core/lib/jna.LICENSE.LGPL-2.1.txt

This file was deleted.

Binary file removed arduino-core/lib/jna.jar
Binary file not shown.
6 changes: 3 additions & 3 deletions arduino-core/src/processing/app/BaseNoGui.java
Original file line number Diff line number Diff line change
Expand Up @@ -425,8 +425,6 @@ static public String[] headerListFromIncludePath(File path) throws IOException {
}

static public void init(String[] args) throws Exception {
getPlatform().init();

String sketchbookPath = getSketchbookPath();

// If no path is set, get the default sketchbook folder for this platform
Expand Down Expand Up @@ -740,7 +738,9 @@ static public void main(String args[]) throws Exception {
Runtime.getRuntime().addShutdownHook(new Thread(DeleteFilesOnShutdown.INSTANCE));

initPlatform();


getPlatform().init();

initPortableFolder();

initParameters(args);
Expand Down
2 changes: 2 additions & 0 deletions arduino-core/src/processing/app/macosx/Platform.java
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ public Platform() {
}

public void init() throws IOException {
super.init();

System.setProperty("apple.laf.useScreenMenuBar", "true");

discoverRealOsArch();
Expand Down
Loading