Skip to content

Commit

Permalink
Avoid dll unpacking within JSSC
Browse files Browse the repository at this point in the history
This requires a custom build of JSSC.
scream3r/java-simple-serial-connector#105
  • Loading branch information
cmaglie committed May 18, 2017
1 parent 7dcc135 commit 229c32c
Show file tree
Hide file tree
Showing 7 changed files with 33 additions and 4 deletions.
2 changes: 1 addition & 1 deletion app/.classpath
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
<classpathentry kind="lib" path="lib/slf4j-api-1.7.22.jar"/>
<classpathentry kind="lib" path="lib/slf4j-simple-1.7.22.jar"/>
<classpathentry kind="lib" path="lib/jsch-0.1.50.jar"/>
<classpathentry kind="lib" path="lib/jssc-2.8.0.jar"/>
<classpathentry kind="lib" path="lib/jssc-2.8.0-arduino1.jar"/>
<classpathentry kind="lib" path="lib/rsyntaxtextarea-2.6.1.jar"/>
<classpathentry kind="lib" path="lib/xml-apis-1.3.04.jar"/>
<classpathentry kind="lib" path="lib/xml-apis-ext-1.3.04.jar"/>
Expand Down
Binary file renamed app/lib/jssc-2.8.0.jar → app/lib/jssc-2.8.0-arduino1.jar
100644 → 100755
Binary file not shown.
2 changes: 1 addition & 1 deletion arduino-core/.classpath
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<classpathentry kind="lib" path="lib/jmdns-3.5.1.jar"/>
<classpathentry kind="lib" path="lib/slf4j-api-1.7.22.jar"/>
<classpathentry kind="lib" path="lib/slf4j-simple-1.7.22.jar"/>
<classpathentry kind="lib" path="lib/jssc-2.8.0.jar"/>
<classpathentry kind="lib" path="lib/jssc-2.8.0-arduino1.jar"/>
<classpathentry kind="lib" path="lib/jsch-0.1.50.jar"/>
<classpathentry kind="lib" path="lib/commons-exec-1.1.jar"/>
<classpathentry kind="lib" path="../app/lib/commons-codec-1.7.jar"/>
Expand Down
Binary file renamed arduino-core/lib/jssc-2.8.0.jar → arduino-core/lib/jssc-2.8.0-arduino1.jar
100644 → 100755
Binary file not shown.
27 changes: 27 additions & 0 deletions build/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1037,6 +1037,33 @@
<param name="file" value="windows/work/lib/jnidispatch-4.2.2-win32-x86.dll" />
</antcall>

<exec executable="unzip" failonerror="true">
<arg value="-q" />
<arg value="-n" />
<arg value="-j" />
<arg value="-d" />
<arg value="windows/work/lib" />
<arg value="../arduino-core/lib/jssc-2.8.0-arduino1.jar" />
<arg value="libs/windows/jSSC-2.8_x86.dll" />
</exec>
<move file="windows/work/lib/jSSC-2.8_x86.dll" tofile="windows/work/lib/jSSC-2.8_x86.dll" />
<antcall target="make-file-executable">
<param name="file" value="windows/work/lib/jSSC-2.8_x86.dll" />
</antcall>
<exec executable="unzip" failonerror="true">
<arg value="-q" />
<arg value="-n" />
<arg value="-j" />
<arg value="-d" />
<arg value="windows/work/lib" />
<arg value="../arduino-core/lib/jssc-2.8.0-arduino1.jar" />
<arg value="libs/windows/jSSC-2.8_x86_64.dll" />
</exec>
<move file="windows/work/lib/jSSC-2.8_x86_64.dll" tofile="windows/work/lib/jSSC-2.8_x86_64.dll" />
<antcall target="make-file-executable">
<param name="file" value="windows/work/lib/jSSC-2.8_x86_64.dll" />
</antcall>

<antcall target="assemble">
<param name="target.path" value="windows/work" />
</antcall>
Expand Down
3 changes: 2 additions & 1 deletion build/windows/launcher/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
<cp>%EXEDIR%/lib/jna-4.2.2.jar</cp>
<cp>%EXEDIR%/lib/jna-platform-4.2.2.jar</cp>
<cp>%EXEDIR%/lib/jsch-0.1.50.jar</cp>
<cp>%EXEDIR%/lib/jssc-2.8.0.jar</cp>
<cp>%EXEDIR%/lib/jssc-2.8.0-arduino1.jar</cp>
<cp>%EXEDIR%/lib/pde.jar</cp>
<cp>%EXEDIR%/lib/rsyntaxtextarea-2.6.1.jar</cp>
<cp>%EXEDIR%/lib/xml-apis-1.3.04.jar</cp>
Expand All @@ -63,6 +63,7 @@
<opt>-Djna.nounpack=true</opt>
<opt>-Djna.boot.library.name=jnidispatch-4.2.2-win32-x86</opt>
<opt>-Djna.boot.library.path="%EXEDIR%"/lib</opt>
<opt>-Djssc.library.path="%EXEDIR%"/lib</opt>
<opt>-DAPP_DIR="%EXEDIR%"</opt>
</jre>
<versionInfo>
Expand Down
3 changes: 2 additions & 1 deletion build/windows/launcher/config_debug.xml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
<cp>%EXEDIR%/lib/jna-4.2.2.jar</cp>
<cp>%EXEDIR%/lib/jna-platform-4.2.2.jar</cp>
<cp>%EXEDIR%/lib/jsch-0.1.50.jar</cp>
<cp>%EXEDIR%/lib/jssc-2.8.0.jar</cp>
<cp>%EXEDIR%/lib/jssc-2.8.0-arduino1.jar</cp>
<cp>%EXEDIR%/lib/pde.jar</cp>
<cp>%EXEDIR%/lib/rsyntaxtextarea-2.6.1.jar</cp>
<cp>%EXEDIR%/lib/xml-apis-1.3.04.jar</cp>
Expand All @@ -62,6 +62,7 @@
<opt>-Djna.nounpack=true</opt>
<opt>-Djna.boot.library.name=jnidispatch-4.2.2-win32-x86</opt>
<opt>-Djna.boot.library.path="%EXEDIR%"/lib</opt>
<opt>-Djssc.library.path="%EXEDIR%"/lib</opt>
<opt>-Djna.debug_load=true</opt>
<opt>-DAPP_DIR="%EXEDIR%"</opt>
<opt>-DDEBUG=true</opt>
Expand Down

0 comments on commit 229c32c

Please sign in to comment.