[wix-users] Another apache tomcat issue...

Lewis Henderson henderso at opentext.com
Thu Mar 31 10:36:19 PDT 2016


Hi Keith,

I'm also using some CA's and I'm sure others may have a better approach, but I'll try to outline it here.  First, this is for Apache Tomcat 7.0.54.  It's probably much the same for all 7.x.x versions, but your mileage may vary.  I start with a few properties:

JAVA_HOME is the result of one or more registry searched to find the appropriate Java installation.
JVM_PATH is the result of one or more RegistrySearches to find the jvm.dll for the appropriate Java version.
TOMCAT_DIR is the root directory of where I want to install Tomcat.  This points to [INSTALLDIR]java\apache-tomcat-7.0.54 in my case.
TOMCAT_NAME is the name I want for the tomcat service
TOMCAT_PORT is the main connector port, usually 8080
TOMCAT_SVR is the port for the Catalina servlet, usually 8005
TOMCAT_AJP is the ajp13 protocol connector port, usually 8009

I have all of the tomcat Components listed in tomcat_components.wxi (it could probably be a Fragment), but for the tomcat executable component, I also have:

          <File Id="java_tomcat_bin_tomcat7_exe" Name="tomcat7.exe" KeyPath="yes" />
          <?include tomcat7_service.wxi ?>

The include file takes care of all the messy stuff associated with the service.  I also have all of the features in tomcat_features.wxi, the registry values in tomcat_regval.wxi, the CA definitions in tomcat_ca.wxi, and the InstallExecuteSequence changes in tomcat_exseq.wxi, just to keep the associated install cleaner.  Oh, and the XML file edits in tomcat_xml.wxi.  It all lays out in the product install like this:

...
    <Directory Id="TARGETDIR" Name="SourceDir">
      <Directory Id="INSTALLDIR" Name="Webadmin"
                 FileSource="$(var.SourceBase)">
        <Directory Id="java" Name="java">
          <?include tomcat_components.wxi ?>
          ...
        </Directory>
        ...
      </Directory>
      <?include tomcat_regval.wxi ?>
      <?include tomcat_xml.wxi ?>
      <?include web_regval.wxi ?>
    </Directory>

    <Feature Id=...>
      ...
      <?include tomcat_features.wxi ?>
    </Feature>

    ...

    <?include tomcat_ca.wxi ?>

    <InstallExecuteSequence>
      ....
      <?include tomcat_exseq.wxi ?>
    </InstallExecuteSequence>

Now for the CA's: I have one that does TCP/IP port number validation during the UI sequence.  I'll leave that to your imagination.  The other does some edits to non-xml files, in the ca and exseq includes.  That CA, DoEdit, takes a string with three arguments, delimited by semicolons: first is the full path to the file to be edited, the second is the start of a line to find, and the last is the line to write in place of the located line.  I'm doing edits to the isapi_redirect.properties and workers.properties files.  You may have other needs.  One other thing to note is the ordering of the edit CA's in the InstallExecuteSequence.  Each pair of CA calls performs one edit.  The first sets it up and the second does the actual edit.  For multiple edits to the same file, they have to be ordered properly, as shown in my example which does three edits to each of two files.

Anyway, I'll attach the .wxi files and hope they make it through the list.  If not, let me know and I'll try to post them individually.  That should be enough to get you started.

				Lewis Henderson
				OpenText, Inc.

-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of Douglas, Keith (STATCAN)
Sent: Thursday, March 31, 2016 10:07 AM
To: WiX Toolset Users Mailing List
Subject: Re: [wix-users] Another apache tomcat issue...

Hi Lewis,

Would you be willing to share what you've done to handle the configuration for Tomcat? I'm going to be attempting to do that too at some point for some of my developers and am finding some matters a little challenging. (I had looked at using custom actions, and have most things worked out, but another approach might be useful to see.)

Thanks for the consideration,


Keith Douglas

Programmer Analyst, Collection Systems Division Statistics Canada / Government of Canada Keith.Douglas at canada.ca / Tel : 613-854-5589

Programmeur analyste, Division des systèmes de collecte Statistique Canada / Gouvernenment du Canada Keith.Douglas at canada.ca / Tél :613-854-5589

-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of Lewis Henderson
Sent: March-31-16 10:00 AM
To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
Subject: Re: [wix-users] Another apache tomcat issue...

Hi Phill,

Thanks for the reply.  I suspected something like this might be necessary.

				Lewis Henderson
				OpenText, Inc.

-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of Phill Hogland
Sent: Wednesday, March 30, 2016 5:38 PM
To: WiX Toolset Users Mailing List
Subject: Re: [wix-users] Another apache tomcat issue...

I do this:
      <Component Transitive="yes">
        <RegistryValue Root="HKMU" Key="SYSTEM\CurrentControlSet\Services\serviceShortName\subfolder if needed" Name="parameter" Value="[MSI_PUBLIC_PROPERTY]" Type="string" KeyPath="yes" />
      </Component>

I use transitive='yes' because my mba may change the value on repair, but you may not want to do that.

________________________________________
From: wix-users <wix-users-bounces at lists.wixtoolset.org> on behalf of Lewis Henderson <henderso at opentext.com>
Sent: Wednesday, March 30, 2016 2:18 PM
To: WiX Toolset Users Mailing List
Subject: [wix-users]  Another apache tomcat issue...

Hi again Folks,

I'm trying to install the apache tomcat servlet using the "proper" Wix/MSI syntax, and things are going well up to a point.  I've got everything in place, except a registry key "Parameters" under the service's key.  There's nothing (but the empty default value) in this key, but the service won't start without it.

I used tomcat's service.bat file to install a mirror service to see what was wrong, and that subkey is the only difference.  I manually added the key, and my service starts.

I'd like to avoid using tomcat's service.bat file, but none of the service related elements appear to allow a subkey to be created.  Can I just hack in a RegistryKey element, or is there a better way?

Thanks again for the help.

                                                                Lewis Henderson
                                                                OpenText, inc.


____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/

____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/

____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/

____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/



More information about the wix-users mailing list