Difference between revisions of "Install"

From Team Developer SqlWindows Wiki
Jump to: navigation, search
(first version of tip "Coexisting runtime versions")
Line 5: Line 5:
  
 
<!------------------------------------------------------------------------------------------------------------------------------>
 
<!------------------------------------------------------------------------------------------------------------------------------>
{{TipHeader|Enter new tip title here}}
+
{{TipHeader|Coexisting runtime versions}}
Enter new tip description here
+
When deploying applications developed using Team Developer, you also have to deploy the correct TD runtime version to your clients PC.
 +
If you have more than one project developed using any Team Developer Version, you may face the need to deploy more than one TD runtime version at a time because keeping every project in the same TD version can be impossible.
 +
There are several ways to solve this problem.
 +
<br/>
 +
<ol>
 +
<li>
 +
<b>Deploy into the same directory</b><br/>
 +
This is the way my company used to deploy the TD runtime versions until TD 5.1 came.
 +
As lots of the TD files have the version in their filenames, copying them together into the same directory worked.<br/>
 +
We had the versions of TD 1.1, TD 1.5 and TD 3.1 installed in parallel.
 +
For the files, that have equal names, we tried if the newer versions worked for TD 1.1 and TD 1.5 applications too.
 +
We were glad, that it worked.<br/>
 +
<u><b>Important!</b></u> Mixing TD 5.1 files with older versions doesn't work! Only files of ANSI-TD-versions may be mixed in on directory!
 +
</li>
 +
<li>
 +
<b>Deploy into the application directory</b><br/>
 +
This might be a solution for you, but personally, I don't like it very much.
 +
As the TD runtime is just a bunch of DLL files, you may copy them completely into your applications installation directory.
 +
So every applications has it's own TD runtime.<br/>
 +
<u><b>Important!</b></u> Verify that your application's installation directory is not enlisted in the system-PATH. You may get some DLL's loaded from different places which may cause problems!
 +
</li>
 +
<li>
 +
<b>Deploy using different directories and start batches</b><br/>
 +
As you can read at the end of the first described way, mixing TD 5.1 files with older TD files does not work. Especially the native database routers, which all have the same name in every version, make problems.
 +
To solve this, I decided to create multiple directories for the files by still having only one SQL.INI file on the system.
 +
As TD applications need cdlli??.dll on startup, you have to ensure that they can be found.
 +
This may be done using start batches like this one.
 +
<pre>
 +
REM Filename: run_td42_app.cmd
 +
set PATH=<TD 4.2 Runtime Directory>;%PATH%;
 +
start td42_app.exe
 +
</pre>
 +
This will extend you system-PATH temporarily with the TD runtime files firectory and start the application.
 +
You'll see a console window flickering by which happens when the batch starts.
 +
If this doesn't bother you, it will be an easy way for solving this.<br/>
 +
<u>Pros:</u> simple, also works from command prompt<br/>
 +
<u>Cons:</u> flickering console window, file has to be run with full path if not in system-PATH
 +
</li>
 +
<li><b>Deploy using different directoried and "App Paths"</b><br/>
 +
If the flickering console window bothers you, this way could be the one of your choice.
 +
Windows Explorer has the functionality of "App Paths" which allow you to define a different search path for every single EXE file in the system. It may look like this for the example above.
 +
<pre>
 +
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\td42_app.exe]
 +
@="C:\\Program Files\\<application installation directory>\\td42_app.exe"
 +
"Path"="<TD 4.2 Runtime Directory>"
 +
</pre>
 +
<u>Pros:</u> no flickering console window, just running "td42_app" from "Start->Run" finds the application, even if it's not in the system-PATH<br/>
 +
<u>Cons:</u> doesn't work if you run the EXE from the command prompt
 +
</ol>

Revision as of 12:33, 20 January 2009

This page covers installation and deployment Tips & Tricks

Contents


Pointer2.png Coexisting runtime versions Pointer.png

When deploying applications developed using Team Developer, you also have to deploy the correct TD runtime version to your clients PC. If you have more than one project developed using any Team Developer Version, you may face the need to deploy more than one TD runtime version at a time because keeping every project in the same TD version can be impossible. There are several ways to solve this problem.

  1. Deploy into the same directory
    This is the way my company used to deploy the TD runtime versions until TD 5.1 came. As lots of the TD files have the version in their filenames, copying them together into the same directory worked.
    We had the versions of TD 1.1, TD 1.5 and TD 3.1 installed in parallel. For the files, that have equal names, we tried if the newer versions worked for TD 1.1 and TD 1.5 applications too. We were glad, that it worked.
    Important! Mixing TD 5.1 files with older versions doesn't work! Only files of ANSI-TD-versions may be mixed in on directory!
  2. Deploy into the application directory
    This might be a solution for you, but personally, I don't like it very much. As the TD runtime is just a bunch of DLL files, you may copy them completely into your applications installation directory. So every applications has it's own TD runtime.
    Important! Verify that your application's installation directory is not enlisted in the system-PATH. You may get some DLL's loaded from different places which may cause problems!
  3. Deploy using different directories and start batches
    As you can read at the end of the first described way, mixing TD 5.1 files with older TD files does not work. Especially the native database routers, which all have the same name in every version, make problems. To solve this, I decided to create multiple directories for the files by still having only one SQL.INI file on the system. As TD applications need cdlli??.dll on startup, you have to ensure that they can be found. This may be done using start batches like this one.
    REM Filename: run_td42_app.cmd
    set PATH=<TD 4.2 Runtime Directory>;%PATH%;
    start td42_app.exe
    

    This will extend you system-PATH temporarily with the TD runtime files firectory and start the application. You'll see a console window flickering by which happens when the batch starts. If this doesn't bother you, it will be an easy way for solving this.
    Pros: simple, also works from command prompt
    Cons: flickering console window, file has to be run with full path if not in system-PATH

  4. Deploy using different directoried and "App Paths"
    If the flickering console window bothers you, this way could be the one of your choice. Windows Explorer has the functionality of "App Paths" which allow you to define a different search path for every single EXE file in the system. It may look like this for the example above.
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\td42_app.exe]
    @="C:\\Program Files\\<application installation directory>\\td42_app.exe"
    "Path"="<TD 4.2 Runtime Directory>"
    

    Pros: no flickering console window, just running "td42_app" from "Start->Run" finds the application, even if it's not in the system-PATH
    Cons: doesn't work if you run the EXE from the command prompt