|
856 | 856 | <unzip src="${archive_file}" dest="${dest_folder}"/>
|
857 | 857 | </target>
|
858 | 858 |
|
| 859 | + <!-- Ensure that the executable flag is set in all enviroments/OS --> |
| 860 | + <target name="make-file-executable" depends="make-file-executable-windows"> |
| 861 | + <chmod perm="755" file="${file}" /> |
| 862 | + </target> |
| 863 | + |
| 864 | + <target name="make-file-executable-windows" if="windows"> |
| 865 | + <exec executable="icacls" failonerror="false"> |
| 866 | + <arg value="${file}"/> |
| 867 | + <arg value="/grant"/> |
| 868 | + <arg value="Everyone:(RX)"/> |
| 869 | + </exec> |
| 870 | + </target> |
| 871 | + |
859 | 872 | <target name="linux-dist" depends="build"
|
860 | 873 | description="Build .tar.xz of linux version">
|
861 | 874 |
|
|
982 | 995 | <param name="dest_folder" value="${staging_folder}" />
|
983 | 996 | </antcall>
|
984 | 997 | <copy file="windows/liblistSerials-${LIBLISTSERIAL-VERSION}/windows/listSerialsj.dll" todir="windows/work/lib/" />
|
985 | | - <chmod perm="755" file="windows/work/lib/listSerialsj.dll" /> |
| 998 | + <antcall target="make-file-executable"> |
| 999 | + <param name="file" value="windows/work/lib/listSerialsj.dll" /> |
| 1000 | + </antcall> |
986 | 1001 |
|
987 | 1002 | <delete dir="${staging_folder}/arduino-builder-windows" includeemptydirs="true"/>
|
988 | 1003 | <mkdir dir="${staging_folder}/arduino-builder-windows"/>
|
|
993 | 1008 | <param name="dest_folder" value="${staging_folder}/arduino-builder-windows" />
|
994 | 1009 | </antcall>
|
995 | 1010 | <copy file="${staging_folder}/arduino-builder-windows/arduino-builder.exe" tofile="windows/work/arduino-builder.exe" />
|
996 | | - <chmod perm="755" file="windows/work/arduino-builder.exe" /> |
| 1011 | + <antcall target="make-file-executable"> |
| 1012 | + <param name="file" value="windows/work/arduino-builder.exe" /> |
| 1013 | + </antcall> |
997 | 1014 | <move file="${staging_folder}/arduino-builder-windows/tools" tofile="windows/work/tools-builder"/>
|
998 | | - <chmod perm="755" file="windows/work/tools-builder/ctags/5.8-arduino11/ctags.exe" /> |
| 1015 | + <antcall target="make-file-executable"> |
| 1016 | + <param name="file" value="windows/work/tools-builder/ctags/5.8-arduino11/ctags.exe" /> |
| 1017 | + </antcall> |
999 | 1018 | <copy todir="windows/work/hardware" overwrite="true">
|
1000 | 1019 | <fileset dir="${staging_folder}/arduino-builder-windows/hardware" includes="*.txt"/>
|
1001 | 1020 | </copy>
|
|
1011 | 1030 | <arg value="com/sun/jna/win32-x86/jnidispatch.dll" />
|
1012 | 1031 | </exec>
|
1013 | 1032 | <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" /> |
| 1033 | + <antcall target="make-file-executable"> |
| 1034 | + <param name="file" value="windows/work/lib/jnidispatch-4.2.2-win32-x86.dll" /> |
| 1035 | + </antcall> |
1015 | 1036 |
|
1016 | 1037 | <antcall target="assemble">
|
1017 | 1038 | <param name="target.path" value="windows/work" />
|
|
0 commit comments