Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

113 lines (112 sloc) 7.433 kB
<project name="MPS-os-specific" default="empty">
<property name="dist.folder.name" value="MPS ${version}" />
<property name="mps.sh" value="mps.sh" />
<property name="mps.bat" value="mps.bat" />
<property name="mps.vmoptions" value="mps.vmoptions" />
<property name="mps.exe.vmoptions" value="mps.exe.vmoptions" />
<property name="MPS" value="MPS" />
<property name="mpshelp.jar" value="help/mpshelp.jar" />
<condition property="windows">
<os family="windows" />
</condition>
<target name="empty" />
<target name="tar">
<fail unless="input.dir" message="Property input.dir unspecified." />
<fail unless="build.number" message="Property build.number unspecified." />
<fail unless="output.dir" message="Property output.dir unspecified." />
<fixcrlf file="${input.dir}/${mps.sh}" eof="remove" eol="unix" />
<fixcrlf file="${input.dir}/${mps.vmoptions}" eof="remove" eol="unix" />
<tar destfile="${output.dir}/${build.number}-linux.tar.gz" compression="gzip">
<tarfileset dir="${input.dir}/${MPS}" excludes="**/*.dll, **/*.exe, **/bin/linux/, **/bin/mac/, **/bin/nix/, **/bin/win/" prefix="${dist.folder.name}" />
<tarfileset file="${input.dir}/${mps.sh}" prefix="${dist.folder.name}" filemode="755" />
<tarfileset dir="${input.dir}/bin/linux" prefix="${dist.folder.name}/bin" excludes="**/fsnotifier, **/fsnotifier64" />
<tarfileset file="${input.dir}/bin/linux/fsnotifier" prefix="${dist.folder.name}/bin" filemode="755" />
<tarfileset file="${input.dir}/bin/linux/fsnotifier64" prefix="${dist.folder.name}/bin" filemode="755" />
<tarfileset file="${input.dir}/${mps.vmoptions}" prefix="${dist.folder.name}/bin" />
<tarfileset file="${input.dir}/${mpshelp.jar}" prefix="${dist.folder.name}/help" />
</tar>
</target>
<target name="zip">
<fail unless="input.dir" message="Property input.dir unspecified." />
<fail unless="output.dir" message="Property output.dir unspecified." />
<fail unless="build.number" message="Property build.number unspecified." />
<fixcrlf file="${input.dir}/${mps.sh}" eof="remove" eol="unix" />
<fixcrlf file="${input.dir}/${mps.bat}" eof="asis" eol="dos" />
<fixcrlf file="${input.dir}/${mps.vmoptions}" eof="remove" eol="unix" />
<fixcrlf file="${input.dir}/${mps.exe.vmoptions}" eof="asis" eol="dos" />
<zip destfile="${output.dir}/${build.number}.zip">
<zipfileset dir="${input.dir}/${MPS}" prefix="${dist.folder.name}" excludes="**/bin/mac/fsnotifier, **/bin/linux/fsnotifier, **/bin/linux/fsnotifier64" />
<zipfileset file="${input.dir}/${mps.sh}" prefix="${dist.folder.name}" filemode="755" />
<zipfileset file="${input.dir}/bin/mac/fsnotifier" prefix="${dist.folder.name}/bin/mac" filemode="755" />
<zipfileset file="${input.dir}/bin/linux/fsnotifier" prefix="${dist.folder.name}/bin/linux" filemode="755" />
<zipfileset file="${input.dir}/bin/linux/fsnotifier64" prefix="${dist.folder.name}/bin/linux" filemode="755" />
<zipfileset file="${input.dir}/${mps.bat}" prefix="${dist.folder.name}" />
<zipfileset file="${input.dir}/${mps.vmoptions}" prefix="${dist.folder.name}/bin" />
<zipfileset file="${input.dir}/${mps.exe.vmoptions}" prefix="${dist.folder.name}/bin" />
<zipfileset file="${input.dir}/${mpshelp.jar}" prefix="${dist.folder.name}/help" />
</zip>
</target>
<target name="mac">
<property name="Info.plist" value="Info.plist" />
<property name="dist.folder.name.mac" value="${dist.folder.name}.app" />
<fail unless="input.dir" message="Property input.dir unspecified." />
<fail unless="version" message="Property version unspecified." />
<fail unless="build.number" message="Property build.number unspecified." />
<fail unless="output.dir" message="Property output.dir unspecified." />
<replace file="${input.dir}/${Info.plist}" token="$version$" value="${version}" />
<replace file="${input.dir}/${Info.plist}" token="$build$" value="${build.number}" />
<fixcrlf file="${input.dir}/${Info.plist}" eol="unix" eof="remove" />
<fixcrlf file="${input.dir}/${mps.sh}" eol="unix" eof="remove" />
<fixcrlf file="${input.dir}/${mps.vmoptions}" eol="unix" eof="remove" />
<zip destfile="${output.dir}/${build.number}-macos.zip" duplicate="preserve">
<zipfileset dir="${input.dir}/${MPS}" prefix="${dist.folder.name.mac}" excludes="**/*.dll, **/*.exe, **/bin/linux/, **/bin/mac/, **/bin/nix/, **/bin/win/" />
<zipfileset dir="${input.dir}/bin/mac" prefix="${dist.folder.name.mac}/bin" excludes="**/fsnotifier" />
<zipfileset file="${input.dir}/bin/mac/fsnotifier" prefix="${dist.folder.name.mac}/bin" filemode="755" />
<zipfileset file="${input.dir}/${Info.plist}" prefix="${dist.folder.name.mac}/Contents" />
<zipfileset file="${input.dir}/mps.icns" prefix="${dist.folder.name.mac}/Contents/Resources" />
<zipfileset file="${input.dir}/mps.executable" fullpath="${dist.folder.name.mac}/Contents/MacOS/mps" filemode="755" />
<zipfileset file="${input.dir}/${mps.sh}" prefix="${dist.folder.name.mac}" filemode="755" />
<zipfileset file="${input.dir}/${mps.vmoptions}" prefix="${dist.folder.name.mac}/bin" />
<zipfileset file="${input.dir}/${mpshelp.jar}" fullpath="${dist.folder.name.mac}/${mpshelp.jar}" />
</zip>
</target>
<target name="exe" if="windows">
<property name="installer.nsi" value="installer.nsi" />
<property name="mps.ico" value="mps.ico" />
<property name="homepage.ico" value="homepage.ico" />
<fail unless="input.dir" message="Property input.dir unspecified." />
<fail unless="version" message="Property version unspecified." />
<fail unless="build.number" message="Property build.number unspecified." />
<fail unless="output.dir" message="Property output.dir unspecified." />
<fixcrlf file="${input.dir}/${mps.bat}" eol="dos" eof="asis" />
<fixcrlf file="${input.dir}/${installer.nsi}" eol="dos" eof="asis" />
<fixcrlf file="${input.dir}/${mps.exe.vmoptions}" eof="asis" eol="dos" />
<copy file="${input.dir}/${mps.exe.vmoptions}" todir="${input.dir}/${MPS}/bin" />
<unzip src="${input.dir}/jre.zip" dest="${input.dir}/jre" />
<java classname="jetbrains.mps.build.GenerateNSI" fork="true" dir="${input.dir}" failonerror="true">
<arg file="${input.dir}/install.nsh" />
<arg file="${input.dir}/uninstall.nsh" />
<arg file="${input.dir}/${MPS}" />
<arg file="${input.dir}/${mps.bat}" />
<arg file="${input.dir}/${mps.ico}" />
<arg file="${input.dir}/${homepage.ico}" />
<arg file="${input.dir}/jre" />
<arg file="${input.dir}/help" />
<classpath>
<pathelement path="${input.dir}/${MPS}/lib/mps-workbench.jar" />
<pathelement path="${input.dir}/${MPS}/lib/mps-core.jar" />
</classpath>
</java>
<replace file="${input.dir}/${installer.nsi}" token="$version$" value="${version}" />
<replace file="${input.dir}/${installer.nsi}" token="$build$" value="${build.number}" />
<unzip src="${input.dir}/nsis.zip" dest="${input.dir}" />
<exec executable="${input.dir}/nsis/makensis.exe" osfamily="windows" failonerror="true">
<arg file="${input.dir}/${installer.nsi}" />
</exec>
<copy todir="${output.dir}">
<fileset dir="${input.dir}">
<include name="*.exe" />
</fileset>
</copy>
</target>
</project>
Jump to Line
Something went wrong with that request. Please try again.