sysmodellibs/sysmodelgen/src/common/DepConstants.pm
changeset 7 3c36c452f013
parent 6 5b32dc297d05
child 8 a2e65c705db8
equal deleted inserted replaced
6:5b32dc297d05 7:3c36c452f013
     1 #!perl
       
     2 # Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3 # All rights reserved.
       
     4 # This component and the accompanying materials are made available
       
     5 # under the terms of "Eclipse Public License v1.0"
       
     6 # which accompanies this distribution, and is available
       
     7 # at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 #
       
     9 # Initial Contributors:
       
    10 # Nokia Corporation - initial contribution.
       
    11 #
       
    12 # Contributors:
       
    13 #
       
    14 # Description:
       
    15 #
       
    16 
       
    17 package DepConstants;
       
    18 
       
    19 use FindBin;
       
    20 use lib $FindBin::Bin;
       
    21 use strict;
       
    22 use Cwd;
       
    23 
       
    24 # -------------------------------------------------------
       
    25 # 	Data stores, etc
       
    26 # -------------------------------------------------------
       
    27 my $KDataDirectory = $FindBin::Bin."deptoolkit_data";
       
    28 sub DataDirectory     { return $KDataDirectory; }
       
    29 
       
    30 my $KDataFile = $FindBin::Bin."deptoolkit_data"; # this is the default value, to be used if the user hasn't specified a value
       
    31 sub DataFile     { return $KDataFile; }
       
    32 
       
    33 # -------------------------------------------------------
       
    34 # 	Html and icons files:
       
    35 # -------------------------------------------------------
       
    36 my $KIconsSourceDirectory = $FindBin::Bin."/../resources/html/icons";
       
    37 sub IconsSource() { return $KIconsSourceDirectory; }
       
    38 
       
    39 my $KZoomInIcon = "dep_zoom_in.gif";
       
    40 my $KZoomInDisabledIcon = "dep_zoom_in_disabled.gif";
       
    41 my $KTopOfPageIcon = "dep_top_of_page.gif";
       
    42 my $KSeperatorIcon = "dep_separator.gif";
       
    43 my $KArrowIcon = "dep_arrow.gif";
       
    44 my $KAtSignIcon = "dep_at_sign.gif";
       
    45 my $KHierarchyIcon = "dep_hierarchy.gif";
       
    46 my $KSysDefIcon = "dep_sysdef.gif";
       
    47 my $KLayerIcon = "dep_layer.gif";
       
    48 my $KBlockIcon = "dep_block.gif";
       
    49 my $KSubBlockIcon = "dep_sub_block.gif";
       
    50 my $KCollectionIcon = "dep_collection.gif";
       
    51 my $KComponentIcon = "dep_component.gif";
       
    52 my $KExeIcon = "dep_exe.gif";
       
    53 my $KWarningIcon = "dep_warning.gif";
       
    54 
       
    55 sub ZoomInIcon() { return $KZoomInIcon; }
       
    56 sub ZoomInDisabledIcon() { return $KZoomInDisabledIcon; }
       
    57 sub TopOfPageIcon() { return $KTopOfPageIcon; }
       
    58 sub SeperatorIcon() { return $KSeperatorIcon; }
       
    59 sub ArrowIcon() { return $KArrowIcon; }
       
    60 sub AtSignIcon() { return $KAtSignIcon; }
       
    61 sub HierarchyIcon() { return $KHierarchyIcon; }
       
    62 sub SysDefIcon() { return $KSysDefIcon; }
       
    63 sub LayerIcon() { return $KLayerIcon; }
       
    64 sub BlockIcon() { return $KBlockIcon; }
       
    65 sub SubBlockIcon() { return $KSubBlockIcon; }
       
    66 sub CollectionIcon() { return $KCollectionIcon; }
       
    67 sub ComponentIcon() { return $KComponentIcon; }
       
    68 sub ExeIcon() { return $KExeIcon; }
       
    69 sub WarningIcon() {return $KWarningIcon; }
       
    70 
       
    71 # Following methods contsruct the HTML image tags using the source directory
       
    72 # (For output files, use the ImgHtml() by passing the /icons directory file names)
       
    73 sub ZoomInImgHtml()
       
    74 	{
       
    75 	my $hrefRelativeDepth = $_[0] ? $_[0] : 0;
       
    76 	return RelativeImgHtml($hrefRelativeDepth, "icons/$KZoomInIcon", 'Causal details of relationship');
       
    77 	}
       
    78 
       
    79 sub ZoomInDisabledImgHtml()
       
    80 	{
       
    81 	my $hrefRelativeDepth = $_[0] ? $_[0] : 0;
       
    82 	return RelativeImgHtml($hrefRelativeDepth, "icons/$KZoomInDisabledIcon", 'Manual dependency: no details available');
       
    83 	}
       
    84 
       
    85 sub TopOfPageImgHtml()
       
    86 	{
       
    87 	my $hrefRelativeDepth = $_[0] ? $_[0] : 0;
       
    88 	return RelativeImgHtml($hrefRelativeDepth, "icons/$KTopOfPageIcon", 'Top', "\#_top");
       
    89 	}
       
    90 
       
    91 sub SeperatorImgHtml()
       
    92 	{
       
    93 	my $hrefRelativeDepth = $_[0] ? $_[0] : 0;
       
    94 	return RelativeImgHtml($hrefRelativeDepth, "icons/$KSeperatorIcon");
       
    95 	}
       
    96 
       
    97 sub ArrowImgHtml()
       
    98 	{
       
    99 	my $hrefRelativeDepth = $_[0] ? $_[0] : 0;
       
   100 	return RelativeImgHtml($hrefRelativeDepth, "icons/$KArrowIcon");
       
   101 	}
       
   102 
       
   103 sub AtSignImgHtml()
       
   104 	{
       
   105 	my $hrefRelativeDepth = $_[0] ? $_[0] : 0;
       
   106 	return RelativeImgHtml($hrefRelativeDepth, "icons/$KAtSignIcon", 'is located at');
       
   107 	}
       
   108 
       
   109 sub HierarchyImgHtml()
       
   110 	{
       
   111 	my $hrefRelativeDepth = $_[0] ? $_[0] : 0;
       
   112 	return RelativeImgHtml($hrefRelativeDepth, "icons/$KHierarchyIcon", "System Model Hierarchy");
       
   113 	}
       
   114 
       
   115 sub SysDefImgHtml()
       
   116 	{
       
   117 	my $hrefRelativeDepth = $_[0] ? $_[0] : 0;
       
   118 	return RelativeImgHtml($hrefRelativeDepth, "icons/$KSysDefIcon");
       
   119 	}
       
   120 
       
   121 sub LayerImgHtml()
       
   122 	{
       
   123 	my $hrefRelativeDepth = $_[0] ? $_[0] : 0;
       
   124 	return RelativeImgHtml($hrefRelativeDepth, "icons/$KLayerIcon", "Layer");
       
   125 	}
       
   126 
       
   127 sub BlockImgHtml()
       
   128 	{
       
   129 	my $hrefRelativeDepth = $_[0] ? $_[0] : 0;
       
   130 	return RelativeImgHtml($hrefRelativeDepth, "icons/$KBlockIcon", "Block");
       
   131 	}
       
   132 
       
   133 sub SubBlockImgHtml()
       
   134 	{
       
   135 	my $hrefRelativeDepth = $_[0] ? $_[0] : 0;
       
   136 	return RelativeImgHtml($hrefRelativeDepth, "icons/$KSubBlockIcon", "Sub-block");
       
   137 	}
       
   138 
       
   139 sub CollectionImgHtml()
       
   140 	{
       
   141 	my $hrefRelativeDepth = $_[0] ? $_[0] : 0;
       
   142 	return RelativeImgHtml($hrefRelativeDepth, "icons/$KCollectionIcon", "Collection");
       
   143 	}
       
   144 
       
   145 sub ComponentImgHtml()
       
   146 	{
       
   147 	my $hrefRelativeDepth = $_[0] ? $_[0] : 0;
       
   148 	return RelativeImgHtml($hrefRelativeDepth, "icons/$KComponentIcon", "Component");
       
   149 	}
       
   150 
       
   151 sub ExeImgHtml()
       
   152 	{
       
   153 	my $hrefRelativeDepth = $_[0] ? $_[0] : 0;
       
   154 	return RelativeImgHtml($hrefRelativeDepth, "icons/$KExeIcon", "Executable");
       
   155 	}
       
   156 
       
   157 sub WarningImgHtml()
       
   158 	{
       
   159 	my $hrefRelativeDepth = $_[0] ? $_[0] : 0;
       
   160 	return RelativeImgHtml($hrefRelativeDepth, "icons/$KWarningIcon", "Warning");
       
   161 	}
       
   162 
       
   163 # Genric:
       
   164 sub RelativeImgHtml()
       
   165 	{
       
   166 	my $hrefRelativeDepth = shift;
       
   167 	my $img = shift; # image file
       
   168 	my $alt = shift; # tool tip text
       
   169 	my $url = shift; # if a url is given, turn it into a href
       
   170 	
       
   171     my $relativeDirText = ""; # where the main index file is.
       
   172 	$relativeDirText = "../" x $hrefRelativeDepth if defined $hrefRelativeDepth;
       
   173     $relativeDirText =~ s@\/$@@; # now remove the trailing slash
       
   174     $img = $relativeDirText."/".$img;
       
   175     
       
   176     return ImgHtml($img, $alt, $url);
       
   177 	}
       
   178 
       
   179 sub ImgHtml()
       
   180 	{
       
   181 	my $img = shift; # image file
       
   182 	my $alt = shift; # tool tip text
       
   183 	my $url = shift; # if a url is given, turn it into a href
       
   184 	my $imgHtml = "";
       
   185 	return $imgHtml if $img eq "";
       
   186 	$imgHtml .= "<a href='$url'>" if $url;
       
   187 	$imgHtml .= "<img src='$img'";
       
   188 	$imgHtml .= " alt='$alt'" if $alt; # optional
       
   189 	$imgHtml .= " border = '0'>";
       
   190 	$imgHtml .= "</a>" if $url;
       
   191 	return $imgHtml;
       
   192 	}
       
   193 
       
   194 
       
   195 # -------------------------------------------------------
       
   196 # 	Homepage and other files:
       
   197 # -------------------------------------------------------
       
   198 my $KHtmlSourceDirectory = $FindBin::Bin."/../resources/html";
       
   199 sub HtmlSourceDirectory() { return $KHtmlSourceDirectory; }
       
   200 
       
   201 my $KHomepageFileName = "index.html";
       
   202 my $KHomepage = $KHtmlSourceDirectory."/".$KHomepageFileName;
       
   203 sub HomepageFileName() { return $KHomepageFileName; }
       
   204 sub Homepage() { return $KHomepage; }
       
   205 
       
   206 my $KSysModelHtmlName = "sysmodel.html";
       
   207 sub SysModelHtmlName() { return $KSysModelHtmlName; }
       
   208 
       
   209 my @KAuxiliaryHtmlFiles = ("metrics.html", "model_criteria.html",  "user_guide.html", "coupling.pdf");
       
   210 sub AuxiliaryHtmlFiles() { return @KAuxiliaryHtmlFiles; }
       
   211 
       
   212 my $KCssStylesheetFileName = "dep.css";
       
   213 my $KCssStylesheet = $FindBin::Bin."/../resources/html/css/".$KCssStylesheetFileName;
       
   214 sub CssStylesheetFileName() { return $KCssStylesheetFileName; }
       
   215 sub CssStylesheet() { return $KCssStylesheet; }
       
   216 
       
   217 my $KInstallerImageFileName = "DepToolkitInstaller_main.jpg";
       
   218 my $KInstallerImage = $FindBin::Bin."/../resources/html/images/DepToolkitInstaller_main.jpg";
       
   219 sub InstallerImageFileName() { return $KInstallerImage; }
       
   220 sub InstallerImage() { return $KInstallerImage; }
       
   221 
       
   222 my $KCustomisationJavaScript = "custom.js";
       
   223 sub CustomisationJavaScript() { return $KCustomisationJavaScript; }
       
   224 
       
   225 # -------------------------------------------------------
       
   226 #	Misc constants:
       
   227 # -------------------------------------------------------
       
   228 # Relationship type between two items:
       
   229 use constant KDependency						=> 1;
       
   230 use constant KDependent							=> 2;
       
   231 # Dependency type between two items:
       
   232 use constant KStaticDependency					=> 1;
       
   233 use constant KDynamicDependency					=> 2;
       
   234 use constant KManualDependency					=> 3;
       
   235 
       
   236 # -------------------------------------------------------
       
   237 # 	ERROR & WARNING CODES
       
   238 # -------------------------------------------------------
       
   239 
       
   240 use constant KErrorNone							=> 0;
       
   241 
       
   242 use constant KIncorrectSyntax					=> 1;
       
   243 use constant KFileDoesNotExist					=> 2;
       
   244 use constant KCannotOpenFile					=> 3;
       
   245 use constant KInvalidROMLog						=> 4;
       
   246 use constant KBinaryNotInROM					=> 5;
       
   247 use constant KNoBinariesInROM					=> 6;
       
   248 use constant KBinaryDoesNotExist				=> 7;
       
   249 use constant KMapFileDoesNotExist				=> 8;
       
   250 use constant KFailure							=> 9;
       
   251 
       
   252 # System_Definition.xml error codes:
       
   253 use constant KSysDefNotFound					=> 31;
       
   254 use constant KInvalidSysDefXML					=> 32;
       
   255 use constant KConfigurationNotFound				=> 33;
       
   256 
       
   257 # Graphing error codes:
       
   258 use constant KDotExeNotFound					=> 41;
       
   259 
       
   260 # HTML rendering error codes:
       
   261 #
       
   262 
       
   263 # Codes for scripts and modules (starting at 100):
       
   264 use constant KStartOfScriptCodes				=> 100;
       
   265 use constant KUnknownModule						=> 100;
       
   266 use constant KModel								=> 101;
       
   267 use constant KFileMaps							=> 102;
       
   268 use constant KDepInfo							=> 103;
       
   269 use constant KDepInfoToLinkDeps					=> 104;
       
   270 use constant KDepInfoToHtml						=> 105;
       
   271 use constant KDepsTree							=> 106;
       
   272 use constant KModelEngine						=> 107;
       
   273 use constant KDepRendererCommon					=> 108;
       
   274 use constant KDepSummariesRenderer				=> 109;
       
   275 use constant KDepDetailsRenderer				=> 110;
       
   276 use constant KGenGraphs							=> 111;
       
   277 use constant KSysDefParser						=> 112;
       
   278 use constant KSysModelDepsGenerator				=> 113;
       
   279 use constant KDepsCommon						=> 114;
       
   280 use constant KDotDigraph						=> 115;
       
   281 
       
   282 # Logging severity levels:
       
   283 use constant ERROR 								=> 1;
       
   284 use constant WARNING							=> 2;
       
   285 use constant INFO 								=> 3;
       
   286 use constant VERBOSE							=> 4;
       
   287 
       
   288 # Script or module-level error codes (starting at 200):
       
   289 use constant KUnknownModuleError				=> 200;
       
   290 use constant KModelError						=> 201;
       
   291 use constant KFileMapsError						=> 202;
       
   292 use constant KDepInfoError						=> 203;
       
   293 use constant KDepInfoToLinkDepsError			=> 204;
       
   294 use constant KDepInfoToHtmlError				=> 205;
       
   295 use constant KDepsTreeError						=> 206;
       
   296 use constant KModelEngineError					=> 207;
       
   297 use constant KDepRendererCommonError			=> 208;
       
   298 use constant KDepSummariesRendererError			=> 209;
       
   299 use constant KDepDetailsRendererError			=> 210;
       
   300 use constant KGenGraphsError					=> 211;
       
   301 use constant KSysDefParserError					=> 212;
       
   302 use constant KSysModelDepsGeneratorError		=> 213;
       
   303 use constant KDepsCommonError					=> 214;
       
   304 use constant KDotDigraphError					=> 215;
       
   305 
       
   306 # Script or module-level warning codes (starting at 300):
       
   307 use constant KUnknownModuleWarning				=> 300;
       
   308 use constant KModelWarning						=> 301;
       
   309 use constant KFileMapsWarning					=> 302;
       
   310 use constant KDepInfoWarning					=> 303;
       
   311 use constant KDepInfoToLinkDepsWarning			=> 304;
       
   312 use constant KDepInfoToHtmlWarning				=> 305;
       
   313 use constant KDepsTreeWarning					=> 306;
       
   314 use constant KModelEngineWarning				=> 307;
       
   315 use constant KDepRendererCommonWarning			=> 308;
       
   316 use constant KDepSummariesRendererWarning		=> 309;
       
   317 use constant KDepDetailsRendererWarning			=> 310;
       
   318 use constant KGenGraphsWarning					=> 311;
       
   319 use constant KSysDefParserWarning				=> 312;
       
   320 use constant KSysModelDepsGeneratorWarning		=> 313;
       
   321 use constant KDepsCommonWarning					=> 314;
       
   322 use constant KDotDigraphWarning					=> 315;
       
   323 
       
   324 # Script or module-level info codes (starting at 400):
       
   325 use constant KUnknownModuleInfo					=> 400;
       
   326 use constant KModelInfo							=> 401;
       
   327 use constant KFileMapsInfo						=> 402;
       
   328 use constant KDepInfoInfo						=> 403;
       
   329 use constant KDepInfoToLinkDepsInfo				=> 404;
       
   330 use constant KDepInfoToHtmlInfo					=> 405;
       
   331 use constant KDepsTreeInfo						=> 406;
       
   332 use constant KModelEngineInfo					=> 407;
       
   333 use constant KDepRendererCommonInfo				=> 408;
       
   334 use constant KDepSummariesRendererInfo			=> 409;
       
   335 use constant KDepDetailsRendererInfo			=> 410;
       
   336 use constant KGenGraphsInfo						=> 411;
       
   337 use constant KSysDefParserInfo					=> 412;
       
   338 use constant KSysModelDepsGeneratorInfo			=> 413;
       
   339 use constant KDepsCommonInfo					=> 414;
       
   340 use constant KDotDigraphInfo					=> 415;
       
   341 
       
   342 my @KUnknownModuleCodes       		= (KUnknownModuleError, KUnknownModuleWarning, KUnknownModuleInfo);
       
   343 my @KModelCodes       				= (KModelError, KModelWarning, KModelInfo);
       
   344 my @KFileMapsCodes 					= (KFileMapsError, KFileMapsWarning, KFileMapsInfo);
       
   345 my @KDepInfoCodes 					= (KDepInfoError, KDepInfoWarning, KDepInfoInfo);
       
   346 my @KDepInfoToHtmlCodes 		 	= (KDepInfoToHtmlError, KDepInfoToHtmlWarning, KDepInfoToHtmlInfo);
       
   347 my @KDepInfoToLinkDepsCodes 		= (KDepInfoToLinkDepsError, KDepInfoToLinkDepsWarning, KDepInfoToLinkDepsInfo);
       
   348 my @KDepsTreeCodes       			= (KDepsTreeError, KDepsTreeWarning, KDepsTreeInfo);
       
   349 my @KModelEngineCodes				= (KModelEngineError, KModelEngineWarning, KModelEngineInfo);
       
   350 my @KDepRendererCommonCodes			= (KDepRendererCommonError, KDepRendererCommonWarning, KDepRendererCommonInfo);
       
   351 my @KDepSummariesRendererCodes     	= (KDepSummariesRendererError, KDepSummariesRendererWarning, KDepSummariesRendererInfo);
       
   352 my @KDepDetailsRendererCodes       	= (KDepDetailsRendererError, KDepDetailsRendererWarning, KDepDetailsRendererInfo);
       
   353 my @KGenGraphsCodes       			= (KGenGraphsError, KGenGraphsWarning, KGenGraphsInfo);
       
   354 my @KSysDefParserCodes       		= (KSysDefParserError, KSysDefParserWarning, KSysDefParserInfo);
       
   355 my @KSysModelDepsGeneratorCodes   	= (KSysModelDepsGeneratorError, KSysModelDepsGeneratorWarning, KSysModelDepsGeneratorInfo);
       
   356 my @KDepsCommonCodes   				= (KDepsCommonError, KDepsCommonWarning, KDepsCommonInfo);
       
   357 my @KDotDigraphCodes   				= (KDotDigraphError, KDotDigraphWarning, KDotDigraphInfo);
       
   358 
       
   359 sub ModuleErrorCodes()
       
   360 	{
       
   361 	my $moduleCode = shift;
       
   362 	--(my $level = shift); # decrement as it's an index into an array
       
   363 	return 0 if $moduleCode < KStartOfScriptCodes or $level < 0 or $level > 2;
       
   364 	return $KModelCodes[$level] 				if ($moduleCode == KModel);
       
   365 	return $KFileMapsCodes[$level] 				if ($moduleCode == KFileMaps);
       
   366 	return $KDepInfoCodes[$level] 				if ($moduleCode == KDepInfo);
       
   367 	return $KDepInfoToLinkDepsCodes[$level]		if ($moduleCode == KDepInfoToLinkDeps);
       
   368 	return $KDepInfoToHtmlCodes[$level] 		if ($moduleCode == KDepInfoToHtml);
       
   369 	return $KDepsTreeCodes[$level] 				if ($moduleCode == KDepsTree);
       
   370 	return $KModelEngineCodes[$level] 			if ($moduleCode == KModelEngine);
       
   371 	return $KDepRendererCommonCodes[$level] 	if ($moduleCode == KDepRendererCommon);
       
   372 	return $KDepSummariesRendererCodes[$level] 	if ($moduleCode == KDepSummariesRenderer);
       
   373 	return $KDepDetailsRendererCodes[$level] 	if ($moduleCode == KDepDetailsRenderer);
       
   374 	return $KGenGraphsCodes[$level] 			if ($moduleCode == KGenGraphs);
       
   375 	return $KSysDefParserCodes[$level] 			if ($moduleCode == KSysDefParser);
       
   376 	return $KSysModelDepsGeneratorCodes[$level] if ($moduleCode == KSysModelDepsGenerator);
       
   377 	return $KDepsCommonCodes[$level]			if ($moduleCode == KDepsCommon);
       
   378 	return $KDotDigraphCodes[$level]			if ($moduleCode == KDotDigraph);
       
   379 	
       
   380 	return $KUnknownModuleCodes[$level];
       
   381 	}
       
   382 
       
   383 #-----------------------------------------------------------------------------
       
   384 # EPOCROOT, NM, CPPFILT, PETRAN
       
   385 #-----------------------------------------------------------------------------
       
   386 my $EPOCROOT = $ENV{EPOCROOT};
       
   387 
       
   388 # Global Variables:
       
   389 my $NM          = "nm.exe";
       
   390 my $CPPFILT     = "c++filt.exe";
       
   391 my $PETRAN      = "petran.exe";
       
   392 my $ELFTRAN     = "elftran.exe";
       
   393 
       
   394 sub EPOCROOT    { return $EPOCROOT; } 
       
   395 sub NM          { return $NM; }
       
   396 sub CPPFILT     { return $CPPFILT; }
       
   397 sub PETRAN      { return $PETRAN; }
       
   398 sub ELFTRAN     { return $ELFTRAN; }
       
   399 
       
   400 #-----------------------------------------------------------------------------
       
   401 # DOT (Graphing tool)
       
   402 #-----------------------------------------------------------------------------
       
   403 my $KDOTDirectory = $FindBin::Bin."/../resources/installed/Dot";
       
   404 my $KDOT = $KDOTDirectory."/dot.exe -q";
       
   405 sub Dot     	{ return $KDOT." -q1"; }
       
   406 
       
   407 my $KNEATO = $KDOTDirectory."/neato.exe";
       
   408 sub Neato     	{ return $KNEATO; }
       
   409 
       
   410 # -------------------------------------------------------
       
   411 # 	Auxiliary files:
       
   412 # -------------------------------------------------------
       
   413 my $KAuxiliaryDirectory = $FindBin::Bin."/resources/auxiliary";
       
   414 my $KSystemModelColorsXmlFile = $KAuxiliaryDirectory."/system_model_colors.xml";
       
   415 my $KSystemModelExtraInfoXmlFile = $KAuxiliaryDirectory."/SystemInfo.xml";
       
   416 
       
   417 sub SystemModelColorsXmlFile()
       
   418 	{
       
   419 	my $colorsFile = $KSystemModelColorsXmlFile;
       
   420 	$colorsFile = $FindBin::Bin."/../../resources/auxiliary/system_model_colors.xml" if ! -e $colorsFile;
       
   421 	return $colorsFile;
       
   422 	}
       
   423 
       
   424 sub SystemModelXmlDataDir()
       
   425 	{
       
   426 	my $file = $KAuxiliaryDirectory;
       
   427 	$file = $FindBin::Bin."/../../resources/auxiliary" if ! -e $file;
       
   428 	return $file;
       
   429 	}
       
   430 
       
   431 #-----------------------------------------------------------------------------
       
   432 # Xalan
       
   433 #-----------------------------------------------------------------------------
       
   434 my $KXalanDirectory = $FindBin::Bin."/resources/installed/Xalan";
       
   435 my $KXalan = $KXalanDirectory."/xalan.exe";
       
   436 sub Xalan()
       
   437 	{
       
   438 	my $xalan = $KXalan;
       
   439 	$xalan = $FindBin::Bin."/../../resources/installed/Xalan/xalan.exe" if ! -e $xalan;
       
   440 	return $xalan;
       
   441 	}
       
   442 
       
   443 my $KSystemoModelSVG = $FindBin::Bin."/../temp/sysmodel.svg";
       
   444 sub SystemoModelSVG { return $KSystemoModelSVG; }
       
   445 
       
   446 #-----------------------------------------------------------------------------
       
   447 # Gzip
       
   448 #-----------------------------------------------------------------------------
       
   449 sub GzipCommand
       
   450 	{ # returns empty if gzip not in path
       
   451 	foreach my $dir (split(/;/,$ENV{'PATH'}))
       
   452 		{
       
   453 		$dir.="\\gzip.exe";
       
   454 		if(-e $dir) {return "gzip -9"}
       
   455 		}
       
   456 	return "";
       
   457 	}
       
   458 
       
   459 
       
   460 #-----------------------------------------------------------------------------
       
   461 # Logging
       
   462 #-----------------------------------------------------------------------------
       
   463 my $KLogDirectory = $FindBin::Bin."/../temp";
       
   464 my $KDepToolkitLogFile = $KLogDirectory."/log.txt";
       
   465 sub LogFile { return $KDepToolkitLogFile; }
       
   466 
       
   467 1;