MarkNorthup
Posts: 2
Joined: Wed Nov 21, 2012 6:10 pm

Controlling install dir name in Tomcat webapp installer

Hi,

I'm in my trial period. My goal for this product is to produce an installer for a Tomcat web application, that will install or required JDK 1.7 and install Tomcat (if needed), then install a web application into the Tomcat7\webapps folder.

I created a Project using the Tomcat Webapp template. I have setup prerequisites for JDK 1.7 and Tomcat. This part seems clear enough.

Here are some of the problems I see:
1) We have experience that says we need to have the Tomcat installation avoid the use of blanks in the installation path. Thus, we need to override the default installation folder in the Tomcat installer. My guess is that this needs to handled by clear instructions for the person doing the installation, since this is controlled by the Tomcat installer provided.

2) The source directory for my webapp is named "sree", but I might need to use another name at installation time. This would allow me to install the same app side-by-side with another app (using different settings). How would I do that with your product? I don't see a way to control the installed name of the ApplicationFolder.

3) Does the Tomcat Webapp template automatically place the ApplicationFolder inside the Tomcat\webapps folder?

If this works out, I'll need to provide a convincing argument to management for the purchase of the Enterprise version.

We also have a few other installer applications the I would like to reduce the amount of time spent on creating installers.

Any additional help you could provide would be great.

Thanks,
Mark Northup
Sr. Software Developer
http://www.AssetPoint.com
Daniel
Posts: 8276
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Controlling install dir name in Tomcat webapp installer

Hello Mark and welcome to Advanced Installer forums,

Thank you for your interest in Advanced Installer.
1) We have experience that says we need to have the Tomcat installation avoid the use of blanks in the installation path. Thus, we need to override the default installation folder in the Tomcat installer. My guess is that this needs to handled by clear instructions for the person doing the installation, since this is controlled by the Tomcat installer provided.
You can add a warning message on an install dialog (e.g. on "VerifyReadyDlg" dialog) from "Dialogs" page.
2) The source directory for my webapp is named "sree", but I might need to use another name at installation time. This would allow me to install the same app side-by-side with another app (using different settings). How would I do that with your product? I don't see a way to control the installed name of the ApplicationFolder.
You can set the Application Folder location in the "Install Parameters -> Application Folder" field.
3) Does the Tomcat Webapp template automatically place the ApplicationFolder inside the Tomcat\webapps folder?
No, by default the APPDIR property will be set to:

Code: Select all

[ProgramFilesFolder][Manufacturer]\[ProductName]
However, you can change this default path in the "Install Parameters -> Application Folder" field. Also, you can take a look on our "Folder Paths" article.

Let us know if this helps, otherwise please give us more details about your scenario.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
MarkNorthup
Posts: 2
Joined: Wed Nov 21, 2012 6:10 pm

Re: Controlling install dir name in Tomcat webapp installer

Thank you for your quick response.

Now I'm trying to figure out how to:
1:Get the Tomcat installation directory from the registry into a variable named TOMCAT_HOME.

2: Modify the APPDIR folder location at runtime with something like {TOMCAT_HOME}/webapps/CustomWebApp, where CustomWebApp would be a name that is configurable by the user (via a custom dialog) -- this allows side-by side installations with different names.

I'm thinking this would need to be done in a Custom Action, but I'm lost as to how to make this work.
Daniel
Posts: 8276
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Controlling install dir name in Tomcat webapp installer

Hello,

In order to achieve what you want you can proceed like this:
- Go to "Search" page and add a registry search named TOMCAT_HOME (the search result will be stored in a public property named TOMCAT_HOME) which will search for Tomcat installation path.
- Go to "Dialogs" page and add a custom dialog where a public property (e.g. CUSTOMWEBAPP) is set.
- Go to "Custom Actions" page and add a "Set installer property" custom action with sequence, scheduled before "Install Execution Stage -> Paths Resolution" action group, like this:
  • Property: APPDIR
    Formatted: [TOMCAT_HOME]\webapps\[CUSTOMWEBAPP]
- Build and run your project.

Let us know if this helped.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”