windows installer - Does anybody have a complete wix configuration example for installing a procrun based Java service? -


i have been working on project need install java service running spring boot application wix installer windows. should autodetect if there jre instance installed globally on system, , if so, use it, otherwise, install private jre application. after looking complete solutions, , working through many different problems, have come configuration works. manually installs service via wix , sets registry keys procrun program needs instead of using procrun install service.

i new site (as submitter), post wix xml created answer. isn't polished, others through hurdles had jump through make work.

here (summarized) wix xml, important pieces in place. had summarize due response size limit. many stack overflow answers point.

<?xml version="1.0" encoding="utf-8"?> <!-- # comment generated wixedit, specific commandline # arguments wix toolset stored here.  candleargs:  lightargs: "heimdalldemo.wixobj" -out "heimdalldemo.msi" -ext wixutilextension -ext wixuiextension --> <!-- installation script heimdall data access platform, www.heimdalldata.com --> <wix xmlns="http://schemas.microsoft.com/wix/2006/wi"> <product id="*" name="heimdall data access platform" language="1033" version="0.9.0.1" manufacturer="heimdall data" upgradecode="98ce97b6-8e91-42f5-8c32-8f0f078433ec">     <package description="heimdall data server , driver installer" comments="heimdall installer" installprivileges="elevated" installscope="permachine" installerversion="200" compressed="yes" platform="x64" />     <media id="1" cabinet="simple.cab" embedcab="yes" />     <?define productname = "heimdall data access platform" ?>     <?define platformprogramfilesfolder = "programfiles64folder" ?>     <!-- check requirements on "install", not on modify or uninstall. -->     <property id="java_current_version64">         <registrysearch id="jre_current_version_regsearch64" root="hklm" key="software\javasoft\java runtime environment" name="currentversion" type="raw" win64="yes" />     </property>     <directory id="targetdir" name="sourcedir">         <directory id="$(var.platformprogramfilesfolder)">             <directory id="driverdir" name="heimdall">                 <!-- driver components -->             </directory>             <directory id="trafficdir" name="heimdall">        <!-- traffic generator components -->             </directory>             <directory id="serverdir" name="heimdall">                 <component id="registry_a" diskid="1" guid="*">                     <registrykey root="hklm" key="software\apache software foundation\procrun 2.0\heimdall\parameters\java" action="createandremoveonuninstall">                         <registryvalue type="string" name="classpath" value="[serverdir]heimdallserver.jar" keypath="yes" />                         <registryvalue type="string" name="jvm"     value="auto" />                         <registryvalue type="multistring" action="append" name="options">                            <multistringvalue type="multistring" name="options" action="append">-duser.dir=[serverdir]</multistringvalue>                            <multistringvalue type="multistring" name="options" action="append">-xx:+useconcmarksweepgc</multistringvalue>                            <multistringvalue type="multistring" name="options" action="append">-xx:+cmsincrementalpacing</multistringvalue>                            <multistringvalue type="multistring" name="options" action="append">-xx:parallelgcthreads=2</multistringvalue>                            <multistringvalue type="multistring" name="options" action="append">-xx:+aggressiveopts</multistringvalue>                         </registryvalue>                         <registryvalue type="integer" name="jvmms" value="128" />                         <registryvalue type="integer" name="jvmmx" value="512" />                         <registryvalue type="integer" name="jvmss" value="4000" />                     </registrykey>                     <registrykey root="hklm" key="software\apache software foundation\procrun 2.0\heimdall\parameters\log" action="createandremoveonuninstall">                         <registryvalue type="string" name="path" value="[serverdir]log" />                         <registryvalue type="string" name="level" value="error" />                         <registryvalue type="string" name="prefix" value="procrun.log" />                         <registryvalue type="string" name="stderror" value="auto" />                         <registryvalue type="string" name="stdoutput" value="auto" />                     </registrykey>                     <registrykey root="hklm" key="software\apache software foundation\procrun 2.0\heimdall\parameters\start" action="createandremoveonuninstall">                         <registryvalue type="string" name="mode" value="jvm" />                         <registryvalue type="string" name="class" value="com.heimdalldata.server.bootstrap" />             <registryvalue type="string" name="workingpath" value="[serverdir]" />                         <registryvalue type="string" name="method" value="start" />                         <registryvalue type="string" name="params" value="start" />                         <registryvalue type="string" name="stdoutput" value="auto" />                     </registrykey>                     <registrykey root="hklm" key="software\apache software foundation\procrun 2.0\heimdall\parameters\stop" action="createandremoveonuninstall">                         <registryvalue type="string" name="mode" value="jvm" />                         <registryvalue type="string" name="class" value="com.heimdalldata.server.bootstrap" />                         <registryvalue type="string" name="method" value="stop" />                         <registryvalue type="string" name="params" value="stop" />                         <registryvalue type="string" name="stdoutput" value="auto" />                     </registrykey>                     <registrykey root="hklm" key="system\currentcontrolset\services\heimdall" action="createandremoveonuninstall">                         <registryvalue type="string" name="description" value="heimdall management , logging server" />                         <registryvalue type="string" name="displayname" value="heimdall" />                         <registryvalue type="string" name="imagepath" value="[serverdir]heimdallserver.exe //rs//heimdall" />                         <registryvalue type="string" name="dependsonservice" value="tcpip afd" />                         <registryvalue type="string" name="objectname" value="localsystem" />                         <registryvalue type="integer" name="errorcontrol" value="1" />                         <registryvalue type="integer" name="start" value="2" />                         <registryvalue type="integer" name="type" value="16" />                     </registrykey>                     <registrykey root="hklm" key="system\currentcontrolset\services\heimdall\parameters" action="createandremoveonuninstall">                         <registryvalue type="string" name="test" value="pass" />                     </registrykey>                 </component>                 <component id="registry_b" diskid="1" guid="*">                     <registrykey root="hklm" key="software\apache software foundation\procrun 2.0\heimdall\parameters\java" action="createandremoveonuninstall">                         <registryvalue type="string" name="javahome" value="[serverdir]jre6" />             <registryvalue type="string" name="jvm"     value="[serverdir]jre6\bin\server\jvm.dll" />                     </registrykey>                 </component>                  <component id="heimdallserver64.exe" diskid="1" guid="*"> <!-- renamed procrun 64 bit executable -->                     <file id="heimdallserver64.exe" name="heimdallserver.exe" source="c:\heimdall\heimdallserver64.exe" />                     <serviceinstall id="heimdallserver64" type="ownprocess" name="heimdall" displayname="heimdall" description="heimdall management , logging server" start="auto" account="[serviceaccount]" password="[servicepassword]" errorcontrol="normal" arguments=" //rs//heimdall" />                     <servicecontrol id="startservice64" start="install" stop="both" remove="uninstall" name="heimdall" wait="no" />                 </component>             </directory>         </directory>     </directory>     <feature id="server" title="heimdall server" level="1" configurabledirectory="serverdir">         <componentref id="registry_a" />         <!-- server components -->         <feature id="configuration" title="example configuration" level="1" configurabledirectory="config">             <!-- configuration components -->         </feature>         <feature id="drivers" title="driver library" level="1" configurabledirectory="config">        <!-- driver feature components -->         </feature>     </feature>     <feature id="driver" title="heimdall driver" level="1" configurabledirectory="driverdir">         <!-- driver component -->         <feature id="libraries" title="grid api libraries" level="6" configurabledirectory="libdir">             <!-- library components -->         </feature>     </feature>      <feature id="jre" title="private jre" level="1" configurabledirectory="serverdir">         <condition level="6">java_current_version64 &gt;= "1.6"</condition>     <componentref id="registry_b" />     <!-- jre file components -->     </feature>     <ui />     <uiref id="wixui_mondo" />     <!-- custom dialog (welcome , completion dialogs)  493x312 -->     <wixvariable id="wixuidialogbmp" value="c:\heimdall\banner.bmp" />     <!-- custom logo (top bar)  493x58 -->     <wixvariable id="wixuibannerbmp" value="c:\heimdall\logo.bmp" />     <!-- custom license agreement -->     <!-- <wixvariable id="wixuilicensertf" value="c:\heimdall\license.rtf" /> -->     <!-- call localhost:8087 on exit of installer when installing -->     <property id="myurl"><![cdata[http://localhost:8087/]]></property>     <customaction id="setopenurl" property="wixshellexectarget" value="[myurl]" />     <customaction id="openurl" binarykey="wixca" dllentry="wixshellexec" impersonate="yes" return="ignore" />     <installexecutesequence>         <!-- launch webpage during full uninstall, not upgrade -->         <custom action="setopenurl" after="installfinalize"><![cdata[&server=3 , uilevel > 2 , not installed]]></custom>         <custom action="openurl" after="setopenurl"><![cdata[&server=3 , uilevel > 2 , not installed]]></custom>     </installexecutesequence> </product> </wix> 

Comments

Popular posts from this blog

1111. appearing after print sequence - php -

java - WARN : org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/board/] in DispatcherServlet with name 'appServlet' -

Ruby on Rails, ActiveRecord, Postgres, UTF-8 and ASCII-8BIT encodings -