At 10:32 04/04/2005 +0200, you wrote:
François PERRAD wrote:

I agree with you, 'win32-inno-installer' is a better target name than 'setup'.
Do you want a new version of the patch with this name ?

Yes please.

I rename too the new script to mk_inno.pl

Francois

Thanks,
leo


diff -Nur parrot/README.win32 parrot.new/README.win32
--- parrot/README.win32 2005-01-26 12:02:48.000000000 +0100
+++ parrot.new/README.win32     2005-04-04 14:35:34.000000000 +0200
@@ -38,8 +38,7 @@
 or
 ftp://ftp.microsoft.com/Softlib/MSLFILES/nmake15.exe
 
-MinGW works with its GNU "make" port. It can be downloaded here:
-L<http://prdownloads.sf.net/mingw/mingw32-make-3.80.0-3.exe>
+MinGW works with its GNU "make" (v 3.80) port and its name is 
'mingw32-make.exe'.
 
 =item Command Shell
 
@@ -62,6 +61,18 @@
 
 With MinGW32, use icu-2.8-Win32_msvc6.zip . 
 
+=item Inno Setup
+
+Inno Setup is a I<free> installer for Windows programs.
+
+The latest release of Inno Setup at the time of writing is 5.0.8. 
+
+The HomePage is on L<http://www.jrsoftware.org/>.
+
+Add the directory to PATH.
+
+    set PATH=%PATH%;C:\Program Files\Inno Setup 5
+
 =item Borland C++
 
 XXX
@@ -80,17 +91,15 @@
 
 =item MinGW32 with GCC
 
-The latest release of MSYS package at the time of writing is 1.0.10, 
+The latest release of MinGW package at the time of writing is 3.1.0, 
 which contains gcc-3.2.3. It can be downloaded here: 
-L<http://prdownloads.sf.net/mingw/MSYS-1.0.10.exe>
+L<http://prdownloads.sf.net/mingw/MinGW-3.1.0-1.exe>
 
 The HomePage is on L<http://www.mingw.org/>.
 
-As Configure.pl extracts configuration from the perl program,
-first build/install perl with MinGW (no binary distribution available).
+With the ActiveState Perl distribution, tell Configure.pl to use gcc :
 
-See details on L<http://search.cpan.org/dist/perl/README.win32>, 
-and source on L<http://www.cpan.org/src/stable.tar.gz>.
+    perl Configure.pl --cc=gcc --icushared="C:\usr\lib\icu\lib\icudata.lib 
C:\usr\lib\icu\lib\icuuc.lib" --icuheaders="C:\usr\lib\icu\include"
 
 Nota: Use only the ICU binary distribution. 
 
@@ -112,6 +121,13 @@
 
     $MAKE install
 
+=head2 Installer
+
+    $MAKE win32-inno-installer
+    
+This command creats a setup-parrot-x.y.z.exe that contains all parrot install 
+directories and the ICU shared libraries.
+
 =head2 Usage Hints
 
     XXX
@@ -144,6 +160,6 @@
 
 This document borrows heavily from perl's README.win32.
 
-Last updated: 23 Jan 2005
+Last updated: 31 March 2005
 
 =cut
diff -Nur parrot/config/gen/icu.pl parrot.new/config/gen/icu.pl
--- parrot/config/gen/icu.pl    2004-10-11 12:09:26.000000000 +0200
+++ parrot.new/config/gen/icu.pl        2005-03-17 23:05:28.000000000 +0100
@@ -97,11 +97,14 @@
   
   if (defined($icushared) && defined($icuheaders)) {
     $icuheaders =~ s![\\/]$!!;
+    my $icudir = $icuheaders;
+    $icudir =~ s![\\/]\w+$!!;
     my $c_libs = Configure::Data->get('libs');
     $c_libs .= " $icushared";
     my $localicudatadir = "";
     $localicudatadir = $icudatadir if defined $icudatadir;
     Configure::Data->set(
+        icu_dir => $icudir,
         icu_headers => join(' ', map {"$icuheaders/unicode/$_"} @icu_headers),
         blib_lib_libsicuuc_a => '',
         blib_lib_libsicudata_a => '',
@@ -192,6 +195,7 @@
     # Set up makefile entries.
     Configure::Data->set(
       buildicu => 1,
+      icu_dir => '',
       icu_headers => 'blib\include\unicode\ucnv.h 
blib\include\unicode\utypes.h blib\include\unicode\uchar.h',
       blib_lib_libsicuuc_a => 'blib\lib\libicuuc$(A)',
       blib_lib_libsicudata_a => 'blib\lib\libicudata$(A)',
@@ -263,6 +267,7 @@
   
   Configure::Data->set(
     buildicu => 1,
+    icu_dir => '',
     icu_headers => 'blib/include/unicode/ucnv.h blib/include/unicode/utypes.h 
blib/include/unicode/uchar.h',
        blib_lib_libsicuuc_a => 'blib/lib/libicuuc$(A)',
     blib_lib_libsicudata_a => 'blib/lib/libicudata$(A)',
diff -Nur parrot/config/gen/makefiles/root.in 
parrot.new/config/gen/makefiles/root.in
--- parrot/config/gen/makefiles/root.in 2005-03-06 12:19:30.000000000 +0100
+++ parrot.new/config/gen/makefiles/root.in     2005-04-04 14:07:54.000000000 
+0200
@@ -104,6 +104,10 @@
 # ex: make LINTOPTS='-posixstrictlibs +posixlibs' lint
 LINTOPTS   =
 
+INNO_SETUP = iscc
+
+ICU_DIR = ${icu_dir}  
+
 
 ###############################################################################
 #
@@ -603,6 +607,7 @@
        @echo "Release:"
        @echo "  release:           create a TAR ball."
        @echo "  rpm:               create RPMs."
+       @echo "  win32-inno-installer:      create MSWin32 setup."
        @echo ""
        @echo "Examples:"
        @echo "  hello:             'Hello World' as an executable."
@@ -1362,6 +1367,10 @@
        sudo cp parrot.spec /usr/src/*/SPECS
        cd /usr/src/*/SPECS ${make_and} sudo rpm -ba parrot.spec
 
+win32-inno-installer : install
+       $(PERL) tools/dev/mk_inno.pl --version=$(VERSION) --prefix=$(PREFIX) 
--icudir=$(ICU_DIR)
+       $(INNO_SETUP) /Q parrot.iss
+
 ###############################################################################
 #
 # miniparrot targets:
diff -Nur parrot/tools/dev/mk_inno.pl parrot.new/tools/dev/mk_inno.pl
--- parrot/tools/dev/mk_inno.pl 1970-01-01 01:00:00.000000000 +0100
+++ parrot.new/tools/dev/mk_inno.pl     2005-04-04 14:02:44.000000000 +0200
@@ -0,0 +1,104 @@
+#! perl -w
+################################################################################
+# Copyright: 2005 The Perl Foundation.  All Rights Reserved.
+# $Id: mk_inno.pl $
+################################################################################
+
+=head1 TITLE
+
+tools/dev/mk_inno.pl - Create a script for Inno Setup
+
+=head1 SYNOPSIS
+
+    % perl tools/dev/mk_inno.pl [options]
+
+=head1 DESCRIPTION
+
+=head2 Options
+
+=over 4
+
+=item C<prefix>
+
+The install prefix.
+
+=item C<icudir>
+
+The ICU directory unless built with parrot.
+
+=item C<version>
+
+The parrot version.
+
+=back
+
+=head1 SEE ALSO
+
+http://www.jrsoftware.org/
+
+=cut
+
+################################################################################
+
+my %options = (
+               version => 'x.y.z',
+               prefix => '\usr\local\parrot',
+               icudir => 'C:\usr\lib\icu',
+); 
+
+foreach (@ARGV) {
+    if (/^--([^=]+)=(.*)/) {
+        $options{$1} = $2;
+    }
+}
+
+$options{prefix} =~ s/\//\\/g;
+$options{icudir} =~ s/\//\\/g;
+
+my $icu_section = '';
+if ($options{icudir}) {
+       $icu_section = qq{
+Source: "$options{icudir}\\license.html"; DestDir: "{app}\\icu"; Flags:
+Source: "$options{icudir}\\bin\\icu*.dll"; DestDir: "{app}\\bin"; Flags:
+};
+}
+
+open OUT, "> parrot.iss" or die "Can't open parrot.iss";
+
+print OUT qq{ 
+; generated by tools/dev/mk_setup.pl for the Inno Setup Script Compiler.
+
+[Setup]
+AppName=parrot
+AppVerName=parrot $options{version}
+AppPublisher=The Perl Foundation
+AppPublisherURL=http://www.parrotcode.org/
+AppSupportURL=http://www.parrotcode.org/
+AppUpdatesURL=http://www.parrotcode.org/
+DefaultDirName={pf}\\parrot-$options{version}
+DefaultGroupName=parrot
+AllowNoIcons=yes
+LicenseFile=$options{prefix}\\LICENSES\\Artistic
+OutputDir=.\\
+OutputBaseFilename=setup-parrot-$options{version}
+Compression=lzma
+SolidCompression=yes
+ChangesAssociations=yes
+
+[Files]
+Source: "$options{prefix}\\*"; DestDir: "{app}"; Flags: ignoreversion 
recursesubdirs
+${icu_section}
+
+[Icons]
+Name: "{group}\\{cm:UninstallProgram,parrot}"; Filename: "{uninstallexe}"
+};
+
+close OUT;

Reply via email to