; Script generated by the My Inno Setup Extensions Script Wizard. ; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES! ; My thanks to Robert Cowham <robert@vaccaperna.co.uk> for getting this installer ; started. Without him I doubt if I'd have bothered. TS 28/11/2002 [Setup] AppName=P4Perl: The Perforce API for Perl 5.8 AppVerName=P4Perl: Build 3.4582 for Perl 5.8 AppPublisher=Perforce Software <tony@perforce.com> AppPublisherURL=http://www.perforce.com AppCopyright=Copyright 2001-2004 Perforce Software WindowVisible=yes AppSupportURL=http://public.perforce.com/guest/tony_smith/perforce/API/Perl/index.html AppUpdatesURL=http://public.perforce.com/guest/tony_smith/perforce/API/Perl/index.html DefaultDirName={code:P4LibDir} DisableProgramGroupPage=yes DirExistsWarning=no DisableDirPage=yes SourceDir=. OutputDir=..\current OutputBaseFilename=p4perl58-setup [Files] Source: "blib\arch\auto\P4\P4.dll"; DestDir: "{code:P4AutoDir}"; Flags: overwritereadonly; Source: "blib\arch\auto\P4\P4.lib"; DestDir: "{code:P4AutoDir}"; Flags: overwritereadonly; Source: "blib\arch\auto\P4\P4.exp"; DestDir: "{code:P4AutoDir}"; Flags: overwritereadonly; Source: "blib\arch\auto\P4\P4.bs"; DestDir: "{code:P4AutoDir}"; Flags: overwritereadonly; Source: "blib\lib\auto\P4\autosplit.ix"; DestDir: "{code:P4AutoDir}"; Flags: overwritereadonly; Source: "blib\lib\P4.pm"; DestDir: "{code:P4LibDir}"; Flags: overwritereadonly; [Code] // This section is the Pascal script - various procedures called from above. program Setup; var SiteLibPath: String; PerlVersion: String; //--------------------------------------------------- // Called automatically at the start of initialization function InitializeSetup(): Boolean; var TempFile: String; Cmd: String; PerlBuildVer: String; Lines: TArrayOfString; i: Longint; ResultCode: Integer; begin // Version of Perl we're looking for PerlBuildVer := '5.8'; // Make sure Perl is installed and work out where to copy library Result := false; // TempFile := GenerateUniqueName(GetTempDir(), '.ini'); TempFile := 'C:\\install.txt'; // // Some fiddling to find appropriate way to get output - straight piping didn't seem to work. // We use Perl's Config.pm module to figure out where to put the files. // // Note: use qq() to do single quotes inside the Pascal quotes. It also saves us // having to escape the \'s in the file path as well as saving us from horrible // multiple quotes (e.g. '''' ) // Cmd := '"use Config; '; Cmd := Cmd + 'open( FH, qq(>' + TempFile + ')) or die( qq(Failed to write temp file));'; Cmd := Cmd + 'print( FH qq(SiteLib=), $Config{ qq(sitelib) }, qq(\n) );'; Cmd := Cmd + 'print( FH qq(Version=), $Config{ qq(version) }, qq(\n) );'; Cmd := Cmd + 'close( FH );'; Cmd := Cmd + '"'; Cmd := '-e ' + Cmd; if not InstExec('perl.exe', Cmd, GetTempDir(), True, False, SW_SHOWMINNOACTIVE, ResultCode) then begin MsgBox('Can''t find perl.exe in your path - Perl doesn''t seem to be installed.' + #13#13 'Please fix this and try again!', mbError, MB_OK); end else begin if not LoadStringsFromFile(TempFile, Lines) then begin MsgBox('Error loading strings '' from file.', mbError, MB_OK); end else begin // Extract the SiteLib path from the file for i := 0 to GetArrayLength( Lines ) - 1 do begin if ( Pos( 'SiteLib=', Lines[ i ] ) = 1 ) then begin SiteLibPath := Lines[ i ]; StringChange( SiteLibPath, 'SiteLib=', '' ); end; if ( Pos( 'Version=', Lines[ i ] ) = 1 ) then begin PerlVersion := Lines[ i ]; StringChange( PerlVersion, 'Version=', '' ); end; end; if ( Length( SiteLibPath ) > 0 ) then begin Result := true end else begin MsgBox('Unable to determine Perl sitelib directory', mbError, MB_OK); end; if ( Length( PerlVersion ) > 0) then begin if ( Pos( PerlBuildVer, PerlVersion ) <> 1 ) then begin MsgBox( 'Incorrect Perl Version. This installer is for Perl ' + PerlBuildVer + '. You appear to be running Perl ' + PerlVersion + '. If you have more than one Perl installed, check your ' + 'PATH environment variable and make sure that Perl ' + PerlBuildVer + ' is first in the PATH.', mbError, MB_OK ); Result := false; end; end; end; DeleteFile(TempFile); end; end; function P4LibDir(Default: String): String; begin Result := SiteLibPath; end; function P4AutoDir(Default: String): String; begin Result := SiteLibPath + '\\auto\\P4'; end; begin end.
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#1 | 4669 | Raymond Danks | Create a branch of P4-3.4608. | ||
//guest/tony_smith/perforce/API/Perl/P4/p4perl58.iss | |||||
#1 | 4584 | Tony Smith |
Update the Perl 5.6 and 5.8 installers for P4Perl. These are installers for P4Perl 3.4582. Since the 3.x version of P4Perl no longer requires the P4-Client module, I've moved the installer scripts down a level. I've also added some additional code in the installer to check the Perl version being used matches (roughly) the version it was built for. This helps to stop people (like me) with multiple Perl versions from accidentally breaking things. |
||
//guest/tony_smith/perforce/API/Perl/p4perl.iss | |||||
#5 | 4158 | Tony Smith |
Copyright notice updates. No functional change. |
||
#4 | 2676 | Tony Smith |
Installer script tweaks. CopyMode is deprecated |
||
#3 | 2597 | Tony Smith | P4Perl Build 2.2596 installer for ntx86 | ||
#2 | 2441 | Tony Smith | More installer tweaks for P4Ruby and P4Perl | ||
#1 | 2440 | Tony Smith | First P4Perl installer for Windows users. |