Subversion Repositories DevTools

Rev

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

Rev 1566 Rev 6481
Line 72... Line 72...
72
#
72
#
73
#   Kludgy values
73
#   Kludgy values
74
#       May need to be configured
74
#       May need to be configured
75
#       These are current IS 11.5 install locations
75
#       These are current IS 11.5 install locations
76
#
76
#
-
 
77
my @AutoBuilderOLE = ('C:\Program Files\Macrovision\IS11.5',
-
 
78
                      'C:\Program Files (X86)\Macrovision\IS11.5' );
-
 
79
 
-
 
80
 
77
my $AutoBuilder = 'C:\Program Files\Macrovision\IS 11.5 StandaloneBuild';
81
my @AutoBuilderSA = ('C:\Program Files\Macrovision\IS 11.5 StandaloneBuild',
-
 
82
                     'C:\Program Files (X86)\Macrovision\IS 11.5 StandaloneBuild');
-
 
83
my $AutoBuilder;
78
my $result_code = 0;
84
my $result_code = 0;
79
 
85
 
80
#-------------------------------------------------------------------------------
86
#-------------------------------------------------------------------------------
81
# Function        : Mainline Entry Point
87
# Function        : Mainline Entry Point
82
#
88
#
Line 193... Line 199...
193
        Warning ("MergeModule path not found: $path" ) unless ( -d $path );
199
        Warning ("MergeModule path not found: $path" ) unless ( -d $path );
194
        $path =~ s~/~\\~g;
200
        $path =~ s~/~\\~g;
195
    }
201
    }
196
}
202
}
197
 
203
 
198
 
-
 
199
#
204
#
200
#   Instantiate the Developer Automation interface
205
#   Instantiate the Developer Automation interface
201
#   Use the StandAlone interface if it can be found
206
#   Use the StandAlone interface if it can be found
202
#
207
#
203
my $dev;
208
my $dev;
204
if ( $opt_use_sa )
209
if ( $opt_use_sa )
205
{
210
{
206
    Message "Using StandAlone OLE";
211
    Message "Using StandAlone OLE";
-
 
212
    $AutoBuilder = LocateInstallShield(\@AutoBuilderSA, 'SAAuto1150.dll');
207
 
213
 
208
    #
214
    #
209
    #   Ensure the interface is registered
215
    #   Ensure the interface is registered
210
    #   This allows a simple 'copy' of the SA build environment to a build
216
    #   This allows a simple 'copy' of the SA build environment to a build
211
    #   machine.
217
    #   machine.
212
    #
218
    #
213
    my $regdll = $AutoBuilder . '\SAAuto1150.dll' ;
219
    my $regdll = $AutoBuilder . '\SAAuto1150.dll' ;
214
    Error ("Cannot find SA OLE DLL: $regdll") unless ( -f $regdll );
220
    Error ("Cannot find SA OLE DLL: $regdll") unless ( -f $regdll );
215
 
221
 
216
    my $rv = System( 'regsvr32.exe', '/s', $regdll);
222
    my $rv = System( 'regsvr32.exe', '/s', $regdll);
217
    Error ("Failed to register $regdll: $rv" ) if ( $rv  );
223
    Warning ("Failed to register $regdll: $rv" ) if ( $rv  );
218
 
224
 
219
    $dev = Win32::OLE->new("SAAuto1150.ISWiProject");
225
    $dev = Win32::OLE->new("SAAuto1150.ISWiProject");
220
 
226
 
221
} else {
227
} else {
-
 
228
 
222
    Message "Using InstallShield OLE";
229
    Message "Using InstallShield OLE";
-
 
230
    $AutoBuilder = LocateInstallShield(\@AutoBuilderOLE, 'System\isdev.exe');
223
    $dev = Win32::OLE->new("IswiAuto1150.ISWiProject");
231
    $dev = Win32::OLE->new("IswiAuto1150.ISWiProject");
224
 
232
 
225
}
233
}
226
Error( "Cannot open Automation interface") unless ( $dev );
234
Error( "Cannot open Automation interface") unless ( $dev );
227
 
235
 
Line 541... Line 549...
541
#   Return build result to the user
549
#   Return build result to the user
542
#
550
#
543
exit $result_code;
551
exit $result_code;
544
 
552
 
545
#-------------------------------------------------------------------------------
553
#-------------------------------------------------------------------------------
-
 
554
# Function        : LocateInstallShield  
-
 
555
#
-
 
556
# Description     : Locate the InstallShield installation
-
 
557
#
-
 
558
# Inputs          : $dirList        - List of potential installation locations
-
 
559
#                   $tFile          - File to locate 
-
 
560
#
-
 
561
# Returns         : First installed path
-
 
562
#                   Will not return on error
-
 
563
#
-
 
564
sub LocateInstallShield {
-
 
565
    my ($dirList, $tFile) = @_;
-
 
566
 
-
 
567
    #
-
 
568
    #   Use EnvVar if it has been provided
-
 
569
    #
-
 
570
    if (exists $ENV{GBE_INSTALLSHIELD}) {
-
 
571
        $AutoBuilder = $ENV{GBE_INSTALLSHIELD};
-
 
572
        Error ("EnvVar GBE_INSTALLSHIELD does not address valid directory") unless -d $AutoBuilder;
-
 
573
 
-
 
574
        my $tPath = join ('\\', $AutoBuilder, $tFile );
-
 
575
        Error ("EnvVar GBE_INSTALLSHIELD does not reference a suitable directory") unless -f $tPath;
-
 
576
 
-
 
577
        return $AutoBuilder; 
-
 
578
    }
-
 
579
 
-
 
580
    #
-
 
581
    #   Locate the installed program in the list of user paths
-
 
582
    #
-
 
583
    foreach my $AutoBuilder (@{$dirList})
-
 
584
    {
-
 
585
        my $tPath = join ('\\', $AutoBuilder, $tFile );
-
 
586
        if (-f $tPath) {
-
 
587
            return $AutoBuilder; 
-
 
588
        }
-
 
589
    }
-
 
590
 
-
 
591
    Error('Cannot find InstallShield. You need to install either',
-
 
592
          'InstallShieldStandAloneBuilder',
-
 
593
          'InstallShield 11.5 Pro');
-
 
594
}
-
 
595
 
-
 
596
 
-
 
597
#-------------------------------------------------------------------------------
546
# Function        : kludge_merge_module_stuff
598
# Function        : kludge_merge_module_stuff
547
#
599
#
548
# Description     : Handle BUG in the SA builder
600
# Description     : Handle BUG in the SA builder
549
#
601
#
550
#   The current version of InstallShield StandAlone Builder has a bug associated
602
#   The current version of InstallShield StandAlone Builder has a bug associated