; 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.6 AppVerName=P4Perl: Build 3.6001 for Perl 5.6 AppPublisher=Perforce Software <tony@perforce.com> AppPublisherURL=http://www.perforce.com AppCopyright=Copyright 2001-2007 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=p4perl56-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 Result := false; // Make sure Perl is installed and work out where to copy library // Version of Perl we're looking for PerlBuildVer := '5.6'; // Temp file where we put our output. Must escape the backslashes. TempFile := GenerateUniqueName(GetTempDir(), '.txt'); StringChange( TempFile, '\', '\\' ); // // 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 Exec('perl.exe', Cmd, GetTempDir(), 0, ewWaitUntilTerminated, 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 | |
---|---|---|---|---|---|
#18 | 6002 | Tony Smith |
P4Perl 3.6001 Windows installers for Perl 5.6 and Perl 5.8 Built with Visual Studio 2003 and 2007.2 Perforce API. |
||
#17 | 5709 | Tony Smith | Updated installers for P4Perl 3.5708 | ||
#16 | 5590 | Tony Smith |
P4Perl installers for Build 3.5564. The Perl 5.8 is now made with ActivePerl 5.8.0 build 804 to make sure it works with people using older builds. |
||
#15 | 5314 | Tony Smith | Update P4Perl installers to 3.5313 using 2005.2 API | ||
#14 | 5261 | Tony Smith | Update P4Perl Installers to build 3.5259 | ||
#13 | 5073 | Tony Smith |
Yet another P4::SetProg fix. Turns out the last change fixed everything except the build script and it all worked... unless you used the 2005.1 API which has a different format for the Version file. P4::SetProg is a no-op when P4Perl is built with an older API so not identifying the API build properly breaks it thoroughly. This change adapts P4Perl's setup script to support both pre-2005.1 and 2005.1 formats, and gives the user the chance to enter the API version manually if it can't be automatically determined. Installers also included in this change |
||
#12 | 5068 | Tony Smith | Update Windows installers to 3.5067 build. | ||
#11 | 5039 | Tony Smith | P4Perl 3.5038 Windows installers for Perl 5.6 and Perl 5.8 | ||
#10 | 5036 | Tony Smith | P4Perl 3.5035 installers for ActivePerl 5.6 and 5.8 | ||
#9 | 4864 | Tony Smith |
Bug fix: Introduce workaround for obscure 2000.1/2000.2 protocol bug that I really thought we'd seen the last of. Along the way, a total revamp of the debugging output - required to diagnose the problem. |
||
#8 | 4857 | Tony Smith | Update P4Perl installers to build 3.4856 | ||
#7 | 4805 | Tony Smith | Update P4Perl installers to build 4804 | ||
#6 | 4757 | Tony Smith |
Updated P4Ruby and P4Perl installers for changes 4753 AND 4754 respectively. |
||
#5 | 4740 | Tony Smith |
Update P4Perl installers to correctly use a tempfile in the users TMP/TEMP directory instead of the old hard-coded ugliness. P4Ruby installers will follow with a similar change |
||
#4 | 4699 | Tony Smith | Update P4Perl installers to include change 4698 | ||
#3 | 4668 | Tony Smith | Update P4Perl installers to 3.4667 build | ||
#2 | 4609 | Tony Smith | Update Windows installers for P4Perl to Build 3.4608. | ||
#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. |