program DocLauncher;

{
[DocLauncher] [1.0]
Delphi 2005
November 2006

LICENSE

The contents of this file are subject to the Mozilla Public License Version
1.1 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
"http://www.mozilla.org/MPL/"

Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
the specific language governing rights and limitations under the License.

The Original Code is "[DocLauncher.dpr]".

The Initial Developer of the Original Code is Martin Holmes (Victoria,
BC, Canada, "http://www.mholmes.com/"). Copyright (C) 2006 Martin Holmes
and the University of Victoria Computing and Media Centre. The code was 
co-developed for university and personal projects, and rights are shared
by Martin Holmes and the University of Victoria. All Rights Reserved.
}

{
  This is a simple non-GUI app which uses the functionality in mdhHelp.pas
  to start the browser and open a file based on a command-line parameter.
  The latter is typically installed with an application, and then referenced
  from shortcuts on the Start menu to launch help files, tutorials and other
  browser-based documentation using the best browser available on the system.

  Dependencies:

  ShBrowseU (Alan G. Lloyd)
  TntUnicodeControls (Troy Wolbrink)

}

uses
  SysUtils,
  TntSysUtils,
  mdhHelp in 'mdhHelp.pas',
  FileFunctions in '..\FileFunc\FileFunctions.pas',
  ShBrowseU in '..\FileFunc\ShBrowseU.pas';

begin
  { TODO -oUser -cConsole Main : Insert code here }

  try
    
    if Length(ParamStr(1)) > 0 then
      if WideFileExists(ParamStr(1)) then
          AppHelpFile := ParamStr(1);

    mdhCallHelp('');
  except
  end;

end.
