Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit a59cf8e

Browse files
committed
JNA: try to avoid unzipping jnidispatch.dll from jar on Windows
Normally if JNA doesn't find the jnidispatch.dll it tries to extract it from the jar into a temp folder and load from there. This is being restriscted on Microsoft Apps for the app-store and this commit prevents this behaviour.
1 parent c6bac06 commit a59cf8e

File tree

3 files changed

+16
-0
lines changed

3 files changed

+16
-0
lines changed

‎build/build.xml‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1001,6 +1001,18 @@
10011001
</copy>
10021002
<delete dir="${staging_folder}/arduino-builder-windows" includeemptydirs="true"/>
10031003

1004+
<exec executable="unzip" failonerror="true">
1005+
<arg value="-q" />
1006+
<arg value="-n" />
1007+
<arg value="-j" />
1008+
<arg value="-d" />
1009+
<arg value="windows/work/lib" />
1010+
<arg value="../arduino-core/lib/jna-4.2.2.jar" />
1011+
<arg value="com/sun/jna/win32-x86/jnidispatch.dll" />
1012+
</exec>
1013+
<move file="windows/work/lib/jnidispatch.dll" tofile="windows/work/lib/jnidispatch-4.2.2-win32-x86.dll" />
1014+
<chmod perm="755" file="windows/work/lib/jnidispatch-4.2.2-win32-x86.dll" />
1015+
10041016
<antcall target="assemble">
10051017
<param name="target.path" value="windows/work" />
10061018
</antcall>

‎build/windows/launcher/config.xml‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,8 @@
6060
<opt>-splash:"%EXEDIR%/lib/splash.png"</opt>
6161
<opt>-Dsun.java2d.d3d=false</opt>
6262
<opt>-Djna.nosys=true</opt>
63+
<opt>-Djna.boot.library.name=jnidispatch-4.2.2-win32-x86</opt>
64+
<opt>-Djna.boot.library.path=lib</opt>
6365
<opt>-DAPP_DIR="%EXEDIR%"</opt>
6466
</jre>
6567
<versionInfo>

‎build/windows/launcher/config_debug.xml‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@
5959
<runtimeBits>32</runtimeBits>
6060
<opt>-Dsun.java2d.d3d=false</opt>
6161
<opt>-Djna.nosys=true</opt>
62+
<opt>-Djna.boot.library.name=jnidispatch-4.2.2-win32-x86</opt>
63+
<opt>-Djna.boot.library.path=lib</opt>
6264
<opt>-DAPP_DIR="%EXEDIR%"</opt>
6365
<opt>-DDEBUG=true</opt>
6466
</jre>

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /