I am building dmg file by using ant tool, but I am getting error while build.
Extract of build.xml:
...
<copy todir="${mac.build.dir}/.background">
<fileset file="${basedir}/build/installer/images/mac/dmgBackground.png"/>
</copy>
<symlink link="${mac.build.dir}/Applications" overwrite="true" resource="/Applications" />
<echo message="Create tmp.dmg"/>
<exec executable="hdiutil" failonerror="true">
<arg line="create -srcfolder '${mac.build.dir}' -volname '${mac.volname}' -fs HFS+ -fsargs '-c c=64,a=16,e=16' -format UDRW '${target}/tmp.dmg'"/>
</exec>
....
Error:
**BUILD FAILED
D:\DevProjects\spark\build\build.xml:761: Could not launch ln: java.io.IOException: Cannot run program "ln": CreateProcess error=2, The system cannot find the file specified**
I used script to invoke dmg file creation is ant installer.mac
Am I invoking correct target or wrong one?
Ant’s
symlinktask doesn’t work on Windows variants.See SO: Ant symlink task on windows (NTFS)
From the Ant documentation:
… and …
As to how to fix it, I’m now out of my depth as I’ve never made a DMG before. However, the symlink is a link to the Applications folder, and may simply be there so that the user has a handy link to drag the application to in order to copy into Applications. As such, that link may not be strictly necessary. If anyone can shine some light on this, please do.