I am putting together an installer with NSIS (1st time, but liking it and have learnt a lot from these forums and from the NSIS tag on Stack Overflow).
This installer has already installed a JRE and Tomcat.
The next part will be to create a connection file to allow my application to point to a database
- Save this file into $PLUGINSDIR (will move it once I deploy some WARs at a later step).
Currently, when manually doing our installs, we have a small JAR application that helps the user build this connection property file.
It has built in functionality to try and ping the DB, regardless of its Oracle, Oracle XE, SQL Server 2005/2008
It has a drop-down which provides the bones of the URL connection strings, and then user can tweak if need be.
In my original mockup
of an installer, ideally, I wanted something that did away with the JAR app and had this component built into the installer. Something like this:
Little unsure on where to start.
Had a look at some database related posts, and saw some samples here
I would like some advice/initial pointers on the best way to go about this.
- Should I be trying to code this all within NSIS, or should I be calling on something external to test the connection? Not sure if you can Telnet via NSIS?
- Has anyone seen any similar samples that I can reverse engineer?
- Any other advice would be great.
Thanks in advance.
For info, once I have achieved this, a later step will be to create a database by running some SQL scripts I have.
Just thinking ahead, I guess which database vendor/version they have, will depend on which sql script to run. Im thinking that if the user chooses e.g. SQL Server 2005 on this page, this could be writen to a variable to use later when choosing the right sql script.