|
24 | 24 | <condition property="platform" value="linux64"><os family="unix" arch="amd64" /></condition>
|
25 | 25 | <condition property="platform" value="linuxarm"><os family="unix" arch="arm" /></condition>
|
26 | 26 |
|
| 27 | + <condition property="windows_host" value="true"><os family="windows" /></condition> |
| 28 | + |
27 | 29 | <condition property="macosx"><equals arg1="${platform}" arg2="macosx" /></condition>
|
28 | 30 | <condition property="windows"><equals arg1="${platform}" arg2="windows" /></condition>
|
29 | 31 | <condition property="linux32"><equals arg1="${platform}" arg2="linux32" /></condition>
|
|
857 | 859 | <unzip src="${archive_file}" dest="${dest_folder}"/>
|
858 | 860 | </target>
|
859 | 861 |
|
| 862 | + <!-- Ensure that the executable flag is set in all enviroments/OS --> |
| 863 | + <target name="make-file-executable" depends="make-file-executable-windows"> |
| 864 | + <chmod perm="755" file="${file}" /> |
| 865 | + </target> |
| 866 | + |
| 867 | + <target name="make-file-executable-windows" if="windows_host"> |
| 868 | + <exec executable="icacls" failonerror="false"> |
| 869 | + <arg value="${file}"/> |
| 870 | + <arg value="/grant"/> |
| 871 | + <arg value="Everyone:(RX)"/> |
| 872 | + </exec> |
| 873 | + </target> |
| 874 | + |
860 | 875 | <target name="linux-dist" depends="build"
|
861 | 876 | description="Build .tar.xz of linux version">
|
862 | 877 |
|
|
983 | 998 | <param name="dest_folder" value="${staging_folder}" />
|
984 | 999 | </antcall>
|
985 | 1000 | <copy file="windows/liblistSerials-${LIBLISTSERIAL-VERSION}/windows/listSerialsj.dll" todir="windows/work/lib/" />
|
986 |
| - <chmod perm="755" file="windows/work/lib/listSerialsj.dll" /> |
| 1001 | + <antcall target="make-file-executable"> |
| 1002 | + <param name="file" value="windows/work/lib/listSerialsj.dll" /> |
| 1003 | + </antcall> |
987 | 1004 |
|
988 | 1005 | <delete dir="${staging_folder}/arduino-builder-windows" includeemptydirs="true"/>
|
989 | 1006 | <mkdir dir="${staging_folder}/arduino-builder-windows"/>
|
|
994 | 1011 | <param name="dest_folder" value="${staging_folder}/arduino-builder-windows" />
|
995 | 1012 | </antcall>
|
996 | 1013 | <copy file="${staging_folder}/arduino-builder-windows/arduino-builder.exe" tofile="windows/work/arduino-builder.exe" />
|
997 |
| - <chmod perm="755" file="windows/work/arduino-builder.exe" /> |
| 1014 | + <antcall target="make-file-executable"> |
| 1015 | + <param name="file" value="windows/work/arduino-builder.exe" /> |
| 1016 | + </antcall> |
998 | 1017 | <move file="${staging_folder}/arduino-builder-windows/tools" tofile="windows/work/tools-builder"/>
|
999 |
| - <chmod perm="755" file="windows/work/tools-builder/ctags/5.8-arduino11/ctags.exe" /> |
| 1018 | + <antcall target="make-file-executable"> |
| 1019 | + <param name="file" value="windows/work/tools-builder/ctags/5.8-arduino11/ctags.exe" /> |
| 1020 | + </antcall> |
1000 | 1021 | <copy todir="windows/work/hardware" overwrite="true">
|
1001 | 1022 | <fileset dir="${staging_folder}/arduino-builder-windows/hardware" includes="*.txt"/>
|
1002 | 1023 | </copy>
|
|
1012 | 1033 | <arg value="com/sun/jna/win32-x86/jnidispatch.dll" />
|
1013 | 1034 | </exec>
|
1014 | 1035 | <move file="windows/work/lib/jnidispatch.dll" tofile="windows/work/lib/jnidispatch-4.2.2-win32-x86.dll" />
|
1015 |
| - <chmod perm="755" file="windows/work/lib/jnidispatch-4.2.2-win32-x86.dll" /> |
| 1036 | + <antcall target="make-file-executable"> |
| 1037 | + <param name="file" value="windows/work/lib/jnidispatch-4.2.2-win32-x86.dll" /> |
| 1038 | + </antcall> |
1016 | 1039 |
|
1017 | 1040 | <antcall target="assemble">
|
1018 | 1041 | <param name="target.path" value="windows/work" />
|
|
0 commit comments