git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@116112 13f79535-47bb-0310-9956-ffa450edef68
94 lines
3.4 KiB
XML
94 lines
3.4 KiB
XML
<?xml version="1.0"?>
|
|
<!--
|
|
/*
|
|
* Copyright 2001-2004 The Apache Software Foundation.
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/
|
|
-->
|
|
|
|
|
|
<project
|
|
xmlns:j="jelly:core"
|
|
xmlns:ant="jelly:ant"
|
|
xmlns:license="license"
|
|
xmlns:maven="jelly:maven"
|
|
xmlns:util="jelly:util">
|
|
|
|
|
|
<!--==================================================================-->
|
|
<!-- Generate NSIS Instller.exe file -->
|
|
<!--==================================================================-->
|
|
<goal name="nsis"
|
|
description="Generate NSIS Installer .exe"
|
|
prereqs="nsis:installer">
|
|
<ant:echo>Installer generated successfully</ant:echo>
|
|
</goal>
|
|
|
|
<goal name="nsis:generate-project"
|
|
description="Generate NSIS project.nsh file">
|
|
<maven:get var="maven.dist.bin.assembly.dir" plugin="maven-dist-plugin" property="maven.dist.bin.assembly.dir"/>
|
|
<maven:param-check value="${maven.dist.bin.assembly.dir}" fail="true"
|
|
message="'maven.dist.bin.assembly.dir' must be specified. It is the directory containing files to be placed in the installer"/>
|
|
|
|
<mkdir dir="${maven.build.dir}"/>
|
|
|
|
<j:set var="generatedFileName" value="${maven.build.dir}/project.nsh"/>
|
|
|
|
<ant:echo>Creating ${generatedFileName} ...</ant:echo>
|
|
<j:file name="${generatedFileName}" prettyPrint="false" xmlns="dummy" omitXmlDeclaration="true" escapeText="false">
|
|
<j:import file="${maven.nsis.project.template}" inherit="true"/>
|
|
</j:file>
|
|
|
|
</goal>
|
|
|
|
<goal name="nsis:generate-setup"
|
|
description="Generate NSIS .nsi file">
|
|
|
|
<mkdir dir="${maven.build.dir}"/>
|
|
|
|
<j:set var="generatedFileName" value="${maven.build.dir}/setup.nsi"/>
|
|
|
|
<ant:echo>Creating ${generatedFileName} ...</ant:echo>
|
|
<j:file name="${generatedFileName}" prettyPrint="false" xmlns="dummy" omitXmlDeclaration="true" escapeText="false">
|
|
<j:import file="${maven.nsis.setup.template}" inherit="true"/>
|
|
</j:file>
|
|
|
|
</goal>
|
|
|
|
|
|
<!--==================================================================-->
|
|
<!-- Generate NSIS .exe file -->
|
|
<!--==================================================================-->
|
|
<goal name="nsis:installer"
|
|
description="Generate NSIS .exe file"
|
|
prereqs="nsis:generate-project,nsis:generate-setup">
|
|
|
|
<j:set var="script" value="${maven.build.dir}/setup.nsi"/>
|
|
|
|
<util:file var="nsisExeFile" name="${maven.nsis.exe}" />
|
|
<j:if test="${!nsisExeFile.exists()}">
|
|
<fail>The NSIS executable '${maven.nsis.exe}' could not be found</fail>
|
|
</j:if>
|
|
<maven:get var="maven.dist.dir" plugin="maven-dist-plugin" property="maven.dist.dir"/>
|
|
<mkdir dir="${maven.dist.dir}"/>
|
|
<!-- call makensis.exe with the setup.nsi file -->
|
|
<ant:exec executable="${maven.nsis.exe}" failonerror="true">
|
|
<arg value="/V2"/>
|
|
<arg value="${script}"/>
|
|
</ant:exec>
|
|
</goal>
|
|
|
|
|
|
</project>
|