Build a plug-in
Opened this issue · 3 comments
Hello!
Thanks for the plugin!
I need to change some things. I cloned the repository in the eclipse.
How to get the esp8266fs.jar file?
Please make a quick guide to assembling the plugin.
Windows 10 x64, Arduino 1.8.5
I have specified the actual paths, but the jar file is not created.
#!/usr/bin/env bash
function pause(){
read -p "$*"
}
if [[ -z "$INSTALLDIR" ]]; then
INSTALLDIR="C:/Program Files (x86)/Arduino"
fi
echo "INSTALLDIR: $INSTALLDIR"
pde_path="C:/Program Files (x86)/Arduino/lib/pde.jar"
core_path="C:/Program Files (x86)/Arduino/lib/arduino-core.jar"
lib_path="C:/Program Files (x86)/Arduino/lib/commons-codec-1.7.jar"
if [[ -z "$core_path" || -z "$pde_path" ]]; then
echo "Some java libraries have not been built yet (did you run ant build?)"
return 1
fi
echo "pde_path: $pde_path"
echo "core_path: $core_path"
echo "lib_path: $lib_path"
set -e
mkdir -p bin
pause 'Press [Enter] key to continue...'
javac -target 1.8 -cp "$pde_path:$core_path:$lib_path" -d bin src/ESP8266FS.java
pause 'Press [Enter] key to continue...'
pushd bin
mkdir -p $INSTALLDIR/tools
rm -rf $INSTALLDIR/tools/ESP8266FS
mkdir -p $INSTALLDIR/tools/ESP8266FS/tool
zip -r $INSTALLDIR/tools/ESP8266FS/tool/esp8266fs.jar *
popd
dist=$PWD/dist
rev=$(git describe --tags)
mkdir -p $dist
pushd $INSTALLDIR/tools
zip -r $dist/ESP8266FS-$rev.zip ESP8266FS/
popd
The terminal closes very quickly and there are no errors that can be seen.
Pause work to string: javac -target 1.8 -cp "$pde_path:$core_path:$lib_path" -d bin src/ESP8266FS.java
After that, pauses do not help either.
I tried to copy files pde.jar, arduino-core.jar, commons-codec-1.7.jar to the folder so that there were no spaces in the path. Did not help.
HELP!
I tried to run a command in the terminal separately and got errors:
D:\ESP8266FS>javac -target 1.8 -cp "C:/Program Files (x86)/Arduino/lib/pde.jar":"C:/Program Files (x86)/Arduino/lib/arduino-core.jar":"C:/Program Files (x86)/Arduino/lib/commons-codec-1.7.jar" -d bin src/ESP8266FS.java
src\ESP8266FS.java:37: error: package processing.app does not exist
import processing.app.PreferencesData;
^
src\ESP8266FS.java:38: error: package processing.app does not exist
import processing.app.Editor;
^
src\ESP8266FS.java:39: error: package processing.app does not exist
import processing.app.Base;
^
src\ESP8266FS.java:40: error: package processing.app does not exist
import processing.app.BaseNoGui;
^
src\ESP8266FS.java:41: error: package processing.app does not exist
import processing.app.Platform;
^
src\ESP8266FS.java:42: error: package processing.app does not exist
import processing.app.Sketch;
^
src\ESP8266FS.java:43: error: package processing.app.tools does not exist
import processing.app.tools.Tool;
^
src\ESP8266FS.java:44: error: package processing.app.helpers does not exist
import processing.app.helpers.ProcessUtils;
^
src\ESP8266FS.java:45: error: package processing.app.debug does not exist
import processing.app.debug.TargetPlatform;
^
src\ESP8266FS.java:47: error: package org.apache.commons.codec.digest does not exist
import org.apache.commons.codec.digest.DigestUtils;
^
src\ESP8266FS.java:48: error: package processing.app.helpers does not exist
import processing.app.helpers.FileUtils;
^
src\ESP8266FS.java:50: error: package cc.arduino.files does not exist
import cc.arduino.files.DeleteFilesOnShutdown;
^
src\ESP8266FS.java:55: error: cannot find symbol
public class ESP8266FS implements Tool {
^
symbol: class Tool
src\ESP8266FS.java:56: error: cannot find symbol
Editor editor;
^
symbol: class Editor
location: class ESP8266FS
src\ESP8266FS.java:59: error: cannot find symbol
public void init(Editor editor) {
^
symbol: class Editor
location: class ESP8266FS
src\ESP8266FS.java:113: error: cannot find symbol
private String getBuildFolderPath(Sketch s) {
^
symbol: class Sketch
location: class ESP8266FS
src\ESP8266FS.java:70: error: cannot find symbol
final Process p = ProcessUtils.exec(arguments);
^
symbol: variable ProcessUtils
location: class ESP8266FS
src\ESP8266FS.java:125: error: cannot find symbol
File buildFolder = FileUtils.createTempFolder("build", DigestUtils.md5Hex(s.getMainFilePath()) + ".tmp");
^
symbol: variable DigestUtils
location: class ESP8266FS
src\ESP8266FS.java:125: error: cannot find symbol
File buildFolder = FileUtils.createTempFolder("build", DigestUtils.md5Hex(s.getMainFilePath()) + ".tmp");
^
symbol: variable FileUtils
location: class ESP8266FS
src\ESP8266FS.java:136: error: cannot find symbol
method = BaseNoGui.class.getMethod("getBuildFolder");
^
symbol: class BaseNoGui
location: class ESP8266FS
src\ESP8266FS.java:154: error: cannot find symbol
String data = BaseNoGui.getBoardPreferences().get(name);
^
symbol: variable BaseNoGui
location: class ESP8266FS
src\ESP8266FS.java:161: error: cannot find symbol
if(!PreferencesData.get("target_platform").contentEquals("esp8266")){
^
symbol: variable PreferencesData
location: class ESP8266FS
src\ESP8266FS.java:163: error: cannot find symbol
editor.statusError("SPIFFS Not Supported on "+PreferencesData.get("target_platform"));
^
symbol: variable PreferencesData
location: class ESP8266FS
src\ESP8266FS.java:167: error: cannot find symbol
if(!BaseNoGui.getBoardPreferences().containsKey("build.spiffs_start") || !BaseNoGui.getBoardPreferences().containsKey("build.spiffs_end")){
^
symbol: variable BaseNoGui
location: class ESP8266FS
src\ESP8266FS.java:167: error: cannot find symbol
if(!BaseNoGui.getBoardPreferences().containsKey("build.spiffs_start") || !BaseNoGui.getBoardPreferences().containsKey("build.spiffs_end")){
^
symbol: variable BaseNoGui
location: class ESP8266FS
src\ESP8266FS.java:169: error: cannot find symbol
editor.statusError("SPIFFS Not Defined for "+BaseNoGui.getBoardPreferences().get("name"));
^
symbol: variable BaseNoGui
location: class ESP8266FS
src\ESP8266FS.java:185: error: cannot find symbol
TargetPlatform platform = BaseNoGui.getTargetPlatform();
^
symbol: class TargetPlatform
location: class ESP8266FS
src\ESP8266FS.java:185: error: cannot find symbol
TargetPlatform platform = BaseNoGui.getTargetPlatform();
^
symbol: variable BaseNoGui
location: class ESP8266FS
src\ESP8266FS.java:189: error: cannot find symbol
if(PreferencesData.get("runtime.os").contentEquals("windows"))
^
symbol: variable PreferencesData
location: class ESP8266FS
src\ESP8266FS.java:198: error: cannot find symbol
tool = new File(PreferencesData.get("runtime.tools.mkspiffs.path"), mkspiffsCmd);
^
symbol: variable PreferencesData
location: class ESP8266FS
src\ESP8266FS.java:210: error: cannot find symbol
String serialPort = PreferencesData.get("serial.port");
^
symbol: variable PreferencesData
location: class ESP8266FS
src\ESP8266FS.java:235: error: cannot find symbol
esptool = new File(PreferencesData.get("runtime.tools.esptool.path"), esptoolCmd);
^
symbol: variable PreferencesData
location: class ESP8266FS
src\ESP8266FS.java:264: error: cannot find symbol
String resetMethod = BaseNoGui.getBoardPreferences().get("upload.resetmethod");
^
symbol: variable BaseNoGui
location: class ESP8266FS
src\ESP8266FS.java:265: error: cannot find symbol
String uploadSpeed = BaseNoGui.getBoardPreferences().get("upload.speed");
^
symbol: variable BaseNoGui
location: class ESP8266FS
src\ESP8266FS.java:266: error: cannot find symbol
String uploadAddress = BaseNoGui.getBoardPreferences().get("build.spiffs_start");
^
symbol: variable BaseNoGui
location: class ESP8266FS
src\ESP8266FS.java:303: error: cannot find symbol
if(PreferencesData.get("runtime.os").contentEquals("windows"))
^
symbol: variable PreferencesData
location: class ESP8266FS
36 errors```
how do I create the .jar file, using windows, what compiler do I use