Subversion Repositories DevTools

Rev

Rev 229 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 229 Rev 231
Line 148... Line 148...
148
Error ("TMP not found or not a directory")
148
Error ("TMP not found or not a directory")
149
    unless ( $TMP && -d $TMP );
149
    unless ( $TMP && -d $TMP );
150
$TMP = "$TMP/$$";
150
$TMP = "$TMP/$$";
151
 
151
 
152
#
152
#
-
 
153
#   Determine the path to BC2.EXE
153
#   Ensure BeyondCompare is installed in the expected(default) location
154
#   It maynot be installed inthe default place
154
#
155
#
155
Error ("Beyond Compare not found",
-
 
156
       "Looking in: $BC2" )
156
if ( ! -x $BC2 )
-
 
157
{
157
    unless ( -x $BC2 );
158
    $BC2 = GetBc2ExePath();
-
 
159
}
158
 
160
 
159
#
161
#
160
#   Ensure that the 'cleartool' program can be located
162
#   Ensure that the 'cleartool' program can be located
161
#
163
#
162
Verbose ("Locate clearcase utility in users path");
164
Verbose ("Locate clearcase utility in users path");
Line 311... Line 313...
311
        $tpath .= '/' if ( $tpath );
313
        $tpath .= '/' if ( $tpath );
312
        $tpath .= $dir;
314
        $tpath .= $dir;
313
    }
315
    }
314
}
316
}
315
 
317
 
-
 
318
#-------------------------------------------------------------------------------
-
 
319
# Function        : GetBc2ExePath
-
 
320
#
-
 
321
# Description     : Determine the path to the BeyondCompare executable
-
 
322
#                   by looking in the Windows Registry
-
 
323
#
-
 
324
# Inputs          : None
-
 
325
#
-
 
326
# Returns         : Path to an executable
-
 
327
#
-
 
328
 
-
 
329
sub GetBc2ExePath
-
 
330
{
-
 
331
    eval "require Win32::TieRegistry"
-
 
332
        or Error ("Win32::TieRegistry not available");
-
 
333
 
-
 
334
    my $userKey= Win32::TieRegistry->new("CUser")
-
 
335
        or  Error( "Can't access HKEY_CURRENT_USER key: $^E" );
-
 
336
 
-
 
337
    my $bc2Key= $userKey->Open( "Software/Scooter Software/Beyond Compare", {Delimiter=>"/"} )
-
 
338
        or  Error "Can't access BC2 Keys: $^E";
-
 
339
 
-
 
340
    my $bc2Data = $bc2Key->GetValue( 'ExePath' )
-
 
341
        or Error( "Cannot locate BeyondCompare in Windows Registry");
-
 
342
 
-
 
343
    Error ("BeyondCompare program not found", "Prog: $bc2Data") unless ( -x $bc2Data );
-
 
344
    return $bc2Data;
-
 
345
}
316
 
346
 
317
#-------------------------------------------------------------------------------
347
#-------------------------------------------------------------------------------
318
# Function        : END
348
# Function        : END
319
#
349
#
320
# Description     : This function will be called as the program exits
350
# Description     : This function will be called as the program exits
Line 376... Line 406...
376
 
406
 
377
CCbc2 - ClearCase BeyondCompare Difference
407
CCbc2 - ClearCase BeyondCompare Difference
378
 
408
 
379
=head1 SYNOPSIS
409
=head1 SYNOPSIS
380
 
410
 
381
  jats CCbc2 [options] [[old_label] new-label]
411
  jats CCbc2 [options] [old_label new_label]
382
 
412
 
383
 Options:
413
 Options:
384
    -help              - brief help message
414
    -help              - brief help message
385
    -help -help        - Detailed help message
415
    -help -help        - Detailed help message
386
    -man               - Full documentation
416
    -man               - Full documentation