Git Product home page Git Product logo

wxs-generator-maven-plugin's Introduction

WXS Generator Maven Plugin

The WXS Generator Maven Plugin generates a WXS file from your maven project. WXS Files serve as Input for the Windows Installer XML Toolset (https://wixtoolset.org).

Requirements

In order to create an installer from a Maven Project, all files to be installed must be assembled into a distribution directory (e.g. which needs to be set in the configured rootPath). The Project must be assembled in a way that it might be started from the distribution directory. I personally recommend using the maven-assembly-plugin for this task (http://maven.apache.org/plugins/maven-assembly-plugin/).

Goals

generate-wxs

Usage

<build>
    <plugins>
        <plugin>
            <groupId>com.ptrxwsmitt</groupId>
            <artifactId>wxs-generator-maven-plugin</artifactId>
            <version>0.5</version>
            <executions>
                <execution>
                    <phase>package</phase>
                    <goals>
                        <goal>generate-wxs</goal>
                    </goals>
                    <configuration>
                        <productUid>54e94bd2-44bb-4b88-99d4-944d1a1a4af5</productUid>
                        <rootPath>target/dist</rootPath>
                        <targetFile>target/dist/MyAppSetup.wxs</targetFile>
                        <mainExecutable>runMyApp.bat</mainExecutable>
                        <iconPath>myApp.ico</iconPath>
                        <installerLocale>en-us</installerLocale>
                        <licenceRtfPath>LICENCE.rtf</licenceRtfPath>
                        <manufacturer>My Company</manufacturer>
                    </configuration>
                </execution>
            </executions>
        </plugin>
    </plugins>
<build>

Configuration

The plugin will automatically create a wsx file with the installer definition .
The installer will automatically create a desktop link, which is not configurable yet!

Parameters

productUid (mandatory)

Give your product a UID (I recommend using a UUID Generator).

productName

Defaults to maven ${project.name}.

installDir

Install directory: Relative path within the directory "Program Files" (or the corresponding x86 directory). Defaults to parameter "productName".

productVersion

Defaults to maven ${project.version}. Suffix "-SNAPSHOT" will be removed automatically.
The Version must match regex [0-9]+(\.[0-9]+)*; WIX Toolset will fail otherwise.

  • Valid examples: 1.3.5, 2019.3
  • Invalid examples: 2.3a, 0.5-SNAPSHOT
productDescription

Defaults to maven ${project.description}.

manufacturer (mandatory)

Defaults to maven ${project.organization.name}.

rootPath (mandatory)

Path to the directory which contains all files in the required structure of the target installation (e.g. assembled by maven assembly plugin).

sharedLibraryDir

Shared library directory: Relative path to the "rootPath" parameter. Defaults to parameter "productName".
The libraries in this directory will be only uninstalled when no other application is installed which also use the libraries.

targetFile

Filename of the wxs-file to be generated (e.g. "installer.wxs").

mainExecutable

Path to the main Executable (e.g. *.bat file) relative to rootPath

iconPath

Path to the application's Icon (*.ico) relative to rootPath

licenceRtfPath

Path to Licence (*.rtf) relative to rootPath

provideBuildBatch

Decide whether you want the plugin to generate a "buildInstaller.bat" file for easy integration into your build process. This requires the WIX Toolset commands "candle" and "light" to be available within your systems PATH environment variable.

dialogBackground

Path to the Background Image for the welcome and finish screens (493 x 312)

bannerTop

Path to the Banner Image for banner on the top (493 x 58)

x64

Switch for enabling/disabling 64 bit architecture installer (default 'true').

Licence Information

MIT Licence (see LICENCE File)

Changelog

2019-07-17

Initial Version

2019-07-19

Desktop Shortcut of bat file can now be pinned to Task Bar

2019-08-01

Start Menu Entry is now created automatically

2019-11-08

Fixed some issues concerning a blocked wxs result file.
Improved the version setting, to have a maximum of 3 components (according to windows limitations).
Added a feature for enabling/disabling x64 architecture.

2019-12-18

Made mainExecutable optional.
Added installDir Parameter

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.