Commit 6bd5c94b authored by Ken Martin's avatar Ken Martin

fix the app dir for 1.4 release

parent a92f700e
......@@ -62,7 +62,7 @@ int vtkKWApplication::WidgetVisibility = 1;
//----------------------------------------------------------------------------
vtkStandardNewMacro( vtkKWApplication );
vtkCxxRevisionMacro(vtkKWApplication, "1.161");
vtkCxxRevisionMacro(vtkKWApplication, "1.161.2.1");
extern "C" int Vtktcl_Init(Tcl_Interp *interp);
extern "C" int Vtkkwwidgetstcl_Init(Tcl_Interp *interp);
......@@ -248,6 +248,8 @@ void vtkKWApplication::FindApplicationInstallationDirectory()
{
char directory[1024];
vtkKWDirectoryUtilities::GetFilenamePath(nameofexec, directory);
// remove the /bin from the end
directory[strlen(directory) - 4] = '\0';
vtkKWDirectoryUtilities *util = vtkKWDirectoryUtilities::New();
this->SetApplicationInstallationDirectory(
util->ConvertToUnixSlashes(directory));
......@@ -269,7 +271,19 @@ void vtkKWApplication::FindApplicationInstallationDirectory()
}
else
{
this->SetApplicationInstallationDirectory(0);
reg->SetGlobalScope(1);
if (reg && reg->ReadValue(setup_key, "InstalledPath", installed_path))
{
vtkKWDirectoryUtilities *util = vtkKWDirectoryUtilities::New();
this->SetApplicationInstallationDirectory(
util->ConvertToUnixSlashes(installed_path));
util->Delete();
}
else
{
this->SetApplicationInstallationDirectory(0);
}
reg->SetGlobalScope(0);
}
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment