Last Published: 2009-03-27  | Version: 0.2.0-M1 | Insight > Release Engineering

Configure the Plug-in for Insight UI

The sample NSIS project configuration below is the one actually in use for the Insight UI. This is used to generate the Insight UI Installer for Windows platforms.

pom.xml configuration

The section below shows the section used in the pom.xml of the insight ui

<project>
        ...
        <build>
                ...
                <plugins>
                        ...
                        <plugin>
                <groupId>com.mindtree.techworks.insight.releng</groupId>
                <artifactId>maven-nsis-plugin</artifactId>
                <version>0.2.0</version>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>compile</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <projectFile>src/assembly/insight-nsis.xml</projectFile>
                </configuration>
            </plugin>
            ...
                </plugins>
                ...
        </build>
        ...
</project>

insight-nsis.xml

The following is the insight-nsis.xml file placed in src/assembly

<nsisProject
        xmlns="http://mindtreeinsight.sourceforge.net/releng/mvn/nsis/0.2.0"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://mindtreeinsight.sourceforge.net/releng/mvn/nsis/0.2.0 http://mindtreeinsight.sourceforge.net/releng/maven-nsis-plugin/xsd/0.2.0/NsisProject-0.2.0.xsd">
        <projectInfo>
           <productName>Insight</productName>
           <readmeFile>README.txt</readmeFile>
        </projectInfo>
        <installerSettings>
           <installDir>$PROGRAMFILES\MindTree\${PRODUCT_NAME}</installDir>
        </installerSettings>
        <muiInstallerSettings>
           <installerIcon>src/assembly/resources/install.ico</installerIcon>
           <uninstallerIcon>src/assembly/resources/uninstall.ico</uninstallerIcon>
           <useHeaderImage>true</useHeaderImage>
        </muiInstallerSettings>
        <muiPages>
                <welcomePageSettings>
                        <title3Lines>true</title3Lines>
                        <text>Log Viewer and Analysis tool.$\r$\n? 2005-2008, ${PRODUCT_PUBLISHER}.$\r$\n</text>
                </welcomePageSettings>
                <licensePageSettings>
                        <licensePageSetting>
                                <licenseFileDestination>LICENSE.txt</licenseFileDestination>
                                <licenseFile>LICENSE.txt</licenseFile>
                                <textTop>GNU General Public License v3.0</textTop>
                        </licensePageSetting>
                        <licensePageSetting>
                                <licenseFileDestination>NOTICE.txt</licenseFileDestination>
                                <licenseFile>NOTICE.txt</licenseFile>
                        </licensePageSetting>
                </licensePageSettings>
                <componentsPageSettings>
                </componentsPageSettings>
                <directoryPageSettings>
                </directoryPageSettings>
                <startMenuFolderPageSettings>
                        <noDisable>true</noDisable>
                </startMenuFolderPageSettings>
                <installationPageSettings>
                </installationPageSettings>
                <finishPageSettings>
                        <run>$INSTDIR\${project.build.finalName}.exe</run>
                        <showReadme>$INSTDIR\${README_FILE}</showReadme>
                        <link>${PRODUCT_WEB_SITE}</link>
                        <linkLocation>${PRODUCT_WEB_SITE}</linkLocation>
                </finishPageSettings>
        </muiPages>
        <sections>
                <installTypes>
                        <installType>Default</installType>
                        <installType>Complete</installType>
                </installTypes>
                <sections>
                        <section>
                                <bold>true</bold>
                                <name>${PRODUCT_NAME}</name>
                                <description>Core Insight Application Files</description>
                                <inInsTypes>
                                        <inInsType>RO</inInsType>
                                </inInsTypes>
                                <fileSets>
                                        <fileSet>
                                                <directory>/</directory>
                                                <includes>
                                                        <include>*.txt</include>
                                                </includes>
                                                <filtered>true</filtered>
                                                <lineEnding>dos</lineEnding>
                                                <overWritePolicy>ifdiff</overWritePolicy>
                                        </fileSet>
                                        <fileSet>
                                                <directory>target</directory>
                                                <includes>
                                                        <include>*.jar</include>
                                                        <include>*.exe</include>
                                                </includes>
                                                <excludes>
                                                        <exclude>*javadoc.jar</exclude>
                                                        <exclude>*sources.jar</exclude>
                                                        <exclude>*-setup.exe</exclude>
                                                </excludes>
                                                <overWritePolicy>ifdiff</overWritePolicy>
                                        </fileSet>
                                </fileSets>
                                <files>
                                        <file>
                                                <outputDirectory>config</outputDirectory>
                                                <source>src/main/config/insight-preferences.xml</source>
                                                <overWritePolicy>on</overWritePolicy>
                                        </file>
                                </files>
                                <dependencySets>
                                        <dependencySet>
                                                <outputDirectory>lib</outputDirectory>
                                                <overWritePolicy>on</overWritePolicy>
                                        </dependencySet>
                                </dependencySets>
                                <shortcuts>
                                        <shortcut>
                                                <link>$SMPROGRAMS\$ICONS_GROUP\${PRODUCT_NAME}.lnk</link>
                                                <targetFile>$INSTDIR\${project.build.finalName}.exe</targetFile>
                                                <description>${PRODUCT_NAME}: Log viewer and analyzer tool</description>
                                        </shortcut>
                                        <shortcut>
                                                <link>$SMPROGRAMS\$ICONS_GROUP\${PRODUCT_NAME} Preferences.lnk</link>
                                                <targetFile>$INSTDIR\${project.build.finalName}.exe</targetFile>
                                                <parameters>-p</parameters>
                                                <description>${PRODUCT_NAME}: Preferences</description>
                                        </shortcut>
                                        <shortcut>
                                                <link>$SMPROGRAMS\$ICONS_GROUP\LICENSE.lnk</link>
                                                <targetFile>notepad.exe</targetFile>
                                                <parameters>LICENSE.txt</parameters>
                                                <description>${PRODUCT_NAME}: License</description>
                                        </shortcut>
                                        <!-- 
                                        <shortcut>
                                                <link>$SMPROGRAMS\$ICONS_GROUP\User Manual.lnk</link>
                                                <targetFile>$INSTDIR\docs\${USER_MANUAL}</targetFile>
                                                <description>${PRODUCT_NAME}: User Manual</description>
                                        </shortcut>
                                        -->
                                        <shortcut>
                                                <link>$DESKTOP\${PRODUCT_NAME}.lnk</link>
                                                <targetFile>$INSTDIR\${project.build.finalName}.exe</targetFile>
                                                <description>${PRODUCT_NAME}: Log viewer and analyzer tool</description>
                                        </shortcut>
                                </shortcuts>
                        </section>
                        <section>
                                <optional>true</optional>
                                <name>Sample Log Files</name>
                                <description>Sample Log files</description>
                                <inInsTypes>
                                        <inInsType>2</inInsType>
                                </inInsTypes>
                                <fileSets>
                                        <fileSet>
                                                <outputDirectory>sample</outputDirectory>
                                                <directory>src/contrib/samples</directory>
                                                <overWritePolicy>off</overWritePolicy>
                                                <includes>
                                                        <include>*</include>
                                                </includes>
                                        </fileSet>
                                </fileSets>
                                <shortcuts>
                                        <shortcut>
                                                <link>$SMPROGRAMS\$ICONS_GROUP\Samples Directory.lnk</link>
                                                <targetFile>$INSTDIR\sample</targetFile>
                                                <description>${PRODUCT_NAME}: Sample log files</description>
                                        </shortcut>
                                </shortcuts>
                        </section>
                </sections>
        </sections>
        <functions>
                <multiInstallerInstanceMessage>An instance of Insight installer is already running on this machine.</multiInstallerInstanceMessage>
                <installAppRunCheckFn>
                        <name>CloseInsight</name>
                        <definition><![CDATA[
Function CloseInsight
         Push $5
         loop:
              FindWindow $5 "" "${PRODUCT_NAME}"
              IntCmp $5 0 done
              ; Insight is running
              MessageBox MB_RETRYCANCEL|MB_ICONSTOP "${PRODUCT_NAME} is running. Please close the running \
                         instance and click Retry to retry Installing again. Click Cancel to abort the Installation" IDRETRY loop
              Abort "Aborting Operation"
        done:
        Pop $5
FunctionEnd
                        ]]></definition>
                </installAppRunCheckFn>
                <uninstallAppRunCheckFn>
                        <name>un.CloseInsight</name>
                        <definition><![CDATA[
Function un.CloseInsight
        Push $5
        loop:
            FindWindow $5 "" "${PRODUCT_NAME}"
            IntCmp $5 0 done
            ; Insight is running
            MessageBox MB_RETRYCANCEL|MB_ICONSTOP "${PRODUCT_NAME} is running. Please close the running \
                instance and click Retry to try Uninstalling again. Click Cancel to abort the Uninstallation" IDRETRY loop
            Abort "Aborting Operation"
        done:
        Pop $5
FunctionEnd
                        ]]></definition>
                </uninstallAppRunCheckFn>
        </functions>
</nsisProject>
Maven NSIS Plugin
Configuration Reference
Examples
  • Insight NSIS Project Configuration
Release - 0.1.0
Project Documentation
Parent Project